diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue
index c1a9df63..89b71aa3 100644
--- a/src/views/homesteadSurvey/add.vue
+++ b/src/views/homesteadSurvey/add.vue
@@ -671,7 +671,7 @@
placeholder="使用权人代表证件号码"
maxlength="30"
required
- :rules="[{ required: true, message: '使用权人代表证件号码不能为空' }]"
+ :rules="[{ required: true, message: '使用权人代表证件号码不能为空' },{validator:validatorIdcard,message:'身份证号格式错误!'}]"
/>
+ :rules="[{ required: true, message: '是否共有不能为空' }]">
是
@@ -1117,7 +1117,7 @@
label="户主证件号码"
placeholder="户主证件号码"
required
- :rules="[{ required: true, message: '户主证件号码不能为空' }]"
+ :rules="[{ required: true, message: '户主证件号码不能为空' },,{validator:validatorIdcard1,message:'身份证号格式错误!'}]"
/>
@@ -3284,6 +3284,30 @@
}
},
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)
+ }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)
+ }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)
+ }else{
+ return true
+ }
+ },
showycbjinfo(){
this.showycbj = true
if(this.form.isyc!=null&&this.form.isyc!=""){
@@ -3485,8 +3509,8 @@
img.onload = () => {
const h = img.height
const w = img.width
- let ch = img.height/4
- let cw = img.width/4
+ let ch = img.height/6
+ let cw = img.width/6
let canvas = document.createElement('canvas')
let ctx = canvas.getContext('2d')
canvas.height = ch
@@ -3536,8 +3560,8 @@
img.onload = () => {
const h = img.height
const w = img.width
- let ch = img.height/4
- let cw = img.width/4
+ let ch = img.height/5
+ let cw = img.width/5
let canvas = document.createElement('canvas')
let ctx = canvas.getContext('2d')
canvas.height = ch
@@ -3967,7 +3991,12 @@
hzxm : item.xm,
hzzjlx : item.zjlx,
hzzjhm : item.zjhm,
- phone : item.lxdh
+ phone : item.lxdh,
+ jzqk: item.jzqk,
+ occupation :item.occupation,
+ hyzk: item.hyzk,
+ sfwbh:item.sfwbh,
+ sfpkh:item.sfpkh
}
setNhInfo(pnh).then(res => {
})
@@ -4034,10 +4063,10 @@
listSuyqr(params).then((response) => {
if(response.rows.length>0){
this.nhform.suyqrdm = response.rows[0].suyqrdm
- this.nhform.txdz = response.rows[0].dbrtxdz
+ this.nhform.txdz = response.rows[0].suyqrmc
}else{
this.nhform.suyqrdm = this.form.suyqrdm
- this.nhform.txdz = this.form.suyqrmc
+ this.nhform.txdz = this.form.zl
}
});
}else{
@@ -4239,7 +4268,7 @@
}
if(response.rows.length>0){
this.form.suyqrdm = response.rows[0].suyqrdm
- this.form.zl = response.rows[0].dbrtxdz
+ this.form.zl = response.rows[0].suyqrmc
}
});
}
@@ -4282,50 +4311,255 @@
},
onSubmithncy(){
if (this.form5.id != null) {
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
})
- }
- })
- });
- } else {
- addNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
+ if(this.form5.xb!='0'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
}
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
+ })
+ });
+ }
+ } else {
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
})
- }
- })
- });
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
+ if(this.form5.xb!='0'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+
}
},
onSubmitsyqr(){
if(this.form.id==null||this.form.id==""){
Notify({ type: 'danger', message: '请先保存宅基地信息' });
}else{
- if (this.form1.id != null) {
+ /* if (this.form1.id != null) {
updateShyqr(this.form1).then(response => {
let _this =this
this.$toast({
@@ -4353,6 +4587,174 @@
}
})
});
+ }*/
+ if (this.form1.id != null) {
+ if (this.form1.shyqrdbzjlx=='01'&&parseInt(this.form1.shyqrdbzjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form1.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '使用权人性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ 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()
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }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.xb=='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ 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()
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }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) {
+ if(this.form1.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '使用权人性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ 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()
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }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()
+ }
+ })
+ });
+ }
+
+ } else {
+ if(this.form1.xb=='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ 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()
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }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()
+ }
+ })
+ });
+ }
+ }
+
}
}
},
@@ -4406,6 +4808,7 @@
}
setSyqrInfo(psyqr).then(res => {
_this.shownh = false
+ _this.getSyqrList()
})
}
})
@@ -4621,7 +5024,7 @@
"deptId":this.item.deptId,
"zjlx":'01',
"zjlxName":"身份证",
- "yhzgx":"14",
+ "yhzgx":"12",
"yhzgxName":"妻",
"hyzk":'02',
"hklx":'1',
@@ -4652,7 +5055,7 @@
this.form5.zjlxName = "身份证"
}
if(this.form5.yhzgx==null||this.form5.yhzgx==""){
- this.form5.yhzgx = "14"
+ this.form5.yhzgx = "12"
this.form5.yhzgxName = "妻"
}
if(this.form5.hyzk==null||this.form5.hyzk==""){
diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue
index 79ed4462..6a098f48 100644
--- a/src/views/homesteadSurvey/list.vue
+++ b/src/views/homesteadSurvey/list.vue
@@ -296,7 +296,7 @@
required
placeholder="代表人证件号码"
input-align="right"
- :rules="[{ required: true, message: '' }]"
+ :rules="[{ required: true, message: '代表人证件号码不能为空' },{validator:validatorIdcardqlr,message:'身份证号格式错误!'}]"
/>
@@ -1428,6 +1428,30 @@
}
},
methods: {
+ validatorIdcardqlr(val){
+ if(this.qlrform.dbrzjlx=='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)
+ }else{
+ return true
+ }
+ },
+ validatorIdcardnh(val){
+ if(this.nhform.hzzjlx=='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)
+ }else{
+ return true
+ }
+ },
+ validatorIdcardhncy(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)
+ }else{
+ return true
+ }
+ },
deleteZjd(item,index){
Dialog.confirm({
title: '警告',
@@ -2214,47 +2238,478 @@
/* }*/
},
onConfirm(){},
- onSubmithncy(){
+ /*onSubmithncy(){
if (this.form5.id != null) {
- updateNhhncy(this.form5).then(response => {
- let _this =this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '修改成功',
- duration:"1000",
- onClose:function(){
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
- }
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
})
- }
- })
- });
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+
+ } else {
+ if(this.form5.xb=='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }
} else {
- addNhhncy(this.form5).then(response => {
- let _this = this
- this.$toast({
- icon: 'success', // 找到自己需要的图标
- message: '保存成功',
- duration:"1000",
- onClose:function(){
- _this.totalR+=1
- _this.totalH+=1
- _this.showhncy = false
- let params = {
- "nhdm":_this.form5.nhdm,
- deptId:_this.form5.deptId
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ _this.totalR+=1
+ _this.totalH+=1
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ _this.totalR+=1
+ _this.totalH+=1
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+
+ } else {
+ if(this.form5.xb=='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ _this.totalR+=1
+ _this.totalH+=1
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ _this.totalR+=1
+ _this.totalH+=1
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }
+
+ }
+ },*/
+ onSubmithncy(){
+ if (this.form5.id != null) {
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
+ if(this.form5.xb!='0'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }else{
+ updateNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '修改成功',
+ duration:"1000",
+ onClose:function(){
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
}
- listNhhncy(params).then((response) => {
- _this.hncylist = response.rows
+ })
+ });
+ }
+ } else {
+ if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
+ if(this.form5.xb!='1'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.totalR+=1
+ _this.totalH+=1
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
})
- }
- })
- });
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.totalR+=1
+ _this.totalH+=1
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
+ if(this.form5.xb!='0'){
+ Dialog.confirm({
+ title: '警告',
+ message: '成员性别与身份证号中性别信息不符,是否继续保存?',
+ })
+ .then(() => {
+ // on confirm
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.totalR+=1
+ _this.totalH+=1
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ })
+ .catch(() => {
+ // on cancel
+ });
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.totalR+=1
+ _this.totalH+=1
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+ }else{
+ addNhhncy(this.form5).then(response => {
+ let _this =this
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '保存成功',
+ duration:"1000",
+ onClose:function(){
+ _this.totalR+=1
+ _this.totalH+=1
+ _this.showhncy = false
+ let params = {
+ "nhdm":_this.form5.nhdm,
+ deptId:_this.form5.deptId
+ }
+ listNhhncy(params).then((response) => {
+ _this.hncylist = response.rows
+ })
+ }
+ })
+ });
+ }
+
}
},
mapShow() {