移动端
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

525 satır
19 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 v-model="form.code" label="资源编码" placeholder="不输入时系统自动分配" input-align="right" :border="false" />
  14. <van-field required :rules="[{ required: true }]" v-model="form.name" label="资源名称" placeholder="资源名称" input-align="right" :border="false" />
  15. <van-field
  16. readonly
  17. clickable
  18. label="资源分类"
  19. placeholder="请选择"
  20. v-model="resourceType"
  21. @click="showResourceType = 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="showResourceType" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="resourceTypeOptions"
  33. @confirm="onConfirmResourceType"
  34. @cancel="showResourceType = false"
  35. />
  36. </van-popup>
  37. <van-field
  38. readonly
  39. clickable
  40. label="资源类型"
  41. placeholder="请选择"
  42. v-model="resourceSort"
  43. @click="showResourceSort = 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="showResourceSort" position="bottom">
  52. <van-picker
  53. show-toolbar
  54. :columns="farmingResourceTypeOptions"
  55. @confirm="onConfirmResourceSort"
  56. @cancel="showResourceSort = false"
  57. />
  58. </van-popup>
  59. <van-field v-model="form.location" label="坐落位置" placeholder="坐落位置" input-align="right" :border="false" />
  60. <van-field v-model="form.east" label="东至" placeholder="东至" input-align="right" :border="false" />
  61. <van-field v-model="form.west" label="西至" placeholder="西至" input-align="right" :border="false" />
  62. <van-field v-model="form.south" label="南至" placeholder="南至" input-align="right" :border="false" />
  63. <van-field v-model="form.north" label="北至" placeholder="北至" input-align="right" :border="false" />
  64. <van-field v-model="form.totalArea" label="总面积(亩)" placeholder="总面积(亩)" required :rules="[{ required: true }]" input-align="right" :border="false" />
  65. <field-select
  66. v-model="form.operationType"
  67. label="经营属性"
  68. value-key="dictLabel"
  69. data-key="dictValue"
  70. placeholder="请选择"
  71. :rulesx="[{ required: true }]"
  72. requiredx
  73. remote-url="/open/zdzh/list/operation_type"
  74. :on-remote-response="'data'"/>
  75. <van-field
  76. readonly
  77. clickable
  78. label="使用情况"
  79. placeholder="请选择"
  80. v-model="useType"
  81. @click="showUseType = true"
  82. input-align="right"
  83. right-icon="arrow-down"
  84. label-width="auto"
  85. required
  86. :border="false"
  87. :rules="[{ required: true }]"
  88. />
  89. <van-popup v-model="showUseType" position="bottom">
  90. <van-picker
  91. show-toolbar
  92. :columns="useTypeOptions"
  93. @confirm="onConfirmUseType"
  94. @cancel="showUseType = false"
  95. />
  96. </van-popup>
  97. <van-field
  98. readonly
  99. clickable
  100. label="资产状态"
  101. placeholder="请选择"
  102. v-model="assetStatus"
  103. @click="showAssetStatus = true"
  104. input-align="right"
  105. right-icon="arrow-down"
  106. label-width="auto"
  107. required
  108. :border="false"
  109. :rules="[{ required: true }]"
  110. />
  111. <van-popup v-model="showAssetStatus" position="bottom">
  112. <van-picker
  113. show-toolbar
  114. :columns="assetStatusOptions"
  115. @confirm="onConfirmAssetStatus"
  116. @cancel="showAssetStatus = false"
  117. />
  118. </van-popup>
  119. <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" />
  120. </div>
  121. <!-- <div class="list_main">-->
  122. <!-- <div class="titBox">-->
  123. <!-- <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>-->
  124. <!-- <p class="tit">未承包到户</p>-->
  125. <!-- </div>-->
  126. <!-- <van-field v-model="form.sumArea" label="总面积(亩)" placeholder="总面积(亩)" input-align="right" :border="false" />-->
  127. <!-- <van-divider>集体经营</van-divider>-->
  128. <!-- <van-field v-model="form.groupArea" label="面积(亩)" placeholder="面积(亩)" input-align="right" :border="false" />-->
  129. <!-- <van-field v-model="form.groupValue" label="年收益(元)" placeholder="年收益(元)" input-align="right" :border="false" />-->
  130. <!-- <van-divider>出租经营</van-divider>-->
  131. <!-- <van-field v-model="form.rentArea" label="面积(亩)" placeholder="面积(亩)" input-align="right" :border="false" />-->
  132. <!-- <van-field v-model="form.rentValue" label="年租金(元)" placeholder="年租金(元)" input-align="right" :border="false" />-->
  133. <!-- <van-field v-model="form.rentLessee" label="承租人" placeholder="承租人" input-align="right" :border="false" />-->
  134. <!-- <van-field-->
  135. <!-- autocomplete="off"-->
  136. <!-- input-align="right"-->
  137. <!-- v-model="form.rentStartTime"-->
  138. <!-- name="开始时间"-->
  139. <!-- label="开始时间"-->
  140. <!-- placeholder="开始时间"-->
  141. <!-- readonly-->
  142. <!-- @click="showStartTime = true"-->
  143. <!-- :border="false"-->
  144. <!-- />-->
  145. <!-- <van-popup v-model:show="showStartTime" position="bottom">-->
  146. <!-- <van-datetime-picker-->
  147. <!-- type="date"-->
  148. <!-- v-model="buildTime"-->
  149. <!-- @confirm="onConfirStartTime"-->
  150. <!-- @cancel="showStartTime = false"-->
  151. <!-- :min-date="minDate"-->
  152. <!-- />-->
  153. <!-- </van-popup>-->
  154. <!-- <van-field-->
  155. <!-- autocomplete="off"-->
  156. <!-- input-align="right"-->
  157. <!-- v-model="form.rentEndTime"-->
  158. <!-- name="到期时间"-->
  159. <!-- label="到期时间"-->
  160. <!-- placeholder="到期时间"-->
  161. <!-- readonly-->
  162. <!-- @click="showEndTime = true"-->
  163. <!-- :border="false"-->
  164. <!-- />-->
  165. <!-- <van-popup v-model:show="showEndTime" position="bottom">-->
  166. <!-- <van-datetime-picker-->
  167. <!-- type="date"-->
  168. <!-- v-model="buildTime"-->
  169. <!-- @confirm="onConfirEndTime"-->
  170. <!-- @cancel="showEndTime = false"-->
  171. <!-- :min-date="minDate"-->
  172. <!-- />-->
  173. <!-- </van-popup>-->
  174. <!--&lt;!&ndash; <van-field v-model="form.rentStartTime" label="开始时间" placeholder="开始时间" input-align="right" :border="false" />&ndash;&gt;-->
  175. <!--&lt;!&ndash; <van-field v-model="form.rentEndTime" label="到期时间" placeholder="到期时间" input-align="right" :border="false" />&ndash;&gt;-->
  176. <!-- <van-divider>其他经营</van-divider>-->
  177. <!-- <van-field v-model="form.otherArea" label="面积(亩)" placeholder="面积(亩)" input-align="right" :border="false" />-->
  178. <!-- <van-field v-model="form.otherValue" label="年收益(元)" placeholder="年收益(元)" input-align="right" :border="false" />-->
  179. <!-- </div>-->
  180. <!-- <div class="list_main">-->
  181. <!-- <div class="titBox">-->
  182. <!-- <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>-->
  183. <!-- <p class="tit">已承包到户</p>-->
  184. <!-- </div>-->
  185. <!-- <van-field v-model="form.farmerArea" label="总面积(亩)" placeholder="总面积(亩)" input-align="right" :border="false" />-->
  186. <!-- <van-divider>流转入集体统一经营</van-divider>-->
  187. <!-- <van-field v-model="form.circulationArea" label="面积(亩)" placeholder="面积(亩)" input-align="right" :border="false" />-->
  188. <!-- <van-field v-model="form.circulationValue" label="年收益(元)" placeholder="年收益(元)" input-align="right" :border="false" />-->
  189. <!-- </div>-->
  190. <div style="margin: 16px auto;width: 50%;">
  191. <van-button round block type="primary" native-type="submit">
  192. 保存
  193. </van-button>
  194. </div>
  195. </van-form>
  196. </div>
  197. </template>
  198. <script>
  199. import { addResource } from "@/api/sunVillage_info/fixedAssets";
  200. import FieldSelect from "@/components/form/FieldSelect.vue";
  201. export default {
  202. name: "certificateList",
  203. components: {FieldSelect},
  204. data() {
  205. return {
  206. // 资源分类字典
  207. resourceTypeOptions: [],
  208. //农用地资源类型字典
  209. farmingResourceTypeOptions: [],
  210. //建设用地资源类型字典
  211. buildResourceTypeOptions: [],
  212. //未利用地、林木用地资源类型字典
  213. unusedResourceTypeOptions: [],
  214. showStartTime:false,
  215. showEndTime:false,
  216. showResourceType:false,
  217. resourceType:'',
  218. showResourceSort:false,
  219. resourceSort:'',
  220. minDate:new Date(1900,1,1),
  221. applicationList:[],
  222. applicationListSecond:[],
  223. form:{
  224. assetType:'151001',
  225. operationType:'1',
  226. addType:'1',
  227. buildTime:this.format(new Date(),'yyyy-MM-dd'),
  228. useType:'1',
  229. assetStatus:'1',
  230. isMin:'Y',
  231. isFormAsset:'N',
  232. quantity:1.00,
  233. depreciationSubject:"152:累计折旧",
  234. fixedSubject:"153:固定资产清理",
  235. depreciationFeeSubject:"541005:管理费用-折旧及修理费",
  236. depreciationType:'3',
  237. expectedYears:1,
  238. depreciationYears:0,
  239. netValue:0.00,
  240. originalValue:0.00,
  241. residualsRate:1,
  242. netSalvage:0.00,
  243. fixedValue:null,
  244. perYearDepreciationValue:null,
  245. depreciationValue:0
  246. },
  247. //资产类别
  248. assetType:'房屋及建筑物',
  249. showAssetType:false,
  250. resourceSortOptions:[],
  251. //经营属性
  252. showOperationType:false,
  253. operationTypeOptions:[],
  254. //增加方式
  255. addTypeOptions:[],
  256. showAddType:false,
  257. addType:'购入',
  258. //使用情况
  259. useTypeOptions:[],
  260. showUseType:false,
  261. useType:'自用',
  262. //资产状态
  263. assetStatusOptions:[],
  264. showAssetStatus:false,
  265. assetStatus:'正常',
  266. //资产状态
  267. depreciationTypeOptions:[],
  268. showDepreciationType:false,
  269. depreciationType:'不折旧',
  270. showBuildTime:false,
  271. auditStatus:[],
  272. loading: false,
  273. finished: false,
  274. listLength:'0',
  275. searchInput:'',
  276. queryParams:{
  277. pageNum:1,
  278. pageSize:10,
  279. orderByColumn:'createTime',
  280. isAsc:'desc',
  281. name:'',
  282. },
  283. buildTime:new Date()
  284. };
  285. },
  286. created() {
  287. this.houseGetDicts("resource_sort").then((response) => {
  288. for(var i = 0 ; i < response.data.length ; i++){
  289. this.resourceSortOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  290. }
  291. });
  292. this.houseGetDicts("operation_type").then((response) => {
  293. for(var i = 0 ; i < response.data.length ; i++){
  294. this.operationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  295. }
  296. });
  297. this.houseGetDicts("add_type").then((response) => {
  298. for(var i = 0 ; i < response.data.length ; i++){
  299. this.addTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  300. }
  301. });
  302. this.houseGetDicts("use_type").then((response) => {
  303. for(var i = 0 ; i < response.data.length ; i++){
  304. this.useTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  305. }
  306. });
  307. this.houseGetDicts("sys_normal_disable").then((response) => {
  308. for(var i = 0 ; i < response.data.length ; i++){
  309. this.assetStatusOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  310. }
  311. });
  312. this.houseGetDicts("depreciation_type").then((response) => {
  313. for(var i = 0 ; i < response.data.length ; i++){
  314. this.depreciationTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  315. }
  316. });
  317. // this.houseGetDicts("resource_farming_type").then((response) => {
  318. // for(var i = 0 ; i < response.data.length ; i++){
  319. // this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  320. // }
  321. // });
  322. // this.houseGetDicts("resources_build_type").then((response) => {
  323. // for(var i = 0 ; i < response.data.length ; i++){
  324. // this.buildResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  325. // }
  326. // });
  327. // this.houseGetDicts("resources_unused_type").then((response) => {
  328. // for(var i = 0 ; i < response.data.length ; i++){
  329. // this.unusedResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  330. // }
  331. // });
  332. this.houseGetDicts("resource_type").then((response) => {
  333. for(var i = 0 ; i < response.data.length ; i++){
  334. this.resourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  335. }
  336. });
  337. },
  338. methods: {
  339. onConfirStartTime(val){
  340. let year = val.getFullYear()
  341. let month = val.getMonth() + 1
  342. let day = val.getDate()
  343. if (month >= 1 && month <= 9) { month = `0${month}` }
  344. if (day >= 1 && day <= 9) { day = `0${day}` }
  345. this.form.rentStartTime = year+"-"+month+"-"+day
  346. this.showStartTime= false
  347. },
  348. onConfirEndTime(val){
  349. let year = val.getFullYear()
  350. let month = val.getMonth() + 1
  351. let day = val.getDate()
  352. if (month >= 1 && month <= 9) { month = `0${month}` }
  353. if (day >= 1 && day <= 9) { day = `0${day}` }
  354. this.form.rentEndTime = year+"-"+month+"-"+day
  355. this.showEndTime= false
  356. },
  357. onConfirmResourceType(data){
  358. this.resourceType = data.text;
  359. this.form.resourceType = data.value;
  360. this.showResourceType = false;
  361. this.farmingResourceTypeOptions = [];
  362. this.resourceSort = '';
  363. this.form.resourceSort = '';
  364. if (data.value == '1'){//农用地
  365. this.houseGetDicts("resource_farming_type").then((response) => {
  366. for(var i = 0 ; i < response.data.length ; i++){
  367. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  368. }
  369. });
  370. }
  371. if (data.value == '2'){//建设用地
  372. this.houseGetDicts("resources_build_type").then((response) => {
  373. for(var i = 0 ; i < response.data.length ; i++){
  374. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  375. }
  376. });
  377. }
  378. if (data.value == '3'){//未利用地
  379. this.houseGetDicts("resources_unused_type").then((response) => {
  380. for(var i = 0 ; i < response.data.length ; i++){
  381. this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  382. }
  383. });
  384. }
  385. },
  386. onConfirmResourceSort(data){
  387. this.resourceSort = data.text;
  388. this.form.resourceSort = data.value;
  389. this.showResourceSort = false;
  390. },
  391. onConfirmUseType(data){
  392. this.useType = data.text;
  393. this.form.useType = data.value;
  394. this.showUseType = false;
  395. },
  396. onConfirmAssetStatus(data){
  397. this.assetStatus = data.text;
  398. this.form.status = data.value;
  399. this.showAssetStatus = false;
  400. },
  401. onSubmit(){
  402. addResource(this.form).then(response => {
  403. if (response.code == 200){
  404. this.$notify({ type: 'success', message: '新增成功' });
  405. setTimeout(function(){
  406. history.back(-1);
  407. },2000)
  408. }
  409. });
  410. }
  411. },
  412. }
  413. </script>
  414. <style scoped lang="scss">
  415. /deep/ .van-button--primary{
  416. background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
  417. background-size: 100% 100%;
  418. border: none;
  419. }
  420. .home_wrapper{
  421. background: #e9e9e9;
  422. min-height: 100vh;
  423. width: 100vw;
  424. .header_main {
  425. height: 116px;
  426. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  427. background-size: 100% 100%;
  428. position: fixed;
  429. top: 0;
  430. left: 0;
  431. width: 100%;
  432. font-size: 36px;
  433. line-height: 116px;
  434. text-align: center;
  435. color: #fff;
  436. position: relative;
  437. .return_btn {
  438. width: 24px;
  439. height: 43.2px;
  440. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  441. background-size: 20px 36px;
  442. position: absolute;
  443. left: 38px;
  444. top: 36px;
  445. }
  446. .add_btn {
  447. width: 56.4px;
  448. height: 40.8px;
  449. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  450. background-size: 47px 34px;
  451. position: absolute;
  452. right: 38px;
  453. top: 36px;
  454. }
  455. }
  456. .list_main{
  457. padding:25px;
  458. background: #ffffff;
  459. width: 94%;
  460. margin: 25px auto 0;
  461. border-radius: 15PX;
  462. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  463. }
  464. .titBox{
  465. display: flex;
  466. align-items: center;
  467. }
  468. .tit{
  469. font-size: 36px;
  470. font-weight: bold;
  471. }
  472. /deep/ .van-cell{
  473. padding-left: 0!important;
  474. padding-right: 0!important;
  475. padding-bottom: 0!important;
  476. }
  477. /deep/ .van-field__label{
  478. padding-left: 10PX;
  479. width: 8.2em;
  480. }
  481. /deep/ .van-cell--required::before{
  482. left: 0;
  483. }
  484. }
  485. </style>