| @@ -63,10 +63,10 @@ | |||
| <p class="btn" @click="goDetail()" v-if="taskStatus === '2' && $route.params.surveyStatus !== '3'">新增</p> | |||
| </div> | |||
| <van-popup v-model="showContractorPopup" position="bottom"> | |||
| <van-search v-model="searchKeyword" placeholder="请输入姓名搜索" /> | |||
| <van-picker | |||
| title="请选择新户主" | |||
| show-toolbar | |||
| :columns="contractorList" | |||
| :columns="filteredContractors" | |||
| @confirm="onConfirmContractorOptions" | |||
| @cancel="showContractorPopup = false" | |||
| > | |||
| @@ -98,6 +98,7 @@ | |||
| showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | |||
| transferMemberId: null, // 转出的成员ID | |||
| taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | |||
| searchKeyword: '', // 弹出框查询关键字 | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -105,6 +106,13 @@ | |||
| this.getList(); | |||
| this.getContractorList(); | |||
| }, | |||
| computed: { | |||
| filteredContractors() { | |||
| return this.contractorList.filter(item => { | |||
| return item.cbfmc.indexOf(this.searchKeyword) !== -1; | |||
| }) | |||
| } | |||
| }, | |||
| methods: { | |||
| getList(){ | |||
| listJtcy({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | |||
| @@ -185,6 +193,7 @@ | |||
| return false; | |||
| } | |||
| this.transferMemberId = item.id; | |||
| this.searchKeyword = ''; | |||
| this.showContractorPopup = true; | |||
| }, | |||
| onConfirmContractorOptions(value) { | |||
| @@ -261,14 +270,6 @@ | |||
| border: none; | |||
| } | |||
| /deep/ .van-search__content{ | |||
| background: rgba(255,255,255,.5); | |||
| } | |||
| /deep/ .van-search{ | |||
| padding: 0; | |||
| flex: 1; | |||
| } | |||
| /deep/ .van-ellipsis{ | |||
| overflow: initial; | |||
| } | |||
| @@ -62,9 +62,10 @@ | |||
| </template> | |||
| </van-swipe-cell> | |||
| <van-popup v-model="showContractorPopup" position="bottom"> | |||
| <van-search v-model="searchKeyword" placeholder="请输入姓名搜索" /> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="contractorList" | |||
| :columns="filteredContractors" | |||
| @confirm="onConfirmContractorOptions" | |||
| @cancel="showContractorPopup = false" | |||
| > | |||
| @@ -99,6 +100,7 @@ | |||
| showContractorPopup: false, // 控制承包方信息弹出层的显示和隐藏 | |||
| transferLandId: null, // 转出的承包地块ID | |||
| taskStatus: null, // 调查任务的完成状态:1表示已完成,2表示未完成 | |||
| searchKeyword: '', // 弹出框查询关键字 | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -106,6 +108,13 @@ | |||
| this.getList(); | |||
| this.getContractorList(); | |||
| }, | |||
| computed: { | |||
| filteredContractors() { | |||
| return this.contractorList.filter(item => { | |||
| return item.cbfmc.indexOf(this.searchKeyword) !== -1; | |||
| }) | |||
| } | |||
| }, | |||
| methods: { | |||
| getList(){ | |||
| listCbdkxx({cbfbm: this.$route.params.cbfbm, translate_dict: 1}).then(response => { | |||
| @@ -166,6 +175,7 @@ | |||
| }, | |||
| transferLand(id) { | |||
| this.transferLandId = id; | |||
| this.searchKeyword = ''; | |||
| this.showContractorPopup = true; | |||
| }, | |||
| onConfirmContractorOptions(value) { | |||
| @@ -237,15 +247,6 @@ | |||
| border: none; | |||
| } | |||
| /deep/ .van-search__content{ | |||
| background: rgba(255,255,255,.5); | |||
| } | |||
| /deep/ .van-search{ | |||
| padding: 0; | |||
| flex: 1; | |||
| } | |||
| /deep/ .van-ellipsis{ | |||
| overflow: initial; | |||
| } | |||
| @@ -16,7 +16,7 @@ | |||
| v-model="value" | |||
| shape="round" | |||
| background="transparent" | |||
| placeholder="请输入地块代码搜索" | |||
| placeholder="请输入地块名称搜索" | |||
| @search="onSearch" | |||
| ></van-search> | |||
| @@ -78,7 +78,7 @@ | |||
| // 查询参数 | |||
| queryParams: { | |||
| deptId: null, | |||
| dkbm: null, | |||
| dkmc: null, | |||
| dklb: null, | |||
| pageNum:1, | |||
| pageSize:20, | |||
| @@ -132,7 +132,7 @@ | |||
| }); | |||
| }, | |||
| onSearch(){ | |||
| this.queryParams.dkbm = this.value; | |||
| this.queryParams.dkmc = this.value; | |||
| this.queryData(); | |||
| }, | |||
| landCategoryChange(dictValue, dictLabel) { | |||
| @@ -53,7 +53,7 @@ | |||
| right-icon="arrow-down" | |||
| readonly | |||
| clickable | |||
| @click="showLandCategory = true" | |||
| @click="openLandCategoryPopup" | |||
| /> | |||
| <van-popup v-model="showLandCategory" position="bottom"> | |||
| <van-picker | |||
| @@ -213,13 +213,16 @@ | |||
| }, | |||
| created() { | |||
| this.taskStatus = Cookies.get('taskStatus'); | |||
| console.log(this.$route.query); | |||
| console.log(this.$route.params); | |||
| this.getDicts("land_ownership").then(response => { | |||
| this.syqxzOptions = response.data; | |||
| }); | |||
| this.getDicts("land_type").then(response => { | |||
| this.dklbOptions = response.data; | |||
| // 新增地块信息的时候,去除地块类别中的承包地块选项 | |||
| if (!this.$route.query.id) { | |||
| let index = this.dklbOptions.findIndex(item => item.dictValue === '10'); | |||
| this.dklbOptions.splice(index, 1); | |||
| } | |||
| }); | |||
| this.getDicts("land_grade").then(response => { | |||
| this.dldjOptions = response.data; | |||
| @@ -238,7 +241,9 @@ | |||
| if (this.$route.query.id) { | |||
| this.titleName = '修改地块信息'; | |||
| this.isDisabled = true; | |||
| this.getDetail(); | |||
| setTimeout(() => { | |||
| this.getDetail(); | |||
| }, 500); | |||
| } else { | |||
| this.titleName = '新增地块信息'; | |||
| this.resetForm(); | |||
| @@ -270,11 +275,11 @@ | |||
| deptId: null, | |||
| dkbm: null, | |||
| dkmc: null, | |||
| syqxz: null, | |||
| dklb: null, | |||
| tdlylx: null, | |||
| dldj: null, | |||
| tdyt: null, | |||
| syqxz: '30', | |||
| dklb: '99', | |||
| tdlylx: '01', | |||
| dldj: '01', | |||
| tdyt: '1', | |||
| sfjbnt: '1', | |||
| scmjm: null, | |||
| zjrxm: null, | |||
| @@ -285,6 +290,11 @@ | |||
| dkbzxx: null, | |||
| theGeom: null | |||
| }; | |||
| this.syqxzText = '集体土地所有权'; | |||
| this.dklbText = '其他集体土地'; | |||
| this.tdlylxText = '【1】耕地'; | |||
| this.dldjText = '一等地'; | |||
| this.tdytText = '种植业'; | |||
| }, | |||
| getCoordinates() { | |||
| getDept(this.$route.query.deptId).then(response => { | |||
| @@ -303,6 +313,15 @@ | |||
| this.showOwnership = false; | |||
| }, | |||
| onConfirmLandCategoryOptions(value){ | |||
| /* if (this.$route.query.id && this.form.dklb === '10') { | |||
| this.$toast({ | |||
| icon: 'fail', | |||
| message: '当前地块为承包地块,不能修改地块类别', | |||
| duration: '2000' | |||
| }) | |||
| this.showLandCategory = false; | |||
| return ; | |||
| } */ | |||
| this.form.dklb = value.dictValue; | |||
| this.dklbText = value.dictLabel; | |||
| this.showLandCategory = false; | |||
| @@ -367,20 +386,6 @@ | |||
| }); | |||
| } | |||
| }); | |||
| /* this.form.deptId = this.$route.params.deptId; | |||
| this.form.cbfbm = this.$route.params.cbfbm; | |||
| addCbdkxx(this.form).then(response => { | |||
| if (response.code == 200) { | |||
| this.$toast({ | |||
| icon: 'success', | |||
| message: '保存成功', | |||
| duration:"1000", | |||
| onClose: () => { | |||
| this.goBack(); | |||
| } | |||
| }); | |||
| } | |||
| }); */ | |||
| } | |||
| }).catch(() => { | |||
| this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | |||
| @@ -399,7 +404,26 @@ | |||
| }); | |||
| }, | |||
| goBack() { | |||
| history.back(-1); | |||
| // history.back(-1); | |||
| this.$router.push({ | |||
| path:'/contracted/village/massif', | |||
| query: { | |||
| deptId: this.$route.query.deptId, | |||
| deptName: this.$route.query.deptName, | |||
| } | |||
| }); | |||
| }, | |||
| openLandCategoryPopup() { | |||
| // 修改时 && 地块类别为承包地块 不允许打开地块类别弹出层 | |||
| if (this.$route.query.id && this.form.dklb === '10') { | |||
| this.$toast({ | |||
| icon: 'fail', | |||
| message: '当前地块为承包地块,不能修改地块类别', | |||
| duration: '2000' | |||
| }) | |||
| return ; | |||
| } | |||
| this.showLandCategory = true; | |||
| } | |||
| }, | |||
| }; | |||