移动端
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.
 
 

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