From 89be7ccae1a6fb1a770d1d932de05c8d9fe20028 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Tue, 12 Dec 2023 10:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E6=8F=90=E4=BA=A41212?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pages/index/index.js | 4 + Pages/yishi/case/index.wxml | 6 +- Pages/yishi/case/index.wxss | 7 +- Pages/yishi/cash/index.js | 2 + Pages/yishi/cash/index.wxml | 28 +- Pages/yishi/cash/index.wxss | 50 +- Pages/yishi/cashrecord/index.wxml | 22 +- Pages/yishi/cashrecord/index.wxss | 68 +- Pages/yishi/myaccount/index.js | 23 +- Pages/yishi/myaccount/index.json | 1 + Pages/yishi/myaccount/index.wxml | 50 +- Pages/yishi/myaccount/index.wxss | 128 +++- Pages/yishi/onlinechufang/index.js | 2 +- Pages/yishi/orderdetail/index.wxml | 5 +- Pages/yishi/orderdetail/index.wxss | 12 + Pages/yishi/patient_sick/index.js | 1 - Pages/yishi/sickform/index.js | 594 +++++++++++++++++- Pages/yishi/sickform/index.wxml | 120 ++-- Pages/yishi/sickform/index.wxss | 11 +- Pages/yishi/wenzhen_v2/wenzhen.wxml | 5 +- Pages/yishi/write_sickform/index.wxss | 3 + .../MessageElements/CustomMessage/index.js | 7 +- .../components/MessageInput/index.wxml | 2 +- app.js | 3 +- commpents/upload-cell/index.wxml | 2 +- filters/filter.wxs | 70 +++ .../images/yishi/tabbar_icon/wenzhenform.png | Bin 0 -> 1209 bytes .../images/yishi/tabbar_icon/wenzhenicon.png | Bin 0 -> 2195 bytes utils/network/api.js | 13 + utils/substr.wxs | 1 + 30 files changed, 1083 insertions(+), 157 deletions(-) create mode 100644 filters/filter.wxs create mode 100644 static/images/yishi/tabbar_icon/wenzhenform.png create mode 100644 static/images/yishi/tabbar_icon/wenzhenicon.png diff --git a/Pages/index/index.js b/Pages/index/index.js index 9e3e34b..f6259dd 100644 --- a/Pages/index/index.js +++ b/Pages/index/index.js @@ -91,6 +91,10 @@ Page({ complete: () => {} }) this.setData({ loading: false }); + if(app.globalData.isLogin){ + let usertype = wx.getStorageSync('usertype'); + this.guideTo(usertype) + } // let isEntry=wx.getStorageSync('hasEntry'); // console.log("onshow:"+isEntry) // if(!isEntry){ diff --git a/Pages/yishi/case/index.wxml b/Pages/yishi/case/index.wxml index a0380bc..3b5d4d8 100644 --- a/Pages/yishi/case/index.wxml +++ b/Pages/yishi/case/index.wxml @@ -124,13 +124,13 @@ 药品: - - {{itemName}}; + + {{itemName.product_name}}; 用法: - {{case_detail.order_prescription.single_use}} + {{case_detail.order_prescription.doctor_advice}} diff --git a/Pages/yishi/case/index.wxss b/Pages/yishi/case/index.wxss index 9535db7..ebd1ea4 100644 --- a/Pages/yishi/case/index.wxss +++ b/Pages/yishi/case/index.wxss @@ -42,7 +42,8 @@ page{ } .info_item{ text-align: left; - width: 203rpx; + width: 33.3%; + margin-right: -1rpx; /* height: 60rpx; */ margin-top: 10rpx; @@ -52,8 +53,8 @@ page{ align-items: flex-start; } .info_item:nth-child(3n){ - text-indent: 20rpx; -} + margin-right: 0rpx; +} .info_title{ font-size: 28rpx; color: #333333; diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js index a48c6af..5b366f9 100644 --- a/Pages/yishi/cash/index.js +++ b/Pages/yishi/cash/index.js @@ -17,6 +17,7 @@ Page({ bank_name : "xx银行", bank_card_code_mask: "888 xxxx xxxx 888", withdrawal_amount: "xxxx", + amount_total:'', income_tax: "xx", contactKeFu: false, sub_visible: false, @@ -91,6 +92,7 @@ Page({ bank_name : response.data.bank.bank_name, bank_card_code_mask: response.data.bank.bank_card_code_mask, withdrawal_amount: response.data.withdrawal_amount, + amount_total:response.data.amount_total, order_inquiry_ids: response.data.order_inquiry_ids, bank_card_name: response.data.bank.bank_card_name_mask, income_tax: response.data.income_tax, diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml index 8963a27..866db00 100644 --- a/Pages/yishi/cash/index.wxml +++ b/Pages/yishi/cash/index.wxml @@ -21,30 +21,44 @@ - 实际到账(元) + - {{withdrawal_amount}} + 账户余额:¥{{amount_total}} 扣除个人所得税: {{income_tax}}元 - + - - 提现记录 > - + + 实际到账(元) + + + {{withdrawal_amount}} + + + 查看订单 + + + + + + + 提现记录 + + diff --git a/Pages/yishi/cash/index.wxss b/Pages/yishi/cash/index.wxss index fb7a38c..f02535e 100644 --- a/Pages/yishi/cash/index.wxss +++ b/Pages/yishi/cash/index.wxss @@ -66,7 +66,7 @@ page{ } .cash{ width: 92vw; - height: 300rpx; + margin: 20rpx auto; background-color: #fff; border-radius: 20rpx; @@ -74,20 +74,26 @@ page{ flex-direction: column; } .cash_top{ - margin-top: 20rpx; + margin-top:30rpx; display: flex; flex: 3; } .cash_bottom{ + padding:20rpx 20rpx 30rpx; border-top: 1px solid #E5E5E5; - flex: 1.2; - color: #3CC7C0; + font-size: 32rpx; display: flex; - align-items: center; - justify-content: flex-end; + + flex-direction: column; padding-right: 20rpx; } +.cash_bottom .title{ + margin-top: 10rpx; + font-size: 30rpx; + + color: #000000; +} .cash_left{ flex: 3; display: flex; @@ -104,10 +110,12 @@ page{ flex: 2; display: flex; align-items: center; - font-size: 64rpx; + font-size: 34rpx; } .shui{ flex: 1; + margin-top: 20rpx; + margin-bottom: 30rpx; display: flex; align-items: center; font-size: 28rpx; @@ -154,3 +162,31 @@ page{ color: #3CC7C0; } +.moneybox{ + display: flex; +} +.moneybox{ + display: flex; + margin-top: 20rpx; + align-items: center; + justify-content: space-between; +} + +.money .mark{ + font-size: 42rpx; +font-weight: 400; +color: #333333; +} +.moneyNum{ + font-size: 64rpx; +font-family: ArialMT; +color: #333333; +} +.tixian{ + display: flex; + margin:0 30rpx; + color: #3CC7C0; + font-size: 32rpx; + align-items: center; + justify-content: flex-end; +} \ No newline at end of file diff --git a/Pages/yishi/cashrecord/index.wxml b/Pages/yishi/cashrecord/index.wxml index c20219e..dc40839 100644 --- a/Pages/yishi/cashrecord/index.wxml +++ b/Pages/yishi/cashrecord/index.wxml @@ -1,5 +1,6 @@ + @@ -10,19 +11,24 @@ - + + + + - {{item.account_name}}(尾号{{item.bank_card_code_four}}) - {{item.created_at}} + + + + {{item.examine_status==1?'结算中':item.examine_status==2?'结算成功':item.examine_status==3?'结算失败':'未知'}} + + - ¥{{item.actual_withdrawal_amount}} - - - {{item.examine_status==1?'审核中':item.examine_status==2?'审核通过':item.examine_status==3?'审核未通过':'未知'}} - + {{moduleFilter.transforDay(item.created_at,"noyear")}} + 实际到账金额:¥{{item.actual_withdrawal_amount}} + 个人所得税:¥{{item.income_tax}} diff --git a/Pages/yishi/cashrecord/index.wxss b/Pages/yishi/cashrecord/index.wxss index cd48aeb..f7f7b1a 100644 --- a/Pages/yishi/cashrecord/index.wxss +++ b/Pages/yishi/cashrecord/index.wxss @@ -25,46 +25,57 @@ page{ .data_item{ display: flex; flex-direction: column; - margin-bottom: 50rpx; - height: 200rpx; + margin-bottom: 20rpx; background-color: #ffffff; border-radius: 20rpx; - padding: 20rpx 0 0 0; + padding: 30rpx 0 0 0; } .data_item_top{ - flex: 2; - display: flex; + margin:0 30rpx; border-bottom: 1px solid #E7E7E7; } .data_item_top_icon{ - flex: 1; + text-align: center; - height: 70%; - align-self: start; + } .data_item_top_content{ - flex: 3; + + justify-content: space-between; display: flex; - flex-direction: column; } .name{ + margin-left: 10rpx; font-size: 32rpx; color: #333333; - flex: 1; + } .date{ - flex: 1; font-size: 28rpx; + display: flex; + margin-left: 28rpx; color: #999999; + white-space: nowrap; } .data_item_top_num{ - flex: 2; - display: flex; - flex-direction: column; justify-content: space-between; + display: flex; + align-items: center; + margin:0 30rpx 25rpx; + text-align: center; } +.jinename{ + font-size: 30rpx; + font-weight: 400; + color: #666666; +} +.namebox{ + display: flex; +} .jine{ + display: flex; + align-items: center; color: #FF0000; font-size: 34rpx; } @@ -73,27 +84,38 @@ page{ justify-content: center; } .status{ - border-radius: 10px; - font-size: 24rpx; - padding: 10rpx 40rpx; + width: 125rpx; + height: 50rpx; + background: #FFF2E8; + border-radius: 10rpx; margin-bottom: 20rpx; + font-size: 24rpx; + font-weight: 400; + display: flex; + align-items: center; + justify-content: center; + color: #FFFFFF; } -.status_ing{ - background-color: #FFF2E8; +.status.paying{ + background: #FFF2E8; color: #FA541C; } -.status_end{ +.status.paysuccess{ + background: #E2FFFE; + color: #3CC7C0; +} +.status.payfail{ background-color: #C5C5C5; color: #FFFFFF; } .data_item_bottom{ - flex: 1; + padding:20rpx 30rpx 26rpx; display: flex; align-items: center; justify-content: flex-end; margin-right: 20rpx; color: #666; - font-size: 32rpx; + font-size: 28rpx; } .t-picker__confirm{ color: #3CC7C0 !important; diff --git a/Pages/yishi/myaccount/index.js b/Pages/yishi/myaccount/index.js index 99a476a..48465c5 100644 --- a/Pages/yishi/myaccount/index.js +++ b/Pages/yishi/myaccount/index.js @@ -12,9 +12,12 @@ Page({ dateVisible: false, dateText: "", dateValue: ['2023','3'], + dialog_visible:false, select_date: "", balance_account: "", amount_total_month: "", + doctor_today_inquiry_total:'', + doctor_day_completed_amount_total:'', withdrawal_amount_month: "", static_host: api.getStaticHost(), bill: [], @@ -54,7 +57,7 @@ Page({ let mmdateValue = [''+year+'',''+month+'']; this.setData({ dateValue: mmdateValue, - dateText: month+"月" + dateText: year+"年" }) let date = this.data.dateValue.join("-"); @@ -63,7 +66,16 @@ Page({ onColumnChange(e) { console.log('picker onColumnChange:', e); }, - + confirmDialog(){ + this.setData({ + dialog_visible:false + }) + }, + showDialog(){ + this.setData({ + dialog_visible:true + }) + }, onPickerChange(e) { const { key } = e.currentTarget.dataset; const { value } = e.detail; @@ -72,7 +84,7 @@ Page({ this.setData({ [`${key}Visible`]: false, [`${key}Value`]: value, - [`${key}Text`]: value[1]+"月", + [`${key}Text`]: value[0]+"年", }); let date = value.join("-"); @@ -106,11 +118,16 @@ Page({ this.setData({ balance_account: response.data.balance_account, amount_total_month: response.data.amount_total_month, + doctor_today_inquiry_total:response.data.doctor_today_inquiry_total, + doctor_day_completed_amount_total:response.data.doctor_today_inquiry_total, withdrawal_amount_month: response.data.withdrawal_amount_month, bill: response.data.bill, }) }).catch(errors => {console.error(errors);}) }, + goTixian(){ + app.go('/Pages/yishi/cash/index') + }, goDetail(e){ let url = e.currentTarget.dataset.url; let md = e.currentTarget.dataset.md; diff --git a/Pages/yishi/myaccount/index.json b/Pages/yishi/myaccount/index.json index 1ae5130..09bf0e3 100644 --- a/Pages/yishi/myaccount/index.json +++ b/Pages/yishi/myaccount/index.json @@ -6,6 +6,7 @@ "t-picker": "tdesign-miniprogram/picker/picker", "t-picker-item": "tdesign-miniprogram/picker-item/picker-item", "van-icon": "@vant/weapp/icon/index", + "t-dialog": "tdesign-miniprogram/dialog/dialog", "van-cell": "@vant/weapp/cell/index", "van-cell-group": "@vant/weapp/cell-group/index", "van-empty": "@vant/weapp/empty/index" diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml index 2981644..c3ec3fa 100644 --- a/Pages/yishi/myaccount/index.wxml +++ b/Pages/yishi/myaccount/index.wxml @@ -1,6 +1,6 @@ - + - {{dateText}} + + 账户余额(元) + + + + {{balance_account}} + 提现 + + + + + 今日接诊收入 + ¥{{doctor_today_inquiry_total}} + + + 已完成待入账 + ¥{{doctor_day_completed_amount_total}} + + + + + + {{dateText}} - 账单 - + @@ -37,8 +58,21 @@ bindcancel="onPickerCancel" > - + + \ No newline at end of file + > + + 1、账户余额表示未提现的所有已经结束的订单金额总和 + 2、今日接诊收入表示今日已经接诊的订单金额总和 + 3、已完成待入账表示近期已完成未结束的订单金额总和 + + + 确定 + + + diff --git a/Pages/yishi/myaccount/index.wxss b/Pages/yishi/myaccount/index.wxss index e1a2f53..ea4072c 100644 --- a/Pages/yishi/myaccount/index.wxss +++ b/Pages/yishi/myaccount/index.wxss @@ -20,9 +20,9 @@ page{ } .monthbox{ width: 92vw; - margin: -40rpx auto 0 auto; + margin: 20rpx auto 0 auto; background-color: #ffffff; - height: 200rpx; + padding:26rpx 0 20rpx; border-radius: 20rpx; display: flex; flex-direction: column; @@ -53,7 +53,7 @@ page{ text-align: left; } .txt_title{ - font-size: 30rpx; + font-size: 34rpx; margin: 20rpx 0; position: relative; left: 4vw; @@ -64,10 +64,126 @@ page{ background-color: #fff; margin: 0 auto; border-radius: 20rpx; - padding: 20rpx 0; + overflow: hidden; } .t-picker__confirm{ color: #3CC7C0 !important; } - - +.titlebox{ + margin:0 30rpx; + display: flex; +} +.titlebox .name{ + color: #000000; +} +.question{ + color:rgba(0,0,0,0.6); +} +.tixian{ + width: 200rpx; +height: 70rpx; +background: linear-gradient(310deg, #FF931A 0%, #FF931A 0%, #FCB75D 100%); +border-radius: 10rpx; +font-size: 32rpx; +display: flex; +align-items: center; +justify-content: center; +font-weight: 400; +color: #FFFFFF; +} +.accoutbox{ + margin:20rpx 30rpx 0; + display: flex; + align-items: center; + justify-content: space-between; + padding-bottom: 26rpx; + +} +.line{ + width:100%; + height:1rpx; + background-color:#E5E5E5; +} +.mark{ + font-size: 42rpx; +font-weight: 400; +color: #333333; +} +.cashbox{ + margin:20rpx 30rpx 0; + display: flex; +} +.accountNum{ + font-size: 64rpx; +font-family: ArialMT; +color: #333333; +} +.titlename{ + font-size: 28rpx; +font-weight: 400; +color: #999999; +} +.today,.finish{ + flex:1; +} +.money{ + margin-top: 16rpx; + font-size: 36rpx; +font-weight: 400; +color: #000000; +} +.van-cell:after{ + left:0rpx!important; + right:0rpx!important; +} +.van-cell{ + padding:35rpx 16rpx!important; +} +.dialog{ + width: 100%; + text-align: center; + height: 100rpx; + line-height: 100rpx; +} +.dialog_cancel_btn{ + position: relative; +} +.dialog_cancel_btn::before { + content: ' '; + position: absolute; + box-sizing: border-box; + top: 0; + left: 0; + border-top: 2px solid var(--td-border-color, #e7e7e7); + border-right: 2px solid var(--td-border-color, #e7e7e7); + transform: scale(0.5); + transform-origin: 0 0; + width: 200%; + height: 200%; + border-radius: 0; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; +} +.dialog_confirm_btn{ + border-top: 1px solid #E9E9E9; + color: #3CC7C0; +} +.t-button__content{ + color: #3CC7C0 !important; +} +.t-dialog__button--text:before { + border-top: 2px solid #E9E9E9 !important; + border-left: 2px solid var(--td-border-color, #E9E9E9); + border-top-color: #E9E9E9 !important; +} +.slotcontent{ + margin-top: 20rpx; +} +.slotcontent .msg{ + font-size: 34rpx; +font-weight: 400; +color: #666; +line-height: 48rpx; +} \ No newline at end of file diff --git a/Pages/yishi/onlinechufang/index.js b/Pages/yishi/onlinechufang/index.js index 5ba3f6b..d5f2c84 100644 --- a/Pages/yishi/onlinechufang/index.js +++ b/Pages/yishi/onlinechufang/index.js @@ -60,7 +60,7 @@ Page({ let order_inquiry_id = options.order_inquiry_id; let order_prescription_id = options.order_prescription_id ; //获取患者问诊病例 - api.getDoctorInquiryCase({order_inquiry_id: order_inquiry_id}).then(response => { + api.getInquiryDetail({order_inquiry_id: order_inquiry_id}).then(response => { console.log(response); this.setData({ case_detail: response.data diff --git a/Pages/yishi/orderdetail/index.wxml b/Pages/yishi/orderdetail/index.wxml index 07ef182..bbd0f5d 100644 --- a/Pages/yishi/orderdetail/index.wxml +++ b/Pages/yishi/orderdetail/index.wxml @@ -6,13 +6,14 @@ {{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }} - {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'问诊结束':item.inquiry_status==7?'已取消':'其他' }} + + {{ item.entry_status==1?'入账中':item.entry_status==2?'入账成功':item.entry_status==3?'入账失败':'未知' }} 订单编号:{{item.inquiry_no}} 就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁) 接诊时间:{{item.reception_time}} - 结束时间:{{item.finish_time}} + 结束时间:{{item.finish_time}} 订单金额:¥{{item.amount_total}} 预计收入:¥{{item.estimate_income}} diff --git a/Pages/yishi/orderdetail/index.wxss b/Pages/yishi/orderdetail/index.wxss index 1c81f27..03df119 100644 --- a/Pages/yishi/orderdetail/index.wxss +++ b/Pages/yishi/orderdetail/index.wxss @@ -46,6 +46,18 @@ page{ background-color: #C5C5C5; color: #fff; } +.order_status.entrying{ + background: #FFF2E8; + color: #FA541C; +} +.order_status.entrysuccess{ + background: #E2FFFE; + color: #3CC7C0; +} +.order_status.entryfail{ + background-color: #C5C5C5; + color: #fff; +} .order_item_content_data{ flex: 5; display: flex; diff --git a/Pages/yishi/patient_sick/index.js b/Pages/yishi/patient_sick/index.js index e60e9bc..85e1d3b 100644 --- a/Pages/yishi/patient_sick/index.js +++ b/Pages/yishi/patient_sick/index.js @@ -26,7 +26,6 @@ Page({ goDetail:debounce(function(event){ console.log(event) let id=event.currentTarget.dataset.id; - console.log(id); app.go("/Pages/yishi/case/index?order_inquiry_id="+id); }), goDetailbefore:debounce(function(event){ diff --git a/Pages/yishi/sickform/index.js b/Pages/yishi/sickform/index.js index 3aabba6..c9fac44 100644 --- a/Pages/yishi/sickform/index.js +++ b/Pages/yishi/sickform/index.js @@ -1,4 +1,9 @@ -// Pages/sickform/index.js +// pages/inquiryForm/inquiryForm.js +const app = getApp() +import { API } from './../../../utils/network/api' +const api = new API() + + Page({ /** @@ -9,23 +14,552 @@ Page({ showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 title: '问诊表', //导航栏 中间的标题 }, - params:null, - basic:[], - preson:[] + obj:{ + height:'身高', + weight:'体重', + nation_id:'民族', + job_id:'职业', + marital_status:'婚姻状态', + allergy_history:'是否有过敏史?', + family_history:'是否有家族病史?', + is_pregnant:'是否处于备孕、妊娠、哺乳期?', + is_operation:'是否做过手术?', + drink_wine_status:'是否有饮酒史?', + smoke_status:'是否有吸烟史?', + chemical_compound_status:'是否有接触过化学物?', + diagnosis_hospital:'确诊医院是?', + is_take_medicine:'服用药品是?' + + }, + showNation:false, + showJob:false, + showMarital:false, + nationname:'', + order_inquiry_id:'', + jobname:'', + hideGuomin:false, + hideFamilysick:false, + hidePregnant:false, + hideOperation:false, + hideChemical:false, + hideHospital:false, + hideDrug:false, + personInfo:{}, + showBtn:true, + maritalColumn: [{ + text: '未婚', + value: 0 + }, { + text: '已婚 ', + value: 1 + }, { + text: '离异 ', + value: 2 + }], + nationcolumns:[], + jobcolumns:[], + list1:[], + list2:[], + startIndex1:1, + showList:[{ + isHas:false, + index:1 + },{ + isHas:false, + index:2 + },{ + isHas:false, + index:3 + },{ + isHas:false, + index:4 + },{ + isHas:false, + index:5 + },{ + isHas:false, + index:6 + },{ + isHas:false, + index:7 + },{ + isHas:false, + index:8 + },{ + isHas:false, + index:9 + }], + static_host: '' + + }, + handleSendFields(){ + const {order_inquiry_id,personInfo,list1,list2,marital_name,jobname,nationname}=this.data; + console.log(personInfo) + const fields=[]; + for (let i = 0; i { + wx.showToast({ + title: '发送成功', + icon:'none' + }), + wx.navigateBack() + + }) + }, + openMaritalPicker() { + this.setData({ + showMarital: true + }) + }, + closeMaritalPicker() { + this.setData({ + showMarital: false + }) + }, + onConfirmMaritalPicker(event) { + const { + value + } = event.detail; + + this.setData({ + showMarital: false, + marital_name:value.text, + 'personInfo.marital_status':value.value + }) + }, + onChangeRadio(event) { + let key = event.target.dataset.id; + let obj= "personInfo."+key; + this.setData({ + [obj]:Number(event.detail) + }); + if(key=="chemical_compound_status" && event.detail==1){ + this.setData({ + "personInfo.chemical_compound_describe":'' + }) + }else if(event.detail==0){ + if(key=="is_allergy_history"){ + this.setData({ + "personInfo.allergy_history":'', + hideGuomin:false + }) + }; + if(key=="is_pregnant"){ + this.setData({ + "personInfo.pregnant":'', + hidePregnant:false + }) + } + if(key=="is_family_history"){ + this.setData({ + "personInfo.family_history":'', + hideFamilysick:false + }) + } + } + }, + handelFocus(e) { + let key = e.target.dataset.id; + let value = e.target.dataset.value; + let obj="personInfo."+value; + if (!e.detail.value) { + this.setData({ + [key]: false, + [obj]: e.detail.value + }) + } else { + this.setData({ + [key]: true, + [obj]: e.detail.value + }) + } + }, + onConfirmNation(event) { + const { + value + } = event.detail; + this.setData({ + "nationname": `${value.nation_name}`, + "personInfo.nation_id": `${value.nation_id}`, + showNation: false + }) + }, + showNation() { + + this.setData({ + showNation: true + }) + + }, + onCancelNation() { + this.setData({ + showNation: false + }) + }, + onConfirmJob(event) { + const { + value + } = event.detail; + this.setData({ + "jobname": `${value.job_name}`, + "personInfo.job_id": `${value.job_id}`, + showJob: false + }) + }, + showJob() { + this.setData({ + showJob: true + }) + }, + onCancelJob() { + this.setData({ + showJob: false + }) + }, + commonMethods(arr1,arr2){ + this.setData({ + list1:arr1, + list2:arr2 + }); + let count=0; + arr2.forEach((item)=>{ + if(item=="allergy_history"){ + count++; + this.setData({ + 'showList[0].isHas':true, + 'showList[0].index':1 + }) + }else if(item=="family_history"){ + count++; + this.setData({ + 'showList[1].isHas':true, + 'showList[1].index':count + }) + }else if(item=="is_pregnant"){ + count++; + this.setData({ + 'showList[2].isHas':true, + 'showList[2].index':count + }) + }else if(item=="is_operation"){ + count++; + this.setData({ + 'showList[3].isHas':true, + 'showList[3].index':count + }) + }else if(item=="drink_wine_status"){ + count++; + this.setData({ + 'showList[4].isHas':true, + 'showList[4].index':count + }) + }else if(item=="smoke_status"){ + count++; + this.setData({ + 'showList[5].isHas':true, + 'showList[5].index':count + }) + }else if(item=="chemical_compound_status"){ + count++; + this.setData({ + 'showList[6].isHas':true, + 'showList[6].index':count + }) + }else if(item=="diagnosis_hospital"){ + count++; + this.setData({ + 'showList[7].isHas':true, + 'showList[7].index':count + }) + }else if(item=="is_take_medicine"){ + count++; + this.setData({ + 'showList[8].isHas':true, + 'showList[8].index':count + }) + } + }) + + }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - if(options.params){ - this.setData({ - params:options.params - }); - let data=JSON.parse(options.params); - console.log(options.params) - } - + this.getNation(); + this.getJob(); + if(options.order_inquiry_id){ + this.setData({ + order_inquiry_id:options.order_inquiry_id + }) + } + if(options.case_filled_fields){ + + let data=JSON.parse(options.case_filled_fields); + let arr1=[]; + let arr2=[]; + + this.setData({ + personInfo:data, + showBtn:false + }); + if(data.is_allergy_history==1){ + this.setData({ + hideGuomin:true + }) + } + if(data.is_family_history==1){ + this.setData({ + hideFamilysick:true + }) + } + if(data.is_operation==1){ + this.setData({ + hideOperation:true + }) + } + if(data.is_pregnant==1){ + this.setData({ + hidePregnant:true + }) + } + if(data.chemical_compound_status && data.chemical_compound_status!=1){ + this.setData({ + hideChemical:true + }) + } + if(data.diagnosis_hospital){ + this.setData({ + hideHospital:true + }) + } + if(data.is_take_medicine==1){ + this.setData({ + hideDrug:true + }) + } + let {maritalColumn,jobcolumns,nationcolumns}=this.data; + if(data.marital_status==0 || data.marital_status){ + let select=maritalColumn.filter(item=>{return item.value==data.marital_status}); + this.setData({ + 'marital_name':select[0].text + }) + }; + + + + Object.keys(data).forEach(function(key){ + if(key=="weight" || key=="height" || key=="marital_status" || key=="nation_id" || key=="job_id"){ + arr1.push(key); + }else{ + arr2.push(key); + } + }) + this.commonMethods(arr1,arr2); + + + + } + if(options.params){ + let data=JSON.parse(options.params); + let {obj}=this.data; + let arr1=[]; + let arr2=[]; + data.forEach(item => { + if(item=="weight" || item=="height" || item=="marital_status" || item=="nation_id" || item=="job_id"){ + arr1.push(item); + }else{ + arr2.push(item); + } + + }) + this.commonMethods(arr1,arr2); + + } }, /** @@ -34,12 +568,44 @@ Page({ onReady() { }, - + getNation(){ + api.getNation().then(data=>{ + let result=data.data; + this.setData({ + nationcolumns:result + }) + let {personInfo}=this.data; + if(personInfo.nation_id || personInfo.nation_id==0){ + let select=result.filter(item=>{return item.nation_id==personInfo.nation_id}); + this.setData({ + 'nationname':select[0].nation_name + }) + } + }) + }, + getJob(){ + api.getJob().then(data=>{ + let result=data.data; + this.setData({ + jobcolumns: result + }) + let {personInfo}=this.data; + if(personInfo.job_id || personInfo.job_id==0){ + let select=result.filter(item=>{return item.job_id==personInfo.job_id}); + this.setData({ + 'jobname':select[0].job_name + }) + } + }) + }, /** * 生命周期函数--监听页面显示 */ onShow() { - + console.log(api.getStaticHost()) + this.setData({ + static_host:api.getStaticHost() + }) }, /** diff --git a/Pages/yishi/sickform/index.wxml b/Pages/yishi/sickform/index.wxml index 7ff733d..7b2a3ec 100644 --- a/Pages/yishi/sickform/index.wxml +++ b/Pages/yishi/sickform/index.wxml @@ -1,65 +1,63 @@ - - - + 基本信息 - + - 1、身高(CM) + {{filter.formatwenzhenList(list1,'height').NUMBER}}、身高(CM) - + - + - 2、体重(KG) + {{filter.formatwenzhenList(list1,'weight').NUMBER}}、体重(KG) - + - + - 3、婚姻状况 + {{filter.formatwenzhenList(list1,'marital_status').NUMBER}}、婚姻状况 - - + + - + - 4、民族 + {{filter.formatwenzhenList(list1,'nation_id').NUMBER}}、民族 - - + + - + - 5、职业 + {{filter.formatwenzhenList(list1,'job_id').NUMBER}}、职业 - - + + @@ -69,85 +67,85 @@ 个人情况 - - 1、 + + {{showList[0].index}}、 您是否有过敏史? - + - - 2、 + + {{showList[1].index}}、 您是否有家族病史? - + - - {{startIndex}}、 + + {{showList[2].index}}、 您是否处于备孕、妊娠、哺乳期? - + - - {{startIndex+1}}、 + + {{showList[3].index}}、 是否做过手术 - + - - {{startIndex+2}}、 + + {{showList[4].index}}、 是否有饮酒史 - + 从不 偶尔 经常 @@ -157,12 +155,12 @@ - - {{startIndex+3}}、 + + {{showList[5].index}}、 是否有吸烟史 - + 从不 偶尔 经常 @@ -172,12 +170,12 @@ - - {{startIndex+4}}、 + + {{showList[6].index}}、 是否有接触过化学物 - + 从不 偶尔 经常 @@ -186,7 +184,7 @@ - + @@ -194,27 +192,31 @@ - - {{startIndex+45}}、 + + {{showList[7].index}}、 确诊医院是? - - - - - {{startIndex+6}}、 + + {{showList[8].index}}、 - 服用药品是? - - - - - 不接诊24小时后自动取消 + + 不接诊5分钟后自动取消 + 不接诊524小时后自动取消 + diff --git a/Pages/yishi/write_sickform/index.wxss b/Pages/yishi/write_sickform/index.wxss index 6218821..de55aa1 100644 --- a/Pages/yishi/write_sickform/index.wxss +++ b/Pages/yishi/write_sickform/index.wxss @@ -65,4 +65,7 @@ border-radius: 8rpx; color: #999999; align-items: center; flex-direction: column; +} +.van-cell{ + align-items: center; } \ No newline at end of file diff --git a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js index 5064003..739b6ac 100644 --- a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js +++ b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js @@ -311,9 +311,8 @@ Component({ }) }), goSick(event){ - // const url=event.currentTarget.dataset.url; - // console.log(url); - // app.go(url); + const url=event.currentTarget.dataset.url; + app.go(url); }, openLink(e) { @@ -336,7 +335,7 @@ Component({ const {ismine,params}=event.currentTarget.dataset; console.log(params); if(!ismine){ - app.go('/Pages/yishi/sickform/index?params='+params) + app.go('/Pages/yishi/sickform/index?case_filled_fields='+params) } // app.go(url); } diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxml b/TUIKit/components/TUIChat/components/MessageInput/index.wxml index 827f1ed..5b931b6 100644 --- a/TUIKit/components/TUIChat/components/MessageInput/index.wxml +++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxml @@ -55,7 +55,7 @@ 常用语 - + 问诊表