移动端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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