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

436 linhas
16 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. <div class="main_box">
  14. <van-field v-model="circulation.shyqrdbxm" label="申请人姓名" placeholder="申请人姓名" input-align="right" label-width="auto" :rules="[{ required: true }]" required @input="remoteTransfereeMethod" />
  15. <div id="dropList" v-show="showDropList" style="width: 92vw; position: absolute; z-index: 99; left: 50%; margin-left: -46vw; border: 1px solid #E2E0E0;" >
  16. <van-cell id="vanCell" v-for="(item, index) in getObligeeOptions" :key="index" @click="shyqrdmxmChange(item)" style="position: relative; z-index: 999;">
  17. {{item.sqrxm}}
  18. </van-cell>
  19. </div>
  20. <van-field
  21. readonly
  22. v-model="circulation.zjddm"
  23. label="宅基地代码"
  24. input-align="right"
  25. >
  26. <template #button>
  27. <van-button size="small" @click="mapLook" type="primary">查看地图</van-button>
  28. </template>
  29. </van-field>
  30. <!-- <van-field v-model="circulation.sqrxm" label="申请人姓名" placeholder="申请人姓名" input-align="right" label-width="auto"/>-->
  31. <van-field
  32. readonly
  33. clickable
  34. v-model="zjlx"
  35. label="申请人证件类型"
  36. placeholder="请选择"
  37. @click="showzjlx = true"
  38. input-align="right"
  39. right-icon="arrow-down"
  40. label-width="auto"
  41. />
  42. <van-popup v-model="showzjlx" position="bottom">
  43. <van-picker
  44. show-toolbar
  45. :columns="zjlxDictionaries"
  46. @confirm="onConfirmZjlx"
  47. @cancel="showzjlx = false"
  48. />
  49. </van-popup>
  50. <van-field v-model="circulation.sqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto"/>
  51. <van-field v-model="circulation.ycsyfs" label="有偿使用方式" placeholder="有偿使用方式" input-align="right" label-width="auto"/>
  52. <van-cell title="是否一户多宅">
  53. <template #right-icon>
  54. <!-- @change="designPaperChange"-->
  55. <van-radio-group v-model="circulation.sfyhdz" direction="horizontal">
  56. <van-radio name="1">是</van-radio>
  57. <van-radio name="0">否</van-radio >
  58. </van-radio-group>
  59. </template>
  60. </van-cell>
  61. <van-field
  62. readonly
  63. clickable
  64. name="picker"
  65. v-model="circulation.ycsykssj"
  66. label="有偿使用开始时间"
  67. placeholder="选择开始时间"
  68. @click="showycsykssj = true"
  69. input-align="right"
  70. right-icon="arrow-down"
  71. label-width="auto"
  72. />
  73. <van-popup v-model="showycsykssj" position="bottom">
  74. <van-datetime-picker
  75. v-model="currentDate"
  76. type="date"
  77. title="选择年月日"
  78. :min-date="minDate"
  79. :max-date="maxDate"
  80. @confirm="onConfirmYcsykssj"
  81. />
  82. </van-popup>
  83. <van-field
  84. readonly
  85. clickable
  86. name="picker"
  87. v-model="circulation.ycsydqsj"
  88. label="有偿使用到期时间"
  89. placeholder="选择到期时间"
  90. @click="showycsydqsj = true"
  91. input-align="right"
  92. right-icon="arrow-down"
  93. label-width="auto"
  94. />
  95. <van-popup v-model="showycsydqsj" position="bottom">
  96. <van-datetime-picker
  97. v-model="currentDate"
  98. type="date"
  99. title="选择年月日"
  100. :min-date="minDate"
  101. :max-date="maxDate"
  102. @confirm="onConfirmYcsydqsj"
  103. />
  104. </van-popup>
  105. <van-field v-model="circulation.ycsymj" label="有偿使用面积(㎡)" placeholder="请输入有偿使用面积㎡" input-align="right" label-width="auto">
  106. <template #button>
  107. <van-button size="small" @click="computeMJ" type="primary">计算</van-button>
  108. </template>
  109. </van-field>
  110. <van-field v-model="circulation.ycsymjdj" label="有偿使用面积单价(元)" placeholder="请输入有偿使用面积单价" @change="changeDJ" input-align="right" label-width="auto"/>
  111. <van-field v-model="circulation.ycsyfy" label="有偿使用费用(元)" placeholder="请输入有偿使用费用" input-align="right" label-width="auto">
  112. <template #button>
  113. <van-button size="small" @click="computeFY" type="primary">计算</van-button>
  114. </template>
  115. </van-field>
  116. <van-field v-model="circulation.fkfs" label="付款方式" placeholder="请输入付款方式" input-align="right" label-width="auto"/>
  117. <van-field v-model="circulation.bz" label="备注" placeholder="请输入内容" input-align="right" label-width="auto"/>
  118. </div>
  119. <van-dialog v-model="mapShow" show-cancel-button>
  120. <MapGisObtainTc ref="zjdProductResh" :shqrxm="circulation.shyqrdbxm" :landStatus="landStatus" :deptId="circulation.deptId" @closeMoule="closeMoule"></MapGisObtainTc>
  121. </van-dialog>
  122. <div style="padding: 16px 0;">
  123. <van-row>
  124. <van-col span="12" align="center">
  125. <van-button type="info" color="#B4B0B0" native-type="submit" class="submitButton" @click="goEdit">取消</van-button>
  126. </van-col>
  127. <van-col span="12" align="center">
  128. <van-button type="info" native-type="submit" class="submitButton" @click="goSubmit">保存</van-button>
  129. </van-col>
  130. </van-row>
  131. <div class="clear"></div>
  132. </div>
  133. </div>
  134. </template>
  135. <script>
  136. import { zjdzd,selectHomesteadObligeeMapList} from "@/api/onlineHome/homestead/circulation";
  137. import { ycsyAdd } from "@/api/onlineHome/homestead/paidUtilize";
  138. import { getShyqrs,getByLyZjddm} from "@/api/sunVillage_info/homestead/paidExit";
  139. import { listYcsyjfbz} from "@/api/onlineHome/homestead/homeuseycsyjfbz";
  140. import MapGisObtainTc from "@/components/Map/MapGisObtainTc";
  141. import {listProgramme} from "@/api/onlineHome/homestead/programme";
  142. export default {
  143. name: "paidUtilizeAdd",
  144. components: {MapGisObtainTc},
  145. data() {
  146. return {
  147. tcqllxDictionaries:[],//退出权利类型
  148. tclxDictionaries:[],//退出类型
  149. tcfsDictionaries:[],//退出方式
  150. zjlxDictionaries:[],//申请人证件类型
  151. bcfsDictionaries:[],//补偿方式
  152. zjdDictionaries:[],//宅基地代码
  153. shyqrdmDictionaries:[],//使用权人
  154. getObligeeOptions:[],//下拉框列表
  155. //计算有偿使用面积
  156. jsmjData:{
  157. zdmjSum:0.00,
  158. hzdmj:0.00,
  159. },
  160. landStatus:"1",
  161. tcqllx:'',
  162. tclx:'',
  163. tcfs:'',
  164. zjlx:'身份证',
  165. bcfs:'',
  166. zjddm:'',
  167. sysFarmer:{deptId:this.$store.state.user.loginDeptId,memberName:""},
  168. showtcqllx: false,
  169. showtclx: false,
  170. showtcfs: false,
  171. showzjlx: false,
  172. showbcfs: false,
  173. showzjddm: false,
  174. showshyqrdm: false,
  175. showycsykssj: false,
  176. showycsydqsj: false,
  177. showDropList: false,//是否显示下拉框
  178. mapShow: false,
  179. circulation:{ ycsymj:0.00, ycsyfy:0.00, ycsymjdj:0.00,sfyhdz:"0"},
  180. minDate: new Date(),
  181. maxDate: new Date(2025, 10, 1),
  182. currentDate: new Date(),
  183. };
  184. },
  185. created() {
  186. this.getDictionaries();
  187. },
  188. methods: {
  189. getDictionaries(){
  190. //退出权利类型
  191. this.houseGetDicts("tcqllx").then((res) => {
  192. for (var i = 0; i < res.data.length; i++) {
  193. this.tcqllxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  194. }
  195. });
  196. //退出类型
  197. this.houseGetDicts("tclx").then((res) => {
  198. for (var i = 0; i < res.data.length; i++) {
  199. this.tclxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  200. }
  201. });
  202. //退出方式
  203. this.houseGetDicts("tcfs").then((res) => {
  204. for (var i = 0; i < res.data.length; i++) {
  205. this.tcfsDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  206. }
  207. });
  208. //申请人证件类型
  209. this.houseGetDicts("zjlx").then((res) => {
  210. for (var i = 0; i < res.data.length; i++) {
  211. this.zjlxDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  212. }
  213. });
  214. //补偿方式
  215. this.houseGetDicts("bcfs").then((res) => {
  216. for (var i = 0; i < res.data.length; i++) {
  217. this.bcfsDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  218. }
  219. });
  220. //宅基地代码
  221. zjdzd().then(zjdRes => {
  222. for (let i = 0; i < zjdRes.rows.length; i++) {
  223. this.zjdDictionaries.push(zjdRes.rows[i].zjddm);
  224. }
  225. });
  226. // //使用权人代码
  227. // listByDeptId().then(zjdRes => {
  228. // for (let i = 0; i < zjdRes.rows.length; i++) {
  229. // this.shyqrdmDictionaries.push(zjdRes.rows[i].shyqrdm);
  230. // }
  231. // });
  232. },
  233. shyqrdmxmChange(val){
  234. this.$set(this.circulation, "shyqrdbxm", val.sqrxm);
  235. this.$set(this.circulation, "deptId", val.deptId);
  236. this.$set(this.circulation, "deptName", val.deptName);
  237. this.$set(this.circulation, "sqrzjhm", val.sqrzjhm);
  238. this.$set(this.circulation, "sqrzjlx", val.sqrzjlx);
  239. this.getObligeeOptions=[];
  240. this.showDropList = false;
  241. },
  242. /** 查找地图中宅基地 */
  243. closeMoule: function (data) {
  244. getByLyZjddm(data).then((response) => {
  245. this.$set(this.circulation, "sfyhdz", response.data.isMore);
  246. // const baseImgUrl = this.$store.getters.baseRoutingUrl;
  247. });
  248. },
  249. /** 模糊查询人员信息 */
  250. remoteTransfereeMethod(query) {
  251. if (query !== "") {
  252. getShyqrs({shyqrdbxm:query,status:1,deptId:this.sysFarmer.deptId}).then((response) => {
  253. if (response.code == 200) {
  254. this.getObligeeOptions = response.rows.map(function (item) {
  255. return {
  256. sqrxm:item.shyqrdbxm,
  257. sqrxb:item.xb,
  258. sqrzjhm:item.shyqrdbzjhm,
  259. sqrnhdm:item.nhdm,
  260. sqrzjlx:item.shyqrdbzjlx,
  261. sqrdh:item.dh,
  262. gyfs:item.gyfs,
  263. dz:item.dz,
  264. deptId:item.deptId,
  265. deptName:item.deptName,
  266. zjddm:item.zjddm,
  267. }
  268. })
  269. //设置模糊查询的下拉框和滚动条
  270. if (this.getObligeeOptions.length > 0) {
  271. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  272. //设置模糊查询的和滚动条
  273. this.$nextTick(() => {
  274. if (this.getObligeeOptions.length > 4) {
  275. let height = document.getElementById("vanCell").offsetHeight * 4;
  276. document.getElementById("dropList").style.height = height + "px";
  277. document.getElementById("dropList").style.overflow = "scroll";
  278. } else {
  279. document.getElementById("dropList").style.height = "";
  280. document.getElementById("dropList").style.overflow = "visible";
  281. }
  282. });
  283. } else {
  284. this.showDropList = false;
  285. }
  286. }
  287. });
  288. } else {
  289. this.getObligeeOptions = [];
  290. this.showDropList = false;
  291. }
  292. },
  293. onConfirmZjddm(data){
  294. console.log(data)
  295. this.circulation.zjddm = data;
  296. this.showzjddm = false;
  297. },
  298. onConfirmZjlx(data){
  299. this.zjlx = data.text;
  300. this.circulation.sqrzjlx = data.value;
  301. this.showzjlx = false;
  302. },
  303. onConfirmTcqllx(data){
  304. this.tcqllx = data.text;
  305. this.circulation.tcqllx = data.value;
  306. this.showtcqllx = false;
  307. },
  308. onConfirmTclx(data){
  309. this.tclx = data.text;
  310. this.circulation.tclx = data.value;
  311. this.showtclx = false;
  312. },
  313. onConfirmTcfs(data){
  314. this.tcfs = data.text;
  315. this.circulation.tcfs = data.value;
  316. this.showtcfs = false;
  317. },
  318. onConfirmBcfs(data){
  319. this.bcfs = data.text;
  320. this.circulation.bcfs = data.value;
  321. this.showbcfs = false;
  322. },
  323. onConfirmShyqrdm(data){
  324. this.circulation.shyqrdm = data;
  325. this.showshyqrdm = false;
  326. },
  327. onConfirmYcsykssj(data){
  328. this.circulation.ycsykssj = this.getNowFormatDate(data).substr(0,10);
  329. this.showycsykssj = false;
  330. },
  331. onConfirmYcsydqsj(data){
  332. this.circulation.ycsydqsj = this.getNowFormatDate(data).substr(0,10);
  333. this.showycsydqsj = false;
  334. },
  335. goEdit(){
  336. window.location.replace("paidUtilizeList")
  337. },
  338. mapLook(){
  339. this.mapShow = true;
  340. setTimeout(() => {
  341. this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
  342. },1000);
  343. },
  344. /** 有偿使用面积计算 */
  345. computeMJ(){
  346. if(this.circulation.shyqrdbxm == null || this.circulation.shyqrdbxm === ""){
  347. return this.$toast("请先选择使用权人");
  348. }
  349. let _this = this;
  350. _this.$set( _this.circulation, "ycsymj", 0.00);
  351. _this.$set( _this.jsmjData, "hzdmj", 0.00);
  352. _this.$set( _this.jsmjData, "zdmjSum", 0.00);
  353. listProgramme({}).then((res) => {
  354. if(res.rows.length > 0){
  355. _this.$set( _this.jsmjData, "hzdmj", res.rows[0].maxArea);
  356. }
  357. selectHomesteadObligeeMapList({shyqrdbxm:_this.circulation.shyqrdbxm,landStatus:_this.landStatus}).then((response) => {
  358. if (response.code == 200) {
  359. response.data.map(function(item){
  360. _this.$set( _this.jsmjData, "zdmjSum", _this.jsmjData.zdmjSum + item.zjdzdxx.zdmj);
  361. if(_this.jsmjData.zdmjSum - _this.jsmjData.hzdmj > 0){
  362. _this.$set( _this.circulation, "ycsymj", (_this.jsmjData.zdmjSum - _this.jsmjData.hzdmj).toFixed(2));
  363. }else{
  364. _this.$set( _this.circulation, "ycsymj", 0.00);
  365. }
  366. });
  367. }
  368. });
  369. })
  370. },
  371. /**使用费用计算 */
  372. computeFY(){
  373. let _this = this;
  374. _this.$set( _this.circulation, "ycsymjdj", 0.00);
  375. _this.$set( _this.circulation, "ycsyfy", 0.00);
  376. listYcsyjfbz({}).then(response => {
  377. response.rows.map(function(item){
  378. if(_this.circulation.ycsymj >= item.startArea && _this.circulation.ycsymj <= item.endArea){
  379. _this.$set( _this.circulation, "ycsyfy", (_this.circulation.ycsymj * item.feeAmount).toFixed(2));
  380. }
  381. });
  382. });
  383. },
  384. changeDJ() {
  385. if (this.circulation.ycsymj != null) {
  386. this.circulation.ycsyfy = ((this.circulation.ycsymj * this.circulation.ycsymjdj)).toFixed(2);
  387. }
  388. },
  389. goSubmit(){
  390. ycsyAdd(this.circulation).then(response => {
  391. if(response.code = 200){
  392. this.$toast.success('新增成功');
  393. setTimeout(function(){
  394. window.location.replace("paidUtilizeList")
  395. },1000)
  396. }
  397. });
  398. }
  399. },
  400. }
  401. </script>
  402. <style scoped lang="scss">
  403. .app-container {
  404. padding: 2% 0;
  405. }
  406. .main_title{
  407. font-size: 0.4rem;
  408. color: #1D6FE9;
  409. margin: 0.2rem 6%;
  410. position: relative;
  411. }
  412. .main_box{
  413. width: 96%;
  414. margin: 0 auto;
  415. border-radius: 6px;
  416. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  417. overflow: hidden;
  418. background-color: #FFF;
  419. }
  420. .submitButton{
  421. width: 80%;
  422. margin: 0 auto;
  423. background-color: #1D6FE9;
  424. }
  425. </style>