prescribe.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. <template>
  2. <view class="content">
  3. <view class="fixed-top-box">
  4. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  5. <view class="back-box" @click="back">
  6. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_white.png" mode=""></image>
  7. <text class="title">填写处方信息</text>
  8. <text></text>
  9. </view>
  10. </view>
  11. <template v-if="order!=null">
  12. <view class="inner">
  13. <view :style="{height: statusBarHeight}"></view>
  14. <!-- 步骤 -->
  15. <view class="steps-box">
  16. <view class="item active">填写信息</view>
  17. <image class="arrow" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
  18. <view class="item">医生开方</view>
  19. <image class="arrow" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
  20. <view class="item">支付订单</view>
  21. <image class="arrow" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
  22. <view class="item">厂家发货</view>
  23. </view>
  24. <!-- 提示 -->
  25. <view class="tip-box">
  26. <view class="top">
  27. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/safe2.png" mode=""></image>
  28. <text class="text">依据国家规定、处方药需凭处方购买</text>
  29. </view>
  30. <view class="time-tip">填写问诊人信息、处方信息</view>
  31. </view>
  32. <view class="info-box">
  33. <!-- 选择问诊人 -->
  34. <view class="chose-people">
  35. <view class="title-box">
  36. <text class="title">选择问诊人</text>
  37. <view class="add-box" @click="addPeople()">
  38. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/add26.png" mode=""></image>
  39. <text >添加</text>
  40. </view>
  41. </view>
  42. <view class="peop-list" v-if="patient.length>0">
  43. <view v-for="(item,index) in patient" :key="index" :class="patientId == item.patientId?'item active':'item'" @click="chosePatient(item)">
  44. <view class="name">{{ item.patientName }}</view>
  45. <view class="info">
  46. <text class="sex" v-if="item.gender==1">男</text>
  47. <text class="sex" v-if="item.gender==2">女</text>
  48. <text class="ege">{{$getAge(item.birthday)}}岁</text>
  49. </view>
  50. <!-- 选中的对号角标 -->
  51. <image v-if="patientId == item.patientId" class="active-img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/sel_right50.png" mode=""></image>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- <view class="text-content">
  56. <view class="title">
  57. <text class="black">主诉</text>
  58. <text class="gray">(选填)</text>
  59. </view>
  60. <textarea class="textArea" maxlength="200" @input="chiefComplaintInput" placeholder="请填写主诉内容"></textarea>
  61. </view>
  62. <view class="text-content">
  63. <view class="title">
  64. <text class="black">既往病史</text>
  65. <text class="gray">(选填)</text>
  66. </view>
  67. <textarea class="textArea" maxlength="200" @input="historyIllnessInput" placeholder="请填写既往病史内容"></textarea>
  68. </view> -->
  69. <view class="img-content">
  70. <view class="title">
  71. <text class="black">复诊凭证</text>
  72. <text class="gray">(选填) {{imgList.length}}/4</text>
  73. </view>
  74. <view class="upload-img">
  75. <view class="img" v-for="(item,index) in imgList" :key="index" >
  76. <image :src="item" mode="aspectFill" @click="previewImage(index)"></image>
  77. <view class="del" @click="delImg(index)" >
  78. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/del2.png"></image>
  79. </view>
  80. </view>
  81. <view class="chose-img" @tap="chooseImage(1)" v-if="imgList.length<4">
  82. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/adds.png"></image>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 疾病选择 -->
  87. <view class="disease-select">
  88. <view class="x-bc" @click="show=true">
  89. <view class="title">
  90. <text class="black">本次用药的确诊疾病</text>
  91. <text class="gray">(可多选)</text>
  92. </view>
  93. <u-icon name="arrow-right" color="#222" size="18" ></u-icon>
  94. </view>
  95. <view class="dise-list">
  96. <view
  97. v-for="(item,index) in activeDise"
  98. :key="index"
  99. class="item active x-bc"
  100. >
  101. {{ item }}
  102. <u-icon name="close" color="#fff" size="16" @click="choseDise(item,1)" style="margin-left: 10rpx;"></u-icon>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- 是否使用过此药 -->
  107. <view class="check-box" v-for="(que,index) in quesList" :key="index">
  108. <view class="left">
  109. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
  110. <text class="text">{{que.title}}</text>
  111. </view>
  112. <radio-group style="display: flex;align-items: center;" @change="changeRadio($event,index,1)">
  113. <label class="label" v-for="(option,index) in que.options" :key="index">
  114. <radio :value="option" :checked="option==que.answer" style="margin-right: 16upx;" />
  115. <text class="my-radio-text">{{option}}</text>
  116. </label>
  117. </radio-group>
  118. </view>
  119. <view class="check-box">
  120. <view class="left">
  121. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
  122. <text class="text">是否是备孕/怀孕</text>
  123. </view>
  124. <radio-group style="display: flex;align-items: center;" @change="changeRadio($event,'isLactation',0)">
  125. <label style="margin-right: 50upx;">
  126. <radio value="1" :checked="isLactation==1" style="margin-right: 16upx;" />
  127. <text class="my-radio-text">是</text>
  128. </label>
  129. <label>
  130. <radio value="0" :checked="isLactation==0" style="margin-right: 16upx;" />
  131. <text class="my-radio-text">否</text>
  132. </label>
  133. </radio-group>
  134. </view>
  135. <view class="check-box">
  136. <view class="left">
  137. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/yao.png" mode=""></image>
  138. <text class="text">是否是哺乳期</text>
  139. </view>
  140. <radio-group style="display: flex;align-items: center;" @change="changeRadio($event,'isPregnantWoman',0)">
  141. <label style="margin-right: 50upx;">
  142. <radio value="1" :checked="isPregnantWoman==1" style="margin-right: 16upx;" />
  143. <text class="my-radio-text">是</text>
  144. </label>
  145. <label>
  146. <radio value="0" :checked="isPregnantWoman==0" style="margin-right: 16upx;" />
  147. <text class="my-radio-text">否</text>
  148. </label>
  149. </radio-group>
  150. </view>
  151. </view>
  152. </view>
  153. <view class="agreement">
  154. <label @click="handleAgreement()">
  155. <checkbox :checked="isAgreement" color="#2583EB" style="transform:scale(0.7)" />我确认已确诊此疾病并使用过该药,且无过敏史、无相关禁忌症和不良反应
  156. </label>
  157. </view>
  158. <view class="btn-box">
  159. <view class="btn" @click="submit()">去开处方</view>
  160. </view>
  161. </template>
  162. <view v-else>
  163. <view class="empty x-ac" style="flex-direction: column;">
  164. <u-loading-icon text="加载中"></u-loading-icon>
  165. </view>
  166. </view>
  167. <u-popup :show="show" :round="10" mode="bottom" closeable :closeOnClickOverlay="false" @close="close">
  168. <view class="popbox-title">
  169. <view>选择本次用药的确诊疾病</view>
  170. </view>
  171. <view class="search-cont">
  172. <view class="inner" style="margin-top:0">
  173. <image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
  174. <input type="text" v-model="diagnosisName" placeholder="输入疾病搜索" confirm-type="search" @confirm="doSearchUser" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
  175. </view>
  176. </view>
  177. <scroll-view :scroll-y="true" class="popbox" style="height: 60vh;" @scrolltolower="scrolltolower">
  178. <view v-for="(item, i) in diseaseList" :key="i" @click="choseDise(item.diagnosisName)">
  179. <view class="popbox-item x-bc">
  180. <view class="name">{{item.diagnosisName}}</view>
  181. <view v-show="activeDise.includes(item.diagnosisName)">
  182. <u-icon name="checkmark" color="#2979ff" size="22"></u-icon>
  183. </view>
  184. </view>
  185. </view>
  186. <view class="empty x-ac" style="flex-direction: column;" v-if="diseaseList&&diseaseList.length==0">
  187. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/global_search_empty.png" style="width: 200rpx;" mode="widthFix"></image>
  188. <view>{{msg}}</view>
  189. </view>
  190. </scroll-view>
  191. </u-popup>
  192. </view>
  193. </template>
  194. <script>
  195. import {getStoreOrderById} from '@/api/myStoreOrder.js'
  196. import {getWeixinPrescribeTemps} from '@/api/common'
  197. import {doPrescribe,diseaseQueryList,selectSquareInformation,cacheOrderPrescription,selectOrderPrescription} from './api/prescribe'
  198. import {getPatientList,delPatient} from '@/api/patient'
  199. export default {
  200. data() {
  201. return {
  202. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  203. order:null,
  204. temps:[],
  205. imgList: [],
  206. orderId:null,
  207. patient:[],
  208. patientId:null,
  209. patientInfo: {},
  210. // 疾病列表
  211. diseaseList: [],
  212. // 选中的疾病
  213. activeDise: [],
  214. isLactation: 0,
  215. isPregnantWoman: 0,
  216. chiefComplaint:null,
  217. historyIllness:null,
  218. diagnosisName: '',
  219. pageNum: 1,
  220. pageSize: 10,
  221. quesList:[
  222. // {
  223. // answer: "是",
  224. // subjectId: 3,
  225. // title: "是否使用过此类药物",
  226. // options: ['是','否']
  227. // },
  228. {
  229. answer: "否",
  230. subjectId: 4,
  231. title: "是否有药物过敏史",
  232. options: ['是','否']
  233. },
  234. {
  235. answer: "否",
  236. subjectId: 5,
  237. title: "肝肾功能是否有异常",
  238. options: ['是','否']
  239. }
  240. ],
  241. show: false,
  242. msg: '暂无数据',
  243. isAgreement: false,
  244. hasMore: true,
  245. dataKey: '',
  246. dataPrescribeKey:'',
  247. companyUserId:''
  248. }
  249. },
  250. onLoad(option) {
  251. this.companyUserId = option.companyUserId ||''
  252. this.dataKey = option.dataKey || ''
  253. this.dataPrescribeKey = option.dataPrescribeKey || ''
  254. this.orderId=option.orderId
  255. if(this.dataPrescribeKey) {
  256. this.getSquareInformation()
  257. this.cacheOrderPrescription()
  258. } else {
  259. this.selectOrderPrescription()
  260. }
  261. this.getPatientList();
  262. uni.$on('refreshPatient', () => {
  263. this.getPatientList()
  264. })
  265. this.getWeixinPrescribeTemps();
  266. this.diseaseQueryList()
  267. },
  268. onShow() {
  269. this.getPatientList();
  270. },
  271. methods: {
  272. // 根据dataKey查询处方填写信息
  273. getSquareInformation() {
  274. const param = {
  275. userId: companyUserId,
  276. dataKey: this.dataPrescribeKey
  277. }
  278. uni.showLoading({
  279. title: '加载中'
  280. })
  281. selectSquareInformation(param).then(res=>{
  282. uni.hideLoading()
  283. if(res.code==200) {
  284. this.imgList = res.data.imgList ? res.data.imgList.split(','):[];
  285. const str = res.data.beforeAiDataList.find(v => v.subjectId === 1)?.answer || '';
  286. this.activeDise = str.split(',').filter(Boolean); // 去掉空元素
  287. // 例:["急性上呼吸道感染"]
  288. this.getStoreOrderById();
  289. } else {
  290. uni.showToast({
  291. icon:'none',
  292. title: res.msg,
  293. });
  294. }
  295. })
  296. },
  297. // 绑定订单编码和dataPrescribeKey
  298. cacheOrderPrescription() {
  299. const param = {
  300. orderCode: this.orderId,
  301. dataKey: this.dataPrescribeKey,
  302. companyUserId: this.companyUserId
  303. }
  304. cacheOrderPrescription(param).then(res=>{
  305. if(res.code==200) {
  306. this.imgList = res.data.imgList ? res.data.imgList.split(','):[];
  307. this.activeDise = res.data.beforeAiDataList
  308. } else {
  309. uni.showToast({
  310. icon:'none',
  311. title: res.msg,
  312. });
  313. }
  314. })
  315. },
  316. // 根据订单编码orderCode查询dataKey
  317. selectOrderPrescription() {
  318. const param = {
  319. orderCode: this.orderId,
  320. }
  321. uni.showLoading({
  322. title: '加载中'
  323. })
  324. selectOrderPrescription(param).then(res=>{
  325. uni.hideLoading()
  326. if(res.code==200) {
  327. this.dataPrescribeKey = res.data.dataKey || ''
  328. if(this.dataPrescribeKey) {
  329. this.getSquareInformation()
  330. }
  331. } else {
  332. uni.showToast({
  333. icon:'none',
  334. title: res.msg,
  335. });
  336. }
  337. })
  338. },
  339. handleAgreement() {
  340. this.isAgreement = !this.isAgreement;
  341. },
  342. back(){
  343. // uni.showToast({
  344. // icon:'none',
  345. // title: "请填写资料提交处方,否则将无法发货"
  346. // });
  347. uni.showModal({
  348. title: '提示',
  349. content: '请填写资料提交处方,否则将无法发货,确定要返回吗?',
  350. cancelColor: '#2583EB',
  351. confirmColor: '#000000',
  352. success: function (res) {
  353. if (res.confirm) {
  354. uni.navigateBack()
  355. } else if (res.cancel) {
  356. console.log('用户点击取消');
  357. }
  358. }
  359. });
  360. },
  361. close() {
  362. this.show = false
  363. },
  364. diseaseQueryList(){
  365. var that = this;
  366. const param = {
  367. orderId: this.orderId,
  368. diagnosisName: this.diagnosisName,
  369. pageNum: this.pageNum,
  370. pageSize: this.pageSize,
  371. }
  372. diseaseQueryList(param).then(
  373. res => {
  374. if(res.code==200){
  375. if (that.pageNum == 1) {
  376. that.diseaseList = res.datas;
  377. } else {
  378. that.diseaseList = that.diseaseList.concat(res.datas);
  379. }
  380. if(that.diseaseList.length>=res.total) {
  381. that.hasMore = false
  382. } else {
  383. that.hasMore = true
  384. }
  385. }else{
  386. uni.showToast({
  387. icon:'none',
  388. title: "请求失败",
  389. });
  390. that.diseaseList = [];
  391. }
  392. },
  393. rej => {}
  394. );
  395. },
  396. scrolltolower() {
  397. if(!this.hasMore) return
  398. this.pageNum++;
  399. this.diseaseQueryList()
  400. },
  401. doSearchUser() {
  402. this.hasMore = true
  403. this.pageNum = 1;
  404. this.diseaseQueryList()
  405. },
  406. changeRadio(e,name,type) {
  407. if(type==1) {
  408. this.quesList[name].answer = e.detail.value
  409. } else {
  410. this[name] = e.detail.value
  411. }
  412. },
  413. getStoreOrderById(){
  414. var data={orderId:this.orderId}
  415. getStoreOrderById(data).then(
  416. res => {
  417. if(res.code==200){
  418. this.order=res.order
  419. }else{
  420. }
  421. },
  422. rej => {}
  423. );
  424. },
  425. getWeixinPrescribeTemps(){
  426. getWeixinPrescribeTemps().then(
  427. res => {
  428. if(res.code==200){
  429. this.temps=res.temp
  430. console.log(this.temps)
  431. }else{
  432. }
  433. },
  434. rej => {}
  435. );
  436. },
  437. chiefComplaintInput(e) {
  438. this.chiefComplaint = e.detail.value
  439. },
  440. historyIllnessInput(e) {
  441. this.historyIllness = e.detail.value
  442. },
  443. // 选择图片
  444. chooseImage(type) {
  445. var that=this;
  446. uni.chooseImage({
  447. count: 4, //默认9
  448. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  449. sourceType: ['album', 'camera'], //从相册选择
  450. success: (res) => {
  451. uni.uploadFile({
  452. url: uni.getStorageSync('requestPath')+'/app/common/uploadOSS', //仅为示例,非真实的接口地址
  453. filePath: res.tempFilePaths[0],
  454. name: 'file',
  455. success: (res) => {
  456. that.imgList.push(JSON.parse( res.data).url)
  457. }
  458. });
  459. }
  460. });
  461. },
  462. //图片预览
  463. previewImage(index){
  464. //预览图片
  465. uni.previewImage({
  466. urls: this.imgList,
  467. current: this.imgList[index]
  468. });
  469. },
  470. delImg(index) {
  471. uni.showModal({
  472. title: '提示',
  473. content: '确定要删除这张图片吗?',
  474. cancelText: '取消',
  475. confirmText: '确定',
  476. success: res => {
  477. if (res.confirm) {
  478. this.imgList.splice(index, 1);
  479. }
  480. }
  481. })
  482. },
  483. submit(){
  484. console.log('this.isAgreement==',this.isAgreement)
  485. if (!this.isAgreement) {
  486. uni.showToast({
  487. icon: 'none',
  488. title: '请先勾选确认'
  489. });
  490. return false;
  491. }
  492. var that=this;
  493. if(this.patientId==null){
  494. uni.showToast({
  495. icon:'none',
  496. title: "请选择患者"
  497. });
  498. return;
  499. }
  500. uni.showLoading({
  501. title:"正在处理中"
  502. })
  503. // var data={
  504. // patientId:this.patientId,
  505. // orderId:this.orderId,
  506. // isAllergic:this.isAllergic,
  507. // isLiver:this.isLiver,
  508. // isRenal:this.isRenal,
  509. // isLactation:this.isLactation,
  510. // chiefComplaint:this.chiefComplaint,
  511. // historyIllness:this.historyIllness,
  512. // recordPic:this.imgList.toString()
  513. // }
  514. // const products = JSON.parse(this.order.itemJson)
  515. // console.log("products=",products)
  516. // let answerMedicine = this.order
  517. if(this.activeDise.length==0) {
  518. uni.showToast({
  519. icon:'none',
  520. title: "请选择本次用药的确诊疾病"
  521. });
  522. return
  523. }
  524. let products = JSON.parse(this.order.itemJson)
  525. let answerMedicine = products.map(it=>({
  526. medicineId:it.productId,
  527. number: it.num
  528. }))
  529. if(!answerMedicine||answerMedicine.length==0) {
  530. uni.showToast({
  531. icon:'none',
  532. title: "用药信息选择不正确"
  533. });
  534. return
  535. }
  536. const beforeAiDataList = [
  537. { answer: this.activeDise.join(','), subjectId: 1, title: '症状' },
  538. {
  539. answerMedicine: JSON.stringify(answerMedicine),
  540. subjectId: 2,
  541. title: '居民用药信息选择'
  542. },
  543. {
  544. answer: "是",
  545. subjectId: 3,
  546. title: "是否使用过此类药物"
  547. },
  548. ...this.quesList.map(({ answer, subjectId, title }) => ({ answer, subjectId, title }))
  549. ];
  550. const relationMap = { '本人': 1, '父母': 2,'配偶': 3, '子女': 4 };
  551. const relationship = relationMap[this.patientInfo.relation] ?? 5;
  552. const data={
  553. souceFrom: 0,//0-微信小程序,1-APP,2-H5,3-支付宝小程序
  554. storeOrderId: this.orderId,
  555. imgList:this.imgList.toString(),
  556. isLactation: this.isLactation,
  557. isPregnantWoman: this.isPregnantWoman,
  558. patientId:this.patientId,
  559. userId: uni.getStorageSync('userId'),
  560. relationship, // 1-本人,2-父母,3-配偶,4-子女,5-其他
  561. beforeAiDataList
  562. }
  563. doPrescribe(data).then(
  564. res => {
  565. uni.hideLoading()
  566. if(res.code==200){
  567. uni.redirectTo({
  568. url: '/pages/index/webview?type=prescribe&url='+encodeURIComponent(res.data)
  569. })
  570. // uni.showToast({
  571. // icon:'success',
  572. // title:res.msg,
  573. // });
  574. // var order =res.order;
  575. // uni.requestSubscribeMessage({
  576. // tmplIds: this.temps,
  577. // success(res) {
  578. // setTimeout(function(){
  579. // if(order.paid!=1){
  580. // uni.redirectTo({
  581. // url: './paymentOrder?orderId='+that.order.id
  582. // })
  583. // }
  584. // else{
  585. // uni.navigateBack({
  586. // delta: 1
  587. // });
  588. // }
  589. // },500);
  590. // },
  591. // fail(res) {
  592. // setTimeout(function(){
  593. // if(order.paid!=1){
  594. // uni.redirectTo({
  595. // url: './paymentOrder?orderId='+that.order.id
  596. // })
  597. // }
  598. // else{
  599. // uni.navigateBack({
  600. // delta: 1
  601. // });
  602. // }
  603. // },500);
  604. // }
  605. // })
  606. }else{
  607. uni.showToast({
  608. icon:'none',
  609. title: res.msg,
  610. });
  611. }
  612. },
  613. rej => {}
  614. );
  615. },
  616. getPatientList(){
  617. uni.showLoading({
  618. title:"正在加载中"
  619. })
  620. getPatientList().then(
  621. res => {
  622. uni.hideLoading()
  623. if(res.code==200){
  624. this.patient=res.data;
  625. }else{
  626. uni.showToast({
  627. icon:'none',
  628. title: "请求失败",
  629. });
  630. }
  631. },
  632. rej => {}
  633. );
  634. },
  635. // 选中问诊人
  636. chosePatient(item) {
  637. this.patientInfo = item
  638. this.patientId = item.patientId
  639. },
  640. // 添加问诊人
  641. addPeople() {
  642. uni.navigateTo({
  643. url:"/pages_user/patient"
  644. })
  645. },
  646. // 疾病选择
  647. choseDise(item) {
  648. this.activeDise.includes(item) ? this.activeDise.splice(this.activeDise.indexOf(item), 1) : this.activeDise.push(item); // 不在就加上
  649. }
  650. }
  651. }
  652. </script>
  653. <style lang="scss" scoped>
  654. .label {
  655. margin-right: 50upx;
  656. &:last-child {
  657. margin-right: 0;
  658. }
  659. }
  660. .popbox-item {
  661. padding: 24rpx;
  662. border-bottom: 1rpx solid #eee;
  663. }
  664. .agreement {
  665. padding: 40rpx 30rpx 0 30rpx;
  666. font-size: 28rpx;
  667. font-family: PingFang SC;
  668. font-weight: 500;
  669. color: #666666;
  670. }
  671. .popbox {
  672. background-color: #fff;
  673. &-title {
  674. width: 100%;
  675. display: flex;
  676. align-items: center;
  677. justify-content: center;
  678. padding: 24rpx;
  679. background-color: #fff;
  680. border-bottom: 1rpx solid #EDEEEF;
  681. box-sizing: border-box;
  682. }
  683. }
  684. .search-cont{
  685. padding: 16upx 30upx;
  686. background-color: #FFFFFF;
  687. .inner{
  688. box-sizing: border-box;
  689. width: 100%;
  690. height: 72upx;
  691. background: #F7F7F7;
  692. border-radius: 36upx;
  693. display: flex;
  694. align-items: center;
  695. padding: 0 30upx;
  696. .icon-search{
  697. width: 28upx;
  698. height: 28upx;
  699. margin-right: 20upx;
  700. }
  701. input{
  702. height: 60upx;
  703. line-height: 60upx;
  704. flex: 1;
  705. }
  706. }
  707. }
  708. .content{
  709. height: 100%;
  710. display: flex;
  711. flex-direction: column;
  712. justify-content: space-between;
  713. .fixed-top-box{
  714. width: 100%;
  715. background: linear-gradient(to right, #2583EB 0%, #60CDC3 100%);
  716. position: fixed;
  717. top: 0;
  718. left: 0;
  719. z-index: 1000;
  720. .back-box{
  721. height: 88upx;
  722. padding-left: 22upx;
  723. display: flex;
  724. align-items: center;
  725. justify-content: space-between;
  726. padding: 0 20upx;
  727. image{
  728. width: 40upx;
  729. height: 40upx;
  730. }
  731. .title{
  732. font-size: 36upx;
  733. font-family: PingFang SC;
  734. font-weight: 500;
  735. color: #FFFFFF;
  736. }
  737. }
  738. }
  739. .inner{
  740. margin-top: 88rpx;
  741. .steps-box{
  742. height: 88upx;
  743. background: #FFFFFF;
  744. padding: 0 48upx;
  745. display: flex;
  746. align-items: center;
  747. justify-content: space-between;
  748. .item{
  749. font-size: 28upx;
  750. font-family: PingFang SC;
  751. font-weight: 500;
  752. color: #666666;
  753. &.active{
  754. font-weight: bold;
  755. color: #2583EB;
  756. }
  757. }
  758. .arrow{
  759. width: 12upx;
  760. height: 22upx;
  761. }
  762. }
  763. .tip-box{
  764. box-sizing: border-box;
  765. height: 130upx;
  766. background: #FFF4E6;
  767. padding: 26upx 0 30upx 50upx;
  768. display: flex;
  769. flex-direction: column;
  770. justify-content: space-between;
  771. .top{
  772. display: flex;
  773. align-items: center;
  774. image{
  775. width: 26upx;
  776. height: 31upx;
  777. margin-right: 10upx;
  778. }
  779. .text{
  780. font-size: 28upx;
  781. font-family: PingFang SC;
  782. font-weight: 500;
  783. color: #EF8A07;
  784. line-height: 1;
  785. }
  786. }
  787. .time-tip{
  788. padding-left: 40upx;
  789. font-size: 24upx;
  790. font-family: PingFang SC;
  791. font-weight: 500;
  792. color: #999999;
  793. line-height: 1;
  794. }
  795. }
  796. .info-box{
  797. padding: 20upx;
  798. .chose-people{
  799. box-sizing: border-box;
  800. background: #FFFFFF;
  801. border-radius: 16upx;
  802. padding: 40upx 30upx 30upx;
  803. .title-box{
  804. display: flex;
  805. align-items: center;
  806. justify-content: space-between;
  807. .title{
  808. font-size: 32upx;
  809. font-family: PingFang SC;
  810. font-weight: bold;
  811. color: #111111;
  812. }
  813. .add-box{
  814. display: flex;
  815. align-items: center;
  816. image{
  817. width: 26upx;
  818. height: 26upx;
  819. margin-right: 11upx;
  820. }
  821. text{
  822. font-size: 28upx;
  823. font-family: PingFang SC;
  824. font-weight: 500;
  825. color: #111111;
  826. }
  827. }
  828. }
  829. .peop-list{
  830. display: flex;
  831. flex-wrap: wrap;
  832. margin-top: 30upx;
  833. .item{
  834. box-sizing: border-box;
  835. padding: 18upx 30upx;
  836. width: 31.28%;
  837. height: 110upx;
  838. background: #F7F7F7;
  839. border-radius: 16upx;
  840. margin: 0 20upx 10upx 0;
  841. border: 2upx solid #F7F7F7;
  842. display: flex;
  843. flex-direction: column;
  844. justify-content: space-between;
  845. &:nth-child(3n){
  846. margin-right: 0;
  847. }
  848. &.active{
  849. background: rgba(230, 250, 247, 0);
  850. border: 2upx solid #2583EB;
  851. position: relative;
  852. }
  853. .active-img{
  854. width: 50upx;
  855. height: 50upx;
  856. position: absolute;
  857. right: -2upx;
  858. bottom: -2upx;
  859. }
  860. .name{
  861. font-size: 30upx;
  862. line-height: 1;
  863. font-family: PingFang SC;
  864. font-weight: bold;
  865. color: #111111;
  866. }
  867. .info{
  868. display: flex;
  869. align-items: center;
  870. .sex,
  871. .ege{
  872. font-size: 26upx;
  873. font-family: PingFang SC;
  874. line-height: 1;
  875. font-weight: 500;
  876. color: #666666;
  877. }
  878. .ege{
  879. margin-left: 19upx;
  880. }
  881. }
  882. }
  883. }
  884. }
  885. .disease-select{
  886. box-sizing: border-box;
  887. min-height: 286upx;
  888. background: #FFFFFF;
  889. border-radius: 16upx;
  890. padding: 40upx 30upx 22upx;
  891. margin-top: 20upx;
  892. margin-bottom: 20upx;
  893. .title{
  894. display: flex;
  895. align-items: center;
  896. align-items: flex-end;
  897. .black{
  898. font-size: 32upx;
  899. font-family: PingFang SC;
  900. font-weight: bold;
  901. color: #111111;
  902. line-height: 1;
  903. margin-left: 10upx;
  904. }
  905. .gray{
  906. font-size: 28upx;
  907. font-family: PingFang SC;
  908. color: #999999;
  909. line-height: 1;
  910. margin-left: 10upx;
  911. }
  912. }
  913. .dise-list{
  914. display: flex;
  915. flex-wrap: wrap;
  916. margin-top: 26upx;
  917. .item{
  918. box-sizing: border-box;
  919. height: 64upx;
  920. line-height: 64upx;
  921. font-size: 28upx;
  922. font-family: PingFang SC;
  923. font-weight: 500;
  924. color: #2583EB;
  925. background: #eef5fd;
  926. border: 1px solid #2583EB;
  927. padding: 0 20upx;
  928. border-radius: 32upx;
  929. margin: 0 20upx 20upx 0;
  930. &.active{
  931. background: #2583EB;
  932. border: 1px solid #2583EB;
  933. color: #FFFFFF;
  934. }
  935. }
  936. }
  937. }
  938. .text-content{
  939. box-sizing: border-box;
  940. min-height: 286upx;
  941. background: #FFFFFF;
  942. border-radius: 16upx;
  943. padding: 40upx 30upx 22upx;
  944. margin-top: 20upx;
  945. .title{
  946. display: flex;
  947. align-items: center;
  948. align-items: flex-end;
  949. .black{
  950. font-size: 32upx;
  951. font-family: PingFang SC;
  952. font-weight: bold;
  953. color: #111111;
  954. line-height: 1;
  955. margin-left: 10upx;
  956. }
  957. .gray{
  958. font-size: 28upx;
  959. font-family: PingFang SC;
  960. color: #999999;
  961. line-height: 1;
  962. margin-left: 10upx;
  963. }
  964. }
  965. .textArea{
  966. margin: 30rpx 0rpx 0rpx 0rpx;
  967. width: 100%;
  968. }
  969. }
  970. .img-content{
  971. box-sizing: border-box;
  972. min-height: 286upx;
  973. background: #FFFFFF;
  974. border-radius: 16upx;
  975. padding: 40upx 30upx 22upx;
  976. margin-top: 20upx;
  977. margin-bottom: 20upx;
  978. .title{
  979. display: flex;
  980. align-items: center;
  981. align-items: flex-end;
  982. .black{
  983. font-size: 32upx;
  984. font-family: PingFang SC;
  985. font-weight: bold;
  986. color: #111111;
  987. line-height: 1;
  988. margin-left: 10upx;
  989. }
  990. .gray{
  991. font-size: 28upx;
  992. font-family: PingFang SC;
  993. color: #999999;
  994. line-height: 1;
  995. margin-left: 10upx;
  996. }
  997. }
  998. .textArea{
  999. margin: 30rpx 0rpx 0rpx 0rpx;
  1000. width: 100%;
  1001. }
  1002. .upload-img{
  1003. margin: 30rpx 0rpx 0rpx 0rpx;
  1004. width: 100%;
  1005. display: flex;
  1006. align-items: flex-start;
  1007. .img{
  1008. margin-right: 10rpx;
  1009. width: 100rpx;
  1010. height: 100rpx;
  1011. position: relative;
  1012. image{
  1013. width: 100%;
  1014. height: 100%;
  1015. }
  1016. .del{
  1017. right:0rpx;
  1018. top:0rpx;
  1019. position: absolute;
  1020. image{
  1021. width: 30rpx;
  1022. height:30rpx;
  1023. }
  1024. }
  1025. }
  1026. .chose-img{
  1027. border-radius: 5rpx;
  1028. border: 1px solid #eee;
  1029. padding: 5rpx;
  1030. display: flex;
  1031. align-items: center;
  1032. justify-content: center;
  1033. width: 100rpx;
  1034. height: 100rpx;
  1035. image{
  1036. width: 50rpx;
  1037. height: 50rpx;
  1038. }
  1039. }
  1040. }
  1041. }
  1042. .check-box{
  1043. height: 88upx;
  1044. background: #FFFFFF;
  1045. border-radius: 16upx;
  1046. padding: 0 30upx;
  1047. display: flex;
  1048. align-items: center;
  1049. justify-content: space-between;
  1050. .left{
  1051. display: flex;
  1052. align-items: center;
  1053. image{
  1054. width: 21upx;
  1055. height: 27upx;
  1056. margin-right: 20upx;
  1057. }
  1058. .text{
  1059. font-size: 32upx;
  1060. font-family: PingFang SC;
  1061. font-weight: 500;
  1062. color: #666666;
  1063. }
  1064. }
  1065. .my-radio-text{
  1066. font-size: 30upx;
  1067. font-family: PingFang SC;
  1068. font-weight: 500;
  1069. color: #111111;
  1070. line-height: 30upx;
  1071. }
  1072. }
  1073. }
  1074. }
  1075. .btn-box{
  1076. height: 120upx;
  1077. padding: 30upx;
  1078. // background: #FFFFFF;
  1079. display: flex;
  1080. align-items: center;
  1081. justify-content: center;
  1082. .btn{
  1083. width: 100%;
  1084. height: 88upx;
  1085. line-height: 88upx;
  1086. font-size: 30upx;
  1087. font-family: PingFang SC;
  1088. font-weight: bold;
  1089. color: #FFFFFF;
  1090. text-align: center;
  1091. background: #2583EB;
  1092. border-radius: 44upx;
  1093. }
  1094. }
  1095. }
  1096. </style>