| xqd
@@ -12,11 +12,11 @@
|
|
|
<!-- 左 -->
|
|
|
<view class="left">
|
|
|
<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
|
|
|
- <view class="t2">基础价格为包含十分钟的起步价</view>
|
|
|
+ <view class="t2">基础价格为包含十分钟的起步价</view>
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="telePhone.Basics" type="text" :border="true" placeholder="请输入金额" />
|
|
|
+ <u-input v-model="form.is_phone.base_price" type="digit" :border="true" placeholder="请输入金额" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 步进价格 -->
|
| xqd
@@ -28,7 +28,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="telePhone.additional" type="text" :border="true" placeholder="请输入金额" />
|
|
|
+ <u-input v-model="form.is_phone.step_price" type="digit" :border="true" placeholder="请输入金额" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 服务时间 -->
|
| xqd
@@ -124,7 +124,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="telePhone.peopleNum" type="text" :border="true" placeholder="请输入人次" />
|
|
|
+ <u-input v-model="form.is_phone.person" type="digit" :border="true" placeholder="请输入人次" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -146,7 +146,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="imgText.Basics" type="text" :border="true" placeholder="请输入金额" />
|
|
|
+ <u-input v-model="form.is_chat.base_price" type="digit" :border="true" placeholder="请输入金额" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 服务时间 -->
|
| xqd
@@ -242,7 +242,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="imgText.peopleNum" type="text" :border="true" placeholder="请输入人次" />
|
|
|
+ <u-input v-model="form.is_chat.person" type="digit" :border="true" placeholder="请输入人次" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -264,7 +264,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="mz.Basics" type="text" :border="true" placeholder="请输入金额" />
|
|
|
+ <u-input v-model="form.is_appoint[0].base_price" type="digit" :border="true" placeholder="请输入金额" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 服务时间 -->
|
| xqd
@@ -450,7 +450,7 @@
|
|
|
</view>
|
|
|
<!-- 右 -->
|
|
|
<view class="right">
|
|
|
- <u-input v-model="mz.peopleNum" type="text" :border="true" placeholder="请输入人次" />
|
|
|
+ <u-input v-model="form.is_appoint[0].person" type="digit" :border="true" placeholder="请输入人次" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -473,15 +473,13 @@
|
|
|
data() {
|
|
|
return {
|
|
|
// 控制列表显示:0=电话,1=图文,2=门诊预约
|
|
|
- showList:[
|
|
|
- {
|
|
|
- flag: true
|
|
|
- }, {
|
|
|
- flag:true
|
|
|
- },{
|
|
|
- flag:true
|
|
|
- },
|
|
|
- ],
|
|
|
+ showList: [{
|
|
|
+ flag: true
|
|
|
+ }, {
|
|
|
+ flag: true
|
|
|
+ }, {
|
|
|
+ flag: true
|
|
|
+ }, ],
|
|
|
hospital: [{
|
|
|
name: '熊科医院'
|
|
|
}, {
|
| xqd
@@ -578,91 +576,180 @@
|
|
|
checked: false
|
|
|
}],
|
|
|
|
|
|
- /******************需要保存的资料*********************/
|
|
|
- //电话
|
|
|
- telePhone: {
|
|
|
- Basics: '', //基础价格
|
|
|
- additional: '', //步进
|
|
|
- peopleNum: '', //服务人次
|
|
|
+ /********************保存的数据****************************/
|
|
|
+ form: {
|
|
|
+ is_chat: {
|
|
|
+ base_price: "0",
|
|
|
+ service_time: "",
|
|
|
+ person: 0,
|
|
|
+ type: "2"
|
|
|
+ },
|
|
|
+ is_phone: {
|
|
|
+ base_price: "0",
|
|
|
+ service_time: "",
|
|
|
+ person: 0,
|
|
|
+ type: "1"
|
|
|
+ },
|
|
|
+ is_appoint: {
|
|
|
+ base_price: "0",
|
|
|
+ type:"3",
|
|
|
+ person: 0,
|
|
|
+ hospitals:[{
|
|
|
+ service_time: "",
|
|
|
+ relation_id: 0
|
|
|
+ },{
|
|
|
+ service_time: "",
|
|
|
+ relation_id: 0
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
- //图文
|
|
|
- imgText: {
|
|
|
- Basics: '', //基础价格
|
|
|
- additional: '', //步进
|
|
|
- peopleNum: '' //服务人次
|
|
|
- },
|
|
|
- //门诊
|
|
|
- mz: {
|
|
|
- Basics: '', //基础价格
|
|
|
- additional: '', //步进
|
|
|
- peopleNum: '' //服务人次
|
|
|
- },
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ /* 保存 */
|
|
|
+ bc(e) {
|
|
|
+ /**
|
|
|
+ * 电话
|
|
|
+ * */
|
|
|
+ for(let i in this.dh.timeList1){ //遍历选中 保存id
|
|
|
+ if(this.dh.timeList1[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList1[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.dh.timeList2){ //遍历选中 保存id
|
|
|
+ if(this.dh.timeList2[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList2[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.dh.timeList3){ //遍历选中 保存id
|
|
|
+ if(this.dh.timeList3[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList3[i].id}
|
|
|
+ }
|
|
|
+ //判断开头第一个是否为逗号,是就删除逗号
|
|
|
+ if(this.form.is_phone.service_time.startsWith(",")){
|
|
|
+ this.form.is_phone.service_time= this.form.is_phone.service_time.substr(1);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 图文
|
|
|
+ * */
|
|
|
+ for(let i in this.tw.timeList1){ //遍历选中 保存id
|
|
|
+ if(this.tw.timeList1[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList1[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.tw.timeList2){ //遍历选中 保存id
|
|
|
+ if(this.tw.timeList2[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList2[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.tw.timeList3){ //遍历选中 保存id
|
|
|
+ if(this.tw.timeList3[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList3[i].id}
|
|
|
+ }
|
|
|
+ //判断开头第一个是否为逗号,是就删除逗号
|
|
|
+ if(this.form.is_chat.service_time.startsWith(",")){
|
|
|
+ this.form.is_chat.service_time= this.form.is_chat.service_time.substr(1);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 门诊
|
|
|
+ * */
|
|
|
+ for(let i in this.mz1.timeList1){ //遍历选中 保存id
|
|
|
+ if(this.mz1.timeList1[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList1[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.mz1.timeList2){ //遍历选中 保存id
|
|
|
+ if(this.mz1.timeList2[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList2[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.mz1.timeList3){ //遍历选中 保存id
|
|
|
+ if(this.mz1.timeList3[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList3[i].id}
|
|
|
+ }
|
|
|
+ //判断开头第一个是否为逗号,是就删除逗号
|
|
|
+ if(this.form.is_appoint.hospitals[0].service_time.startsWith(",")){
|
|
|
+ this.form.is_appoint.hospitals[0].service_time= this.form.is_appoint.hospitals[0].service_time.substr(1);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 门诊
|
|
|
+ * */
|
|
|
+ for(let i in this.mz2.timeList1){ //遍历选中 保存id
|
|
|
+ if(this.mz2.timeList1[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList1[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.mz2.timeList2){ //遍历选中 保存id
|
|
|
+ if(this.mz2.timeList2[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList2[i].id}
|
|
|
+ }
|
|
|
+ for(let i in this.mz2.timeList3){ //遍历选中 保存id
|
|
|
+ if(this.mz2.timeList3[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList3[i].id}
|
|
|
+ }
|
|
|
+ //判断开头第一个是否为逗号,是就删除逗号
|
|
|
+ if(this.form.is_appoint.hospitals[1].service_time.startsWith(",")){
|
|
|
+ this.form.is_appoint.hospitals[1].service_time= this.form.is_appoint.hospitals[1].service_time.substr(1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ console.log(this.form)
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* @author Liu Yuanhang
|
|
|
* 获取页面显示状态以及数据
|
|
|
*/
|
|
|
- getShows:async function(){
|
|
|
- let res = await this.$request.post('doctor/getSettingList',{'type':2});
|
|
|
- if(res.status==0){
|
|
|
-
|
|
|
+ getShows: async function() {
|
|
|
+ let res = await this.$request.post('doctor/getSettingList', {
|
|
|
+ 'type': 2
|
|
|
+ });
|
|
|
+ if (res.status == 0) {
|
|
|
+
|
|
|
// 1.控制列表显示,2.渲染数据
|
|
|
// 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;
|
|
|
-
|
|
|
+
|
|
|
// 渲染显示的基础价格设置
|
|
|
- if(res.data.list.phone!=null){
|
|
|
+ if (res.data.list.phone != null) {
|
|
|
// 渲染电话的基础数据
|
|
|
- this.telePhone.Basics = res.data.list.phone.base_price;
|
|
|
- this.telePhone.additional = res.data.list.phone.step_price;
|
|
|
- this.telePhone.peopleNum = res.data.list.phone.person;
|
|
|
+ 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.person = res.data.list.phone.person;
|
|
|
}
|
|
|
-
|
|
|
- if(res.data.list.chat!=null){
|
|
|
+
|
|
|
+ if (res.data.list.chat != null) {
|
|
|
// 渲染图文的基础数据
|
|
|
- this.imgText.Basics = res.data.list.chat.base_price;
|
|
|
- this.imgText.additional = res.data.list.chat.step_price;
|
|
|
- this.imgText.peopleNum = res.data.list.chat.person;
|
|
|
+ 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;
|
|
|
}
|
|
|
-
|
|
|
- if(res.data.list.men!=null){
|
|
|
+
|
|
|
+ if (res.data.list.men != null) {
|
|
|
// 渲染门诊预约的基础数据
|
|
|
- this.mz.Basics = res.data.list.men[0].base_price;
|
|
|
- this.mz.additional = res.data.list.men[0].step_price;
|
|
|
- this.mz.peopleNum = res.data.list.men[0].person;
|
|
|
+ this.form.is_appoint.base_price = res.data.list.men.base_price;
|
|
|
+ this.form.is_appoint.step_price = res.data.list.men.step_price;
|
|
|
+ this.form.is_appoint.person = res.data.list.men.person;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 获取医院
|
|
|
- if(res.data.org!=null){
|
|
|
- console.log('获取医院',res.data.org)
|
|
|
+ if (res.data.org != null) {
|
|
|
+ console.log('获取医院', res.data.org)
|
|
|
this.hospital = res.data.org;
|
|
|
this.hospitals = res.data.orgs;
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/* 渲染时间 */
|
|
|
//电话的时间
|
|
|
- let dhtime = res.data.times;
|
|
|
+ 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 = res.data.times;
|
|
|
+ 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 = res.data.times;
|
|
|
+ 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 = res.data.times;
|
|
|
+
|
|
|
+ let mz2 = JSON.parse(JSON.stringify(res.data.times))
|
|
|
this.mz2.timeList1 = mz2.list1;
|
|
|
this.mz2.timeList2 = mz2.list2;
|
|
|
this.mz2.timeList3 = mz2.list3;
|
| xqd
@@ -674,39 +761,41 @@
|
|
|
* @author Liu Yuan hang
|
|
|
* @param {Object} e
|
|
|
*/
|
|
|
- reanders(e){
|
|
|
- uni.showLoading({title: '渲染中',mask:true});
|
|
|
- let oks,dh1,dh2,dh3,tw1,tw2,tw3;
|
|
|
-
|
|
|
-
|
|
|
+ reanders(e) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '渲染中',
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ let oks, dh1, dh2, dh3, tw1, tw2, tw3;
|
|
|
+
|
|
|
// 电话
|
|
|
- if(e.list.phone!=null){
|
|
|
- dh1=this.dh.timeList1;
|
|
|
- dh2=this.dh.timeList2;
|
|
|
- dh3=this.dh.timeList3;
|
|
|
- let phones = e.list.phone.service_time;
|
|
|
- console.log('我是电话',phones)
|
|
|
- for(let i=0;i<dh1.length;i++){
|
|
|
- if(phones.indexOf(dh1[i].id)!=-1){
|
|
|
- dh1[i].checked = true
|
|
|
+ if (e.list.phone != null) {
|
|
|
+ dh1 = this.dh.timeList1;
|
|
|
+ dh2 = this.dh.timeList2;
|
|
|
+ dh3 = this.dh.timeList3;
|
|
|
+ let phones = e.list.phone.service_time;
|
|
|
+ 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
|
|
|
+
|
|
|
+ for (let i = 0; i < dh2.length; i++) {
|
|
|
+ if (phones.indexOf(dh2[i].id) != -1) {
|
|
|
+ dh2[i].checked = true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- for(let i=0;i<dh3.length;i++){
|
|
|
- if(phones.indexOf(dh3[i].id)!=-1){
|
|
|
- dh3[i].checked = true
|
|
|
+
|
|
|
+ for (let i = 0; i < dh3.length; i++) {
|
|
|
+ if (phones.indexOf(dh3[i].id) != -1) {
|
|
|
+ dh3[i].checked = true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 图文资讯渲染
|
|
|
- // if(e.list.chat!=null){
|
|
|
+ }
|
|
|
+
|
|
|
+ // 图文资讯渲染
|
|
|
+ // if(e.list.chat!=null){
|
|
|
// tw1=this.tw.timeList1;
|
|
|
// tw2=this.tw.timeList2;
|
|
|
// tw3=this.tw.timeList3;
|
| xqd
@@ -727,22 +816,8 @@
|
|
|
// tw3[i].checked = true
|
|
|
// }
|
|
|
// }
|
|
|
- // }
|
|
|
+ // }
|
|
|
uni.hideLoading();
|
|
|
- },
|
|
|
- bc(e) {
|
|
|
- console.log('电话' + this.telePhone)
|
|
|
- console.log('图文' + this.imgText)
|
|
|
- console.log('门诊' + this.mz)
|
|
|
- console.log('电话' + this.dhcurrent)
|
|
|
- console.log('图文' + this.twcurrent)
|
|
|
- console.log('门诊' + this.mzcurrent),
|
|
|
- uni.navigateTo({
|
|
|
- url:'setservice'
|
|
|
- })
|
|
|
- },
|
|
|
- test(e) {
|
|
|
-
|
|
|
},
|
|
|
dhchange(index) {
|
|
|
this.dhcurrent = index
|