|
|
|
@ -74,12 +74,13 @@ Page({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 同步 picker 的数组与索引
|
|
|
|
// 同步 picker 的数组与索引
|
|
|
|
_syncPickerData() { |
|
|
|
_syncPickerData() { |
|
|
|
const { CurrentTreatmentPlanList, currentTreatmentPlan, TeprotumumabInfusionCountList, teprotumumabInfusionCount } = this.data |
|
|
|
const { CurrentTreatmentPlanList, currentTreatmentPlan, TeprotumumabInfusionCountList, teprotumumabInfusionCount } = |
|
|
|
|
|
|
|
this.data |
|
|
|
const cpKeys = Object.keys(CurrentTreatmentPlanList) |
|
|
|
const cpKeys = Object.keys(CurrentTreatmentPlanList) |
|
|
|
const cpNames = cpKeys.map(k => CurrentTreatmentPlanList[k]) |
|
|
|
const cpNames = cpKeys.map((k) => CurrentTreatmentPlanList[k]) |
|
|
|
const cpIndex = cpKeys.indexOf(String(currentTreatmentPlan)) |
|
|
|
const cpIndex = cpKeys.indexOf(String(currentTreatmentPlan)) |
|
|
|
const icKeys = Object.keys(TeprotumumabInfusionCountList) |
|
|
|
const icKeys = Object.keys(TeprotumumabInfusionCountList) |
|
|
|
const icNames = icKeys.map(k => TeprotumumabInfusionCountList[k]) |
|
|
|
const icNames = icKeys.map((k) => TeprotumumabInfusionCountList[k]) |
|
|
|
const icIndex = icKeys.indexOf(String(teprotumumabInfusionCount)) |
|
|
|
const icIndex = icKeys.indexOf(String(teprotumumabInfusionCount)) |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
currentTreatmentPlanNames: cpNames, |
|
|
|
currentTreatmentPlanNames: cpNames, |
|
|
|
@ -283,8 +284,8 @@ Page({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleNext() { |
|
|
|
handleNext() { |
|
|
|
const { name, gender, ageRange, relationType, diseaseStage } = this.data |
|
|
|
const { name, gender, ageRange, relationType } = this.data |
|
|
|
if (!name || !gender || !ageRange || !relationType || !diseaseStage) { |
|
|
|
if (!name || !gender || !ageRange || !relationType) { |
|
|
|
wx.showToast({ title: '完善个人信息,可获得【医生】更多关注', icon: 'none' }) |
|
|
|
wx.showToast({ title: '完善个人信息,可获得【医生】更多关注', icon: 'none' }) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
@ -315,8 +316,7 @@ Page({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSubmit() { |
|
|
|
handleSubmit() { |
|
|
|
app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' }) |
|
|
|
app.mpBehavior({ PageName: 'BTN_PatientInfoComfirm' }) |
|
|
|
if (this.data.submiting) |
|
|
|
if (this.data.submiting) return |
|
|
|
return |
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
|
name, |
|
|
|
name, |
|
|
|
gender, |
|
|
|
gender, |
|
|
|
@ -343,17 +343,14 @@ Page({ |
|
|
|
} = this.data |
|
|
|
} = this.data |
|
|
|
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData |
|
|
|
const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData |
|
|
|
const { doctorId, inviteChan, proMethodId } = app.globalData.scene |
|
|
|
const { doctorId, inviteChan, proMethodId } = app.globalData.scene |
|
|
|
const { showTeprotumumabFields } = this.data |
|
|
|
if (!name || !gender || !ageRange) { |
|
|
|
if (!name || !gender || !ageRange || !relationType || !diseaseStage || !diseasePeriod |
|
|
|
|
|
|
|
|| !firstDiagnosisDate || !isRelapse || !currentTreatmentPlan || !Object.values(pastTreatmentPlan).some(v => v) |
|
|
|
|
|
|
|
|| (showTeprotumumabFields && (!teprotumumabFirstInfusionDate || !teprotumumabInfusionCount))) { |
|
|
|
|
|
|
|
wx.showToast({ title: '完善个人信息,可获得【医生】更多关注', icon: 'none' }) |
|
|
|
wx.showToast({ title: '完善个人信息,可获得【医生】更多关注', icon: 'none' }) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const backPage = app.globalData.backPage |
|
|
|
const backPage = app.globalData.backPage |
|
|
|
const navUrl |
|
|
|
const navUrl = |
|
|
|
= typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/patient/pages/certReslove/index' |
|
|
|
typeof backPage === 'string' && backPage.includes('liveResult') ? backPage : '/patient/pages/certReslove/index' |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
submiting: true, |
|
|
|
submiting: true, |
|
|
|
@ -384,7 +381,9 @@ Page({ |
|
|
|
FirstDiagnosisDate: firstDiagnosisDate, |
|
|
|
FirstDiagnosisDate: firstDiagnosisDate, |
|
|
|
IsRelapse: isRelapse, |
|
|
|
IsRelapse: isRelapse, |
|
|
|
CurrentTreatmentPlan: currentTreatmentPlan, |
|
|
|
CurrentTreatmentPlan: currentTreatmentPlan, |
|
|
|
PastTreatmentPlan: Object.keys(pastTreatmentPlan).filter(k => pastTreatmentPlan[k]).join(','), |
|
|
|
PastTreatmentPlan: Object.keys(pastTreatmentPlan) |
|
|
|
|
|
|
|
.filter((k) => pastTreatmentPlan[k]) |
|
|
|
|
|
|
|
.join(','), |
|
|
|
TeprotumumabFirstInfusionDate: teprotumumabFirstInfusionDate || '', |
|
|
|
TeprotumumabFirstInfusionDate: teprotumumabFirstInfusionDate || '', |
|
|
|
TeprotumumabInfusionCount: teprotumumabInfusionCount || '', |
|
|
|
TeprotumumabInfusionCount: teprotumumabInfusionCount || '', |
|
|
|
|
|
|
|
|
|
|
|
@ -414,8 +413,8 @@ Page({ |
|
|
|
handleVisitors() { |
|
|
|
handleVisitors() { |
|
|
|
app.mpBehavior({ PageName: 'BTN_PatientInfoSkip' }) |
|
|
|
app.mpBehavior({ PageName: 'BTN_PatientInfoSkip' }) |
|
|
|
const backPage = app.globalData.backPage |
|
|
|
const backPage = app.globalData.backPage |
|
|
|
const navUrl |
|
|
|
const navUrl = |
|
|
|
= typeof backPage === 'string' && backPage.includes('liveResult') |
|
|
|
typeof backPage === 'string' && backPage.includes('liveResult') |
|
|
|
? backPage.replace('liveResult', 'liveDetail') |
|
|
|
? backPage.replace('liveResult', 'liveDetail') |
|
|
|
: '/patient/pages/index/index?visitors=1' |
|
|
|
: '/patient/pages/index/index?visitors=1' |
|
|
|
wx.ajax({ |
|
|
|
wx.ajax({ |
|
|
|
|