diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index 8af989c0..36f04ee0 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -447,7 +447,7 @@ maxlength="200" /> -
+
保存
@@ -480,7 +480,7 @@ -
+
+添加使用权人 +添加农户信息 @@ -516,7 +516,7 @@ -
+

添加自然幢信息

@@ -576,7 +576,7 @@ -
+

添加附属设施信息

@@ -613,7 +613,7 @@ placeholder="农户代码" required :rules="[{ required: true, message: '农户代码不能为空' }]" - @click="showsyqrnhdmlist = true" + @click="showsyqrnhdmlist = true,nhdmValue=null" readonly /> - - + + 未知 @@ -867,7 +858,7 @@ -
+
保存
@@ -1040,7 +1031,7 @@ placeholder="备注" /> -
+
保存
@@ -1262,7 +1253,7 @@ label="备注" placeholder="备注" /> -
+
保存
@@ -1844,7 +1835,7 @@ -
+
保存
@@ -2419,7 +2410,7 @@ placeholder="备注" /> -
+
保存
@@ -2634,7 +2625,7 @@ v-model="form5.sjly" style="display:none" /> -
+
保存
@@ -2672,7 +2663,7 @@ -
+

添加户内成员信息

@@ -2714,7 +2705,7 @@ -
+

添加房屋信息

