From 1d4619efe72227acab067cdb1004f8fe85fd7a4e Mon Sep 17 00:00:00 2001
From: zoujiandong <10130823232@qq.com>
Date: Sun, 7 Apr 2024 13:58:23 +0800
Subject: [PATCH] =?UTF-8?q?4.7=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Pages/yishi/index/index.wxml | 2 +-
Pages/yishi/wenzhen_v2/wenzhen.wxml | 2 +-
Pages/yishi/wenzhen_v2/wenzhen.wxss | 6 +
user/pages/yishi/addServiceContent/index.js | 216 +++++++++++++++++-
user/pages/yishi/addServiceContent/index.wxml | 36 ++-
user/pages/yishi/addServiceContent/index.wxss | 22 +-
user/pages/yishi/onlinesetup/index.js | 86 ++++++-
user/pages/yishi/onlinesetup/index.wxml | 10 +-
user/pages/yishi/onlinesetup/index.wxss | 11 +
user/pages/yishi/onlinesetupprice/index.js | 23 +-
user/pages/yishi/orderdetail/index.wxml | 2 +-
user/pages/yishi/wenzhenorderV2/index.wxml | 2 +-
user/pages/yishi/yizhensetup/index.js | 58 ++++-
user/pages/yishi/yizhensetup/index.wxml | 4 +-
user/pages/yishi/yizhensetupprice/index.js | 41 +++-
utils/network/api.js | 66 +++++-
16 files changed, 521 insertions(+), 66 deletions(-)
diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml
index 8a80fec..cc2081e 100644
--- a/Pages/yishi/index/index.wxml
+++ b/Pages/yishi/index/index.wxml
@@ -115,7 +115,7 @@
个人简介管理
!
-
+
- {{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':'其他'}}
+ {{item.inquiry_mode==1?'图文':item.inquiry_mode==2?'视频':item.inquiry_mode==6?'疑难问诊':item.inquiry_mode==7?'附赠回复':item.inquiry_mode==8?'健康包':item.inquiry_mode==9?'随访包':'其他'}}
就诊人:
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxss b/Pages/yishi/wenzhen_v2/wenzhen.wxss
index bca92af..94fe624 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.wxss
+++ b/Pages/yishi/wenzhen_v2/wenzhen.wxss
@@ -175,4 +175,10 @@ page{
}
.parallelogram.yinan.parallelogram::before{
background:#ffb700;
+}
+.parallelogram.healthy.parallelogram::before{
+ background:#ff5d6a;
+}
+.parallelogram.visit.parallelogram::before{
+ background:#03b5e3;
}
\ No newline at end of file
diff --git a/user/pages/yishi/addServiceContent/index.js b/user/pages/yishi/addServiceContent/index.js
index b02f33d..e6203a1 100644
--- a/user/pages/yishi/addServiceContent/index.js
+++ b/user/pages/yishi/addServiceContent/index.js
@@ -14,18 +14,219 @@ Page({
},
cycle_columns:['1个月', '3个月', '6个月', '12个月'],
- showCycle:false
+ service_columns:['10次','不限次'],
+ showCycle:false,
+ showServiceNumber:false,
+ monthly_frequency:'',
+ isAdd:false,
+ service_rounds:0,
+ cur_id:'',
+ items:[{
+ service_period:'',
+ service_price:''
+ }]
},
- confirmCycle(event){
- const { picker, value, index } = event.detail;
- console.log(value);
+ openCycle(event){
+ let {id} =event.currentTarget.dataset;
+ console.log(id);
this.setData({
- showCycle:true
+ showCycle:true,
+ cur_id:id,
})
},
+
+ confirmCycle(event){
+ const { picker, value, index} = event.detail;
+ let {items,cur_id}=this.data;
+
+ let obj='items['+cur_id+'].service_period';
+ let day=null;
+ if(index==0){
+ day=30
+ }else if(index==1){
+ day=90
+ }else if(index==2){
+ day=180
+ }else if(index==3){
+ day=360
+ }
+ for (let index = 0; index < items.length; index++) {
+ if(items[index].service_period==day){
+ wx.showToast({
+ title: '此服务周期不能重复设置',
+ icon:'none'
+ })
+ return false
+ };
+
+ }
+ this.setData({
+ showCycle:false,
+ [obj]:day
+ })
+
+ },
+ changeIpt(event){
+ let {value}=event.detail;
+ let {id}=event.currentTarget.dataset;
+ console.log(id);
+ let obj='items['+id+'].service_price';
+ this.setData({
+ [obj]:value
+ })
+
+ },
+ delService(event){
+ let {items}=this.data;
+ let {id} =event.currentTarget.dataset;
+ items.splice(1,id);
+ this.setData({
+ items
+ })
+ },
+ handle(){
+ this.data.isAdd?this.addService():this.editService();
+ },
+ addServiceArr(){
+ let {items}=this.data;
+ this.setData({
+ items:items.concat({
+ service_period:'' ,
+ service_price:''
+ })
+ })
+ },
cancelCycle(){
this.setData({
- showCycle:true
+ showCycle:false
+ })
+ },
+ getService(){
+ api.getFollow().then(response=>{
+ if(response.code==200){
+ if(response.data){
+ let {monthly_frequency,service_rounds,items}=response.data
+ this.setData({
+ monthly_frequency,
+ service_rounds,
+ items,
+ isAdd:false
+ })
+ }else{
+ this.setData({
+ isAdd:true
+ })
+ }
+ }
+ })
+ },
+ addService(){
+ let {monthly_frequency,service_rounds,items}=this.data;
+ if(!monthly_frequency && monthly_frequency===''){
+ wx.showToast({
+ title: '请选择服务次数',
+ icon:'none'
+ })
+ return false
+ };
+ for (let i = 0; i < items.length; i++) {
+ if(!items[i].service_period){
+ wx.showToast({
+ title: '请选择第'+(i+1)+'个的服务周期',
+ icon:'none'
+ })
+ return false
+ }
+ if(!items[i].service_price){
+ wx.showToast({
+ title: '请设置第'+(i+1)+'个的服务价格',
+ icon:'none'
+ })
+ return false
+ }
+ }
+ api.postFollow({
+ monthly_frequency,
+ service_rounds,
+ items
+ }).then(response=>{
+ if(response.code==200){
+ wx.showToast({
+ title: '保存成功',
+ icon:'none'
+ })
+ wx.navigateBack()
+ }
+ })
+ },
+ editService(){
+ let {monthly_frequency,service_rounds,items}=this.data;
+ if(!monthly_frequency && monthly_frequency!=0){
+ wx.showToast({
+ title: '请选择服务次数',
+ icon:'none'
+ })
+ return false
+ };
+ for (let i = 0; i < items.length; i++) {
+ if(!items[i].service_period){
+ wx.showToast({
+ title: '请选择第'+(i+1)+'的服务周期',
+ icon:'none'
+ })
+ return false
+ }
+ if(!items[i].service_price){
+ wx.showToast({
+ title: '请设置第'+(i+1)+'的服务价格',
+ icon:'none'
+ })
+ return false
+ }
+ }
+ api.editFollow({
+ monthly_frequency,
+ service_rounds,
+ items
+ }).then(response=>{
+ if(response.code==200){
+ wx.showToast({
+ title: '修改成功',
+ });
+ wx.navigateBack()
+ }
+ })
+},
+getFollowDetail(){
+ api.getFollowDetail().then(response=>{
+ if(response.code==200){
+ if(response.data){
+ let res=response.data.map((item)=>{
+ return {service_period:item.service_period,service_price:item.service_price}
+ })
+ this.setData({
+ items:res
+ })
+ }
+ }
+ })
+},
+ openServiceNumber(){
+ this.setData({
+ showServiceNumber:true
+ })
+ },
+ confirmServiceNumber(event){
+ const { picker, value, index } = event.detail;
+
+ this.setData({
+ showServiceNumber:false,
+ monthly_frequency:index==0?10:0
+ })
+ },
+ cancelServiceNumber(){
+ this.setData({
+ showServiceNumber:false
})
},
/**
@@ -46,7 +247,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ this.getService();
+ this.getFollowDetail();
},
/**
diff --git a/user/pages/yishi/addServiceContent/index.wxml b/user/pages/yishi/addServiceContent/index.wxml
index af29105..7e3db73 100644
--- a/user/pages/yishi/addServiceContent/index.wxml
+++ b/user/pages/yishi/addServiceContent/index.wxml
@@ -4,8 +4,11 @@
服务次数/月
-
-
+
+ 请选择服务次数
+ {{monthly_frequency===0?'不限次数':'10次'}}
+
+
@@ -17,30 +20,35 @@
-
+
+
服务内容
-
-
+
+
服务周期
-
+ {{item.service_period/30}}个月
+ 请选择周期
+
服务价格(元)
- 元
+ 元
- 建议服务价格设置为:单次图文*10次*5~8折
+ 建议服务价格设置为:{{(item.service_period/30)==1?'单次图文*10次*5~8折':(item.service_period/30)==3?'单次图文*30次*4~7折':(item.service_period/30)==6?'单次图文*60次*3~6折':(item.service_period/30)==12?'单次图文*120次*2~5折':'单次图文*10次*5'}}
+ 删除
-继续添加服务内容
-保存
+继续添加服务内容
+
+保存
+
+
+
\ No newline at end of file
diff --git a/user/pages/yishi/addServiceContent/index.wxss b/user/pages/yishi/addServiceContent/index.wxss
index 72fb535..27b994b 100644
--- a/user/pages/yishi/addServiceContent/index.wxss
+++ b/user/pages/yishi/addServiceContent/index.wxss
@@ -1,6 +1,11 @@
page{
background-color: #F6F6F6;
}
+ .page{
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ }
.title{
width:90vw;
margin: 0 auto 20rpx;
@@ -23,7 +28,7 @@ page{
display: flex;
width: 90vw;
height: 180rpx;
- margin: 0 auto;
+ margin: 0 auto 20rpx;
border-radius: 20rpx;
flex-direction: column;
background-color: rgb(255, 255, 255);
@@ -48,8 +53,10 @@ page{
font-size: 32rpx;
color: #333;
}
+
.price{
text-align: right!important;
+ font-size: 28rpx;
}
.price_steup_box_bottom_num{
flex: 1.5;
@@ -77,7 +84,7 @@ page{
transform: scaleY(0.5);
}
.price_steup_box_top_stepper{
- flex: 1;
+ display: flex;
text-align: right;
align-items: center;
}
@@ -125,7 +132,7 @@ color: #E34D59;
justify-content: center;
width:90vw;
height: 80rpx;
- margin:160rpx auto 0;
+ margin:80rpx auto 0;
background: rgba(44,241,248,0.28);
border-radius: 8rpx;
}
@@ -158,4 +165,13 @@ color: rgba(0,0,0,0.6)!important;
}
.van-picker__toolbar{
border-bottom:.5px solid #E7E7E7;
+ }
+ .amount.nodata{
+ font-size: 28rpx;
+color: rgba(0,0,0,0.45);
+ }
+ .vontent{
+ flex:1;
+ margin-bottom: 150rpx;
+ overflow-y: scroll;
}
\ No newline at end of file
diff --git a/user/pages/yishi/onlinesetup/index.js b/user/pages/yishi/onlinesetup/index.js
index 9c0e75a..11866ce 100644
--- a/user/pages/yishi/onlinesetup/index.js
+++ b/user/pages/yishi/onlinesetup/index.js
@@ -16,6 +16,7 @@ Page({
note: "",
inquiry_type: 1,
inquiry_mode: 1,
+ multi_point_status:'',
config_setting:{},
info:{
is_open: false,
@@ -24,6 +25,7 @@ Page({
},
active:0,
myprice: "",
+ healthPrice:'图文价格*0.5*6',
config:{
"max_work_num_day": 30,
"min_inquiry_price": 0,
@@ -43,8 +45,11 @@ Page({
showOpenchuFang:false,
showOpenTuWen:false,
},
- onLoad(){
-
+ onLoad(options){
+ console.log(options.multi_point_status);
+ this.setData({
+ multi_point_status:options.multi_point_status
+ })
},
cancelOpenChuFang(){
this.setData({
@@ -71,10 +76,25 @@ Page({
onShow(){
let {active}=this.data;
this.getDoctorconfig();
+ this.getDoctorOpen();
+ this.getSysconfig();
if(active==4){
this.getConfig()
}
},
+
+ getDoctorOpen(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getOpen({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ this.setData({
+ note: response.data,
+ 'info.is_open': response.data
+ })
+ }).catch(errors => {console.error(errors);})
+ },
getDoctorconfig(){
let {inquiry_type,inquiry_mode}=this.data;
//接诊类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
@@ -86,9 +106,10 @@ Page({
}).then(response => {
console.log(response);
this.setData({
- info: response.data.info,
- config: response.data.config,
- note: response.data.info.is_open
+ 'info.inquiry_price': response.data.inquiry_price,
+ 'info.work_num_day': response.data.work_num_day,
+ // config: response.data.config,
+ // note: response.data.info.is_open
})
}).catch(errors => {console.error(errors);})
},
@@ -106,6 +127,7 @@ Page({
onChange({ detail }) {
this.doChange(detail)
},
+
getConfig(){
let {inquiry_type,inquiry_mode}=this.data;
api.getServiceConfig({
@@ -132,7 +154,7 @@ Page({
addServiceContent(){
app.go('/user/pages/yishi/addServiceContent/index')
},
- doChange(detail){
+ async doChange(detail){
console.log("onChange: ", detail);
let is_open = 0;
if(detail){
@@ -141,7 +163,23 @@ Page({
if(this.data.active==0){
let check = this.checkPrice(inquiry_price);
if(!check) return;
- }
+ };
+ if(this.data.active==2 && detail){
+ let {data}=await api.getOpen({inquiry_type:1,inquiry_mode:1});
+ if(data==0){
+ this.setData({
+ showOpenTuWen:true
+ })
+ return false
+ }
+ if(this.data.multi_point_status!=1){
+ this.setData({
+ showOpenchuFang:true
+ })
+ return false
+ }
+ };
+
if(this.data.active==3 && detail){
wx.showToast({
title: '即将开通',
@@ -250,6 +288,17 @@ Page({
inquiry_type:1,
inquiry_mode:1,
})
+ }else if(index==1){
+ this.setData({
+ inquiry_type:1,
+ inquiry_mode:9,
+ })
+ }else if(index==2){
+ this.setData({
+ inquiry_type:1,
+ inquiry_mode:8,
+ })
+ this.getHealthy()
}else if(index==3){
this.setData({
inquiry_type:1,
@@ -263,6 +312,8 @@ Page({
this.getConfig();
}
this.getDoctorconfig();
+ this.getDoctorOpen();
+ this.getSysconfig();
},
putDoctorInquiryConfig(){
//修改医生问诊配置
@@ -284,6 +335,27 @@ Page({
})
},
+ getHealthy(){
+ api.getHealthy().then(response => {
+ this.setData({
+ healthPrice:(response.data.inquiry_price*response.data.service_rate/100).toFixed(2)
+ })
+ }).catch(errors => {console.error(errors);})
+ },
+ getSysconfig(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getSysconfig({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ this.setData({
+ 'config': response.data
+ // config: response.data.config,
+ // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
+ })
+ }).catch(errors => {console.error(errors);})
+
+},
myToast(message){
Toast({
context: this,
diff --git a/user/pages/yishi/onlinesetup/index.wxml b/user/pages/yishi/onlinesetup/index.wxml
index e269f97..62b7f40 100644
--- a/user/pages/yishi/onlinesetup/index.wxml
+++ b/user/pages/yishi/onlinesetup/index.wxml
@@ -89,7 +89,7 @@
-->
- 添加服务内容
+ 添加服务内容
@@ -114,8 +114,12 @@
服务价格
-
-
+
+ 元
diff --git a/user/pages/yishi/onlinesetup/index.wxss b/user/pages/yishi/onlinesetup/index.wxss
index bbf4df7..49333ec 100644
--- a/user/pages/yishi/onlinesetup/index.wxss
+++ b/user/pages/yishi/onlinesetup/index.wxss
@@ -182,4 +182,15 @@ page{
font-size: 28rpx;
color: rgba(0,0,0,0.65);
margin: 20rpx auto 0 auto;
+}
+.healthPrice{
+ font-size: 28rpx;
+ color: #E34D59;
+}
+.unit{
+ color: #333;
+}
+.cell_value_heal{
+ display: flex;
+ align-items: center;
}
\ No newline at end of file
diff --git a/user/pages/yishi/onlinesetupprice/index.js b/user/pages/yishi/onlinesetupprice/index.js
index d6ae576..22fdcfe 100644
--- a/user/pages/yishi/onlinesetupprice/index.js
+++ b/user/pages/yishi/onlinesetupprice/index.js
@@ -46,11 +46,28 @@ Page({
api.getDoctorInquiryConfig(params).then(response => {
console.log(response);
this.setData({
- info: response.data.info,
- config: response.data.config,
- note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
+ 'info.inquiry_price': response.data.inquiry_price,
+ 'info.work_num_day': response.data.work_num_day,
+ // config: response.data.config,
+ // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
})
}).catch(errors => {console.error(errors);})
+ this.getSysconfig();
+ },
+ getSysconfig(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getSysconfig({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ console.log(response);
+ this.setData({
+ 'config': response.data
+ // config: response.data.config,
+ // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
+ })
+ }).catch(errors => {console.error(errors);})
+
},
onStepperChange(event) {
console.log(event.detail);
diff --git a/user/pages/yishi/orderdetail/index.wxml b/user/pages/yishi/orderdetail/index.wxml
index da7e5b5..a3fa18e 100644
--- a/user/pages/yishi/orderdetail/index.wxml
+++ b/user/pages/yishi/orderdetail/index.wxml
@@ -5,7 +5,7 @@
- {{ item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
+ {{ item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==1 && item.inquiry_mode==8?'在线问诊-健康包':item.inquiry_type==1 && item.inquiry_mode==9?'在线问诊-随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
{{ item.entry_status==1?'入账中':item.entry_status==2?'入账成功':item.entry_status==3?'入账失败':'未知' }}
diff --git a/user/pages/yishi/wenzhenorderV2/index.wxml b/user/pages/yishi/wenzhenorderV2/index.wxml
index 27ba2ba..aeff9fe 100644
--- a/user/pages/yishi/wenzhenorderV2/index.wxml
+++ b/user/pages/yishi/wenzhenorderV2/index.wxml
@@ -5,7 +5,7 @@
- {{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'未知'}}
+ {{item.inquiry_type==1 && item.inquiry_mode==1?'在线问诊-图文':item.inquiry_type==1 && item.inquiry_mode==2?'在线问诊-视频':item.inquiry_type==1 && item.inquiry_mode==6?'疑难会诊':item.inquiry_type==1 && item.inquiry_mode==8?'在线问诊-健康包':item.inquiry_type==1 && item.inquiry_mode==9?'在线问诊-随访包':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':item.inquiry_type==5?'糖组检测':'未知'}}
订单编号:{{item.inquiry_no }}
就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)
diff --git a/user/pages/yishi/yizhensetup/index.js b/user/pages/yishi/yizhensetup/index.js
index 33a664d..358d98d 100644
--- a/user/pages/yishi/yizhensetup/index.js
+++ b/user/pages/yishi/yizhensetup/index.js
@@ -11,7 +11,6 @@ Page({
},
height: app.globalData.height,
checked: true,
- canFree:false,
showSetting:false,
open_note: "已开启,可在问诊消息中进行接诊",
close_note: "已关闭,暂不接收公益问诊",
@@ -46,11 +45,12 @@ Page({
},
onShow(){
- let doctor_id=wx.getStorageSync('client_user_id_2');
- console.log(doctor_id);
- if(doctor_id){
- this.getService(doctor_id)
- }
+ this.getDoctorOpen()
+ // let doctor_id=wx.getStorageSync('client_user_id_2');
+ // console.log(doctor_id);
+ // if(doctor_id){
+ // this.getService(doctor_id)
+ // }
let params = {};
params.inquiry_type = this.data.inquiry_type;//接诊类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药)
params.inquiry_mode = this.data.inquiry_mode;//接诊方式(1:图文 2:视频 3:语音 4:电话 5:会员)
@@ -58,12 +58,33 @@ Page({
api.getDoctorInquiryConfig(params).then(response => {
console.log(response);
this.setData({
- info: response.data.info,
- config: response.data.config,
+ 'info.inquiry_price': response.data.inquiry_price,
+ 'info.work_num_day': response.data.work_num_day
+ // config: response.data.config,
})
- this.formatAmounts();
- this.formatAmountValue();
+ // this.formatAmounts();
+ // this.formatAmountValue();
}).then(re =>{
+ // let is_open = this.data.info.is_open;
+ // let note = this.data.note;
+ // if(is_open == 1) note = this.data.open_note;
+ // if(is_open == 0) note = this.data.close_note;
+ // this.setData({
+ // note: note
+ // })
+ }).catch(errors => {console.error(errors);})
+ this.getSysconfig();
+ },
+ getDoctorOpen(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getOpen({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ this.setData({
+ note: response.data,
+ 'info.is_open': response.data
+ })
let is_open = this.data.info.is_open;
let note = this.data.note;
if(is_open == 1) note = this.data.open_note;
@@ -108,6 +129,23 @@ Page({
amountText: val
})
},
+ getSysconfig(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getSysconfig({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ console.log(response);
+ this.setData({
+ 'config': response.data
+ // config: response.data.config,
+ // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
+ })
+ this.formatAmounts();
+ this.formatAmountValue();
+ }).catch(errors => {console.error(errors);})
+
+},
changeON(){
let is_open = this.data.info.is_open
console.log("changeON:", is_open)
diff --git a/user/pages/yishi/yizhensetup/index.wxml b/user/pages/yishi/yizhensetup/index.wxml
index eaf02c5..e3fd98d 100644
--- a/user/pages/yishi/yizhensetup/index.wxml
+++ b/user/pages/yishi/yizhensetup/index.wxml
@@ -28,7 +28,7 @@
border="{{true}}"
url="/user/pages/yishi/yizhensetupprice/index"
>
-
+
{{ info.work_num_day }}
去设置
@@ -39,7 +39,7 @@
border="{{false}}"
url="/user/pages/yishi/yizhensetupprice/index"
>
-
+
{{ amountText }}
元
diff --git a/user/pages/yishi/yizhensetupprice/index.js b/user/pages/yishi/yizhensetupprice/index.js
index fe8b253..9e6ad32 100644
--- a/user/pages/yishi/yizhensetupprice/index.js
+++ b/user/pages/yishi/yizhensetupprice/index.js
@@ -48,21 +48,40 @@ Page({
api.getDoctorInquiryConfig(params).then(response => {
console.log(response);
this.setData({
- info: response.data.info,
- config: response.data.config,
+ 'info.inquiry_price': response.data.inquiry_price,
+ 'info.work_num_day': response.data.work_num_day
+ // config: response.data.config,
})
- this.formatAmounts();
- this.formatAmountValue();
+ // this.formatAmounts();
+ // this.formatAmountValue();
}).then(re =>{
- let is_open = this.data.info.is_open;
- let note = this.data.note;
- if(is_open == 1) note = this.data.open_note;
- if(is_open == 0) note = this.data.close_note;
- this.setData({
- note: note
- })
+ // let is_open = this.data.info.is_open;
+ // let note = this.data.note;
+ // if(is_open == 1) note = this.data.open_note;
+ // if(is_open == 0) note = this.data.close_note;
+ // this.setData({
+ // note: note
+ // })
}).catch(errors => {console.error(errors);})
+ this.getSysconfig()
},
+ getSysconfig(){
+ let {inquiry_type,inquiry_mode}=this.data;
+ api.getSysconfig({
+ inquiry_type,
+ inquiry_mode
+ }).then(response => {
+ console.log(response);
+ this.setData({
+ 'config': response.data
+ // config: response.data.config,
+ // note: response.data.info.is_open == 1? this.data.open_note : this.data.close_note
+ })
+ this.formatAmounts();
+ this.formatAmountValue();
+ }).catch(errors => {console.error(errors);})
+
+},
formatAmounts(){
let list = this.data.config.system_inquiry_price.map(item => {
let it = {};
diff --git a/utils/network/api.js b/utils/network/api.js
index 7962c98..9c1ce66 100644
--- a/utils/network/api.js
+++ b/utils/network/api.js
@@ -912,7 +912,7 @@ getJob() {//获取职业
}
getServiceConfig(params) {//获取医生问诊配置-服务设置
return this.request({
- url: `${this.baseUrl}/doctor/inquiry/config/service`,
+ url: `${this.baseUrl}/doctor/inquiry/config/difficult`,
method: 'GET',
data: {
...params
@@ -922,7 +922,7 @@ getServiceConfig(params) {//获取医生问诊配置-服务设置
postServiceConfig(params) {//新增医生问诊配置-服务设置
return this.request({
- url: `${this.baseUrl}/doctor/inquiry/config/service`,
+ url: `${this.baseUrl}/doctor/inquiry/config/difficult`,
method: 'POST',
data: {
...params
@@ -931,7 +931,7 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
}
putServiceConfig(params,id) {//修改医生问诊配置-服务设置
return this.request({
- url: `${this.baseUrl}/doctor/inquiry/config/service/${id}`,
+ url: `${this.baseUrl}/doctor/inquiry/config/difficult/${id}`,
method: 'PUT',
data: {
...params
@@ -1005,13 +1005,67 @@ postServiceConfig(params) {//新增医生问诊配置-服务设置
method: 'GET'
})
}
- getDoctorService(params){
+ getOpen(params){//获取医生问诊服务开启状态
return this.request({
- url: `${this.baseUrl}/doctor/inquiry/service/${params}`,
- method: 'GET'
+ url: `${this.baseUrl}/doctor/inquiry/config/open`,
+ method: 'GET',
+ data: {
+ ...params
+ }
+ })
+ }
+
+ getSysconfig(params){
+ return this.request({//获取系统问诊配置
+ url: `${this.baseUrl}/system/inquiry/config`,
+ method: 'GET',
+ data: {
+ ...params
+ }
})
}
+ getFollow(params){
+ return this.request({//获取医生问诊配置-随访包
+ url: `${this.baseUrl}/doctor/inquiry/config/follow`,
+ method: 'GET',
+ data: {
+ ...params
+ }
+ })
+ }
+
+ postFollow(params){
+ return this.request({//新增医生问诊配置-随访包
+ url: `${this.baseUrl}/doctor/inquiry/config/follow`,
+ method: 'POST',
+ data: {
+ ...params
+ }
+ })
+ }
+ getFollowDetail(){
+ return this.request({//获取医生问诊配置-随访包-明细
+ url: `${this.baseUrl}/doctor/inquiry/config/follow/item`,
+ method: 'GET'
+ })
+ }
+ editFollow(params){
+ return this.request({//修改医生问诊配置-随访包
+ url: `${this.baseUrl}/doctor/inquiry/config/follow`,
+ method: 'PUT',
+ data: {
+ ...params
+ }
+ })
+ }
+ getHealthy(){
+ return this.request({//获取医生问诊配置-健康包
+ url: `${this.baseUrl}/doctor/inquiry/config/health`,
+ method: 'GET'
+ })
+ }
+
}
export { API }