移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

504 рядки
17 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. :disabled="circulation.phfsType == 2"
  17. v-model="circulation.zcfmc"
  18. label="申请人姓名"
  19. placeholder="请输入申请人姓名"
  20. @input="remoteTransfereeMethod"
  21. :rules="[{ required: true }]" required
  22. />
  23. <van-cell v-for="item in getObligeeOptions"
  24. :key="item.shyqrdbxm"
  25. @click="shyqrdmxmChange(item)"
  26. >
  27. {{item.shyqrdbxm}}
  28. </van-cell>
  29. <van-popup v-model="showshyqrdm" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="shyqrdmDictionaries"
  33. @confirm="onConfirmShyqrdm"
  34. @cancel="showshyqrdm = false"
  35. />
  36. </van-popup>
  37. <van-field
  38. readonly
  39. v-model="circulation.zjddm"
  40. label="宅基地代码"
  41. input-align="right"
  42. >
  43. <template #button>
  44. <van-button size="small" @click="mapLook" type="primary">选择宅基地</van-button>
  45. </template>
  46. </van-field>
  47. <van-popup v-model="showzjddm" position="bottom" >
  48. <van-picker
  49. show-toolbar
  50. :columns="zjdDictionaries"
  51. @confirm="onConfirmZjddm"
  52. @cancel="showzjddm = false"
  53. />
  54. </van-popup>
  55. <van-field
  56. v-if="circulation.phrqType == 1"
  57. disabled
  58. v-model="xb"
  59. label="性别"
  60. input-align="right"
  61. label-width="auto"
  62. />
  63. <van-field v-model="circulation.zcfdh" label="联系电话" placeholder="请输入联系电话" input-align="right" label-width="auto" :rules="[{pattern: /(^\d{7}(\d{4})?$)/}]" required/>
  64. <van-field v-if="circulation.phrqType == 1" disabled v-model="circulation.zcfzjhm" label="证件号码" placeholder="证件号码" input-align="right" label-width="auto" />
  65. <van-cell v-if="circulation.phrqType == 1" title="是否本集体经济组织成员" >
  66. <template #right-icon>
  67. <van-radio-group v-model="circulation.zcfzz" direction="horizontal" >
  68. <van-radio name="1">是</van-radio>
  69. <van-radio name="0">否</van-radio>
  70. </van-radio-group>
  71. </template>
  72. </van-cell>
  73. <van-field
  74. v-model ="circulation.zjdmj"
  75. type = "number"
  76. @keyup = "circulation.zjdmj=circulation.zjdmj.replace(circulation.zjdmj,RestrictedMoney(circulation.zjdmj))"
  77. label="经营面积(㎡)"
  78. input-align="right"
  79. label-width="auto" :rules="[{ required: true }]" required
  80. />
  81. <van-field
  82. readonly
  83. clickable
  84. name="picker"
  85. v-model="circulation.phtime"
  86. label="备案时间"
  87. placeholder="选择备案时间"
  88. @click="showbasj = true"
  89. input-align="right"
  90. right-icon="arrow-down"
  91. label-width="auto" :rules="[{ required: true }]" required
  92. />
  93. <van-popup v-model="showbasj" position="bottom">
  94. <van-datetime-picker
  95. :value="new Date"
  96. type="date"
  97. title="选择年月日"
  98. @confirm="onConfirmBasj"
  99. @cancel="showbasj = false"
  100. />
  101. </van-popup>
  102. <van-field
  103. readonly
  104. clickable
  105. name="picker"
  106. v-model="circulation.qsrq"
  107. label="入股开始时间"
  108. placeholder="选择入股开始时间"
  109. @click="showqsrq = true"
  110. input-align="right"
  111. right-icon="arrow-down"
  112. label-width="auto" :rules="[{ required: true }]" required
  113. />
  114. <van-popup v-model="showqsrq" position="bottom">
  115. <van-datetime-picker
  116. :value="new Date"
  117. type="date"
  118. title="选择年月日"
  119. @confirm="onConfirmQsrq"
  120. @cancel="showqsrq = false"
  121. />
  122. </van-popup>
  123. <van-field
  124. readonly
  125. clickable
  126. name="picker"
  127. v-model="circulation.jsrq"
  128. label="入股结束时间"
  129. placeholder="选择入股结束时间"
  130. @click="showjsrq = true"
  131. input-align="right"
  132. right-icon="arrow-down"
  133. label-width="auto" :rules="[{ required: true }]" required
  134. />
  135. <van-field v-model="circulation.fwms" type="textarea" label="地上房屋描述" placeholder="请输入地上房屋描述" input-align="right" label-width="auto" />
  136. <van-field v-model="circulation.bz" type="textarea" label="备注" placeholder="请输入备注" input-align="right" label-width="auto" />
  137. <van-field v-model="circulation.zrfmc" label="经营方姓名" placeholder="请输入经营方姓名" input-align="right" label-width="auto" :rules="[{ required: true }]" required />
  138. <van-field v-model="circulation.zrfzjhm" label="经营方证件号" placeholder="请输入经营方证件号" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>
  139. <van-field v-model="circulation.zrfdh" label="经营方电话" placeholder="请输入经营方电话" input-align="right" label-width="auto" :rules="[{pattern: /(^\d{7}(\d{4})?$)/}]" required/>
  140. <van-dialog v-model:show="mapShow" show-cancel-button>
  141. <MapGisObtain ref="zjdProductResh" :shqrxm="circulation.zcfmc" :shyqrStatus = "circulation.phfsType" @closeMoule="closeMoule"></MapGisObtain>
  142. </van-dialog>
  143. </div>
  144. </van-form>
  145. <div style="padding: 16px 0;">
  146. <van-row>
  147. <van-col span="12" align="center">
  148. <van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="goEdit">取消</van-button>
  149. </van-col>
  150. <van-col span="12" align="center">
  151. <van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
  152. </van-col>
  153. </van-row>
  154. <div class="clear"></div>
  155. </div>
  156. </div>
  157. </template>
  158. <script>
  159. import { zjdzd, obligeeList } from "@/api/onlineHome/homestead/circulation";
  160. import { addPhxxb,updatePhxxb,getPhxxb } from "@/api/onlineHome/phfs/phfs";
  161. import { ycsyAdd , listByDeptId } from "@/api/onlineHome/homestead/paidUtilize";
  162. import MapGisObtain from "@/components/Map/MapGisObtain";
  163. import {Notify} from "vant";
  164. export default {
  165. name: "paidUtilizeAdd",
  166. components: { MapGisObtain,},
  167. props: {
  168. columns: {
  169. type: Array,
  170. default: function () {
  171. return []
  172. }
  173. },
  174. selectValue: {
  175. type: [String, Number],
  176. default: ''
  177. },
  178. option: {
  179. type: Object,
  180. default: function () {
  181. return { label: 'label', value: 'value' }
  182. }
  183. },
  184. isSearch: {
  185. type: Boolean,
  186. default: false
  187. },
  188. offOption: { // 关闭option配置key-value;当数据是非集合的数组的时候,开启
  189. type: Boolean,
  190. default: false
  191. }
  192. },
  193. data() {
  194. return {
  195. tcqllxDictionaries:[],//退出权利类型
  196. tclxDictionaries:[],//退出类型
  197. tcfsDictionaries:[],//退出方式
  198. sexDictionaries:[],//申请人证件类型
  199. bcfsDictionaries:[],//补偿方式
  200. zjdDictionaries:[],//宅基地代码
  201. shyqrdmDictionaries:[],//使用权人
  202. getObligeeOptions:[],
  203. tcqllx:'',
  204. tclx:'',
  205. tcfs:'',
  206. xb:'',
  207. bcfs:'',
  208. zjddm:'',
  209. showzcfmc:false,
  210. showtcqllx: false,
  211. showtclx: false,
  212. showtcfs: false,
  213. showXb: false,
  214. showbcfs: false,
  215. showzjddm: false,
  216. showshyqrdm: false,
  217. showbasj: false,
  218. showqsrq: false,
  219. showjsrq: false,
  220. showycsydqsj: false,
  221. columnsData: [],
  222. circulation:{},
  223. mapShow: false,
  224. };
  225. },
  226. created() {
  227. this.getDetail();
  228. this.getDictionaries();
  229. },
  230. methods: {
  231. getDictionaries(){
  232. //退出权利类型
  233. this.houseGetDicts("tcqllx").then((res) => {
  234. for (var i = 0; i < res.data.length; i++) {
  235. this.tcqllxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  236. }
  237. });
  238. //退出类型
  239. this.houseGetDicts("tclx").then((res) => {
  240. for (var i = 0; i < res.data.length; i++) {
  241. this.tclxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  242. }
  243. });
  244. //退出方式
  245. this.houseGetDicts("tcfs").then((res) => {
  246. for (var i = 0; i < res.data.length; i++) {
  247. this.tcfsDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  248. }
  249. });
  250. //性别
  251. this.houseGetDicts("sex").then((res) => {
  252. for (var i = 0; i < res.data.length; i++) {
  253. this.sexDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  254. }
  255. });
  256. //补偿方式
  257. this.houseGetDicts("bcfs").then((res) => {
  258. for (var i = 0; i < res.data.length; i++) {
  259. this.bcfsDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  260. }
  261. });
  262. //宅基地代码
  263. zjdzd().then(zjdRes => {
  264. for (let i = 0; i < zjdRes.rows.length; i++) {
  265. this.zjdDictionaries.push(zjdRes.rows[i].zjddm);
  266. }
  267. });
  268. //使用权人代码
  269. listByDeptId().then(zjdRes => {
  270. for (let i = 0; i < zjdRes.rows.length; i++) {
  271. this.shyqrdmDictionaries.push(zjdRes.rows[i].shyqrdm);
  272. }
  273. });
  274. },
  275. getDetail()
  276. {
  277. getPhxxb(this.$route.query.id).then(response => {
  278. this.circulation = response.data;
  279. this.houseGetDicts("sex").then((res) => {
  280. this.xb = this.selectDictLabel(res.data, response.data.zcfxb);
  281. });
  282. });
  283. },
  284. plusOrMinus(values) {
  285. let newValue
  286. if (!(/[^0-9.-]/g.test(values))) {
  287. newValue = values.replace(/[^\-\d.]/g, '').replace(/\b(0+){2,}/g, '0').replace(/\-{2,}/g, '-').replace(/^\./g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
  288. if (newValue.toString().indexOf('.') > 0 && Number(newValue.toString().split('.')[1].length) > 2) {
  289. newValue = parseInt(parseFloat(newValue) * 100) / 100
  290. }
  291. if ((newValue.toString().split('-').length - 1) > 1) {
  292. newValue = parseFloat(newValue) || ''
  293. }
  294. if ((newValue.toString().split('-').length) > 1 && newValue.toString().split('-')[0].length > 0) {
  295. newValue = parseFloat(newValue) || ''
  296. }
  297. if (newValue.toString().length > 1 && (newValue.toString().charAt(0) === '0' || (newValue.toString().length > 2 && newValue.toString().charAt(0) === '-' && newValue.toString().charAt(1) === '0' && newValue.toString().charAt(2) !== '.')) && newValue.toString().indexOf('.') < 1) {
  298. newValue = parseFloat(newValue) || ''
  299. }
  300. // 判断整数位最多为9位
  301. if (newValue.toString().indexOf('.') > 0 && Number(newValue.toString().split('.')[0].length) > 9) {
  302. newValue = newValue.toString().substring(0, 9) + '.' + newValue.toString().split('.')[1]
  303. } else if (newValue.toString().indexOf('.') < 0 && Number(newValue.toString().split('.')[0].length) > 9) {
  304. newValue = newValue.toString().substring(0, 9)
  305. }
  306. } else {
  307. newValue = values.replace(/[^0-9.-]/g, '')
  308. }
  309. return newValue
  310. }, materielExtraCostChange(item) {
  311. // 防止删除为空
  312. if (!item) {
  313. item = '0.00'
  314. }
  315. // 一些错误金额输入的判断
  316. if (item.toString().indexOf('.') > 0 && Number(item.toString().split('.')[1].length) < 1) {
  317. item = item.toString().split('.')[0]
  318. }
  319. // 一些错误金额输入的判断
  320. if (!item || item === '-' || item === '-0') {
  321. item = '0.00'
  322. return
  323. }
  324. item = parseFloat(item).toFixed(2)
  325. },RestrictedMoney(values) {
  326. return this.plusOrMinus(values.toString())
  327. },
  328. onConfirmZjddm(data){
  329. console.log(data)
  330. this.circulation.zjddm = data;
  331. this.showzjddm = false;
  332. },
  333. onConfirmXb(data){
  334. this.xb = data.text;
  335. this.circulation.zcfxb = data.value;
  336. this.showXb = false;
  337. },
  338. onConfirmTcqllx(data){
  339. this.tcqllx = data.text;
  340. this.circulation.tcqllx = data.value;
  341. this.showtcqllx = false;
  342. },
  343. onConfirmTclx(data){
  344. this.tclx = data.text;
  345. this.circulation.tclx = data.value;
  346. this.showtclx = false;
  347. },
  348. onConfirmTcfs(data){
  349. this.tcfs = data.text;
  350. this.circulation.tcfs = data.value;
  351. this.showtcfs = false;
  352. },
  353. onConfirmBcfs(data){
  354. this.bcfs = data.text;
  355. this.circulation.bcfs = data.value;
  356. this.showbcfs = false;
  357. },
  358. onConfirmShyqrdm(data){
  359. this.circulation.shyqrdm = data;
  360. this.showshyqrdm = false;
  361. },
  362. onConfirmBasj(data){
  363. this.circulation.phtime = this.getNowFormatDate(data).substr(0,10);
  364. this.showbasj = false;
  365. },
  366. onConfirmQsrq(data){
  367. this.circulation.qsrq = this.getNowFormatDate(data).substr(0,10);
  368. this.showqsrq = false;
  369. },
  370. onConfirmJsrq(data){
  371. this.circulation.jsrq = this.getNowFormatDate(data).substr(0,10);
  372. this.showjsrq = false;
  373. },
  374. onConfirmYcsydqsj(data){
  375. this.circulation.ycsydqsj = this.getNowFormatDate(data).substr(0,10);
  376. this.showycsydqsj = false;
  377. },
  378. goEdit(){
  379. window.location.replace("paidUtilizeList")
  380. },
  381. mapLook(){
  382. this.mapShow =true;
  383. setTimeout(() => {
  384. this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
  385. },1000)
  386. },
  387. /** 查找地图中宅基地 */
  388. closeMoule: function (data) {
  389. this.circulation.zjddm = data;
  390. },
  391. /** 模糊查询人员信息 */
  392. remoteTransfereeMethod(query) {
  393. let _this = this;
  394. if (query !== "") {
  395. let queryMember = {
  396. hzxm : query,
  397. };
  398. this.searchLoading = true;
  399. obligeeList({shyqrdbxm:query,status:this.circulation.phfsType}).then((response) => {
  400. this.searchLoading = false;
  401. if (response.code == 200) {
  402. this.getObligeeOptions = response.rows.map((item) => {
  403. // _this.$set(_this.form, "zcfxb", item.xb);
  404. // _this.$set(_this.form, "zcfdh", item.dh);
  405. // _this.$set(_this.form, "zcfzjhm", item.shyqrdbzjhm);
  406. // _this.$set(_this.form, "zcfdm", item.nhdm);
  407. return {
  408. zcfxb:item.xb,
  409. zcfdh:item.dh,
  410. zcfzjhm:item.shyqrdbzjhm,
  411. zcfdm:item.nhdm,
  412. shyqrdbxm: item.shyqrdbxm,
  413. shyqrdm: item.shyqrdm,
  414. zcfzz: item.sfbncjtjjzzcy
  415. };
  416. });
  417. }
  418. });
  419. } else {
  420. this.getObligeeOptions = [];
  421. }
  422. },
  423. clearFrom() {
  424. // this.initData();
  425. this.getObligeeOptions = [];
  426. },
  427. shyqrdmxmChange(val){
  428. let _this = this;
  429. this.sexDictionaries.map(function (item) {
  430. if(item.value === val.zcfxb){
  431. _this.xb = item.text;
  432. }
  433. })
  434. this.$set(this.circulation, "zcfxb", val.zcfxb);
  435. this.$set(this.circulation, "zcfdh", val.zcfdh);
  436. this.$set(this.circulation, "zcfzjhm", val.zcfzjhm);
  437. this.$set(this.circulation, "zcfdm", val.zcfdm);
  438. this.$set(this.circulation, "zcfmc", val.shyqrdbxm);
  439. this.$set(this.circulation, "zcfzz", val.zcfzz);
  440. this.getObligeeOptions=[];
  441. },
  442. goSubmit(){
  443. console.info( this.$refs._Form.validate());
  444. this.$refs._Form.validate().then(() => {
  445. if (this.circulation.id != null) {
  446. updatePhxxb(this.circulation).then(response => {
  447. this.$toast.success("修改成功");
  448. setTimeout(function(){
  449. window.location.replace("rgjyList")
  450. },1000)
  451. });
  452. } else {
  453. addPhxxb(this.circulation).then(response => {
  454. this.$toast.success("新增成功");
  455. setTimeout(function(){
  456. window.location.replace("rgjyList")
  457. },1000)
  458. });
  459. }
  460. }).catch((e) => {
  461. Notify({ type: 'danger', message: '请填写完整的表单项' });
  462. });
  463. }
  464. },
  465. }
  466. </script>
  467. <style scoped lang="scss">
  468. .app-container {
  469. padding: 2% 0;
  470. }
  471. .main_title{
  472. font-size: 0.4rem;
  473. color: #1D6FE9;
  474. margin: 0.2rem 6%;
  475. position: relative;
  476. }
  477. .main_box{
  478. width: 96%;
  479. margin: 0 auto;
  480. border-radius: 6px;
  481. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  482. overflow: hidden;
  483. background-color: #FFF;
  484. }
  485. .submitButton{
  486. width: 80%;
  487. margin: 0 auto;
  488. background-color: #1D6FE9;
  489. }
  490. </style>