移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

465 line
18 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.zcdm" label="资产编码" placeholder="资产编码" input-align="right" :border="false" :maxlength="20"/>
  14. <van-field required :rules="[{ required: true }]" v-model="form.zcmc" label="资产名称" placeholder="资产名称" input-align="right" :border="false" :maxlength="100"/>
  15. <van-field
  16. readonly
  17. clickable
  18. label="三清类型"
  19. placeholder="请选择"
  20. v-model="threeAssetType"
  21. @click="showThreeAssetType = 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="showThreeAssetType" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="threeAssetTypeOptions"
  33. @confirm="onConfirmThreeAssetType"
  34. @cancel="showThreeAssetType = false"
  35. />
  36. </van-popup>
  37. <van-field
  38. readonly
  39. clickable
  40. label="资产类型"
  41. placeholder="请选择"
  42. v-model="threeDetailType"
  43. @click="showThreeDetailType = true"
  44. input-align="right"
  45. right-icon="arrow-down"
  46. label-width="auto"
  47. required
  48. :border="false"
  49. :rules="[{ required: true }]"
  50. />
  51. <van-popup v-model="showThreeDetailType" position="bottom">
  52. <van-picker
  53. show-toolbar
  54. :columns="farmingResourceTypeOptions"
  55. @confirm="onConfirmThreeDetailType"
  56. @cancel="showThreeDetailType = false"
  57. />
  58. </van-popup>
  59. <van-field v-model="form.ydmj" label="用地面积(亩)" placeholder="用地面积(亩)" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
  60. <van-field v-model="form.jzmj" label="建筑面积(㎡)" placeholder="建筑面积(㎡)" input-align="right" type="number" :border="false" :maxlength="15"/>
  61. <van-field v-model="form.szz" label="所在组" placeholder="所在组" input-align="right" :border="false" :maxlength="100"/>
  62. <van-field
  63. readonly
  64. clickable
  65. label="权属性质"
  66. placeholder="请选择"
  67. v-model="natureOwnership"
  68. @click="showNatureOwnership = true"
  69. input-align="right"
  70. right-icon="arrow-down"
  71. label-width="auto"
  72. :border="false"
  73. />
  74. <van-popup v-model="showNatureOwnership" position="bottom">
  75. <van-picker
  76. show-toolbar
  77. :columns="natureOwnershipOptions"
  78. @confirm="onConfirmNatureOwnership"
  79. @cancel="showNatureOwnership = false"
  80. />
  81. </van-popup>
  82. <van-field
  83. readonly
  84. clickable
  85. label="权属是否存在争议"
  86. placeholder="请选择"
  87. v-model="qssfczzy"
  88. @click="showQssfczzy = true"
  89. input-align="right"
  90. right-icon="arrow-down"
  91. label-width="auto"
  92. :border="false"
  93. />
  94. <van-popup v-model="showQssfczzy" position="bottom">
  95. <van-picker
  96. show-toolbar
  97. :columns="sysYesNoOptions"
  98. @confirm="onConfirmQssfczzy"
  99. @cancel="showQssfczzy = false"
  100. />
  101. </van-popup>
  102. <van-field v-model="form.qszt" label="权属主体" placeholder="权属主体" input-align="right" :border="false" :maxlength="100"/>
  103. <van-field
  104. readonly
  105. clickable
  106. label="是否委托代管"
  107. placeholder="请选择"
  108. v-model="sfwtdg"
  109. @click="showSfwtdg = true"
  110. input-align="right"
  111. right-icon="arrow-down"
  112. label-width="auto"
  113. :border="false"
  114. />
  115. <van-popup v-model="showSfwtdg" position="bottom">
  116. <van-picker
  117. show-toolbar
  118. :columns="sysYesNoOptions"
  119. @confirm="onConfirmSfwtdg"
  120. @cancel="showSfwtdg = false"
  121. />
  122. </van-popup>
  123. <van-field v-model="form.lxdh" label="联系电话" placeholder="联系电话" input-align="right" :border="false" :maxlength="100"/>
  124. <van-field v-model="form.phfs23" label="23年盘活方式" placeholder="23年盘活方式" input-align="right" :border="false" :maxlength="150"/>
  125. <van-field v-model="form.xy23" label="23年效益(万元)" placeholder="23年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
  126. <van-field v-model="form.phfs24" label="24年盘活方式" placeholder="24年盘活方式" input-align="right" :border="false" :maxlength="150"/>
  127. <van-field v-model="form.xy24" label="24年效益(万元)" placeholder="24年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
  128. <van-field v-model="form.phqk" label="盘活情况" placeholder="盘活情况" input-align="right" :border="false" :maxlength="50"/>
  129. <van-field v-model="form.xzyy" label="资产闲置原因" placeholder="资产闲置原因" input-align="right" :border="false" :maxlength="100"/>
  130. <van-field
  131. readonly
  132. clickable
  133. label="是否能正常使用"
  134. placeholder="请选择"
  135. v-model="sfnzcsy"
  136. @click="showSfnzcsy = true"
  137. input-align="right"
  138. right-icon="arrow-down"
  139. label-width="auto"
  140. :border="false"
  141. />
  142. <van-popup v-model="showSfnzcsy" position="bottom">
  143. <van-picker
  144. show-toolbar
  145. :columns="sysYesNoOptions"
  146. @confirm="onConfirmSfnzcsy"
  147. @cancel="showSfnzcsy = false"
  148. />
  149. </van-popup>
  150. <van-field v-model="form.wshsy" label="完善后使用" placeholder="完善后使用" input-align="right" :border="false" :maxlength="100"/>
  151. <van-field v-model="form.bnsy" label="不能使用" placeholder="不能使用" input-align="right" :border="false" :maxlength="100"/>
  152. <van-field v-model="form.phcs" label="盘活措施" placeholder="盘活措施" input-align="right" :border="false" :maxlength="200"/>
  153. <van-field v-model="form.phsx" label="盘活时限" placeholder="盘活时限" input-align="right" :border="false" :maxlength="100"/>
  154. <van-field v-model="form.zctjnd" label="资产统计年度" placeholder="资产统计年度" input-align="right" :border="false" :maxlength="100"/>
  155. <van-field v-model="form.bz" label="备注" placeholder="备注" input-align="right" :border="false" :maxlength="500"/>
  156. </div>
  157. <div style="margin: 16px auto;width: 50%;">
  158. <van-button round block type="primary" native-type="submit">
  159. 保存
  160. </van-button>
  161. </div>
  162. </van-form>
  163. </div>
  164. </template>
  165. <script>
  166. import { updateThree,getThree } from "@/api/sunVillage_info/three";
  167. export default {
  168. name: "certificateList",
  169. data() {
  170. return {
  171. // 资产分类字典
  172. threeAssetTypeOptions: [],
  173. farmingResourceTypeOptions: [],
  174. threeJtzyzcTypeOptions: [],
  175. threeNysssbTypeOptions: [],
  176. threeNhTypeOptions: [],
  177. natureOwnershipOptions:[],
  178. sysYesNoOptions:[],
  179. threeAssetTypeSelect: [],
  180. threeJtzyzcTypeSelect: [],
  181. threeNysssbTypeSelect: [],
  182. threeNhTypeSelect: [],
  183. natureOwnershipSelect:[],
  184. sysYesNoSelect:[],
  185. showStartTime:false,
  186. showEndTime:false,
  187. showThreeAssetType:false,
  188. threeAssetType:'',
  189. showThreeDetailType:false,
  190. threeDetailType:'',
  191. form:{
  192. id: null,
  193. bookId: null,
  194. deptId: null,
  195. zcdm: null,
  196. zcmc: null,
  197. threeAssetType: null,
  198. threeDetailType: null,
  199. ydmj: null,
  200. jzmj: null,
  201. szz: null,
  202. natureOwnership: null,
  203. qssfczzy: null,
  204. qszt: null,
  205. sfwtdg: null,
  206. lxdh: null,
  207. phfs23: null,
  208. xy23: null,
  209. phfs24: null,
  210. xy24: null,
  211. phqk: null,
  212. xzyy: null,
  213. sfnzcsy: null,
  214. wshsy: null,
  215. bnsy: null,
  216. phcs: null,
  217. phsx: null,
  218. zctjnd: null,
  219. bz: null,
  220. theGeom: null,
  221. createBy: null,
  222. createTime: null,
  223. updateBy: null,
  224. updateTime: null
  225. },
  226. showNatureOwnership:false,
  227. natureOwnership:'',
  228. showQssfczzy:false,
  229. qssfczzy:'',
  230. showSfwtdg:false,
  231. sfwtdg:'',
  232. showSfnzcsy:false,
  233. sfnzcsy:'',
  234. showBuildTime:false,
  235. auditStatus:[],
  236. loading: false,
  237. finished: false,
  238. listLength:'0',
  239. searchInput:'',
  240. queryParams:{
  241. pageNum:1,
  242. pageSize:10,
  243. orderByColumn:'createTime',
  244. isAsc:'desc',
  245. name:'',
  246. },
  247. buildTime:new Date()
  248. };
  249. },
  250. created() {
  251. this.houseGetDicts("nature_ownership").then((response) => {
  252. this.natureOwnershipSelect = response.data;
  253. for(var i = 0 ; i < response.data.length ; i++){
  254. this.natureOwnershipOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  255. }
  256. });
  257. this.houseGetDicts("sys_yes_no").then((response) => {
  258. this.sysYesNoSelect = response.data;
  259. for(var i = 0 ; i < response.data.length ; i++){
  260. this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  261. }
  262. });
  263. this.houseGetDicts("three_asset_type").then((response) => {
  264. this.threeAssetTypeSelect = response.data;
  265. for(var i = 0 ; i < response.data.length ; i++){
  266. this.threeAssetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  267. }
  268. });
  269. this.houseGetDicts("three_jtzyzc_type").then((response) => {
  270. this.threeJtzyzcTypeSelect = response.data;
  271. for(var i = 0 ; i < response.data.length ; i++){
  272. this.threeJtzyzcTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  273. }
  274. });
  275. this.houseGetDicts("three_nysssb_type").then((response) => {
  276. this.threeNysssbTypeSelect = response.data;
  277. for(var i = 0 ; i < response.data.length ; i++){
  278. this.threeNysssbTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  279. }
  280. });
  281. this.houseGetDicts("three_nh_type").then((response) => {
  282. this.threeNhTypeSelect = response.data;
  283. for(var i = 0 ; i < response.data.length ; i++){
  284. this.threeNhTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  285. }
  286. });
  287. this.getDetail();
  288. },
  289. methods: {
  290. getDetail(){
  291. getThree(this.$route.query.id).then(response => {
  292. this.form = response.data;
  293. this.threeAssetType = this.selectDictLabel(this.threeAssetTypeSelect, response.data.threeAssetType);
  294. this.natureOwnership = this.selectDictLabel(this.natureOwnershipSelect, response.data.natureOwnership);
  295. this.qssfczzy = this.selectDictLabel(this.sysYesNoSelect, response.data.qssfczzy);
  296. this.sfwtdg = this.selectDictLabel(this.sysYesNoSelect, response.data.sfwtdg);
  297. this.sfnzcsy = this.selectDictLabel(this.sysYesNoSelect, response.data.sfnzcsy);
  298. if (response.data.threeAssetType == '1'){//集体资源资产
  299. this.threeDetailType = this.selectDictLabel(this.threeJtzyzcTypeSelect, response.data.threeDetailType);
  300. this.farmingResourceTypeOptions = this.threeJtzyzcTypeOptions;
  301. }
  302. if (response.data.threeAssetType == '2'){//农业设施设备
  303. this.threeDetailType = this.selectDictLabel(this.threeNysssbTypeSelect, response.data.threeDetailType);
  304. this.farmingResourceTypeOptions = this.threeNysssbTypeOptions;
  305. }
  306. if (response.data.threeAssetType == '3'){//农户资产
  307. this.threeDetailType = this.selectDictLabel(this.threeNhTypeSelect, response.data.threeDetailType);
  308. this.farmingResourceTypeOptions = this.threeNhTypeOptions;
  309. }
  310. });
  311. },
  312. onConfirmThreeAssetType(data){
  313. this.threeAssetType = data.text;
  314. this.form.threeAssetType = data.value;
  315. this.showThreeAssetType = false;
  316. this.threeDetailType = '';
  317. this.form.threeDetailType = '';
  318. this.farmingResourceTypeOptions = []
  319. if (data.value == '1'){//集体资源资产
  320. this.houseGetDicts("three_jtzyzc_type").then((response) => {
  321. for(var i = 0 ; i < response.data.length ; i++){
  322. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  323. }
  324. });
  325. }
  326. if (data.value == '2'){//农业设施设备
  327. this.houseGetDicts("three_nysssb_type").then((response) => {
  328. for(var i = 0 ; i < response.data.length ; i++){
  329. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  330. }
  331. });
  332. }
  333. if (data.value == '3'){//农户资产
  334. this.houseGetDicts("three_nh_type").then((response) => {
  335. for(var i = 0 ; i < response.data.length ; i++){
  336. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  337. }
  338. });
  339. }
  340. },
  341. onConfirmThreeDetailType(data){
  342. this.threeDetailType = data.text;
  343. this.form.threeDetailType = data.value;
  344. this.showThreeDetailType = false;
  345. },
  346. onConfirmQssfczzy(data){
  347. this.qssfczzy = data.text;
  348. this.form.qssfczzy = data.value;
  349. this.showQssfczzy = false;
  350. },
  351. onConfirmNatureOwnership(data){
  352. this.natureOwnership = data.text;
  353. this.form.natureOwnership = data.value;
  354. this.showNatureOwnership = false;
  355. },
  356. onConfirmSfwtdg(data){
  357. this.sfwtdg = data.text;
  358. this.form.sfwtdg = data.value;
  359. this.showSfwtdg = false;
  360. },
  361. onConfirmSfnzcsy(data){
  362. this.sfnzcsy = data.text;
  363. this.form.sfnzcsy = data.value;
  364. this.showSfnzcsy = false;
  365. },
  366. onSubmit(){
  367. updateThree(this.form).then(response => {
  368. if (response.code == 200){
  369. this.$notify({ type: 'success', message: '修改成功' });
  370. setTimeout(function(){
  371. history.back(-1);
  372. },2000)
  373. }
  374. });
  375. }
  376. },
  377. }
  378. </script>
  379. <style scoped lang="scss">
  380. /deep/ .van-button--primary{
  381. background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
  382. background-size: 100% 100%;
  383. border: none;
  384. }
  385. .home_wrapper{
  386. background: #e9e9e9;
  387. min-height: 100vh;
  388. width: 100vw;
  389. .header_main {
  390. height: 116px;
  391. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  392. background-size: 100% 100%;
  393. position: fixed;
  394. top: 0;
  395. left: 0;
  396. width: 100%;
  397. font-size: 36px;
  398. line-height: 116px;
  399. text-align: center;
  400. color: #fff;
  401. position: relative;
  402. .return_btn {
  403. width: 24px;
  404. height: 43.2px;
  405. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  406. background-size: 20px 36px;
  407. position: absolute;
  408. left: 38px;
  409. top: 36px;
  410. }
  411. .add_btn {
  412. width: 56.4px;
  413. height: 40.8px;
  414. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  415. background-size: 47px 34px;
  416. position: absolute;
  417. right: 38px;
  418. top: 36px;
  419. }
  420. }
  421. .list_main{
  422. padding:25px;
  423. background: #ffffff;
  424. width: 94%;
  425. margin: 25px auto 0;
  426. border-radius: 15PX;
  427. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  428. }
  429. .titBox{
  430. display: flex;
  431. align-items: center;
  432. }
  433. .tit{
  434. font-size: 36px;
  435. font-weight: bold;
  436. }
  437. /deep/ .van-cell{
  438. padding-left: 0!important;
  439. padding-right: 0!important;
  440. padding-bottom: 0!important;
  441. }
  442. /deep/ .van-field__label{
  443. padding-left: 10PX;
  444. width: 8.2em;
  445. }
  446. /deep/ .van-cell--required::before{
  447. left: 0;
  448. }
  449. }
  450. </style>