| xqd
@@ -1098,27 +1098,35 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- if (this.form.is_phone.mor_time == "") { //电话的早上服务时间
|
|
|
+ console.log(this.form.is_phone.mor_time == "",this.form.is_phone.aft_time == "",this.form.is_phone.nig_time == "")
|
|
|
+ if(this.form.is_phone.mor_time == ""&&this.form.is_phone.aft_time == ""&&this.form.is_phone.nig_time == ""){
|
|
|
uni.showToast({
|
|
|
- title: '请填写电话咨询的上午服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.form.is_phone.aft_time == "") { //电话的下午服务时间
|
|
|
- uni.showToast({
|
|
|
- title: '请填写电话咨询的下午服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.form.is_phone.nig_time == "") { //电话的晚上服务时间
|
|
|
- uni.showToast({
|
|
|
- title: '请填写电话咨询的晚上服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
+ title: '请至少选择一个服务时间段',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
}
|
|
|
+ // if (this.form.is_phone.mor_time == "") { //电话的早上服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写电话咨询的上午服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // if (this.form.is_phone.aft_time == "") { //电话的下午服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写电话咨询的下午服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // if (this.form.is_phone.nig_time == "") { //电话的晚上服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写电话咨询的晚上服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
if (this.form.is_phone.person == "") { //电话的服务人次
|
|
|
uni.showToast({
|
|
|
title: '请填写电话咨询的服务人次,否则无法保存',
|
| xqd
@@ -1139,27 +1147,34 @@
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
- if (this.form.is_chat.mor_time == "") { //图文的早上服务时间
|
|
|
- uni.showToast({
|
|
|
- title: '请填写图文咨询的上午服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.form.is_chat.aft_time == "") { //图文的下午服务时间
|
|
|
- uni.showToast({
|
|
|
- title: '请填写图文咨询的下午服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.form.is_chat.nig_time == "") { //图文的晚上服务时间
|
|
|
- uni.showToast({
|
|
|
- title: '请填写图文咨询的晚上服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
+ if(this.form.is_chat.mor_time == ""&&this.form.is_chat.aft_time == ""&&this.form.is_chat.nig_time == ""){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请至少保存一个时间段',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
}
|
|
|
+ // if (this.form.is_chat.mor_time == "") { //图文的早上服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写图文咨询的上午服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // if (this.form.is_chat.aft_time == "") { //图文的下午服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写图文咨询的下午服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // if (this.form.is_chat.nig_time == "") { //图文的晚上服务时间
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请填写图文咨询的晚上服务时间,否则无法保存',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
if (this.form.is_chat.person == "") { //图文的服务人次
|
|
|
uni.showToast({
|
|
|
title: '请填写图文咨询的同时服务人次,否则无法保存',
|
| xqd
@@ -1195,7 +1210,7 @@
|
|
|
if (item.service_time.aft.pmStartTime == "") {
|
|
|
uni.showToast({
|
|
|
title: '请填写' + item.name + '的下午服务时间,否则无法保存',
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
return false
|
|
|
}
|
| xqd
@@ -1316,15 +1331,17 @@
|
|
|
setPhoneData: async function() {
|
|
|
let that = this;
|
|
|
let forms = JSON.parse(JSON.stringify(that.form));
|
|
|
- let phone_am = forms.is_phone.mor_time != '' ? forms.is_phone.mor_time.split(' - ') : '';
|
|
|
- let phone_pm = forms.is_phone.aft_time != '' ? forms.is_phone.aft_time.split(' - ') : '';
|
|
|
- let phone_ni = forms.is_phone.nig_time != '' ? forms.is_phone.nig_time.split(' - ') : '';
|
|
|
+ let phone_am = forms.is_phone.mor_time != '' ? forms.is_phone.mor_time.split(' - ') : ['',''];
|
|
|
+ let phone_pm = forms.is_phone.aft_time != '' ? forms.is_phone.aft_time.split(' - ') : ['',''];
|
|
|
+ let phone_ni = forms.is_phone.nig_time != '' ? forms.is_phone.nig_time.split(' - ') : ['',''];
|
|
|
+ console.log("1111111111111111111111",phone_am,phone_pm,phone_ni)
|
|
|
forms.is_phone.amStartTime = phone_am != '' ? phone_am[0] : '';
|
|
|
forms.is_phone.amEndTime = phone_am != '' ? phone_am[1] : '';
|
|
|
forms.is_phone.pmStartTime = phone_pm != '' ? phone_pm[0] : '';
|
|
|
forms.is_phone.pmEndTime = phone_pm != '' ? phone_pm[1] : '';
|
|
|
forms.is_phone.nightStartTime = phone_ni != '' ? phone_ni[0] : '';
|
|
|
forms.is_phone.nightEndTime = phone_ni != '' ? phone_ni[1] : '';
|
|
|
+ console.log('2222222222222',forms.is_phone)
|
|
|
if(typeof forms == 'object'){
|
|
|
forms = JSON.stringify(forms)
|
|
|
}
|
| xqd
@@ -1427,11 +1444,11 @@
|
|
|
this.form.is_phone.base_price = data.base_price; //基础价格
|
|
|
this.form.is_phone.step_price = data.step_price; //步进价格
|
|
|
//早上 下午 晚上
|
|
|
- this.form.is_phone.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data
|
|
|
+ this.form.is_phone.mor_time = data.service_time[1] != undefined &&data.service_time[1].amStartTime != ":" ? data.service_time[1].amStartTime + ' - ' + data
|
|
|
.service_time[1].amEndTime : '';
|
|
|
- this.form.is_phone.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data
|
|
|
+ this.form.is_phone.aft_time = data.service_time[2] != undefined && data.service_time[2].pmStartTime != ":"? data.service_time[2].pmStartTime + ' - ' + data
|
|
|
.service_time[2].pmEndTime : '';
|
|
|
- this.form.is_phone.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
|
|
|
+ this.form.is_phone.nig_time = data.service_time[3] != undefined && data.service_time[3].nightStartTime!= ":"? data.service_time[3].nightStartTime + ' - ' +
|
|
|
data.service_time[3].nightEndTime : '';
|
|
|
this.form.is_phone.person = data.person; //服务人次
|
|
|
}
|