@@ -3120,10 +3111,69 @@ enterMap: "", //记录从地图进入宅基地代码 enterMapZjddm:"", + + //审核状态 + isFinished:false, + // cookies + cookiesInfo:null, }; }, created(){ + if(this.$cookies.get("search")){ + if(this.$cookies.get("search").active!=null){ + this.cookiesInfo = this.$cookies.get("search") + this.$cookies.set("search","") + //返回地图值记录----start + this.backMap.activeBtn = 4; + this.enterMap =1; + this.backMap.backMapZjdAData = this.cookiesInfo.mapZjdAData; + this.backMap.deptId = this.cookiesInfo.mapZjdAData.deptId; + this.enterMapZjddm = this.cookiesInfo.mapZjdAData.zjddm; + //返回地图值记录----end + this.active = this.cookiesInfo.active; + this.item = this.cookiesInfo.mapZjdAData; + if(this.item.houseDataConfirmStatus!="CONFIRMED"){ + this.isFinished = true + } + this.form = this.cookiesInfo.mapZjdAData; + let zrz = this.cookiesInfo.mapZrzAData; + let fsss = this.cookiesInfo.mapFsssAData; + this.getnhdmlist(); + this.getBaseUrl(); + this.getZjd(); + if(this.cookiesInfo.active=="3"){ + this.showzrz= true + this.getZrzList() + setTimeout(() => { + this.showPopupzrz(zrz) + }, 500); + + }else if(this.cookiesInfo.active=="4"){ + this.showfsss= true + this.getFsssList() + setTimeout(() => { + this.showPopupfsss(fsss) + }, 500); + } + }else{ + this.item = this.cookiesInfo + if(this.item.houseDataConfirmStatus!="CONFIRMED"){ + this.isFinished = true + } + this.getBaseUrl(); + this.getnhdmlist(); + this.getZjd(); + } + }else{ + this.$set(this.item,"deptId",this.$cookies.get("item").deptId) + if(this.item.houseDataConfirmStatus!="CONFIRMED"){ + this.isFinished = true + } + this.getBaseUrl(); + this.getnhdmlist(); + this.getZjd(); + } this.getDicts("zjdlyzk").then(response => { this.lyzkOptions = response.data; }); @@ -3194,8 +3244,6 @@ } }); this.yhzgxOptions = arr; - - /*this.yhzgxOptions = response.data;*/ }); this.getDicts("rights_nature").then(response => { this.qlxzOptions = response.data; @@ -3230,52 +3278,6 @@ this.getDicts("Industry").then(response => { this.industryOptions = response.data; }); - if(this.$cookies.get("search")){ - if(this.$cookies.get("search").active!=null){ - //返回地图值记录----start - this.backMap.activeBtn = 4; - this.enterMap =1; - this.backMap.backMapZjdAData =this.$cookies.get("search").mapZjdAData; - this.backMap.deptId = this.$cookies.get("search").mapZjdAData.deptId; - this.enterMapZjddm = this.$cookies.get("search").mapZjdAData.zjddm; - //返回地图值记录----end - this.active = this.$cookies.get("search").active; - this.item = this.$cookies.get("search").mapZjdAData; - this.form = this.$cookies.get("search").mapZjdAData; - let zrz = this.$cookies.get("search").mapZrzAData; - let fsss = this.$cookies.get("search").mapFsssAData; - this.getnhdmlist(); - this.getBaseUrl(); - this.getZjd(); - if(this.$cookies.get("search").active=="3"){ - this.showzrz= true - this.getZrzList() - setTimeout(() => { - this.showPopupzrz(zrz) - }, 500); - - }else if(this.$cookies.get("search").active=="4"){ - this.showfsss= true - this.getFsssList() - setTimeout(() => { - this.showPopupfsss(fsss) - }, 500); - } - }else{ - this.item = this.$cookies.get("search") - this.getBaseUrl(); - this.getnhdmlist(); - this.getZjd(); - - } - }else{ - this.$set(this.item,"deptId",this.$cookies.get("item").deptId) - this.getBaseUrl(); - this.getnhdmlist(); - this.getZjd(); - - } - let a = document.cookie.split(';'); }, mounted(){ if(this.active ==1){ @@ -3286,28 +3288,87 @@ methods: { validatorIdcard(val){ if(this.form1.shyqrdbzjlx=='01'){ - let card18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ - return card18.test(val) + if(this.vcheckID(val)){ + return true + }else { + return false + } }else{ return true } }, validatorIdcard1(val){ if(this.nhform.hzzljx=='01'){ - let card18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ - return card18.test(val) + if(this.vcheckID(val)){ + return true + }else { + return false + } }else{ return true } }, validatorIdcard2(val){ if(this.form5.zjlx=='01'){ - let card18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ - return card18.test(val) + if(this.vcheckID(val)){ + return true + }else { + return false + } }else{ return true } }, + checkCode(val) { + var p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; + var factor = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ]; + var parity = [ 1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2 ]; + var code = val.substring(17); + if(p.test(val)) { + var sum = 0; + for(var i=0;i<17;i++) { + sum += val[i]*factor[i]; + } + if(parity[sum % 11] == code.toUpperCase()) { + return true; + } + } + return false; + }, + checkDate (val) { + var pattern = /^(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)$/; + if(pattern.test(val)) { + var year = val.substring(0, 4); + var month = val.substring(4, 6); + var date = val.substring(6, 8); + var date2 = new Date(year+"-"+month+"-"+date); + if(date2 && date2.getMonth() == (parseInt(month) - 1)) { + return true; + } + } + return false; + }, + checkProv(val) { + var pattern = /^[1-9][0-9]/; + var provs = {11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门"}; + if(pattern.test(val)) { + if(provs[val]) { + return true; + } + } + return false; + }, + vcheckID(val){ + if(this.checkCode(val)) { + var date = val.substring(6,14); + if(this.checkDate(date)) { + if(this.checkProv(val.substring(0,2))) { + return true; + } + } + } + return false; + }, showycbjinfo(){ this.showycbj = true if(this.form.isyc!=null&&this.form.isyc!=""){ @@ -4559,35 +4620,6 @@ if(this.form.id==null||this.form.id==""){ Notify({ type: 'danger', message: '请先保存宅基地信息' }); }else{ - /* if (this.form1.id != null) { - updateShyqr(this.form1).then(response => { - let _this =this - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '修改成功', - duration:"1000", - onClose:function(){ - _this.showsyqr = false - _this.active = 2 - _this.getSyqrList() - } - }) - }); - } else { - addShyqr(this.form1).then(response => { - let _this =this - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '保存成功', - duration:"1000", - onClose:function(){ - _this.showsyqr = false - _this.active = 2 - _this.getSyqrList() - } - }) - }); - }*/ if (this.form1.id != null) { if (this.form1.shyqrdbzjlx=='01'&&parseInt(this.form1.shyqrdbzjhm.substr(16, 1)) % 2 == 1) { if(this.form1.xb!='1'){ @@ -4629,9 +4661,8 @@ }) }); } - - } else { - if(this.form1.xb=='1'){ + } else if (this.form1.shyqrdbzjlx=='01'&&parseInt(this.form1.shyqrdbzjhm.substr(16, 1)) % 2 == 0) { + if(this.form1.xb!='0'){ Dialog.confirm({ title: '警告', message: '成员性别与身份证号中性别信息不符,是否继续保存?', @@ -4670,6 +4701,20 @@ }) }); } + }else{ + updateShyqr(this.form1).then(response => { + let _this =this + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '修改成功', + duration:"1000", + onClose:function(){ + _this.showsyqr = false + _this.active = 2 + _this.getSyqrList() + } + }) + }); } } else { if (this.form1.shyqrdbzjlx=='01'&&parseInt(this.form1.shyqrdbzjhm.substr(16, 1)) % 2 == 1) { @@ -4713,8 +4758,8 @@ }); } - } else { - if(this.form1.xb=='1'){ + } else if (this.form1.shyqrdbzjlx=='01'&&parseInt(this.form1.shyqrdbzjhm.substr(16, 1)) % 2 == 0) { + if(this.form1.xb!='0'){ Dialog.confirm({ title: '警告', message: '成员性别与身份证号中性别信息不符,是否继续保存?', @@ -4753,8 +4798,21 @@ }) }); } + }else{ + addShyqr(this.form1).then(response => { + let _this =this + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '保存成功', + duration:"1000", + onClose:function(){ + _this.showsyqr = false + _this.active = 2 + _this.getSyqrList() + } + }) + }); } - } } }, diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index 81cece91..0b8607fa 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -14,7 +14,8 @@ /> -

调查员.采集员

+

调查员.采集员

+

审核员

{{nickName}}

@@ -214,6 +215,8 @@ //宅调人员列表 taskExecutortions:[], + //当前用户级别 + businessLevel:1, }; }, created(){ @@ -221,7 +224,9 @@ this.taskExecutortions = response.data }) getInfo().then(response => { + console.log(response) this.nickName = response.user.nickName + this.businessLevel = response.user.businessLevel this.queryParams.taskExecutor = response.user.userName this.getList(); }); diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 1b525bf5..9a04cd4a 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -82,7 +82,11 @@ -->