| xqd
@@ -11,7 +11,8 @@
|
|
|
<!-- 服务时间选择 -->
|
|
|
<u-select v-model="serviceShow" :list="serviceTimelist" @confirm="selectService"></u-select>
|
|
|
<!-- 医院选择 -->
|
|
|
- <u-select v-model="hospitalShow" :list="form.is_appoint.hospitalList" @confirm="selectHospital" label-name="name" value-name="id"></u-select>
|
|
|
+ <u-select v-model="hospitalShow" :list="form.is_appoint.hospitalList" @confirm="selectHospital" label-name="name"
|
|
|
+ value-name="id"></u-select>
|
|
|
|
|
|
<!-- 电话咨询 -->
|
|
|
<view class="v" v-show="showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')">
|
| xqd
@@ -197,7 +198,8 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].appoint_price" type="digit" :border="true" placeholder="请输入金额" />
|
|
|
+ <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].appoint_price" type="digit" :border="true"
|
|
|
+ placeholder="请输入金额" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 服务时间 -->
|
| xqd
@@ -274,7 +276,8 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].service_num" type="digit" :border="true" placeholder="请输入人次" />
|
|
|
+ <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].service_num" type="digit" :border="true"
|
|
|
+ placeholder="请输入人次" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 预约天数 -->
|
| xqd
@@ -286,14 +289,15 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].show_days" type="digit" :border="true" placeholder="请输入人次" />
|
|
|
+ <u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].show_days" type="digit" :border="true"
|
|
|
+ placeholder="请输入人次" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="width: 100%;height: 60vh;display: flex;justify-content: center;align-items: center;" v-else>
|
|
|
<view style="width: 90%;">
|
|
|
<view style="width: 100%;text-align: center;margin-bottom: 40rpx;font-size: 40rpx;">请选择医院</view>
|
|
|
- <u-button shape="circle" type="primary" @click="hospitalShow = true">请选择医院</u-button>
|
|
|
+ <u-button shape="circle" type="primary" @click="xzyy">请选择医院</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -303,7 +307,7 @@
|
|
|
<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
|
|
|
提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
|
|
|
</view>
|
|
|
- <view class="bottomButton" @click="bc">保存</view>
|
|
|
+ <view class="bottomButton" @click="pd">保存</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
| xqd
@@ -314,6 +318,9 @@
|
|
|
this.$nextTick(function() {
|
|
|
this.addTime()
|
|
|
})
|
|
|
+ console.log(this.form.is_appoint.hospitalList.length)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
mounted() {
|
| xqd
@@ -794,7 +801,7 @@
|
|
|
/********************保存的数据****************************/
|
|
|
form: {
|
|
|
is_phone: { //电话
|
|
|
- base_price: "20", //基础价格
|
|
|
+ base_price: "", //基础价格
|
|
|
mor_time: "", //上午服务时间
|
|
|
aft_time: "", //上午服务时间
|
|
|
nig_time: "", //晚上服务时间
|
| xqd
@@ -802,7 +809,7 @@
|
|
|
type: "1"
|
|
|
},
|
|
|
is_chat: { //图文
|
|
|
- base_price: "20", //基础价格
|
|
|
+ base_price: "", //基础价格
|
|
|
step_price: "", //步进价格
|
|
|
mor_time: "", //上午服务时间
|
|
|
aft_time: "", //上午服务时间
|
| xqd
@@ -812,95 +819,7 @@
|
|
|
},
|
|
|
is_appoint: { //门诊
|
|
|
type: "3",
|
|
|
- hospitalList: [{
|
|
|
- id: 50, //医院Id
|
|
|
- name:"测试1",
|
|
|
- show_days: 0, //可预约天数
|
|
|
- service_times: 0, //就诊时长
|
|
|
- appoint_price: "52.00", //基础价格
|
|
|
- service_num:0,
|
|
|
- service_time: {
|
|
|
- mon: {
|
|
|
- "amStartTime": "08:00", //上午服务时间
|
|
|
- "amEndTime": "12:00",
|
|
|
- "amPerson": 3 //上午可预约号源
|
|
|
- },
|
|
|
- aft: {
|
|
|
- "pmStartTime": "14:00", //下午服务时间
|
|
|
- "pmEndTime": "18:00",
|
|
|
- "pmPerson": 5 //下午可预约号源
|
|
|
- },
|
|
|
- nig: {
|
|
|
- "nightStartTime": "18:00", //晚上服务时间
|
|
|
- "nightEndTime": "23:00",
|
|
|
- "nightPerson": 4 //晚上可预约号源
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // label: "",
|
|
|
- // name: "测试医院6",
|
|
|
- // base_price: "20", //基础价格
|
|
|
- // mor_time: "", //上午服务时间
|
|
|
- // mor_num: 0, //上午可预约号源
|
|
|
- // aft_time: "", //下午服务时间
|
|
|
- // aft_num: 0, //下午可预约号源
|
|
|
- // nig_time: "", //晚上服务时间
|
|
|
- // nig_num: 0, //晚上可预约号源
|
|
|
- // see_doc_time: "", //就诊时长
|
|
|
- // service_order: 0, //同时服务订单数
|
|
|
- // appointment: 0, //可预约天数
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1, //医院Id
|
|
|
- name:"测试2",
|
|
|
- show_days: 0, //可预约天数
|
|
|
- service_times: 0, //就诊时长
|
|
|
- appoint_price: "52.00", //基础价格
|
|
|
- service_num:0,
|
|
|
- service_time: {
|
|
|
- mon: {
|
|
|
- "amStartTime": "08:00", //上午服务时间
|
|
|
- "amEndTime": "12:00",
|
|
|
- "amPerson": 3 //上午可预约号源
|
|
|
- },
|
|
|
- aft: {
|
|
|
- "pmStartTime": "14:00", //下午服务时间
|
|
|
- "pmEndTime": "18:00",
|
|
|
- "pmPerson": 5 //下午可预约号源
|
|
|
- },
|
|
|
- nig: {
|
|
|
- "nightStartTime": "18:00", //晚上服务时间
|
|
|
- "nightEndTime": "23:00",
|
|
|
- "nightPerson": 4 //晚上可预约号源
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3, //医院Id
|
|
|
- name:"测试5",
|
|
|
- show_days: 0, //可预约天数
|
|
|
- service_times: 0, //就诊时长
|
|
|
- appoint_price: "52.00", //基础价格
|
|
|
- service_num:0,
|
|
|
- service_time: {
|
|
|
- mon: {
|
|
|
- "amStartTime": "08:00", //上午服务时间
|
|
|
- "amEndTime": "12:00",
|
|
|
- "amPerson": 3 //上午可预约号源
|
|
|
- },
|
|
|
- aft: {
|
|
|
- "pmStartTime": "14:00", //下午服务时间
|
|
|
- "pmEndTime": "18:00",
|
|
|
- "pmPerson": 5 //下午可预约号源
|
|
|
- },
|
|
|
- nig: {
|
|
|
- "nightStartTime": "18:00", //晚上服务时间
|
|
|
- "nightEndTime": "23:00",
|
|
|
- "nightPerson": 4 //晚上可预约号源
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ hospitalList: [],
|
|
|
},
|
|
|
}
|
|
|
|
| xqd
@@ -1082,13 +1001,16 @@
|
|
|
console.log("晚上时间", this.nightSlot)
|
|
|
this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times = e[0].label
|
|
|
if (this.morningSlot != 0) {
|
|
|
- this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.morningSlot / e[0].label)
|
|
|
+ this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.morningSlot / e[
|
|
|
+ 0].label)
|
|
|
}
|
|
|
if (this.afternoonSlot != 0) {
|
|
|
- this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.afternoonSlot / e[0].label)
|
|
|
+ this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.afternoonSlot /
|
|
|
+ e[0].label)
|
|
|
}
|
|
|
if (this.nightSlot != 0) {
|
|
|
- this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.nightSlot / e[0].label)
|
|
|
+ this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.nightSlot / e[
|
|
|
+ 0].label)
|
|
|
}
|
|
|
},
|
|
|
|
| xqd
@@ -1097,12 +1019,12 @@
|
|
|
*/
|
|
|
selectHospital(e) {
|
|
|
|
|
|
- for(let a = 0;a<this.form.is_appoint.hospitalList.length;a++){
|
|
|
- if(e[0].value == this.form.is_appoint.hospitalList[a].id){
|
|
|
+ for (let a = 0; a < this.form.is_appoint.hospitalList.length; a++) {
|
|
|
+ if (e[0].value == this.form.is_appoint.hospitalList[a].id) {
|
|
|
this.hospitalcurrent = a
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
console.log(this.hospitalcurrent)
|
|
|
|
|
|
//清空暂存数据
|
| xqd
@@ -1116,164 +1038,72 @@
|
|
|
this.curNow = index;
|
|
|
},
|
|
|
/* 保存 */
|
|
|
- bc: async function(e) {
|
|
|
+ // 提示一下
|
|
|
+ pd() {
|
|
|
+ let that = this
|
|
|
+ uni.showModal({
|
|
|
+ title: "请确定信息填写完整,否则无法保存",
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.bc()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ bc: async function() {
|
|
|
let that = this;
|
|
|
- /**
|
|
|
- * 电话
|
|
|
- * */
|
|
|
- // that.form.is_phone.service_time = '';
|
|
|
- // that.form.is_chat.service_time = '';
|
|
|
- // that.form.is_appoint.hospitals[0].service_time = '';
|
|
|
- // that.form.is_appoint.hospitals[1].service_time = '';
|
|
|
- // for (let i in that.dh.timeList1) { //遍历选中 保存id
|
|
|
- // if (that.dh.timeList1[i].checked) {
|
|
|
- // that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList1[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.dh.timeList2) { //遍历选中 保存id
|
|
|
- // if (that.dh.timeList2[i].checked) {
|
|
|
- // that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList2[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.dh.timeList3) { //遍历选中 保存id
|
|
|
- // if (that.dh.timeList3[i].checked) {
|
|
|
- // that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList3[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //判断开头第一个是否为逗号,是就删除逗号
|
|
|
- // if (that.form.is_phone.service_time.startsWith(",")) {
|
|
|
- // that.form.is_phone.service_time = that.form.is_phone.service_time.substr(1);
|
|
|
- // }
|
|
|
- // /**
|
|
|
- // * 图文
|
|
|
- // * */
|
|
|
-
|
|
|
- // for (let i in that.tw.timeList1) { //遍历选中 保存id
|
|
|
- // if (that.tw.timeList1[i].checked) {
|
|
|
- // that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList1[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.tw.timeList2) { //遍历选中 保存id
|
|
|
- // if (that.tw.timeList2[i].checked) {
|
|
|
- // that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList2[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.tw.timeList3) { //遍历选中 保存id
|
|
|
- // if (that.tw.timeList3[i].checked) {
|
|
|
- // that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList3[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //判断开头第一个是否为逗号,是就删除逗号
|
|
|
- // if (that.form.is_chat.service_time.startsWith(",")) {
|
|
|
-
|
|
|
- // that.form.is_chat.service_time = that.form.is_chat.service_time.substr(1);
|
|
|
- // }
|
|
|
- // /**
|
|
|
- // * 门诊
|
|
|
- // * */
|
|
|
- // for (let i in that.mz1.timeList1) { //遍历选中 保存id
|
|
|
- // if (that.mz1.timeList1[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
- // .timeList1[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.mz1.timeList2) { //遍历选中 保存id
|
|
|
- // if (that.mz1.timeList2[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
- // .timeList2[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.mz1.timeList3) { //遍历选中 保存id
|
|
|
- // if (that.mz1.timeList3[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
- // .timeList3[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //判断开头第一个是否为逗号,是就删除逗号
|
|
|
- // if (that.form.is_appoint.hospitals[0].service_time.startsWith(",")) {
|
|
|
-
|
|
|
- // that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time.substr(1);
|
|
|
- // }
|
|
|
- // /**
|
|
|
- // * 门诊
|
|
|
- // * */
|
|
|
- // for (let i in that.mz2.timeList1) { //遍历选中 保存id
|
|
|
- // if (that.mz2.timeList1[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
- // .timeList1[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.mz2.timeList2) { //遍历选中 保存id
|
|
|
- // if (that.mz2.timeList2[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
- // .timeList2[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (let i in that.mz2.timeList3) { //遍历选中 保存id
|
|
|
- // if (that.mz2.timeList3[i].checked) {
|
|
|
- // that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
- // .timeList3[i].id
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //判断开头第一个是否为逗号,是就删除逗号
|
|
|
- // if (that.form.is_appoint.hospitals[1].service_time.startsWith(",")) {
|
|
|
- // that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time.substr(1);
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- var 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]:'';
|
|
|
-
|
|
|
-
|
|
|
- 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 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,
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- forms.is_appoint=newMenList;
|
|
|
+ var 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] : '';
|
|
|
+
|
|
|
+
|
|
|
+ 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 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,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ forms.is_appoint = newMenList;
|
|
|
if (typeof forms != 'string') {
|
|
|
forms = JSON.stringify(forms)
|
|
|
}
|
|
|
let res = await that.$request.post('doctor/saveSettingList', {
|
|
|
data: forms,
|
|
|
type: 2
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+
|
|
|
if (res.status == 0) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
| xqd
@@ -1283,12 +1113,12 @@
|
|
|
})
|
|
|
}
|
|
|
console.log('res对象:', res);
|
|
|
- // 延迟2秒
|
|
|
- setTimeout(function() {
|
|
|
- uni.switchTab({
|
|
|
- url: '../index/index'
|
|
|
- })
|
|
|
- }, 2000);
|
|
|
+ // 延迟1秒
|
|
|
+ // setTimeout(function() {
|
|
|
+ // uni.switchTab({
|
|
|
+ // url: '../index/index'
|
|
|
+ // })
|
|
|
+ // }, 1000);
|
|
|
|
|
|
},
|
|
|
/**
|
| xqd
@@ -1337,46 +1167,52 @@
|
|
|
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]
|
|
|
+ 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]
|
|
|
+ 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]
|
|
|
+ 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++){
|
|
|
- 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 //晚上可预约号源
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ if (res.data.list.men.length != 0) {
|
|
|
+ let dataList = res.data.list.men;
|
|
|
+ let lists = [];
|
|
|
+ for (let i = 0; i < dataList.length; i++) {
|
|
|
+ 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 //晚上可预约号源
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
this.form.is_appoint.hospitalList = lists;
|
|
|
+ if(this.form.is_appoint.hospitalList.length==1){
|
|
|
+ this.hospitalcurrent = 0
|
|
|
+ }
|
|
|
}
|
|
|
/* 渲染时间 */
|
|
|
//电话的时间
|
| xqd
@@ -1560,6 +1396,24 @@
|
|
|
mzchange2(index) {
|
|
|
this.mzcurrent2 = index
|
|
|
},
|
|
|
+ xzyy(){
|
|
|
+ console.log(this.form.is_appoint.hospitalList.length)
|
|
|
+ console.log(this.form.is_appoint.hospitalList)
|
|
|
+ if(this.form.is_appoint.hospitalList.length != 0){
|
|
|
+ this.hospitalShow=true
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "您还没有已认证的医院,确认去认证?",
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/login/doctorRenzheng"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
};
|