移动端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

398 řádky
15 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 产业信息详情
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <van-form @submit="onSubmit">
  8. <div class="list_main">
  9. <div class="titBox">
  10. <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
  11. <p class="tit">基本信息</p>
  12. </div>
  13. <van-field required :rules="[{ required: true }]" v-model="form.industryCode" label="产业编码" placeholder="产业编码" input-align="right" :border="false" :maxlength="20"/>
  14. <van-field required :rules="[{ required: true }]" v-model="form.industryName" label="产业名称" placeholder="产业名称" input-align="right" :border="false" :maxlength="100"/>
  15. <van-field
  16. readonly
  17. clickable
  18. label="产业权属"
  19. placeholder="请选择"
  20. v-model="industryRights"
  21. @click="showIndustryRights = true"
  22. input-align="right"
  23. right-icon="arrow-down"
  24. label-width="auto"
  25. required
  26. :border="false"
  27. :rules="[{ required: true }]"
  28. />
  29. <van-popup v-model="showIndustryRights" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="industryRightsOptions"
  33. @confirm="onConfirmIndustryRights"
  34. @cancel="showIndustryRights = false"
  35. />
  36. </van-popup>
  37. <van-field v-model="form.industryRightsOther" label="其他权属" placeholder="其他权属" input-align="right" :border="false" :maxlength="100"/>
  38. <van-field
  39. readonly
  40. clickable
  41. label="产业类型"
  42. placeholder="请选择"
  43. v-model="industryType"
  44. @click="showIndustryType = true"
  45. input-align="right"
  46. right-icon="arrow-down"
  47. label-width="auto"
  48. required
  49. :border="false"
  50. :rules="[{ required: true }]"
  51. />
  52. <van-popup v-model="showIndustryType" position="bottom">
  53. <van-picker
  54. show-toolbar
  55. :columns="industryTypeOptions"
  56. @confirm="onConfirmIndustryType"
  57. @cancel="showIndustryType = false"
  58. />
  59. </van-popup>
  60. <van-field v-model="form.industryTypeOther" label="其他产业" placeholder="其他产业" input-align="right" :border="false" :maxlength="100"/>
  61. <van-field v-model="form.productName" label="主要产品" placeholder="主要产品" required :rules="[{ required: true }]" input-align="right" :border="false" :maxlength="100"/>
  62. <van-field
  63. readonly
  64. clickable
  65. label="占用土地"
  66. placeholder="请选择"
  67. v-model="occupyLand"
  68. @click="showOccupyLand = true"
  69. input-align="right"
  70. right-icon="arrow-down"
  71. label-width="auto"
  72. :border="false"
  73. required
  74. :rules="[{ required: true }]"
  75. />
  76. <van-popup v-model="showOccupyLand" position="bottom">
  77. <van-picker
  78. show-toolbar
  79. :columns="sysYesNoOptions"
  80. @confirm="onConfirmOccupyLand"
  81. @cancel="showOccupyLand = false"
  82. />
  83. </van-popup>
  84. <van-field v-model="form.occupyLandArea" label="占地面积" placeholder="占地面积" type="number" input-align="right" :border="false" :maxlength="15"/>
  85. <van-field
  86. readonly
  87. clickable
  88. label="占用类型"
  89. placeholder="请选择"
  90. v-model="occupyLandType"
  91. @click="showOccupyLandType = true"
  92. input-align="right"
  93. right-icon="arrow-down"
  94. label-width="auto"
  95. :border="false"
  96. />
  97. <van-popup v-model="showOccupyLandType" position="bottom">
  98. <van-picker
  99. show-toolbar
  100. :columns="occupyLandTypeOptions"
  101. @confirm="onConfirmOccupyLandType"
  102. @cancel="showOccupyLandType = false"
  103. />
  104. </van-popup>
  105. <van-field v-model="form.occupyLandTypeOther" label="其他占用" placeholder="其他占用" input-align="right" :border="false" :maxlength="100"/>
  106. <van-field
  107. readonly
  108. clickable
  109. label="土地来源"
  110. placeholder="请选择"
  111. v-model="landSource"
  112. @click="showLandSource = true"
  113. input-align="right"
  114. right-icon="arrow-down"
  115. label-width="auto"
  116. :border="false"
  117. />
  118. <van-popup v-model="showLandSource" position="bottom">
  119. <van-picker
  120. show-toolbar
  121. :columns="landSourceOptions"
  122. @confirm="onConfirmLandSource"
  123. @cancel="showLandSource = false"
  124. />
  125. </van-popup>
  126. <van-field v-model="form.landSourceOther" label="其他来源" placeholder="其他来源" input-align="right" :border="false" :maxlength="100"/>
  127. <van-field v-model="form.investmentAmount" label="产业投资金额" placeholder="产业投资金额" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
  128. <van-field v-model="form.industryValuation" label="产业估值" placeholder="产业估值" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
  129. <van-field v-model="form.yearSaleAmount" label="年销售额" placeholder="年销售额" type="number" input-align="right" :border="false" :maxlength="15"/>
  130. <van-field v-model="form.yearProfitAmount" label="年利润" placeholder="年利润" type="number" input-align="right" :border="false" :maxlength="15"/>
  131. <van-field
  132. readonly
  133. clickable
  134. label="有贷款需求"
  135. placeholder="请选择"
  136. v-model="isLoan"
  137. @click="showIsLoan = true"
  138. input-align="right"
  139. right-icon="arrow-down"
  140. label-width="auto"
  141. :border="false"
  142. />
  143. <van-popup v-model="showIsLoan" position="bottom">
  144. <van-picker
  145. show-toolbar
  146. :columns="sysYesNoOptions"
  147. @confirm="onConfirmIsLoan"
  148. @cancel="showIsLoan = false"
  149. />
  150. </van-popup>
  151. <van-field v-model="form.loanAmount" label="计划贷款金额" placeholder="计划贷款金额" type="number" input-align="right" :border="false" :maxlength="15"/>
  152. <van-field v-model="form.industryBz" label="备注" placeholder="备注" input-align="right" :border="false" :maxlength="500"/>
  153. </div>
  154. </van-form>
  155. </div>
  156. </template>
  157. <script>
  158. import {getIndustry,updateIndustry} from "@/api/sunVillage_info/industry";
  159. export default {
  160. name: "certificateList",
  161. data() {
  162. return {
  163. // 资产分类字典
  164. industryRightsOptions: [],
  165. industryTypeOptions: [],
  166. industryRightsSelect: [],
  167. industryTypeSelect: [],
  168. showIndustryRights:false,
  169. industryRights:'村集体产业',
  170. showIndustryType:false,
  171. industryType:'种植业',
  172. form:{
  173. id: null,
  174. bookId: null,
  175. deptId: null,
  176. industryCode: null,
  177. industryName: null,
  178. industryRights: "1",
  179. industryRightsOther: null,
  180. industryType: "1",
  181. industryTypeOther: null,
  182. productName: null,
  183. occupyLand: "Y",
  184. occupyLandArea: null,
  185. occupyLandType: "1",
  186. occupyLandTypeOther: null,
  187. landSource: "1",
  188. landSourceOther: null,
  189. investmentAmount: null,
  190. industryValuation: null,
  191. yearSaleAmount: null,
  192. yearProfitAmount: null,
  193. isLoan: "Y",
  194. loanAmount: null,
  195. industryBz: null,
  196. theGeom: null,
  197. createBy: null,
  198. createTime: null,
  199. updateBy: null,
  200. updateTime: null
  201. },
  202. showOccupyLand:false,
  203. occupyLand:'是',
  204. sysYesNoOptions:[],
  205. sysYesNoSelect:[],
  206. showOccupyLandType:false,
  207. occupyLandTypeOptions:[],
  208. occupyLandTypeSelect:[],
  209. occupyLandType:'耕地',
  210. showLandSource:false,
  211. landSourceOptions:[],
  212. landSourceSelect:[],
  213. landSource:'集体',
  214. landSourceTypeOptions:[],
  215. landSourceTypeSelect:[],
  216. showIsLoan:false,
  217. isLoan:'是',
  218. loading: false,
  219. finished: false,
  220. listLength:'0',
  221. searchInput:'',
  222. queryParams:{
  223. pageNum:1,
  224. pageSize:10,
  225. orderByColumn:'createTime',
  226. isAsc:'desc',
  227. industryName:'',
  228. },
  229. buildTime:new Date()
  230. };
  231. },
  232. created() {
  233. this.houseGetDicts("sys_yes_no").then((response) => {
  234. this.sysYesNoSelect = response.data;
  235. for(var i = 0 ; i < response.data.length ; i++){
  236. this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  237. }
  238. });
  239. this.houseGetDicts("industry_rights_type").then((response) => {
  240. this.industryRightsSelect = response.data;
  241. for(var i = 0 ; i < response.data.length ; i++){
  242. this.industryRightsOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  243. }
  244. });
  245. this.houseGetDicts("occupy_land_type").then((response) => {
  246. this.occupyLandTypeSelect = response.data;
  247. for(var i = 0 ; i < response.data.length ; i++){
  248. this.occupyLandTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  249. }
  250. });
  251. this.houseGetDicts("land_source").then((response) => {
  252. this.landSourceSelect = response.data;
  253. for(var i = 0 ; i < response.data.length ; i++){
  254. this.landSourceOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  255. }
  256. });
  257. this.houseGetDicts("purpose_type").then((response) => {
  258. this.industryTypeSelect = response.data;
  259. for(var i = 0 ; i < response.data.length ; i++){
  260. this.industryTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  261. }
  262. });
  263. this.getDetail();
  264. },
  265. methods: {
  266. getDetail(){
  267. getIndustry(this.$route.query.id).then(response => {
  268. this.form = response.data;
  269. this.industryRights = this.selectDictLabel(this.industryRightsSelect, response.data.industryRights);
  270. this.industryType = this.selectDictLabel(this.industryTypeSelect, response.data.industryType);
  271. this.occupyLand = this.selectDictLabel(this.sysYesNoSelect, response.data.occupyLand);
  272. this.occupyLandType = this.selectDictLabel(this.occupyLandTypeSelect, response.data.occupyLandType);
  273. this.landSource = this.selectDictLabel(this.landSourceSelect, response.data.landSource);
  274. this.isLoan = this.selectDictLabel(this.sysYesNoSelect, response.data.isLoan);
  275. });
  276. },
  277. onConfirmIndustryRights(data){
  278. this.industryRights = data.text;
  279. this.form.industryRights = data.value;
  280. this.showIndustryRights = false;
  281. },
  282. onConfirmIndustryType(data){
  283. this.industryType = data.text;
  284. this.form.industryType = data.value;
  285. this.showIndustryType = false;
  286. },
  287. onConfirmOccupyLandType(data){
  288. this.occupyLandType = data.text;
  289. this.form.occupyLandType = data.value;
  290. this.showOccupyLandType = false;
  291. },
  292. onConfirmOccupyLand(data){
  293. this.occupyLand = data.text;
  294. this.form.occupyLand = data.value;
  295. this.showOccupyLand = false;
  296. },
  297. onConfirmLandSource(data){
  298. this.landSource = data.text;
  299. this.form.landSource = data.value;
  300. this.showLandSource = false;
  301. },
  302. onConfirmIsLoan(data){
  303. this.isLoan = data.text;
  304. this.form.isLoan = data.value;
  305. this.showIsLoan = false;
  306. },
  307. onSubmit(){
  308. updateIndustry(this.form).then(response => {
  309. if (response.code == 200){
  310. this.$notify({ type: 'success', message: '新增成功' });
  311. setTimeout(function(){
  312. history.back(-1);
  313. },2000)
  314. }
  315. });
  316. }
  317. },
  318. }
  319. </script>
  320. <style scoped lang="scss">
  321. /deep/ .van-button--primary{
  322. background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
  323. background-size: 100% 100%;
  324. border: none;
  325. }
  326. .home_wrapper{
  327. background: #e9e9e9;
  328. min-height: 100vh;
  329. width: 100vw;
  330. .header_main {
  331. height: 116px;
  332. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  333. background-size: 100% 100%;
  334. position: fixed;
  335. top: 0;
  336. left: 0;
  337. width: 100%;
  338. font-size: 36px;
  339. line-height: 116px;
  340. text-align: center;
  341. color: #fff;
  342. position: relative;
  343. .return_btn {
  344. width: 24px;
  345. height: 43.2px;
  346. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  347. background-size: 20px 36px;
  348. position: absolute;
  349. left: 38px;
  350. top: 36px;
  351. }
  352. .add_btn {
  353. width: 56.4px;
  354. height: 40.8px;
  355. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  356. background-size: 47px 34px;
  357. position: absolute;
  358. right: 38px;
  359. top: 36px;
  360. }
  361. }
  362. .list_main{
  363. padding:25px;
  364. background: #ffffff;
  365. width: 94%;
  366. margin: 25px auto 0;
  367. border-radius: 15PX;
  368. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  369. }
  370. .titBox{
  371. display: flex;
  372. align-items: center;
  373. }
  374. .tit{
  375. font-size: 36px;
  376. font-weight: bold;
  377. }
  378. /deep/ .van-cell{
  379. padding-left: 0!important;
  380. padding-right: 0!important;
  381. padding-bottom: 0!important;
  382. }
  383. /deep/ .van-field__label{
  384. padding-left: 10PX;
  385. width: 8.2em;
  386. }
  387. /deep/ .van-cell--required::before{
  388. left: 0;
  389. }
  390. }
  391. </style>