Преглед изворни кода

宅基地调查使用权人、农户删除

rongxin_prod
Xyq123* пре 1 година
родитељ
комит
a95fdae2cb
5 измењених фајлова са 82 додато и 23 уклоњено
  1. +8
    -0
      src/api/homesteadSurvey/shyqr.js
  2. +4
    -3
      src/views/homesteadSurvey/add2.vue
  3. +65
    -13
      src/views/homesteadSurvey/hncyList2.vue
  4. +4
    -6
      src/views/homesteadSurvey/list2.vue
  5. +1
    -1
      src/views/homesteadSurvey/nhcyList.vue

+ 8
- 0
src/api/homesteadSurvey/shyqr.js Прегледај датотеку

@@ -71,6 +71,14 @@ export function delShyqr(id) {
method: 'get' method: 'get'
}) })
} }
// 删除数据调查-使用权人
export function deleleShyqr(nhdm) {
return request({
url: '/home/homesteadshyqr/removeMobile/' + nhdm,
method: 'get'
})
}



// 设为户主-使用权人 // 设为户主-使用权人
export function setSyqrInfo(data) { export function setSyqrInfo(data) {


+ 4
- 3
src/views/homesteadSurvey/add2.vue Прегледај датотеку

@@ -105,7 +105,7 @@
</template> </template>


<script> <script>
import {getShyqrs,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
import {getShyqrs,addShyqr,updateShyqr,deleleShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd"; import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd";
import MapGisDrawing from "@/components/Map/MapGisDrawing"; import MapGisDrawing from "@/components/Map/MapGisDrawing";
import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz"; import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz";
@@ -202,7 +202,8 @@ export default {
// } // }
}, },
deleteshyqr(val){ deleteshyqr(val){
const ids = val.id || this.ids;
const nhdm = val.nhdm
console.info(val.id);
Dialog.confirm({ Dialog.confirm({
title: '系统提示', title: '系统提示',
message: '是否确认删除使用权人数据项?', message: '是否确认删除使用权人数据项?',
@@ -210,7 +211,7 @@ export default {
cancelButtonText: '取消' cancelButtonText: '取消'
}) })
.then(function() { .then(function() {
return delShyqr(ids);
return deleleShyqr(nhdm);
}).then(() => { }).then(() => {
this.$notify({ type: 'success' , message: "删除成功" }); this.$notify({ type: 'success' , message: "删除成功" });
location.reload(true); location.reload(true);


+ 65
- 13
src/views/homesteadSurvey/hncyList2.vue Прегледај датотеку

@@ -599,21 +599,73 @@
}, },
//删除户主 //删除户主
deletenh(item,index){ deletenh(item,index){
Dialog.confirm({
title: '警告',
message: '确认删除户内成员么?',
})
.then(() => {
// on confirm
delNhhncy(item.id).then(res => {
if(res.code=="200"){
this.hncylist.splice(index,1);
}
if(item.yhzgx !== "02"){
Dialog.confirm({
title: '警告',
message: '确认删除此户内成员?',
}) })
})
.catch(() => {
// on cancel
.then(() => {
// on confirm
delNhhncy(item.id).then(res => {
if(res.code=="200"){
this.getNh(this.shyqrData.nhdm);
}
})
})
.catch(() => {
// on cancel
});
}else{
let yes = true
let params={
nhdm : item.nhdm,
deptId: item.deptId
}
listNhhncy(params).then((res) => {
if(res.rows.length>1){
yes = false
this.$toast({
icon: 'error', // 找到自己需要的图标
message: '无法删除,此户主存在户内成员!',
duration:"1000",
onClose:function(){
}
})
}else{
listShyqr(params).then((res) => {
if(res.rows.length>0){
yes = false
this.$toast({
icon: 'error', // 找到自己需要的图标
message: '无法删除,此户主已经成为使用权人!',
duration:"1000",
onClose:function(){
}
})
}else{
if(yes){
Dialog.confirm({
title: '警告',
message: '确认删除此农户么?',
})
.then(() => {
// on confirm
delNhhncy(item.id).then(res => {
if(res.code=="200"){
this.getNh(this.shyqrData.nhdm);
}
})
})
.catch(() => {
// on cancel
});
}
}
});
}
}); });
}



}, },
// 设为户主 // 设为户主


+ 4
- 6
src/views/homesteadSurvey/list2.vue Прегледај датотеку

@@ -83,7 +83,7 @@
<p style="display: flex;align-items: center;margin-top: 5px;"><img src="../../assets/images/housesteadSurvey/list05.png" alt="" style="margin-right: 5px;">农户代码:<span style="margin-left: auto;">{{item.nhdm}}</span></p> <p style="display: flex;align-items: center;margin-top: 5px;"><img src="../../assets/images/housesteadSurvey/list05.png" alt="" style="margin-right: 5px;">农户代码:<span style="margin-left: auto;">{{item.nhdm}}</span></p>
</div> </div>
<template #right> <template #right>
<van-button square type="danger" class="delete-button" @click="deletenh(item.id)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt=""> 删除</van-button>
<van-button square type="danger" class="delete-button" @click="deletenh(item)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt=""> 删除</van-button>
</template> </template>
</van-swipe-cell> </van-swipe-cell>
</van-list> </van-list>
@@ -595,7 +595,7 @@
} }
listNhhncy(params).then((res) => { listNhhncy(params).then((res) => {
console.log(res.rows.length) console.log(res.rows.length)
if(res.rows.length>0){
if(res.rows.length>1){
yes = false yes = false
this.$toast({ this.$toast({
icon: 'error', // 找到自己需要的图标 icon: 'error', // 找到自己需要的图标
@@ -619,15 +619,13 @@
if(yes){ if(yes){
Dialog.confirm({ Dialog.confirm({
title: '警告', title: '警告',
message: '确认删除此使用权人么?',
message: '确认删除此农户么?',
}) })
.then(() => { .then(() => {
// on confirm // on confirm
delNh(item.id).then(res => { delNh(item.id).then(res => {
if(res.code=="200"){ if(res.code=="200"){
this.nhlist.splice(index,1);
this.totalH--
this.totalR--
this.getNh();
} }
}) })
}) })


+ 1
- 1
src/views/homesteadSurvey/nhcyList.vue Прегледај датотеку

@@ -84,7 +84,7 @@
</div> </div>
</div> </div>
<template #right> <template #right>
<van-button v-if="permission == 'true'" square text="删除" type="danger" class="delete-button" @click="deletehncy(item.id,index)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt="">删除</van-button>
<van-button v-if="permission == 'true' && item.yhzgx != '02'" square text="删除" type="danger" class="delete-button" @click="deletehncy(item.id,index)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt="">删除</van-button>
</template> </template>
</van-swipe-cell> </van-swipe-cell>
<van-dialog v-model="guohuData.visible" title="成员移户" show-cancel-button confirmButtonText="确认" cancelButtonText="关闭" @confirm="guohu" @cancel="show=false"> <van-dialog v-model="guohuData.visible" title="成员移户" show-cancel-button confirmButtonText="确认" cancelButtonText="关闭" @confirm="guohu" @cancel="show=false">


Loading…
Откажи
Сачувај