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

paidUtilizeAdd.vue 16 KiB

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