|
@@ -719,6 +719,7 @@ Page({
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+
|
|
|
if (!han.test(this.data.addOldname)) {
|
|
|
wx.showModal({
|
|
|
showCancel: false,
|
|
@@ -1156,11 +1157,15 @@ Page({
|
|
|
this.data.oldInfo.splice(index, 1)
|
|
|
this.data.otherInfo.splice(index, 1)
|
|
|
this.data.childInfo.splice(index, 1)
|
|
|
+ this.data.regularsInfo.splice(index, 1)
|
|
|
+ this.data.regularsInfos.splice(index, 1)
|
|
|
this.setData({
|
|
|
oldInfo: this.data.oldInfo,
|
|
|
nameArr: this.data.nameArr,
|
|
|
otherInfo: this.data.otherInfo,
|
|
|
childInfo: this.data.childInfo,
|
|
|
+ regularsInfo: this.data.regularsInfo,
|
|
|
+ regularsInfos: this.data.regularsInfos,
|
|
|
})
|
|
|
|
|
|
if ((this.data.activeIndex == index && this.data.activeIndex > 0) || (this.data.activeIndex > index && this.data.activeIndex > 0)) {
|
|
@@ -1283,18 +1288,27 @@ Page({
|
|
|
sex: e.data.words_result['性别'].words
|
|
|
})
|
|
|
} else {
|
|
|
- wx.showToast({
|
|
|
- title: "添加当前老人名字和扫描身份证名字不一致,请重新扫描",
|
|
|
- icon: 'none',
|
|
|
- duration: 2000,
|
|
|
+ console.log("姓名不一样的");
|
|
|
+ // wx.showToast({
|
|
|
+ // title: "添加当前老人名字和扫描身份证名字不一致,请重新扫描",
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000,
|
|
|
+ // })
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '添加当前老人名字和扫描身份证名字不一致,请重新扫描'
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
- wx.showToast({
|
|
|
- title: "身份证OCR识别失败",
|
|
|
- icon: 'none',
|
|
|
- duration: 2000,
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '身份证OCR识别失败'
|
|
|
})
|
|
|
+ // wx.showToast({
|
|
|
+ // title: "身份证OCR识别失败",
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000,
|
|
|
+ // })
|
|
|
}
|
|
|
},
|
|
|
complete: (e) => {
|
|
@@ -1335,10 +1349,27 @@ Page({
|
|
|
return
|
|
|
} else {
|
|
|
console.log(this.data.nameArr)
|
|
|
+ let han = /^[\u4e00-\u9fa5]+$/;
|
|
|
+ if (!han.test(e.detail.value )) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '您输入的内容不是汉字哦'
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if (e.detail.value .length < 2) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '老人姓名不可以少于两个字哦'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
let name = 'nameArr[' + this.data.activeIndex + '].name'
|
|
|
+ let oldName = 'oldInfo[' + this.data.activeIndex + '].name'
|
|
|
this.setData({
|
|
|
oldName: false,
|
|
|
- [name]: e.detail.value
|
|
|
+ [name]: e.detail.value,
|
|
|
+ [oldName]: e.detail.value
|
|
|
})
|
|
|
console.log(this.data.nameArr)
|
|
|
}
|
|
@@ -1487,13 +1518,47 @@ Page({
|
|
|
console.log(e.detail.value)
|
|
|
let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
let Infos = 'oldInfo[' + this.data.activeIndex + '].addressExt'
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].nativePlaceExt, "打印下这个");
|
|
|
+ let address = 'oldInfo[' + this.data.activeIndex + '].address'
|
|
|
+
|
|
|
+ const items = this.data.oldInfo[this.data.activeIndex].isSameWithAddress
|
|
|
+ const values = e.detail.value
|
|
|
+ for (let i = 0, lenI = items.length; i < lenI; ++i) {
|
|
|
+ items[i].checked = false
|
|
|
+ for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
|
|
|
+ if (items[i].name === values[j]) {
|
|
|
+ items[i].checked = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let isSameWithAddress = 'oldInfo[' + this.data.activeIndex + '].isSameWithAddress'
|
|
|
+ this.setData({
|
|
|
+ [isSameWithAddress]: items
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+ console.log(this.data.oldInfo[this.data.activeIndex].nativePlaceExt, "打印下这个");
|
|
|
if (e.detail.value[0] == '现居地址与户籍地址一致') {
|
|
|
+ if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length == 5) {
|
|
|
+ let nativePlaceId = '';
|
|
|
+ let nativePlace = '';
|
|
|
+ for (let value of this.data.oldInfo[this.data.activeIndex].chooseAdressArr) {
|
|
|
+ nativePlace += value.CIVILREGIONALISMNAME + '/'
|
|
|
+ nativePlaceId += value.CIVILREGIONALISMID + ','
|
|
|
+ console.log(value, "打印下");
|
|
|
+ }
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ address: nativePlace.substring(0, nativePlace.length - 1),
|
|
|
+ addressId: nativePlaceId.substring(0, nativePlaceId.length - 1),
|
|
|
+ })
|
|
|
+ }
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
isSameWithAddress: '是',
|
|
|
addressExt: this.data.oldInfo[this.data.activeIndex].nativePlaceExt,
|
|
|
+
|
|
|
})
|
|
|
this.setData({
|
|
|
[Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr,
|
|
@@ -1506,7 +1571,11 @@ Page({
|
|
|
addressExt: '',
|
|
|
})
|
|
|
this.setData({
|
|
|
+<<<<<<< HEAD
|
|
|
[Info]: '',
|
|
|
+=======
|
|
|
+ [Info]: [],
|
|
|
+>>>>>>> 4d87d7ac7ab7af3fd116baec7275859e5585ddfb
|
|
|
[Infos]: '',
|
|
|
})
|
|
|
console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
@@ -2235,6 +2304,17 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ tab1Change24_1:function(e){
|
|
|
+ let Info = 'oldInfo[' + this.data.activeIndex + '].demandExt'
|
|
|
+ this.setData({
|
|
|
+ [Info]: e.detail.value
|
|
|
+ })
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ demandExt: e.detail.value
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
tab1change25: function (e) {
|
|
|
if (e.detail.value == null || e.detail.value == '') {
|
|
|
this.setData({
|
|
@@ -2270,31 +2350,30 @@ Page({
|
|
|
let revise2 = "oldInfo[" + this.data.activeIndex + "].oldType[1].disable";
|
|
|
let revise3 = "oldInfo[" + this.data.activeIndex + "].oldType[2].disable";
|
|
|
let revise4 = "oldInfo[" + this.data.activeIndex + "].oldType[3].disable";
|
|
|
- let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[4].checked";
|
|
|
+ let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[3].checked";
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
oldType: JSON.stringify(e.detail.value)
|
|
|
})
|
|
|
- if (index1 >= 0) {
|
|
|
- this.setData({
|
|
|
- [revise2]: true,
|
|
|
- [revise3]: true,
|
|
|
- [revise4]: true,
|
|
|
- [revise5]: true
|
|
|
- })
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- console.log("反選的");
|
|
|
-
|
|
|
- this.setData({
|
|
|
- // [revise1]: false,
|
|
|
- [revise2]: false,
|
|
|
- [revise3]: false,
|
|
|
- [revise4]: false,
|
|
|
- [revise5]: false
|
|
|
- })
|
|
|
- index4 = -1;
|
|
|
- }
|
|
|
+ // if (index1 >= 0) {
|
|
|
+ // this.setData({
|
|
|
+ // [revise2]: true,
|
|
|
+ // [revise3]: true,
|
|
|
+ // [revise4]: true,
|
|
|
+ // [revise5]: true
|
|
|
+ // })
|
|
|
+ // return false;
|
|
|
+ // } else {
|
|
|
+ // console.log("反選的");
|
|
|
+ // this.setData({
|
|
|
+ // // [revise1]: false,
|
|
|
+ // [revise2]: false,
|
|
|
+ // [revise3]: false,
|
|
|
+ // [revise4]: false,
|
|
|
+ // [revise5]: false
|
|
|
+ // })
|
|
|
+ // index4 = -1;
|
|
|
+ // }
|
|
|
if (index2 >= 0) {
|
|
|
this.setData({
|
|
|
[revise1]: true,
|
|
@@ -2323,19 +2402,43 @@ Page({
|
|
|
[revise4]: false
|
|
|
})
|
|
|
}
|
|
|
- if (index4 >= 0) {
|
|
|
-
|
|
|
+ // if (index4 >= 0) {
|
|
|
+ // this.setData({
|
|
|
+ // [revise1]: true,
|
|
|
+ // [revise2]: true,
|
|
|
+ // [revise3]: true
|
|
|
+ // })
|
|
|
+ // return false;
|
|
|
+ // } else {
|
|
|
+ // this.setData({
|
|
|
+ // [revise1]: false,
|
|
|
+ // [revise2]: false,
|
|
|
+ // [revise3]: false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ if (index1 >= 0) {
|
|
|
this.setData({
|
|
|
- [revise1]: true,
|
|
|
[revise2]: true,
|
|
|
- [revise3]: true
|
|
|
+ [revise3]: true,
|
|
|
+ [revise4]: true,
|
|
|
+ [revise5]: true
|
|
|
})
|
|
|
return false;
|
|
|
- } else {
|
|
|
+ } else if(index4 >= 0){
|
|
|
this.setData({
|
|
|
[revise1]: false,
|
|
|
[revise2]: false,
|
|
|
- [revise3]: false
|
|
|
+ [revise3]: false,
|
|
|
+ [revise4]: false,
|
|
|
+ [revise5]: true
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.setData({
|
|
|
+ [revise1]: false,
|
|
|
+ [revise2]: false,
|
|
|
+ [revise3]: false,
|
|
|
+ [revise4]: false,
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -2416,6 +2519,10 @@ Page({
|
|
|
this.setData({
|
|
|
[Info]: []
|
|
|
})
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ // childInfo:JSON.stringify([]),
|
|
|
+ // })
|
|
|
} else if (e.detail.value == 1) {
|
|
|
this.setData({
|
|
|
[Info]: [{
|
|
@@ -2503,16 +2610,31 @@ Page({
|
|
|
}
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
- childrenNum: e.detail.value
|
|
|
+ childrenNum: e.detail.value,
|
|
|
+ childInfo: JSON.stringify(this.data.childInfo[this.data.activeIndex].Info)
|
|
|
// childrenNum: this.data.childNums[e.detail.value].substring(0, 1)
|
|
|
})
|
|
|
},
|
|
|
// 子女姓名
|
|
|
tab2Change2: function (e) {
|
|
|
+ let han = /^[\u4e00-\u9fa5]+$/;
|
|
|
+ if (!han.test(e.detail.value )) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '您输入的内容不是汉字哦'
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if (e.detail.value .length < 2) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '赡养人姓名不可以少于两个字哦'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
let child = 'childInfo[' + this.data.activeIndex + '].Info[' + e.currentTarget.dataset.index + '].name';
|
|
|
console.log(this.data.childInfo[this.data.activeIndex].Info, "多个数字的问题");
|
|
|
console.log(JSON.stringify(this.data.childInfo[this.data.activeIndex].Info));
|
|
|
-
|
|
|
this.setData({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
@@ -2643,6 +2765,7 @@ Page({
|
|
|
tab3Change1: function (e) {
|
|
|
// 否是1
|
|
|
console.log(e.detail.value, "1111111");
|
|
|
+
|
|
|
let isHasOther = 'otherInfo[' + this.data.activeIndex + '].isHasOther'
|
|
|
if (e.detail.value == '0') {
|
|
|
this.setData({
|
|
@@ -2669,6 +2792,21 @@ Page({
|
|
|
},
|
|
|
// 其他赡养人姓名
|
|
|
tab3Change2: function (e) {
|
|
|
+ let han = /^[\u4e00-\u9fa5]+$/;
|
|
|
+ if (!han.test(e.detail.value )) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '您输入的内容不是汉字哦'
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if (e.detail.value .length < 2) {
|
|
|
+ wx.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '赡养人姓名不可以少于两个字哦'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
let Info = 'otherInfo[' + this.data.activeIndex + '].Info.name'
|
|
|
this.setData({
|
|
|
[Info]: e.detail.value,
|
|
@@ -2845,7 +2983,7 @@ Page({
|
|
|
let visitMode1 = 'regularsInfo[' + this.data.activeIndex + '].visitMode'
|
|
|
this.setData({
|
|
|
[visitMode]: items,
|
|
|
- [visitMode1]: e.detail.value
|
|
|
+ [visitMode1]:JSON.stringify( e.detail.value)
|
|
|
})
|
|
|
console.log(this.data.regularsInfo, "我是?????????????");
|
|
|
|
|
@@ -2858,9 +2996,17 @@ Page({
|
|
|
tab4Change2: function (e) {
|
|
|
let Info = 'regularsInfos[' + this.data.activeIndex + '].visitModeExt'
|
|
|
let Info1 = 'regularsInfo[' + this.data.activeIndex + '].visitModeExt'
|
|
|
+ let visitMode1 = 'regularsInfo[' + this.data.activeIndex + '].visitMode'
|
|
|
+ let arrs = [];
|
|
|
+ this.data.regularsInfos[this.data.activeIndex].visitMode.forEach(item => {
|
|
|
+ if (item.checked) {
|
|
|
+ arrs.push(item.name)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.setData({
|
|
|
[Info]: e.detail.value,
|
|
|
- [Info1]: e.detail.value
|
|
|
+ [Info1]: e.detail.value,
|
|
|
+ [visitMode1]: JSON.stringify(arrs),
|
|
|
})
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2883,9 +3029,17 @@ Page({
|
|
|
})
|
|
|
let visitCount = 'regularsInfos[' + this.data.activeIndex + '].visitCount'
|
|
|
let visitCount1 = 'regularsInfo[' + this.data.activeIndex + '].visitCount'
|
|
|
+ let visitMode1 = 'regularsInfo[' + this.data.activeIndex + '].visitMode'
|
|
|
+ let arrs = [];
|
|
|
+ this.data.regularsInfos[this.data.activeIndex].visitMode.forEach(item => {
|
|
|
+ if (item.checked) {
|
|
|
+ arrs.push(item.name)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.setData({
|
|
|
[visitCount]: data,
|
|
|
- [visitCount1]: e.detail.value
|
|
|
+ [visitCount1]: e.detail.value,
|
|
|
+ [visitMode1]: JSON.stringify(arrs),
|
|
|
})
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2896,9 +3050,17 @@ Page({
|
|
|
tab4change4: function (e) {
|
|
|
let Info = 'regularsInfos[' + this.data.activeIndex + '].visitCountExt'
|
|
|
let Info1 = 'regularsInfo[' + this.data.activeIndex + '].visitCountExt'
|
|
|
+ let visitMode1 = 'regularsInfo[' + this.data.activeIndex + '].visitMode'
|
|
|
+ let arrs = [];
|
|
|
+ this.data.regularsInfos[this.data.activeIndex].visitMode.forEach(item => {
|
|
|
+ if (item.checked) {
|
|
|
+ arrs.push(item.name)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.setData({
|
|
|
[Info]: e.detail.value,
|
|
|
- [Info1]: e.detail.value
|
|
|
+ [Info1]: e.detail.value,
|
|
|
+ [visitMode1]: JSON.stringify(arrs),
|
|
|
})
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -3306,8 +3468,17 @@ Page({
|
|
|
}, {
|
|
|
name: "多重残疾"
|
|
|
}];
|
|
|
-
|
|
|
-
|
|
|
+ let sickType = [{
|
|
|
+ name: "重大器官类疾病"
|
|
|
+ }, {
|
|
|
+ name: "心脑血管类疾病"
|
|
|
+ }, {
|
|
|
+ name: "神经与代谢类疾病"
|
|
|
+ }, {
|
|
|
+ name: "肢体与病毒类疾病"
|
|
|
+ }, {
|
|
|
+ name: "恶性肿瘤"
|
|
|
+ }];
|
|
|
let moneyFromAyy = [{
|
|
|
name: "家庭经营性收入"
|
|
|
}, {
|
|
@@ -3532,13 +3703,16 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- // isSameWithAddress
|
|
|
-
|
|
|
- // else if (item.isSameWithAddress == '否') {
|
|
|
-
|
|
|
- // } else {
|
|
|
-
|
|
|
- // }
|
|
|
+ if(item.majorDiseases[0]){
|
|
|
+ let patorl = this.removeExcess(item.majorDiseases[0]);
|
|
|
+ sickType.forEach(items => {
|
|
|
+ patorl.forEach(itemss => {
|
|
|
+ if (items.name == itemss) {
|
|
|
+ items.checked = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
loveRequire.forEach(itemss => {
|
|
|
item.demand.forEach(item => {
|
|
|
if (itemss.name == item) {
|
|
@@ -3562,6 +3736,8 @@ Page({
|
|
|
item.checked = true;
|
|
|
})
|
|
|
chooseAdressArr1 = chooseAdressArr;
|
|
|
+ }else {
|
|
|
+ chooseAdressArr1 = [];
|
|
|
}
|
|
|
}
|
|
|
let addressExts = '';
|
|
@@ -3584,6 +3760,7 @@ Page({
|
|
|
|
|
|
return {
|
|
|
...item,
|
|
|
+ sickType:sickType,
|
|
|
oldSex: oldSex.map(items => {
|
|
|
if (items.name == item.sex) {
|
|
|
return {
|
|
@@ -3651,7 +3828,7 @@ Page({
|
|
|
})
|
|
|
let def = datass.map(item => {
|
|
|
console.log(item.otherInfo, ";;;;;;;;;;;;;;;;;;;;;;;;;;");
|
|
|
- let sex = [{
|
|
|
+ let sexs = [{
|
|
|
name: '男',
|
|
|
checked: false
|
|
|
},
|
|
@@ -3672,7 +3849,7 @@ Page({
|
|
|
let outgoingplace = ''
|
|
|
let phone2 = ''
|
|
|
let name2 = ''
|
|
|
-
|
|
|
+ let sex = '';
|
|
|
let visit = '';
|
|
|
if (item.otherInfo) {
|
|
|
let partol = this.removeExcess(item.otherInfo);
|
|
@@ -3681,9 +3858,10 @@ Page({
|
|
|
name = partol.name
|
|
|
}
|
|
|
if (partol.sex) {
|
|
|
- sex.forEach(items => {
|
|
|
+ sexs.forEach(items => {
|
|
|
if (items.name == partol.sex) {
|
|
|
items.checked = true;
|
|
|
+ sex = partol.sex ;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -3749,7 +3927,8 @@ Page({
|
|
|
visit: visit,
|
|
|
name2: name2,
|
|
|
phone2: phone2,
|
|
|
- othersyrSexArr: sex
|
|
|
+ othersyrSexArr: sexs,
|
|
|
+ sex :sex ,
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -3848,9 +4027,10 @@ Page({
|
|
|
];
|
|
|
if (item.regularsInfo) {
|
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
|
+ let partols = this.removeExcess(partol.visitMode);
|
|
|
if (partol.visitMode) {
|
|
|
visitMode.forEach(items => {
|
|
|
- partol.visitMode.forEach(itemss => {
|
|
|
+ partols.forEach(itemss => {
|
|
|
if (items.name == itemss) {
|
|
|
items.checked = true;
|
|
|
}
|
|
@@ -3882,12 +4062,14 @@ Page({
|
|
|
let mmm = datass.map(item => {
|
|
|
if (item.regularsInfo) {
|
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
|
+ let partols = this.removeExcess(partol.visitMode);
|
|
|
console.log(partol, "111111111111111111111");
|
|
|
+ console.log(partols, "99999999999999999999");
|
|
|
return {
|
|
|
visitCount: partol.visitCount,
|
|
|
visitCountExt: partol.visitCountExt,
|
|
|
- visitMode: partol.visitCouvisitModepartolnt,
|
|
|
- visitModeExt: partol.visivisitModeExttCount,
|
|
|
+ visitMode: partols,
|
|
|
+ visitModeExt: partol.visitModeExt,
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -4222,24 +4404,28 @@ Page({
|
|
|
},
|
|
|
onShow() {
|
|
|
console.log("Onshow。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。");
|
|
|
- console.log(isTwoOnshow, "1111111111111");
|
|
|
- console.log(this.data.nameArr.length, "namearr长度");
|
|
|
- const app = getApp();
|
|
|
- if (isTwoOnshow) {
|
|
|
- isTwoOnshow = false;
|
|
|
- return;
|
|
|
- };
|
|
|
- if (isonShow) {
|
|
|
- isonShow = false;
|
|
|
- return;
|
|
|
- };
|
|
|
-
|
|
|
- this.setData({
|
|
|
- addOldname: '',
|
|
|
- currentIndex: 0
|
|
|
- })
|
|
|
- console.log(app.globalData.id, "传参的一户的值");
|
|
|
- this.huixian(app.globalData.id, app.globalData.name);
|
|
|
+ if (wx.getStorageSync('user') == '') {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/login/login',
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ const app = getApp();
|
|
|
+ if (isTwoOnshow) {
|
|
|
+ isTwoOnshow = false;
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ if (isonShow) {
|
|
|
+ isonShow = false;
|
|
|
+ return;
|
|
|
+ };
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ addOldname: '',
|
|
|
+ currentIndex: 0
|
|
|
+ })
|
|
|
+ console.log(app.globalData.id, "传参的一户的值");
|
|
|
+ this.huixian(app.globalData.id, app.globalData.name);
|
|
|
+ }
|
|
|
},
|
|
|
onHide() {
|
|
|
const app = getApp()
|
|
@@ -4301,8 +4487,22 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
onLoad(value) {
|
|
|
+<<<<<<< HEAD
|
|
|
this.huixian1(value.id, value.name);
|
|
|
this.chooseAdress();
|
|
|
+=======
|
|
|
+ console.log(wx.getStorageSync('user'), "打印");
|
|
|
+ if (wx.getStorageSync('user') == '') {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/login/login',
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ console.log(value, "onLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoad");
|
|
|
+ this.huixian1(value.id, value.name);
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.getSelfLocation();
|
|
|
+>>>>>>> 4d87d7ac7ab7af3fd116baec7275859e5585ddfb
|
|
|
},
|
|
|
huixian1(id, name) {
|
|
|
if (id) {
|
|
@@ -4943,10 +5143,10 @@ Page({
|
|
|
];
|
|
|
if (item.regularsInfo) {
|
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
|
- console.log(partol, "777777777777777777777");
|
|
|
+ let partols = this.removeExcess(partol.visitMode);
|
|
|
if (partol.visitMode) {
|
|
|
visitMode.forEach(items => {
|
|
|
- partol.visitMode.forEach(itemss => {
|
|
|
+ partols.forEach(itemss => {
|
|
|
if (items.name == itemss) {
|
|
|
items.checked = true;
|
|
|
}
|
|
@@ -4978,11 +5178,17 @@ Page({
|
|
|
let mmm = datass.map(item => {
|
|
|
if (item.regularsInfo) {
|
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
|
+<<<<<<< HEAD
|
|
|
+=======
|
|
|
+ let partols = this.removeExcess(partol.visitMode);
|
|
|
+ console.log(partol, "111111111111111111111");
|
|
|
+ console.log(partols, "99999999999999999999");
|
|
|
+>>>>>>> 4d87d7ac7ab7af3fd116baec7275859e5585ddfb
|
|
|
return {
|
|
|
visitCount: partol.visitCount,
|
|
|
visitCountExt: partol.visitCountExt,
|
|
|
- visitMode: partol.visitCouvisitModepartolnt,
|
|
|
- visitModeExt: partol.visivisitModeExttCount,
|
|
|
+ visitMode: partols,
|
|
|
+ visitModeExt: partol.visitModeExt,
|
|
|
}
|
|
|
}
|
|
|
})
|