|
@@ -302,7 +302,7 @@
|
|
<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
|
|
<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
|
|
提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
|
|
提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
|
|
</view>
|
|
</view>
|
|
- <view class="bottomButton" @click="pd">保存</view>
|
|
|
|
|
|
+ <view class="bottomButton" @click="pd">保存{{curNow==0?"电话":curNow==1?"图文":"门诊"}}设置</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -310,10 +310,11 @@
|
|
export default {
|
|
export default {
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.getShows();
|
|
this.getShows();
|
|
- this.$nextTick(function() {
|
|
|
|
- this.addTime()
|
|
|
|
- })
|
|
|
|
- console.log(this.form.is_appoint.hospitalList.length)
|
|
|
|
|
|
+ this.getPhoneData();
|
|
|
|
+ // this.$nextTick(function() {
|
|
|
|
+ // this.addTime()
|
|
|
|
+ // })
|
|
|
|
+ // console.log(this.form.is_appoint.hospitalList.length)
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
|
@@ -1068,168 +1069,171 @@
|
|
|
|
|
|
/* 分段器选择 */
|
|
/* 分段器选择 */
|
|
sectionChange(index) {
|
|
sectionChange(index) {
|
|
|
|
+ switch(index){
|
|
|
|
+ case 0:this.getPhoneData();break;
|
|
|
|
+ case 1:this.getChatData();break;
|
|
|
|
+ case 2:this.getMenData();break;
|
|
|
|
+ }
|
|
this.curNow = index;
|
|
this.curNow = index;
|
|
},
|
|
},
|
|
|
|
|
|
/* 保存 */
|
|
/* 保存 */
|
|
pd() {
|
|
pd() {
|
|
- // 计算号源
|
|
|
|
let that = this
|
|
let that = this
|
|
//判断有没有填写填写完整
|
|
//判断有没有填写填写完整
|
|
- console.log(this.form)
|
|
|
|
- //电话
|
|
|
|
- if (that.showList[0].flag) { //如果打开了电话服务
|
|
|
|
- if(this.form.is_phone.base_price == ""){ //电话的基础价格没有填
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写电话咨询的基础价格,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- if(this.form.is_phone.step_price == ""){ //电话的步进价格没有填
|
|
|
|
- uni.showToast({
|
|
|
|
- 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:'请填写电话咨询的服务人次,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //图文
|
|
|
|
- if (that.showList[1].flag) { //如果打开了图文服务
|
|
|
|
- if(this.form.is_chat.base_price == ""){ //图文的基础价格没有填
|
|
|
|
- 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:'请填写图文咨询的同时服务人次,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //门诊
|
|
|
|
- if (that.showList[2].flag) {
|
|
|
|
- that.form.is_appoint.hospitalList.forEach(item => {
|
|
|
|
- //基础价格
|
|
|
|
- if(item.appoint_price == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的基础价格,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- //上午
|
|
|
|
- if(item.service_time.mon.amStartTime == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的上午服务时间,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- //下午
|
|
|
|
- if(item.service_time.aft.pmStartTime == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的下午服务时间,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- //晚上
|
|
|
|
- if(item.service_time.nig.nightStartTime== "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的晚上服务时间,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- //就诊时长
|
|
|
|
- if(item.service_times == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的就诊时长,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
|
|
+ switch(this.curNow){
|
|
|
|
+ case 0: //电话的保存
|
|
|
|
+ if (that.showList[0].flag) { //如果打开了电话服务
|
|
|
|
+ if (this.form.is_phone.base_price == "") { //电话的基础价格没有填
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写电话咨询的基础价格,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ if (this.form.is_phone.step_price == "") { //电话的步进价格没有填
|
|
|
|
+ uni.showToast({
|
|
|
|
+ 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: '请填写电话咨询的服务人次,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ this.setPhoneData()
|
|
}
|
|
}
|
|
- //同时服务订单数
|
|
|
|
- if(item.service_num == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的同时服务订单数,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ case 1: //图文的保存
|
|
|
|
+ if (that.showList[1].flag) { //如果打开了图文服务
|
|
|
|
+ if (this.form.is_chat.base_price == "") { //图文的基础价格没有填
|
|
|
|
+ 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: '请填写图文咨询的同时服务人次,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ this.setChatData()
|
|
}
|
|
}
|
|
- //可预约天数
|
|
|
|
- if(item.show_days == "" ){
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请填写'+item.name+'的可预约天数,否则无法保存',
|
|
|
|
- icon:'none'
|
|
|
|
|
|
+ break;
|
|
|
|
+ case 2: //门诊的保存
|
|
|
|
+ if (that.showList[2].flag) {
|
|
|
|
+ that.form.is_appoint.hospitalList.forEach(item => {
|
|
|
|
+ //基础价格
|
|
|
|
+ if (item.appoint_price == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的基础价格,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //上午
|
|
|
|
+ if (item.service_time.mon.amStartTime == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的上午服务时间,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //下午
|
|
|
|
+ if (item.service_time.aft.pmStartTime == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的下午服务时间,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //晚上
|
|
|
|
+ if (item.service_time.nig.nightStartTime == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的晚上服务时间,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //就诊时长
|
|
|
|
+ if (item.service_times == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的就诊时长,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //同时服务订单数
|
|
|
|
+ if (item.service_num == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的同时服务订单数,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ //可预约天数
|
|
|
|
+ if (item.show_days == "") {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请填写' + item.name + '的可预约天数,否则无法保存',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- return false
|
|
|
|
|
|
+ this.setMenData()
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
-
|
|
|
|
- // uni.showModal({
|
|
|
|
- // title: "请确定信息填写完整,否则无法保存",
|
|
|
|
- // success: function(res) {
|
|
|
|
- // if (res.confirm) {
|
|
|
|
- that.bc()
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -1304,301 +1308,448 @@
|
|
|
|
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
- * @author Liu Yuanhang
|
|
|
|
- * 获取页面显示状态以及数据
|
|
|
|
- */
|
|
|
|
- getShows: async function() {
|
|
|
|
- let res = await this.$request.post('doctor/getSettingListnew', {
|
|
|
|
|
|
+ * 保存电话设置
|
|
|
|
+ * */
|
|
|
|
+ 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(' - ') : '';
|
|
|
|
+ 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("保存电话设置",forms.is_phone)
|
|
|
|
+ console.log("保存电话设置",forms)
|
|
|
|
+ let sp = await this.$request.post('doctor/getSettingPhone', {
|
|
|
|
+ data: forms.is_phone,
|
|
|
|
+ });
|
|
|
|
+ if (sp.status == 0) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 1500,
|
|
|
|
+ title: '操作成功',
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ *保存图文设置
|
|
|
|
+ * */
|
|
|
|
+ setChatData: async function() {
|
|
|
|
+ let that = this;
|
|
|
|
+ let forms = JSON.parse(JSON.stringify(that.form));
|
|
|
|
+ let chat_am = forms.is_chat.mor_time != '' ? forms.is_chat.mor_time.split(' - ') : '';
|
|
|
|
+ let chat_pm = forms.is_chat.aft_time != '' ? forms.is_chat.aft_time.split(' - ') : '';
|
|
|
|
+ let chat_ni = forms.is_chat.nig_time != '' ? forms.is_chat.nig_time.split(' - ') : '';
|
|
|
|
+ forms.is_chat.amStartTime = chat_am != '' ? chat_am[0] : '';
|
|
|
|
+ forms.is_chat.amEndTime = chat_am != '' ? chat_am[1] : '';
|
|
|
|
+ forms.is_chat.pmStartTime = chat_pm != '' ? chat_pm[0] : '';
|
|
|
|
+ forms.is_chat.pmEndTime = chat_pm != '' ? chat_pm[1] : '';
|
|
|
|
+ forms.is_chat.nightStartTime = chat_ni != '' ? chat_ni[0] : '';
|
|
|
|
+ forms.is_chat.nightEndTime = chat_ni != '' ? chat_ni[1] : '';
|
|
|
|
+ let sc = await this.$request.post('doctor/getSettingChat', {
|
|
|
|
+ data: forms.is_chat,
|
|
'type': 2
|
|
'type': 2
|
|
});
|
|
});
|
|
- console.log("res", res);
|
|
|
|
- if (res.status == 0) {
|
|
|
|
- // 1.控制列表显示,2.渲染数据
|
|
|
|
- //ltb 分段器赋值
|
|
|
|
- this.showList[0].flag = res.data.show.is_phone;
|
|
|
|
- this.showList[1].flag = res.data.show.is_chat;
|
|
|
|
- this.showList[2].flag = res.data.show.is_appoint;
|
|
|
|
-
|
|
|
|
- // 渲染显示的基础价格设置
|
|
|
|
- this.form.is_phone.person = '';
|
|
|
|
- this.form.is_chat.person = '';
|
|
|
|
- this.form.is_appoint.person = '';
|
|
|
|
-
|
|
|
|
- if (res.data.list.phone.length != 0) {
|
|
|
|
- // 渲染电话的基础数据
|
|
|
|
- this.form.is_phone.base_price = res.data.list.phone.base_price;
|
|
|
|
- this.form.is_phone.step_price = res.data.list.phone.step_price;
|
|
|
|
-
|
|
|
|
- this.form.is_phone.mor_time = res.data.list.phone.service_time[1] != undefined ? res.data.list.phone.service_time[
|
|
|
|
- 1].amStartTime + ' - ' + res.data.list.phone.service_time[1].amEndTime : '';
|
|
|
|
- this.form.is_phone.aft_time = res.data.list.phone.service_time[2] != undefined ? res.data.list.phone.service_time[
|
|
|
|
- 2].pmStartTime + ' - ' + res.data.list.phone.service_time[2].pmEndTime : '';
|
|
|
|
- this.form.is_phone.nig_time = res.data.list.phone.service_time[3] != undefined ? res.data.list.phone.service_time[
|
|
|
|
- 3].nightStartTime + ' - ' + res.data.list.phone.service_time[3].nightEndTime : '';
|
|
|
|
-
|
|
|
|
- this.form.is_phone.person = res.data.list.phone.person;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (res.data.list.chat.length != 0) {
|
|
|
|
- // 渲染图文的基础数据
|
|
|
|
- this.form.is_chat.base_price = res.data.list.chat.base_price;
|
|
|
|
- this.form.is_chat.step_price = res.data.list.chat.step_price;
|
|
|
|
- this.form.is_chat.person = res.data.list.chat.person;
|
|
|
|
-
|
|
|
|
- this.form.is_chat.mor_time = res.data.list.chat.service_time[1] != undefined ? res.data.list.chat.service_time[
|
|
|
|
- 1]
|
|
|
|
- .amStartTime + ' - ' + res.data.list.chat.service_time[1].amEndTime : '';
|
|
|
|
- this.form.is_chat.aft_time = res.data.list.chat.service_time[2] != undefined ? res.data.list.chat.service_time[
|
|
|
|
- 2]
|
|
|
|
- .pmStartTime + ' - ' + res.data.list.chat.service_time[2].pmEndTime : '';
|
|
|
|
- this.form.is_chat.nig_time = res.data.list.chat.service_time[3] != undefined ? res.data.list.chat.service_time[
|
|
|
|
- 3]
|
|
|
|
- .nightStartTime + ' - ' + res.data.list.chat.service_time[3].nightEndTime : '';
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (res.data.list.men.length != 0) {
|
|
|
|
- let dataList = res.data.list.men;
|
|
|
|
- let lists = [];
|
|
|
|
- for (let i = 0; i < dataList.length; i++) {
|
|
|
|
- /**
|
|
|
|
- * 计算所有医院的上下晚时间段时长,用于计算号源
|
|
|
|
- * 需要拿到开始时间和结束时间,相减并判断是否为半点
|
|
|
|
- * 公式:( 结束时间(小时) - 开始时间(小时) ) * 60- ( 结束时间(分钟) - 开始时间(分钟) ) = 时长
|
|
|
|
- * */
|
|
|
|
- let monDuration = (dataList[i].service_time[1].amEndTime.substr(0, 2) - dataList[i].service_time[1].amStartTime
|
|
|
|
- .substr(0, 2)) * 60 + (dataList[i].service_time[1].amEndTime.substr(3, 5) - dataList[i].service_time[1].amStartTime
|
|
|
|
- .substr(3, 5))
|
|
|
|
- let aftDuration = (dataList[i].service_time[2].pmEndTime.substr(0, 2) - dataList[i].service_time[2].pmStartTime
|
|
|
|
- .substr(0, 2)) * 60 + (dataList[i].service_time[2].pmEndTime.substr(3, 5) - dataList[i].service_time[2].pmStartTime
|
|
|
|
- .substr(3, 5))
|
|
|
|
- let nigDuration = (dataList[i].service_time[3].nightEndTime.substr(0, 2) - dataList[i].service_time[3].nightStartTime
|
|
|
|
- .substr(0, 2)) * 60 + (dataList[i].service_time[3].nightEndTime.substr(3, 5) - dataList[i].service_time[3].nightStartTime
|
|
|
|
- .substr(3, 5))
|
|
|
|
- console.log("早", dataList[i].org_name, monDuration)
|
|
|
|
- console.log("下", dataList[i].org_name, aftDuration)
|
|
|
|
- console.log("晚", dataList[i].org_name, nigDuration)
|
|
|
|
- this.slot.push({
|
|
|
|
- mon: monDuration,
|
|
|
|
- aft: aftDuration,
|
|
|
|
- nig: nigDuration
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- lists.push({
|
|
|
|
- id: dataList[i].org_id, //医院Id
|
|
|
|
- name: dataList[i].org_name,
|
|
|
|
- show_days: dataList[i].show_days, //可预约天数
|
|
|
|
- service_times: dataList[i].service_times, //就诊时长
|
|
|
|
- appoint_price: dataList[i].appoint_price, //基础价格
|
|
|
|
- service_num: dataList[i].service_num,
|
|
|
|
- service_time: {
|
|
|
|
- mon: {
|
|
|
|
- "amStartTime": dataList[i].service_time[1].amStartTime, //上午服务时间
|
|
|
|
- "amEndTime": dataList[i].service_time[1].amEndTime,
|
|
|
|
- "amPerson": dataList[i].service_time[1].amPerson //上午可预约号源
|
|
|
|
- },
|
|
|
|
- aft: {
|
|
|
|
- "pmStartTime": dataList[i].service_time[2].pmStartTime, //下午服务时间
|
|
|
|
- "pmEndTime": dataList[i].service_time[2].pmEndTime,
|
|
|
|
- "pmPerson": dataList[i].service_time[2].pmPerson, //下午可预约号源
|
|
|
|
- },
|
|
|
|
- nig: {
|
|
|
|
- "nightStartTime": dataList[i].service_time[3].nightStartTime, //晚上服务时间
|
|
|
|
- "nightEndTime": dataList[i].service_time[3].nightEndTime,
|
|
|
|
- "nightPerson": dataList[i].service_time[3].nightPerson //晚上可预约号源
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
|
|
|
|
- this.form.is_appoint.hospitalList = lists;
|
|
|
|
- if (this.form.is_appoint.hospitalList.length == 1) {
|
|
|
|
- this.hospitalcurrent = 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- /* 渲染时间 */
|
|
|
|
- //电话的时间
|
|
|
|
- // console.log(res.data.times)
|
|
|
|
- // let dhtime = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
- // this.dh.timeList1 = dhtime.list1;
|
|
|
|
- // this.dh.timeList2 = dhtime.list2;
|
|
|
|
- // this.dh.timeList3 = dhtime.list3;
|
|
|
|
-
|
|
|
|
- // //图文的时间
|
|
|
|
- // let twtime = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
- // this.tw.timeList1 = twtime.list1;
|
|
|
|
- // this.tw.timeList2 = twtime.list2;
|
|
|
|
- // this.tw.timeList3 = twtime.list3;
|
|
|
|
-
|
|
|
|
- // // 门诊时间
|
|
|
|
- // let mz1 = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
- // this.mz1.timeList1 = mz1.list1;
|
|
|
|
- // this.mz1.timeList2 = mz1.list2;
|
|
|
|
- // this.mz1.timeList3 = mz1.list3;
|
|
|
|
-
|
|
|
|
- // let mz2 = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
- // this.mz2.timeList1 = mz2.list1;
|
|
|
|
- // this.mz2.timeList2 = mz2.list2;
|
|
|
|
- // this.mz2.timeList3 = mz2.list3;
|
|
|
|
|
|
+ console.log("保存电话设置",sc)
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 保存门诊设置
|
|
|
|
+ * */
|
|
|
|
+ setMenData: async function() {
|
|
|
|
+ let that = this;
|
|
|
|
+ let forms = JSON.parse(JSON.stringify(that.form));
|
|
|
|
+ let newMenList = [];
|
|
|
|
+ for (let i = 0; i < forms.is_appoint.hospitalList.length; i++) {
|
|
|
|
+ newMenList.push({
|
|
|
|
+ "base_price": forms.is_appoint.hospitalList[i].appoint_price,
|
|
|
|
+ "service_times": forms.is_appoint.hospitalList[i].service_times,
|
|
|
|
+ "service_num": forms.is_appoint.hospitalList[i].service_num,
|
|
|
|
+ "amStartTime": forms.is_appoint.hospitalList[i].service_time.mon.amStartTime,
|
|
|
|
+ "amEndTime": forms.is_appoint.hospitalList[i].service_time.mon.amEndTime,
|
|
|
|
+ "amPerson": forms.is_appoint.hospitalList[i].service_time.mon.amPerson,
|
|
|
|
+ "pmStartTime": forms.is_appoint.hospitalList[i].service_time.aft.pmStartTime,
|
|
|
|
+ "pmEndTime": forms.is_appoint.hospitalList[i].service_time.aft.pmEndTime,
|
|
|
|
+ "pmPerson": forms.is_appoint.hospitalList[i].service_time.aft.pmPerson,
|
|
|
|
+ "nightStartTime": forms.is_appoint.hospitalList[i].service_time.nig.nightStartTime,
|
|
|
|
+ "nightEndTime": forms.is_appoint.hospitalList[i].service_time.nig.nightEndTime,
|
|
|
|
+ "nightPerson": forms.is_appoint.hospitalList[i].service_time.nig.nightPerson,
|
|
|
|
+ "show_days": forms.is_appoint.hospitalList[i].show_days,
|
|
|
|
+ "org_id": forms.is_appoint.hospitalList[i].id,
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- // this.reanders(res.data);
|
|
|
|
|
|
+ let sm = await this.$request.post('doctor/getSettingChat', {
|
|
|
|
+ data: forms.is_appoint,
|
|
|
|
+ 'type': 2
|
|
|
|
+ });
|
|
|
|
+ console.log("保存电话设置",sm)
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
- * 渲染选中数据
|
|
|
|
- * @author Liu Yuan hang
|
|
|
|
- * @param {Object} e
|
|
|
|
- */
|
|
|
|
- reanders(e) {
|
|
|
|
- uni.showLoading({
|
|
|
|
- title: '渲染中',
|
|
|
|
- mask: true
|
|
|
|
|
|
+ * 电话数据获取
|
|
|
|
+ * */
|
|
|
|
+ getPhoneData: async function() {
|
|
|
|
+ let gp = await this.$request.post('doctor/getSettingPhone', {
|
|
|
|
+ 'type': 2
|
|
});
|
|
});
|
|
- let oks, dh1, dh2, dh3, tw1, tw2, tw3;
|
|
|
|
-
|
|
|
|
- // 电话
|
|
|
|
- if (e.list.phone.length != 0) {
|
|
|
|
- dh1 = this.dh.timeList1;
|
|
|
|
- dh2 = this.dh.timeList2;
|
|
|
|
- dh3 = this.dh.timeList3;
|
|
|
|
- let phone = e.list.phone.service_time.split(',');
|
|
|
|
- var phones = []; //保存转换后的整型字符串
|
|
|
|
- phone.forEach(function(data, index, arr) {
|
|
|
|
- phones.push(+data);
|
|
|
|
- });
|
|
|
|
- console.log('我是电话', phones)
|
|
|
|
-
|
|
|
|
- for (let i = 0; i < dh1.length; i++) {
|
|
|
|
- if (phones.indexOf(dh1[i].id) != -1) {
|
|
|
|
- dh1[i].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (let i = 0; i < dh2.length; i++) {
|
|
|
|
- if (phones.indexOf(dh2[i].id) != -1) {
|
|
|
|
- dh2[i].checked = true
|
|
|
|
- }
|
|
|
|
|
|
+ console.log("电话数据获取", gp);
|
|
|
|
+ if (gp.status == 0) {
|
|
|
|
+ let data = gp.data.list
|
|
|
|
+ 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
|
|
|
|
+ .service_time[1].amEndTime : '';
|
|
|
|
+ this.form.is_phone.aft_time = data.service_time[2] != undefined ? 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 + ' - ' +
|
|
|
|
+ data.service_time[3].nightEndTime : '';
|
|
|
|
+ this.form.is_phone.person = data.person; //服务人次
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 图文数据获取
|
|
|
|
+ * */
|
|
|
|
+ getChatData: async function() {
|
|
|
|
+ let gt = await this.$request.post('doctor/getSettingChat', {
|
|
|
|
+ 'type': 2
|
|
|
|
+ });
|
|
|
|
+ console.log("图文数据获取", gt);
|
|
|
|
+ if (gt.status == 0) {
|
|
|
|
+ let data = gt.data.list
|
|
|
|
+ this.form.is_chat.base_price = data.base_price; //基础价格
|
|
|
|
+ // this.form.is_chat.step_price = data.chat.step_price; //步进价格
|
|
|
|
+ this.form.is_chat.person = data.person; //服务人次
|
|
|
|
+ //早上 下午 晚上
|
|
|
|
+ this.form.is_chat.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data.service_time[
|
|
|
|
+ 1].amEndTime : '';
|
|
|
|
+ this.form.is_chat.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data.service_time[
|
|
|
|
+ 2].pmEndTime : '';
|
|
|
|
+ this.form.is_chat.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
|
|
|
|
+ data.service_time[3].nightEndTime : '';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 门诊数据获取
|
|
|
|
+ * */
|
|
|
|
+ getMenData: async function() {
|
|
|
|
+ let gm = await this.$request.post('doctor/getSettingSchedule', {
|
|
|
|
+ 'type': 2
|
|
|
|
+ });
|
|
|
|
+ console.log("门诊数据获取", gm);
|
|
|
|
+ if (gm.status == 0) {
|
|
|
|
+ let dataList = gm.data.list
|
|
|
|
+ let lists = [];
|
|
|
|
+ for (let i = 0; i < dataList.length; i++) {
|
|
|
|
+ /**
|
|
|
|
+ * 计算所有医院的上下晚时间段时长,用于计算号源
|
|
|
|
+ * 需要拿到开始时间和结束时间,相减并判断是否为半点
|
|
|
|
+ * 公式:( 结束时间(小时) - 开始时间(小时) ) * 60- ( 结束时间(分钟) - 开始时间(分钟) ) = 时长
|
|
|
|
+ * */
|
|
|
|
+ let monDuration = (dataList[i].service_time[1].amEndTime.substr(0, 2) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ .substr(0, 2)) * 60 + (dataList[i].service_time[1].amEndTime.substr(3, 5) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ .substr(3, 5))
|
|
|
|
+ let aftDuration = (dataList[i].service_time[2].pmEndTime.substr(0, 2) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ .substr(0, 2)) * 60 + (dataList[i].service_time[2].pmEndTime.substr(3, 5) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ .substr(3, 5))
|
|
|
|
+ let nigDuration = (dataList[i].service_time[3].nightEndTime.substr(0, 2) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ .substr(0, 2)) * 60 + (dataList[i].service_time[3].nightEndTime.substr(3, 5) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ .substr(3, 5))
|
|
|
|
+ console.log("早", dataList[i].org_name, monDuration)
|
|
|
|
+ console.log("下", dataList[i].org_name, aftDuration)
|
|
|
|
+ console.log("晚", dataList[i].org_name, nigDuration)
|
|
|
|
+ this.slot.push({
|
|
|
|
+ mon: monDuration,
|
|
|
|
+ aft: aftDuration,
|
|
|
|
+ nig: nigDuration
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ lists.push({
|
|
|
|
+ id: dataList[i].org_id, //医院Id
|
|
|
|
+ name: dataList[i].org_name,
|
|
|
|
+ show_days: dataList[i].show_days, //可预约天数
|
|
|
|
+ service_times: dataList[i].service_times, //就诊时长
|
|
|
|
+ appoint_price: dataList[i].appoint_price, //基础价格
|
|
|
|
+ service_num: dataList[i].service_num,
|
|
|
|
+ service_time: {
|
|
|
|
+ mon: {
|
|
|
|
+ "amStartTime": dataList[i].service_time[1].amStartTime, //上午服务时间
|
|
|
|
+ "amEndTime": dataList[i].service_time[1].amEndTime,
|
|
|
|
+ "amPerson": dataList[i].service_time[1].amPerson //上午可预约号源
|
|
|
|
+ },
|
|
|
|
+ aft: {
|
|
|
|
+ "pmStartTime": dataList[i].service_time[2].pmStartTime, //下午服务时间
|
|
|
|
+ "pmEndTime": dataList[i].service_time[2].pmEndTime,
|
|
|
|
+ "pmPerson": dataList[i].service_time[2].pmPerson, //下午可预约号源
|
|
|
|
+ },
|
|
|
|
+ nig: {
|
|
|
|
+ "nightStartTime": dataList[i].service_time[3].nightStartTime, //晚上服务时间
|
|
|
|
+ "nightEndTime": dataList[i].service_time[3].nightEndTime,
|
|
|
|
+ "nightPerson": dataList[i].service_time[3].nightPerson //晚上可预约号源
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
- for (let i = 0; i < dh3.length; i++) {
|
|
|
|
- if (phones.indexOf(dh3[i].id) != -1) {
|
|
|
|
- dh3[i].checked = true
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
|
|
|
|
+ this.form.is_appoint.hospitalList = lists;
|
|
|
|
+ if (this.form.is_appoint.hospitalList.length == 1) {
|
|
|
|
+ this.hospitalcurrent = 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 获取服务开通状态
|
|
|
|
+ * */
|
|
|
|
+ getShows: async function() {
|
|
|
|
+ // 清空价格
|
|
|
|
+ this.form.is_phone.person = '';
|
|
|
|
+ this.form.is_chat.person = '';
|
|
|
|
+ this.form.is_appoint.person = '';
|
|
|
|
|
|
- // 图文资讯渲染
|
|
|
|
- if (e.list.chat.length != 0) {
|
|
|
|
- tw1 = this.tw.timeList1;
|
|
|
|
- tw2 = this.tw.timeList2;
|
|
|
|
- tw3 = this.tw.timeList3;
|
|
|
|
- let chats = e.list.chat.service_time.split(',');
|
|
|
|
- var chat = []; //保存转换后的整型字符串
|
|
|
|
- chats.forEach(function(data, index, arr) {
|
|
|
|
- chat.push(+data);
|
|
|
|
- });
|
|
|
|
- console.log('我是图文', chat)
|
|
|
|
- for (let i = 0; i < tw1.length; i++) {
|
|
|
|
- if (chat.indexOf(tw1[i].id) != -1) {
|
|
|
|
- tw1[i].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let i = 0; i < tw2.length; i++) {
|
|
|
|
- if (chat.indexOf(tw2[i].id) != -1) {
|
|
|
|
- tw2[i].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let i = 0; i < tw3.length; i++) {
|
|
|
|
- if (chat.indexOf(tw3[i].id) != -1) {
|
|
|
|
- tw3[i].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //总控 全部的服务开通状态
|
|
|
|
+ let res = await this.$request.post('doctor/getSettingBase', {
|
|
|
|
+ 'type': 2
|
|
|
|
+ });
|
|
|
|
+ console.log("总控数据获取", res);
|
|
|
|
+ if (res.status == 0) {
|
|
|
|
+ // 1.控制列表显示,2.渲染数据
|
|
|
|
+ //ltb 分段器赋值
|
|
|
|
+ this.showList[0].flag = res.data.is_phone;
|
|
|
|
+ this.showList[1].flag = res.data.is_chat;
|
|
|
|
+ this.showList[2].flag = res.data.is_appoint;
|
|
}
|
|
}
|
|
|
|
|
|
- let mzCont = e.list.men.length;
|
|
|
|
- if (mzCont > 0) {
|
|
|
|
-
|
|
|
|
- let men = e.list.men;
|
|
|
|
- let men1 = e.list.men[0].service_time.split(',');
|
|
|
|
- let men2 = e.list.men[1].service_time.split(',');
|
|
|
|
- this.form.is_appoint.hospitals[0].relation_id = e.list.men[0].relation_id
|
|
|
|
- this.form.is_appoint.hospitals[1].relation_id = e.list.men[1].relation_id
|
|
|
|
- var men1s = []; //保存转换后的整型字符串
|
|
|
|
- var men2s = []; //保存转换后的整型字符串
|
|
|
|
- men1.forEach(function(data, index, arr) {
|
|
|
|
- men1s.push(+data);
|
|
|
|
- });
|
|
|
|
- men2.forEach(function(data, index, arr) {
|
|
|
|
- men2s.push(+data);
|
|
|
|
- });
|
|
|
|
|
|
+ // //电话 数据获取
|
|
|
|
+ // let gp = await this.$request.post('doctor/getSettingPhone', {
|
|
|
|
+ // 'type': 2
|
|
|
|
+ // });
|
|
|
|
+ // console.log("电话数据获取", gp);
|
|
|
|
+ // if (gp.status == 0) {
|
|
|
|
+ // let data = gp.data.list
|
|
|
|
+ // 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
|
|
|
|
+ // .service_time[1].amEndTime : '';
|
|
|
|
+ // this.form.is_phone.aft_time = data.service_time[2] != undefined ? 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 + ' - ' +
|
|
|
|
+ // data.service_time[3].nightEndTime : '';
|
|
|
|
+ // this.form.is_phone.person = data.person; //服务人次
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // //图文 数据获取
|
|
|
|
+ // let gt = await this.$request.post('doctor/getSettingChat', {
|
|
|
|
+ // 'type': 2
|
|
|
|
+ // });
|
|
|
|
+ // console.log("图文数据获取", gt);
|
|
|
|
+ // if (gt.status == 0) {
|
|
|
|
+ // let data = gt.data.list
|
|
|
|
+ // this.form.is_chat.base_price = data.base_price; //基础价格
|
|
|
|
+ // // this.form.is_chat.step_price = data.chat.step_price; //步进价格
|
|
|
|
+ // this.form.is_chat.person = data.person; //服务人次
|
|
|
|
+ // //早上 下午 晚上
|
|
|
|
+ // this.form.is_chat.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data.service_time[
|
|
|
|
+ // 1].amEndTime : '';
|
|
|
|
+ // this.form.is_chat.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data.service_time[
|
|
|
|
+ // 2].pmEndTime : '';
|
|
|
|
+ // this.form.is_chat.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
|
|
|
|
+ // data.service_time[3].nightEndTime : '';
|
|
|
|
+ // }
|
|
|
|
+ // let gm = await this.$request.post('doctor/getSettingSchedule', {
|
|
|
|
+ // 'type': 2
|
|
|
|
+ // });
|
|
|
|
+ // console.log("门诊数据获取", gm);
|
|
|
|
+ // if (gm.status == 0) {
|
|
|
|
+ // let dataList = gm.data.list
|
|
|
|
+ // let lists = [];
|
|
|
|
+ // for (let i = 0; i < dataList.length; i++) {
|
|
|
|
+ // /**
|
|
|
|
+ // * 计算所有医院的上下晚时间段时长,用于计算号源
|
|
|
|
+ // * 需要拿到开始时间和结束时间,相减并判断是否为半点
|
|
|
|
+ // * 公式:( 结束时间(小时) - 开始时间(小时) ) * 60- ( 结束时间(分钟) - 开始时间(分钟) ) = 时长
|
|
|
|
+ // * */
|
|
|
|
+ // let monDuration = (dataList[i].service_time[1].amEndTime.substr(0, 2) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[1].amEndTime.substr(3, 5) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // let aftDuration = (dataList[i].service_time[2].pmEndTime.substr(0, 2) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[2].pmEndTime.substr(3, 5) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // let nigDuration = (dataList[i].service_time[3].nightEndTime.substr(0, 2) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[3].nightEndTime.substr(3, 5) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // console.log("早", dataList[i].org_name, monDuration)
|
|
|
|
+ // console.log("下", dataList[i].org_name, aftDuration)
|
|
|
|
+ // console.log("晚", dataList[i].org_name, nigDuration)
|
|
|
|
+ // this.slot.push({
|
|
|
|
+ // mon: monDuration,
|
|
|
|
+ // aft: aftDuration,
|
|
|
|
+ // nig: nigDuration
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ // lists.push({
|
|
|
|
+ // id: dataList[i].org_id, //医院Id
|
|
|
|
+ // name: dataList[i].org_name,
|
|
|
|
+ // show_days: dataList[i].show_days, //可预约天数
|
|
|
|
+ // service_times: dataList[i].service_times, //就诊时长
|
|
|
|
+ // appoint_price: dataList[i].appoint_price, //基础价格
|
|
|
|
+ // service_num: dataList[i].service_num,
|
|
|
|
+ // service_time: {
|
|
|
|
+ // mon: {
|
|
|
|
+ // "amStartTime": dataList[i].service_time[1].amStartTime, //上午服务时间
|
|
|
|
+ // "amEndTime": dataList[i].service_time[1].amEndTime,
|
|
|
|
+ // "amPerson": dataList[i].service_time[1].amPerson //上午可预约号源
|
|
|
|
+ // },
|
|
|
|
+ // aft: {
|
|
|
|
+ // "pmStartTime": dataList[i].service_time[2].pmStartTime, //下午服务时间
|
|
|
|
+ // "pmEndTime": dataList[i].service_time[2].pmEndTime,
|
|
|
|
+ // "pmPerson": dataList[i].service_time[2].pmPerson, //下午可预约号源
|
|
|
|
+ // },
|
|
|
|
+ // nig: {
|
|
|
|
+ // "nightStartTime": dataList[i].service_time[3].nightStartTime, //晚上服务时间
|
|
|
|
+ // "nightEndTime": dataList[i].service_time[3].nightEndTime,
|
|
|
|
+ // "nightPerson": dataList[i].service_time[3].nightPerson //晚上可预约号源
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
|
|
- let p = 0;
|
|
|
|
- var names = '';
|
|
|
|
- if (mzCont == 1) {
|
|
|
|
- for (let k = 0; k < this.mz1.timeList1.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
|
|
|
|
- this.mz1.timeList1[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz1.timeList2.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
|
|
|
|
- this.mz1.timeList2[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz1.timeList3.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
|
|
|
|
- this.mz1.timeList3[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else if (mzCont == 2) {
|
|
|
|
- for (let k = 0; k < this.mz1.timeList1.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
|
|
|
|
- this.mz1.timeList1[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz1.timeList2.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
|
|
|
|
- this.mz1.timeList2[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz1.timeList3.length; k++) {
|
|
|
|
- if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
|
|
|
|
- this.mz1.timeList3[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
|
|
|
|
+ // this.form.is_appoint.hospitalList = lists;
|
|
|
|
+ // if (this.form.is_appoint.hospitalList.length == 1) {
|
|
|
|
+ // this.hospitalcurrent = 0
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // if (res.data.list.phone.length != 0) {
|
|
|
|
+ // // 渲染电话的基础数据
|
|
|
|
+ // this.form.is_phone.base_price = res.data.list.phone.base_price;
|
|
|
|
+ // this.form.is_phone.step_price = res.data.list.phone.step_price;
|
|
|
|
+
|
|
|
|
+ // this.form.is_phone.mor_time = res.data.list.phone.service_time[1] != undefined ? res.data.list.phone.service_time[
|
|
|
|
+ // 1].amStartTime + ' - ' + res.data.list.phone.service_time[1].amEndTime : '';
|
|
|
|
+ // this.form.is_phone.aft_time = res.data.list.phone.service_time[2] != undefined ? res.data.list.phone.service_time[
|
|
|
|
+ // 2].pmStartTime + ' - ' + res.data.list.phone.service_time[2].pmEndTime : '';
|
|
|
|
+ // this.form.is_phone.nig_time = res.data.list.phone.service_time[3] != undefined ? res.data.list.phone.service_time[
|
|
|
|
+ // 3].nightStartTime + ' - ' + res.data.list.phone.service_time[3].nightEndTime : '';
|
|
|
|
+
|
|
|
|
+ // this.form.is_phone.person = res.data.list.phone.person;
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // if (res.data.list.chat.length != 0) {
|
|
|
|
+ // // 渲染图文的基础数据
|
|
|
|
+ // this.form.is_chat.base_price = res.data.list.chat.base_price;
|
|
|
|
+ // this.form.is_chat.step_price = res.data.list.chat.step_price;
|
|
|
|
+ // this.form.is_chat.person = res.data.list.chat.person;
|
|
|
|
+
|
|
|
|
+ // this.form.is_chat.mor_time = res.data.list.chat.service_time[1] != undefined ? res.data.list.chat.service_time[
|
|
|
|
+ // 1]
|
|
|
|
+ // .amStartTime + ' - ' + res.data.list.chat.service_time[1].amEndTime : '';
|
|
|
|
+ // this.form.is_chat.aft_time = res.data.list.chat.service_time[2] != undefined ? res.data.list.chat.service_time[
|
|
|
|
+ // 2]
|
|
|
|
+ // .pmStartTime + ' - ' + res.data.list.chat.service_time[2].pmEndTime : '';
|
|
|
|
+ // this.form.is_chat.nig_time = res.data.list.chat.service_time[3] != undefined ? res.data.list.chat.service_time[
|
|
|
|
+ // 3]
|
|
|
|
+ // .nightStartTime + ' - ' + res.data.list.chat.service_time[3].nightEndTime : '';
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // if (res.data.list.men.length != 0) {
|
|
|
|
+ // let dataList = res.data.list.men;
|
|
|
|
+ // let lists = [];
|
|
|
|
+ // for (let i = 0; i < dataList.length; i++) {
|
|
|
|
+ // /**
|
|
|
|
+ // * 计算所有医院的上下晚时间段时长,用于计算号源
|
|
|
|
+ // * 需要拿到开始时间和结束时间,相减并判断是否为半点
|
|
|
|
+ // * 公式:( 结束时间(小时) - 开始时间(小时) ) * 60- ( 结束时间(分钟) - 开始时间(分钟) ) = 时长
|
|
|
|
+ // * */
|
|
|
|
+ // let monDuration = (dataList[i].service_time[1].amEndTime.substr(0, 2) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[1].amEndTime.substr(3, 5) - dataList[i].service_time[1].amStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // let aftDuration = (dataList[i].service_time[2].pmEndTime.substr(0, 2) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[2].pmEndTime.substr(3, 5) - dataList[i].service_time[2].pmStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // let nigDuration = (dataList[i].service_time[3].nightEndTime.substr(0, 2) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ // .substr(0, 2)) * 60 + (dataList[i].service_time[3].nightEndTime.substr(3, 5) - dataList[i].service_time[3].nightStartTime
|
|
|
|
+ // .substr(3, 5))
|
|
|
|
+ // console.log("早", dataList[i].org_name, monDuration)
|
|
|
|
+ // console.log("下", dataList[i].org_name, aftDuration)
|
|
|
|
+ // console.log("晚", dataList[i].org_name, nigDuration)
|
|
|
|
+ // this.slot.push({
|
|
|
|
+ // mon: monDuration,
|
|
|
|
+ // aft: aftDuration,
|
|
|
|
+ // nig: nigDuration
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ // lists.push({
|
|
|
|
+ // id: dataList[i].org_id, //医院Id
|
|
|
|
+ // name: dataList[i].org_name,
|
|
|
|
+ // show_days: dataList[i].show_days, //可预约天数
|
|
|
|
+ // service_times: dataList[i].service_times, //就诊时长
|
|
|
|
+ // appoint_price: dataList[i].appoint_price, //基础价格
|
|
|
|
+ // service_num: dataList[i].service_num,
|
|
|
|
+ // service_time: {
|
|
|
|
+ // mon: {
|
|
|
|
+ // "amStartTime": dataList[i].service_time[1].amStartTime, //上午服务时间
|
|
|
|
+ // "amEndTime": dataList[i].service_time[1].amEndTime,
|
|
|
|
+ // "amPerson": dataList[i].service_time[1].amPerson //上午可预约号源
|
|
|
|
+ // },
|
|
|
|
+ // aft: {
|
|
|
|
+ // "pmStartTime": dataList[i].service_time[2].pmStartTime, //下午服务时间
|
|
|
|
+ // "pmEndTime": dataList[i].service_time[2].pmEndTime,
|
|
|
|
+ // "pmPerson": dataList[i].service_time[2].pmPerson, //下午可预约号源
|
|
|
|
+ // },
|
|
|
|
+ // nig: {
|
|
|
|
+ // "nightStartTime": dataList[i].service_time[3].nightStartTime, //晚上服务时间
|
|
|
|
+ // "nightEndTime": dataList[i].service_time[3].nightEndTime,
|
|
|
|
+ // "nightPerson": dataList[i].service_time[3].nightPerson //晚上可预约号源
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
|
|
- for (let k = 0; k < this.mz2.timeList1.length; k++) {
|
|
|
|
- if (men2s.indexOf(this.mz2.timeList1[k].id) != -1) {
|
|
|
|
- this.mz2.timeList1[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz2.timeList2.length; k++) {
|
|
|
|
- if (men2s.indexOf(this.mz2.timeList2[k].id) != -1) {
|
|
|
|
- this.mz2.timeList2[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (let k = 0; k < this.mz2.timeList3.length; k++) {
|
|
|
|
- if (men2s.indexOf(this.mz2.timeList3[k].id) != -1) {
|
|
|
|
- this.mz2.timeList3[k].checked = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- console.log(e.list);
|
|
|
|
- uni.hideLoading();
|
|
|
|
- },
|
|
|
|
- dhchange(index) {
|
|
|
|
- this.dhcurrent = index
|
|
|
|
- },
|
|
|
|
- twchange(index) {
|
|
|
|
- this.twcurrent = index
|
|
|
|
- },
|
|
|
|
- mzchange1(index) {
|
|
|
|
- this.mzcurrent1 = index
|
|
|
|
- },
|
|
|
|
- mzchange2(index) {
|
|
|
|
- this.mzcurrent2 = index
|
|
|
|
|
|
+ // console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
|
|
|
|
+ // this.form.is_appoint.hospitalList = lists;
|
|
|
|
+ // if (this.form.is_appoint.hospitalList.length == 1) {
|
|
|
|
+ // this.hospitalcurrent = 0
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ /* 渲染时间 */
|
|
|
|
+ //电话的时间
|
|
|
|
+ // console.log(res.data.times)
|
|
|
|
+ // let dhtime = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
+ // this.dh.timeList1 = dhtime.list1;
|
|
|
|
+ // this.dh.timeList2 = dhtime.list2;
|
|
|
|
+ // this.dh.timeList3 = dhtime.list3;
|
|
|
|
+
|
|
|
|
+ // //图文的时间
|
|
|
|
+ // let twtime = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
+ // this.tw.timeList1 = twtime.list1;
|
|
|
|
+ // this.tw.timeList2 = twtime.list2;
|
|
|
|
+ // this.tw.timeList3 = twtime.list3;
|
|
|
|
+
|
|
|
|
+ // // 门诊时间
|
|
|
|
+ // let mz1 = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
+ // this.mz1.timeList1 = mz1.list1;
|
|
|
|
+ // this.mz1.timeList2 = mz1.list2;
|
|
|
|
+ // this.mz1.timeList3 = mz1.list3;
|
|
|
|
+
|
|
|
|
+ // let mz2 = JSON.parse(JSON.stringify(res.data.times))
|
|
|
|
+ // this.mz2.timeList1 = mz2.list1;
|
|
|
|
+ // this.mz2.timeList2 = mz2.list2;
|
|
|
|
+ // this.mz2.timeList3 = mz2.list3;
|
|
|
|
+
|
|
|
|
+ // this.reanders(res.data);
|
|
},
|
|
},
|
|
|
|
+ /**
|
|
|
|
+ * 选择医院 判断有没有认证的医院
|
|
|
|
+ * */
|
|
xzyy() {
|
|
xzyy() {
|
|
console.log(this.form.is_appoint.hospitalList.length)
|
|
console.log(this.form.is_appoint.hospitalList.length)
|
|
console.log(this.form.is_appoint.hospitalList)
|
|
console.log(this.form.is_appoint.hospitalList)
|