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

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