移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

418 linhas
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.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 { addThree } from "@/api/sunVillage_info/three";
  167. export default {
  168. name: "certificateList",
  169. data() {
  170. return {
  171. // 资产分类字典
  172. threeAssetTypeOptions: [],
  173. farmingResourceTypeOptions: [],
  174. showStartTime:false,
  175. showEndTime:false,
  176. showThreeAssetType:false,
  177. threeAssetType:'集体资源资产',
  178. showThreeDetailType:false,
  179. threeDetailType:'草坡',
  180. form:{
  181. id: null,
  182. bookId: null,
  183. deptId: null,
  184. zcdm: null,
  185. zcmc: null,
  186. threeAssetType: "1",
  187. threeDetailType: "01",
  188. ydmj: null,
  189. jzmj: null,
  190. szz: null,
  191. natureOwnership: "1",
  192. qssfczzy: "Y",
  193. qszt: null,
  194. sfwtdg: "Y",
  195. lxdh: null,
  196. phfs23: null,
  197. xy23: null,
  198. phfs24: null,
  199. xy24: null,
  200. phqk: null,
  201. xzyy: null,
  202. sfnzcsy: "Y",
  203. wshsy: null,
  204. bnsy: null,
  205. phcs: null,
  206. phsx: null,
  207. zctjnd: null,
  208. bz: null,
  209. theGeom: null,
  210. createBy: null,
  211. createTime: null,
  212. updateBy: null,
  213. updateTime: null
  214. },
  215. natureOwnershipOptions:[],
  216. showNatureOwnership:false,
  217. natureOwnership:'公有',
  218. sysYesNoOptions:[],
  219. showQssfczzy:false,
  220. qssfczzy:'是',
  221. showSfwtdg:false,
  222. sfwtdg:'是',
  223. showSfnzcsy:false,
  224. sfnzcsy:'是',
  225. showBuildTime:false,
  226. auditStatus:[],
  227. loading: false,
  228. finished: false,
  229. listLength:'0',
  230. searchInput:'',
  231. queryParams:{
  232. pageNum:1,
  233. pageSize:10,
  234. orderByColumn:'createTime',
  235. isAsc:'desc',
  236. name:'',
  237. },
  238. buildTime:new Date()
  239. };
  240. },
  241. created() {
  242. this.houseGetDicts("nature_ownership").then((response) => {
  243. for(var i = 0 ; i < response.data.length ; i++){
  244. this.natureOwnershipOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  245. }
  246. });
  247. this.houseGetDicts("sys_yes_no").then((response) => {
  248. for(var i = 0 ; i < response.data.length ; i++){
  249. this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  250. }
  251. });
  252. this.houseGetDicts("three_asset_type").then((response) => {
  253. for(var i = 0 ; i < response.data.length ; i++){
  254. this.threeAssetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  255. }
  256. });
  257. this.houseGetDicts("three_jtzyzc_type").then((response) => {
  258. for(var i = 0 ; i < response.data.length ; i++){
  259. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  260. }
  261. });
  262. },
  263. methods: {
  264. onConfirmThreeAssetType(data){
  265. this.threeAssetType = data.text;
  266. this.form.threeAssetType = data.value;
  267. this.showThreeAssetType = false;
  268. this.threeDetailType = '';
  269. this.form.threeDetailType = '';
  270. this.farmingResourceTypeOptions = []
  271. if (data.value == '1'){//集体资源资产
  272. this.houseGetDicts("three_jtzyzc_type").then((response) => {
  273. for(var i = 0 ; i < response.data.length ; i++){
  274. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  275. }
  276. });
  277. }
  278. if (data.value == '2'){//农业设施设备
  279. this.houseGetDicts("three_nysssb_type").then((response) => {
  280. for(var i = 0 ; i < response.data.length ; i++){
  281. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  282. }
  283. });
  284. }
  285. if (data.value == '3'){//农户资产
  286. this.houseGetDicts("three_nh_type").then((response) => {
  287. for(var i = 0 ; i < response.data.length ; i++){
  288. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  289. }
  290. });
  291. }
  292. },
  293. onConfirmThreeDetailType(data){
  294. this.threeDetailType = data.text;
  295. this.form.threeDetailType = data.value;
  296. this.showThreeDetailType = false;
  297. },
  298. onConfirmQssfczzy(data){
  299. this.qssfczzy = data.text;
  300. this.form.qssfczzy = data.value;
  301. this.showQssfczzy = false;
  302. },
  303. onConfirmNatureOwnership(data){
  304. this.natureOwnership = data.text;
  305. this.form.natureOwnership = data.value;
  306. this.showNatureOwnership = false;
  307. },
  308. onConfirmSfwtdg(data){
  309. this.sfwtdg = data.text;
  310. this.form.sfwtdg = data.value;
  311. this.showSfwtdg = false;
  312. },
  313. onConfirmSfnzcsy(data){
  314. this.sfnzcsy = data.text;
  315. this.form.sfnzcsy = data.value;
  316. this.showSfnzcsy = false;
  317. },
  318. onSubmit(){
  319. addThree(this.form).then(response => {
  320. if (response.code == 200){
  321. this.$notify({ type: 'success', message: '新增成功' });
  322. setTimeout(function(){
  323. history.back(-1);
  324. },2000)
  325. }
  326. });
  327. }
  328. },
  329. }
  330. </script>
  331. <style scoped lang="scss">
  332. /deep/ .van-button--primary{
  333. background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
  334. background-size: 100% 100%;
  335. border: none;
  336. }
  337. .home_wrapper{
  338. background: #e9e9e9;
  339. min-height: 100vh;
  340. width: 100vw;
  341. .header_main {
  342. height: 116px;
  343. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  344. background-size: 100% 100%;
  345. position: fixed;
  346. top: 0;
  347. left: 0;
  348. width: 100%;
  349. font-size: 36px;
  350. line-height: 116px;
  351. text-align: center;
  352. color: #fff;
  353. position: relative;
  354. .return_btn {
  355. width: 24px;
  356. height: 43.2px;
  357. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  358. background-size: 20px 36px;
  359. position: absolute;
  360. left: 38px;
  361. top: 36px;
  362. }
  363. .add_btn {
  364. width: 56.4px;
  365. height: 40.8px;
  366. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  367. background-size: 47px 34px;
  368. position: absolute;
  369. right: 38px;
  370. top: 36px;
  371. }
  372. }
  373. .list_main{
  374. padding:25px;
  375. background: #ffffff;
  376. width: 94%;
  377. margin: 25px auto 0;
  378. border-radius: 15PX;
  379. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  380. }
  381. .titBox{
  382. display: flex;
  383. align-items: center;
  384. }
  385. .tit{
  386. font-size: 36px;
  387. font-weight: bold;
  388. }
  389. /deep/ .van-cell{
  390. padding-left: 0!important;
  391. padding-right: 0!important;
  392. padding-bottom: 0!important;
  393. }
  394. /deep/ .van-field__label{
  395. padding-left: 10PX;
  396. width: 8.2em;
  397. }
  398. /deep/ .van-cell--required::before{
  399. left: 0;
  400. }
  401. }
  402. </style>