移动端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

388 rader
12 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="$router.back(-1)"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">农房利用情况</p>
  11. </template>
  12. </van-nav-bar>
  13. <van-form ref="_Form">
  14. <div class="main_box">
  15. <van-field
  16. readonly
  17. clickable
  18. name="picker"
  19. v-model="circulation.nmfwdm"
  20. label="农民房屋代码"
  21. placeholder="请选择"
  22. @click="showzjddm = true"
  23. input-align="right"
  24. right-icon="arrow-down" :rules="[{ required: true }]" required
  25. />
  26. <van-popup v-model="showzjddm" position="bottom">
  27. <van-picker
  28. show-toolbar
  29. :columns="zjdDictionaries"
  30. @confirm="onConfirmZjddm"
  31. @cancel="showzjddm = false"
  32. />
  33. </van-popup>
  34. <van-field
  35. readonly
  36. clickable
  37. name="picker"
  38. v-model="fwzt"
  39. label="房屋状态"
  40. placeholder="请选择"
  41. @click="showfwzt = true"
  42. input-align="right"
  43. right-icon="arrow-down"
  44. label-width="auto" :rules="[{ required: true }]" required
  45. />
  46. <van-popup v-model="showfwzt" position="bottom">
  47. <van-picker
  48. show-toolbar
  49. :columns="fwztDictionaries"
  50. @confirm="onConfirmFwzt"
  51. @cancel="showfwzt = false"
  52. />
  53. </van-popup>
  54. <van-field
  55. readonly
  56. clickable
  57. name="picker"
  58. v-model="fwaqxjddj"
  59. label="房屋安全性鉴定等级"
  60. placeholder="请选择"
  61. @click="showfwaqxjddj = true"
  62. input-align="right"
  63. right-icon="arrow-down"
  64. label-width="auto"
  65. />
  66. <van-popup v-model="showfwaqxjddj" position="bottom">
  67. <van-picker
  68. show-toolbar
  69. :columns="fwaqxjddjDictionaries"
  70. @confirm="onConfirmFwaqxjddj"
  71. @cancel="showfwaqxjddj = false"
  72. />
  73. </van-popup>
  74. <van-field
  75. readonly
  76. clickable
  77. name="picker"
  78. v-model="lyzk"
  79. label="利用状况"
  80. placeholder="请选择"
  81. @click="showlyzk = true"
  82. input-align="right"
  83. right-icon="arrow-down"
  84. label-width="auto" :rules="[{ required: true }]" required
  85. />
  86. <van-popup v-model="showlyzk" position="bottom">
  87. <van-picker
  88. show-toolbar
  89. :columns="lyzkDictionaries"
  90. @confirm="onConfirmLyzk"
  91. @cancel="showlyzk = false"
  92. />
  93. </van-popup>
  94. <van-field
  95. readonly
  96. clickable
  97. name="picker"
  98. v-model="fwsfxz"
  99. label="房屋是否闲置"
  100. placeholder="请选择"
  101. @click="showfwsfxz = true"
  102. input-align="right"
  103. right-icon="arrow-down"
  104. label-width="auto" :rules="[{ required: true }]" required
  105. />
  106. <van-popup v-model="showfwsfxz" position="bottom">
  107. <van-picker
  108. show-toolbar
  109. :columns="fwsfxzDictionaries"
  110. @confirm="onConfirmFwsfxz"
  111. @cancel="showfwsfxz = false"
  112. />
  113. </van-popup>
  114. <van-field v-model="circulation.fwxzyy" label="闲置原因" placeholder="闲置原因" input-align="right" label-width="auto"/>
  115. <van-field
  116. readonly
  117. clickable
  118. name="picker"
  119. v-model="circulation.fwxzqssj"
  120. label="房屋闲置起始时间"
  121. placeholder="房屋闲置起始时间"
  122. @click="showfwxzqssj = true"
  123. input-align="right"
  124. right-icon="arrow-down"
  125. label-width="auto"
  126. />
  127. <van-popup v-model="showfwxzqssj" position="bottom">
  128. <van-datetime-picker
  129. :value="new Date"
  130. type="date"
  131. title="选择年月日"
  132. @confirm="onConfirmFwxzqssj"
  133. @cancel="showfwxzqssj = false"
  134. />
  135. </van-popup>
  136. <van-field
  137. readonly
  138. clickable
  139. name="picker"
  140. v-model="phlyms"
  141. label="盘活利用模式"
  142. placeholder="请选择"
  143. @click="showphlyms = true"
  144. input-align="right"
  145. right-icon="arrow-down"
  146. label-width="auto"
  147. />
  148. <van-popup v-model="showphlyms" position="bottom">
  149. <van-picker
  150. show-toolbar
  151. :columns="phlymsDictionaries"
  152. @confirm="onConfirmPhlyms"
  153. @cancel="showphlyms = false"
  154. />
  155. </van-popup>
  156. <van-field
  157. readonly
  158. clickable
  159. name="picker"
  160. v-model="circulation.dcsj"
  161. label="调查时间"
  162. placeholder="选择调查时间"
  163. @click="showdcsj = true"
  164. input-align="right"
  165. right-icon="arrow-down" :rules="[{ required: true }]" required
  166. />
  167. <van-popup v-model="showdcsj" position="bottom">
  168. <van-datetime-picker
  169. :value="new Date"
  170. type="date"
  171. title="选择年月日"
  172. @confirm="onConfirmDcsj"
  173. @cancel="showdcsj = false"
  174. />
  175. </van-popup>
  176. <van-field v-model="circulation.nsy" label="年收益" placeholder="年收益" input-align="right" label-width="auto" type="number"/>
  177. </div>
  178. <p class="main_title">照片信息</p>
  179. <div class="main_box" style="padding: 5%;">
  180. <van-row>
  181. <van-col span="12">
  182. <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片东</p>
  183. <MultiImageUploadComp v-model="circulation.xczpd"/>
  184. </van-col>
  185. <van-col span="12">
  186. <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片南</p>
  187. <MultiImageUploadComp v-model="circulation.xczpn"/>
  188. </van-col>
  189. </van-row>
  190. <van-row>
  191. <van-col span="12">
  192. <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片西</p>
  193. <MultiImageUploadComp v-model="circulation.xczpx" />
  194. </van-col>
  195. <van-col span="12">
  196. <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片北</p>
  197. <MultiImageUploadComp v-model="circulation.xczpb" />
  198. </van-col>
  199. </van-row>
  200. </div>
  201. <p class="main_title">补偿信息</p>
  202. <div class="main_box">
  203. <van-field v-model="circulation.bz" label="备注" type="textarea" placeholder="请输入内容" input-align="right" label-width="auto"/>
  204. </div>
  205. </van-form>
  206. <div style="padding: 16px 0;">
  207. <van-row>
  208. <van-col span="12" align="center">
  209. <van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="$router.back()">关闭</van-button>
  210. </van-col>
  211. <van-col span="12" align="center">
  212. <van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
  213. </van-col>
  214. </van-row>
  215. <div class="clear"></div>
  216. </div>
  217. </div>
  218. </template>
  219. <script>
  220. import { zjdzd } from "@/api/onlineHome/homestead/circulation";
  221. import { getZjdly , nmfwlyEdit , upload} from "@/api/onlineHome/homestead/utilization";
  222. import {Notify} from "vant";
  223. import MultiImageUploadComp from "@/components/house/MultiImageUploadComp"
  224. export default {
  225. name: "utilizationModify",
  226. components: {MultiImageUploadComp},
  227. data() {
  228. return {
  229. phlyms : '',
  230. fwsfxz : '',
  231. lyzk : '',
  232. fwaqxjddj : '',
  233. fwzt: '',
  234. showzjddm:false,
  235. showphlyms:false,
  236. showfwsfxz:false,
  237. showlyzk:false,
  238. showfwaqxjddj:false,
  239. showfwzt:false,
  240. showdcsj: false,
  241. showfwxzqssj: false,
  242. phlymsDictionaries: [],
  243. fwsfxzDictionaries: [],
  244. lyzkDictionaries: [],
  245. fwaqxjddjDictionaries: [],
  246. fwztDictionaries: [],
  247. zjdDictionaries: [],
  248. circulation: {}
  249. };
  250. },
  251. created() {
  252. this.getDetail();
  253. },
  254. methods: {
  255. getDetail(){
  256. getZjdly(this.$route.query.id).then(response => {
  257. console.log(response)
  258. //退出权利类型
  259. this.houseGetDicts("fwzt").then((res) => {
  260. for(var i = 0 ; i < res.data.length ; i++){
  261. this.fwztDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  262. }
  263. this.fwzt = this.selectDictLabel(res.data, response.data.fwzt);
  264. });
  265. this.houseGetDicts("fwaqxjddj").then((res) => {
  266. for(var i = 0 ; i < res.data.length ; i++){
  267. this.fwaqxjddjDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  268. }
  269. this.fwaqxjddj = this.selectDictLabel(res.data, response.data.fwaqxjddj);
  270. });
  271. this.houseGetDicts("nmfwlyzk").then((res) => {
  272. for(var i = 0 ; i < res.data.length ; i++){
  273. this.lyzkDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  274. }
  275. this.lyzk = this.selectDictLabel(res.data, response.data.lyzk);
  276. });
  277. this.houseGetDicts("sys_yes_no").then((res) => {
  278. for(var i = 0 ; i < res.data.length ; i++){
  279. this.fwsfxzDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  280. }
  281. this.fwsfxz = this.selectDictLabel(res.data, response.data.fwsfxz);
  282. });
  283. this.houseGetDicts("phlyms").then((res) => {
  284. for(var i = 0 ; i < res.data.length ; i++){
  285. this.phlymsDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  286. }
  287. this.phlyms = this.selectDictLabel(res.data, response.data.phlyms);
  288. });
  289. //宅基地代码
  290. zjdzd().then(zjdRes => {
  291. for( let i = 0 ; i < zjdRes.rows.length ; i++){
  292. this.zjdDictionaries.push(zjdRes.rows[i].zjddm);
  293. }
  294. });
  295. this.circulation = response.data;
  296. });
  297. },
  298. onConfirmZjddm(data){
  299. console.log(data)
  300. this.circulation.nmfwdm = data;
  301. this.showzjddm = false;
  302. },
  303. onConfirmPhlyms(data){
  304. this.phlyms = data.text;
  305. this.circulation.phlyms = data.value;
  306. this.showphlyms = false;
  307. },
  308. onConfirmFwsfxz(data){
  309. this.fwsfxz = data.text;
  310. this.circulation.fwsfxz = data.value;
  311. this.showfwsfxz = false;
  312. },
  313. onConfirmLyzk(data){
  314. this.lyzk = data.text;
  315. this.circulation.lyzk = data.value;
  316. this.showlyzk = false;
  317. },
  318. onConfirmFwaqxjddj(data){
  319. this.fwaqxjddj = data.text;
  320. this.circulation.fwaqxjddj = data.value;
  321. this.showfwaqxjddj = false;
  322. },
  323. onConfirmFwzt(data){
  324. this.fwzt = data.text;
  325. this.circulation.fwzt = data.value;
  326. this.showfwzt = false;
  327. },
  328. onConfirmFwxzqssj(data){
  329. this.circulation.fwxzqssj = this.getNowFormatDate(data).substr(0,10);;
  330. this.showfwxzqssj = false;
  331. },
  332. onConfirmDcsj(data){
  333. this.circulation.dcsj = this.getNowFormatDate(data).substr(0,10);;
  334. this.showdcsj = false;
  335. },
  336. goSubmit(){
  337. console.log(this.circulation);
  338. this.$refs._Form.validate().then(() => {
  339. nmfwlyEdit(this.circulation).then(response => {
  340. if(response.code = 200){
  341. this.$toast.success('保存成功');
  342. this.back();
  343. }
  344. });
  345. }).catch((e) => {
  346. Notify({ type: 'danger', message: '请填写完整的表单项' });
  347. });
  348. },
  349. back() {
  350. setTimeout(() => this.$router.back(), 1000);
  351. }
  352. },
  353. }
  354. </script>
  355. <style scoped lang="scss">
  356. .app-container {
  357. padding: 2% 0;
  358. }
  359. .main_title{
  360. font-size: 0.4rem;
  361. color: #1D6FE9;
  362. margin: 0.2rem 6%;
  363. position: relative;
  364. }
  365. .main_box{
  366. width: 96%;
  367. margin: 0 auto;
  368. border-radius: 6px;
  369. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  370. overflow: hidden;
  371. background-color: #FFF;
  372. }
  373. .submitButton{
  374. width: 80%;
  375. margin: 0 auto;
  376. background-color: #1D6FE9;
  377. }
  378. </style>