inquiryOrderDetails.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. <template>
  2. <view class="content">
  3. <view class="cont">
  4. <view class="other-info" v-if="order!=null">
  5. <view class="title">付款详情</view>
  6. <view class="item">
  7. <view class="left">
  8. <text class="label">订单类型:</text>
  9. <text class="text">{{$getDictLabelName(inquiryTypeOptions,order.inquiryType)}}</text>
  10. <text class="text">-{{$getDictLabelName(orderTypeOptions,order.orderType)}}</text>
  11. </view>
  12. <view class="status red" v-if="order.status==1">
  13. {{$getDictLabelName(orderStatusOptions,order.status)}}
  14. </view>
  15. <view class="status red" v-if="order.status==2">
  16. {{$getDictLabelName(orderStatusOptions,order.status)}}
  17. </view>
  18. <view class="status green" v-if="order.status==3">
  19. {{$getDictLabelName(orderStatusOptions,order.status)}}
  20. </view>
  21. <view class="status green" v-if="order.status==4">
  22. {{$getDictLabelName(orderStatusOptions,order.status)}}
  23. </view>
  24. <view class="status gray" v-if="order.status<0">
  25. {{$getDictLabelName(orderStatusOptions,order.status)}}
  26. </view>
  27. </view>
  28. </view>
  29. <view class="doc-box" v-if="doctor!=null">
  30. <view class="title">医生详情</view>
  31. <view class="doc-name-box">
  32. <view class="doc-name">
  33. {{doctor.doctorName}}
  34. </view>
  35. <view class="doc-star">
  36. <u-rate activeColor="#ffc603" count="5" readonly v-model="doctor.pingStar"></u-rate>
  37. </view>
  38. </view>
  39. <view class="doc-dept-box">
  40. {{department.deptName}}|{{doctor.position}}
  41. </view>
  42. <view class="doc-his-box">
  43. {{hospital.hospitalName}}
  44. </view>
  45. <view class="doc-spec-box">
  46. <view class="left">
  47. <view class="title">擅长:</view>
  48. <view class="spec">{{doctor.speciality}}</view>
  49. </view>
  50. <view class="right">
  51. <view class="btn" @click="navTo('/pages/doctor/doctorDetails?doctorId='+doctor.doctorId)" >详情</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="other-info" v-if="patient!=null&&order.inquiryType==1">
  56. <view class="title">咨询内容</view>
  57. <view class="item">
  58. <view class="left">
  59. <text class="label">患者信息:</text>
  60. <text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
  61. </view>
  62. </view>
  63. <view class="item">
  64. <view class="left">
  65. <text class="label">病情描述:</text>
  66. <text class="text">{{patient.title}}</text>
  67. </view>
  68. </view>
  69. <view class="item">
  70. <view class="left">
  71. <text class="label">患病时间:</text>
  72. <text class="text">{{patient.duration}}</text>
  73. </view>
  74. </view>
  75. <view class="item">
  76. <view class="left">
  77. <text class="label">就诊情况:</text>
  78. <text class="text">{{patient.isVisit}}</text>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="other-info" v-if="patient!=null&&order.inquiryType==2">
  83. <view class="title">咨询内容</view>
  84. <view class="item">
  85. <view class="left">
  86. <text class="label">患者信息:</text>
  87. <text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
  88. </view>
  89. </view>
  90. <view class="item">
  91. <view class="left">
  92. <text class="label">身高(CM):</text>
  93. <text class="text">{{patient.height}}</text>
  94. </view>
  95. </view>
  96. <view class="item">
  97. <view class="left">
  98. <text class="label">体重(KG):</text>
  99. <text class="text">{{patient.weight}}</text>
  100. </view>
  101. </view>
  102. <view class="item">
  103. <view class="left">
  104. <text class="label">联系电话:</text>
  105. <text class="text">{{patient.mobile}}</text>
  106. </view>
  107. </view>
  108. <view class="item">
  109. <view class="left">
  110. <text class="label">学习进度:</text>
  111. <text class="text">{{patient.study}}</text>
  112. </view>
  113. </view>
  114. <view class="item">
  115. <view class="left">
  116. <text class="label">期望会诊方式:</text>
  117. <text class="text">{{patient.usage}}</text>
  118. </view>
  119. </view>
  120. <view class="item">
  121. <view class="left">
  122. <text class="label">病情描述:</text>
  123. <text class="text">{{patient.title}}</text>
  124. </view>
  125. </view>
  126. <view class="item">
  127. <view class="left">
  128. <text class="label">正在服用药品:</text>
  129. <text class="text">{{patient.drugs}}</text>
  130. </view>
  131. </view>
  132. <view class="item">
  133. <view class="left">
  134. <text class="label">本次患病时间:</text>
  135. <text class="text">{{patient.duration}}</text>
  136. </view>
  137. </view>
  138. <view class="item">
  139. <view class="left">
  140. <text class="label">是否就诊过:</text>
  141. <text class="text">{{patient.isVisit}}</text>
  142. </view>
  143. </view>
  144. <view class="item">
  145. <view class="left">
  146. <text class="label">舌苔照片:</text>
  147. </view>
  148. </view>
  149. <view>
  150. <u-album :urls="tongueImages"></u-album>
  151. </view>
  152. <view class="item">
  153. <view class="left">
  154. <text class="label">面部照片:</text>
  155. </view>
  156. </view>
  157. <view>
  158. <u-album :urls="faceImages"></u-album>
  159. </view>
  160. <view class="item">
  161. <view class="left">
  162. <text class="label">检测报告或患处照片:</text>
  163. </view>
  164. </view>
  165. <view>
  166. <u-album :urls="reportImages"></u-album>
  167. </view>
  168. </view>
  169. <view class="other-info" v-if="patient!=null&&order.inquiryType==3">
  170. <view class="title">咨询内容</view>
  171. <view class="item">
  172. <view class="left">
  173. <text class="label">患者信息:</text>
  174. <text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
  175. </view>
  176. </view>
  177. <view class="item">
  178. <view class="left">
  179. <text class="label">病情描述:</text>
  180. <text class="text">{{patient.title}}</text>
  181. </view>
  182. </view>
  183. <view class="item">
  184. <view class="left">
  185. <text class="label">正在服用药品:</text>
  186. <text class="text">{{patient.drugs}}</text>
  187. </view>
  188. </view>
  189. <view class="item">
  190. <view class="left">
  191. <text class="label">本次患病时间:</text>
  192. <text class="text">{{patient.duration}}</text>
  193. </view>
  194. </view>
  195. <view class="item">
  196. <view class="left">
  197. <text class="label">是否就诊过:</text>
  198. <text class="text">{{patient.isVisit}}</text>
  199. </view>
  200. </view>
  201. <view class="item">
  202. <view class="left">
  203. <text class="label">检测报告或患处照片:</text>
  204. </view>
  205. </view>
  206. <view>
  207. <u-album :urls="reportImages"></u-album>
  208. </view>
  209. <view class="item">
  210. <view class="left">
  211. <text class="label">舌苔照片:</text>
  212. </view>
  213. </view>
  214. <view>
  215. <u-album :urls="tongueImages"></u-album>
  216. </view>
  217. <view class="item">
  218. <view class="left">
  219. <text class="label">面部照片:</text>
  220. </view>
  221. </view>
  222. <view>
  223. <u-album :urls="faceImages"></u-album>
  224. </view>
  225. </view>
  226. <view class="other-info" v-if="report!=null&&order.status>=3" >
  227. <view class="title">体检信息</view>
  228. <view class="item" v-for="(item) in forms">
  229. <view class="left">
  230. <text class="label">{{item.title}}:</text>
  231. <text class="text">
  232. <u-tag size="mini" plain type="success" style="margin-right: 5rpx;margin-bottom: 5rpx;" v-for="(tag) in item.option" :text="tag"></u-tag>
  233. </text>
  234. </view>
  235. </view>
  236. </view>
  237. <view class="other-info" v-if="order!=null">
  238. <view class="title">订单信息</view>
  239. <view class="item">
  240. <view class="left">
  241. <text class="label">订单号码:</text>
  242. <text class="text">{{order.orderSn}}</text>
  243. </view>
  244. <view class="item-btn" @click="copyOrderSn">复制</view>
  245. </view>
  246. <view class="item">
  247. <view class="left">
  248. <text class="label">下单时间:</text>
  249. <text class="text">{{order.createTime}}</text>
  250. </view>
  251. </view>
  252. <view class="item">
  253. <view class="left">
  254. <text class="label">订单金额:</text>
  255. <text class="text">{{order.money.toFixed(2)}}</text>
  256. </view>
  257. </view>
  258. <view class="item">
  259. <view class="left">
  260. <text class="label">优惠金额:</text>
  261. <text class="text">{{order.discountMoney.toFixed(2)}}</text>
  262. </view>
  263. </view>
  264. <view class="item">
  265. <view class="left">
  266. <text class="label">支付金额:</text>
  267. <text class="text">{{order.payMoney.toFixed(2)}}</text>
  268. </view>
  269. </view>
  270. </view>
  271. </view>
  272. <view class="btn-box" v-if="order!=null">
  273. <view class="btn" v-if="report!=null&&order.status>=3" @click="navTo('/pages/store/inquiryOrderReport?orderId='+order.orderId)" >查看报告</view>
  274. </view>
  275. </view>
  276. </template>
  277. <script >
  278. import store from "@/store";
  279. import {getCompanyUserInquiryOrderById,cancel} from '@/api/inquiryOrder.js'
  280. import {getDictByKey} from '@/api/common.js'
  281. export default {
  282. data() {
  283. return {
  284. report:null,
  285. patient:null,
  286. hospital:null,
  287. department:null,
  288. doctor:null,
  289. order:null,
  290. orderId:null,
  291. orderStatusOptions:[],
  292. orderTypeOptions:[],
  293. inquiryTypeOptions:[],
  294. reportImages: [],
  295. tongueImages:[],
  296. faceImages:[],
  297. forms:[],
  298. }
  299. },
  300. onLoad(options) {
  301. this.orderId=options.orderId;
  302. this.getDictByKey("sys_inquiry_order_type");
  303. this.getDictByKey("sys_inquiry_type");
  304. this.getDictByKey("sys_inquiry_status");
  305. },
  306. onShow() {
  307. this.getCompanyUserInquiryOrderById();
  308. },
  309. methods: {
  310. cancel(){
  311. var that=this;
  312. uni.showModal({
  313. title:"提示",
  314. content:"确认取消订单吗?",
  315. showCancel:true,
  316. cancelText:'取消',
  317. confirmText:'确定',
  318. success:res=>{
  319. if(res.confirm){
  320. // 用户点击确定
  321. var data={orderId:this.orderId}
  322. cancel(data).then(
  323. res => {
  324. if(res.code==200){
  325. that.getMyInquiryOrderById()
  326. uni.showToast({
  327. icon:'success',
  328. title: "操作成功",
  329. });
  330. }else{
  331. uni.showToast({
  332. icon:'none',
  333. title: res.msg,
  334. });
  335. }
  336. },
  337. rej => {}
  338. );
  339. }else{
  340. // 否则点击了取消
  341. }
  342. }
  343. })
  344. },
  345. navTo(url){
  346. uni.navigateTo({
  347. url: url
  348. })
  349. },
  350. copyOrderSn() {
  351. uni.setClipboardData({
  352. data: this.order.orderSn,
  353. success: function () {
  354. uni.showToast({
  355. title:'复制成功',
  356. icon:'none'
  357. })
  358. }
  359. })
  360. },
  361. getCompanyUserInquiryOrderById(){
  362. var that=this;
  363. var data={orderId:this.orderId}
  364. getCompanyUserInquiryOrderById(data).then(
  365. res => {
  366. if(res.code==200){
  367. this.order=res.data.order;
  368. this.report=res.data.report;
  369. this.patient=JSON.parse(res.data.order.patientJson);
  370. if(this.report!=null&&this.report.formJson!=null){
  371. this.forms=JSON.parse(this.report.formJson)
  372. }
  373. if(that.patient.reportImages!=null){
  374. that.reportImages=that.patient.reportImages.split(",");
  375. }
  376. if(that.patient.tongueImages!=null){
  377. that.tongueImages=that.patient.tongueImages.split(",");
  378. }
  379. if(that.patient.faceImages!=null){
  380. that.faceImages=that.patient.faceImages.split(",");
  381. }
  382. this.doctor=res.data.doctor;
  383. this.department=res.data.department;
  384. this.hospital=res.data.hospital;
  385. }
  386. },
  387. err => {
  388. }
  389. );
  390. },
  391. getDictByKey(key){
  392. var data={key:key}
  393. getDictByKey(data).then(
  394. res => {
  395. if(res.code==200){
  396. if(key=="sys_inquiry_order_type"){
  397. this.orderTypeOptions=res.data;
  398. }
  399. if(key=="sys_inquiry_type"){
  400. this.inquiryTypeOptions=res.data;
  401. }
  402. if(key=="sys_inquiry_status"){
  403. this.orderStatusOptions=res.data;
  404. }
  405. }
  406. },
  407. err => {
  408. }
  409. );
  410. },
  411. navTo(url){
  412. uni.navigateTo({
  413. url: url
  414. })
  415. }
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. page{
  421. background: #f6f6f6;
  422. }
  423. </style>
  424. <style scoped lang="scss">
  425. .content{
  426. position: relative;
  427. .cont{
  428. position: relative;
  429. padding: 0rpx 20rpx 120rpx;
  430. z-index: 999;
  431. width: 100%;
  432. display: flex;
  433. flex-direction: column;
  434. }
  435. .doc-box{
  436. margin: 20rpx 0rpx 0rpx;
  437. padding: 0rpx 30rpx;
  438. background-color: #fff;
  439. border-radius: 20upx;
  440. .title{
  441. height: 80upx;
  442. line-height: 80upx;
  443. font-size: 30upx;
  444. color: #000;
  445. font-weight: bold;
  446. border-bottom: 2upx solid #eeeeee;
  447. }
  448. .doc-name-box{
  449. margin-top: 15rpx;
  450. display: flex;
  451. align-items: center;
  452. justify-content: flex-start;
  453. .doc-name{
  454. font-size: 38rpx;
  455. font-weight: bold;
  456. }
  457. .doc-star{
  458. margin-left: 10rpx;
  459. }
  460. }
  461. .doc-dept-box{
  462. display: flex;
  463. align-items: center;
  464. justify-content: flex-start;
  465. margin-top: 15rpx;
  466. font-size: 28upx;
  467. font-family: PingFang SC;
  468. color: #2d2b36;
  469. }
  470. .doc-his-box{
  471. display: flex;
  472. align-items: center;
  473. justify-content: flex-start;
  474. margin-top: 15rpx;
  475. font-size: 28upx;
  476. font-family: PingFang SC;
  477. color: #9a9a9c;
  478. }
  479. .doc-spec-box{
  480. display: flex;
  481. align-items: center;
  482. justify-content: space-between;
  483. .left{
  484. display: flex;
  485. align-items: center;
  486. justify-content: flex-start;
  487. .title{
  488. font-size: 28upx;
  489. font-family: PingFang SC;
  490. color: #9a9a9c;
  491. }
  492. .spec{
  493. margin-left: 10rpx;
  494. font-size: 28upx;
  495. font-family: PingFang SC;
  496. color: #9a9a9c;
  497. }
  498. }
  499. .right{
  500. .btn{
  501. font-size: 28upx;
  502. font-family: PingFang SC;
  503. color: #C39A58;
  504. }
  505. }
  506. }
  507. }
  508. .other-info{
  509. margin-top: 20upx;
  510. background-color: #fff;
  511. border-radius: 20upx;
  512. padding: 0 30upx;
  513. .title{
  514. height: 80upx;
  515. line-height: 80upx;
  516. font-size: 30upx;
  517. color: #000;
  518. font-weight: bold;
  519. border-bottom: 2upx solid #eeeeee;
  520. }
  521. .item{
  522. min-height: 80upx;
  523. display: flex;
  524. align-items: center;
  525. justify-content: space-between;
  526. &:last-child{
  527. border-bottom: none;
  528. }
  529. .left{
  530. flex: 1;
  531. display: flex;
  532. align-items: center;
  533. .label{
  534. min-width: 140rpx;
  535. font-size: 28upx;
  536. color: #000;
  537. }
  538. .text{
  539. font-size: 28upx;
  540. color: #1b1b1b;
  541. }
  542. }
  543. .status{
  544. font-size: 28upx;
  545. font-family: PingFang SC;
  546. font-weight: bold;
  547. }
  548. .red{
  549. color: #db5053;
  550. }
  551. .green{
  552. color: #C39A58;
  553. }
  554. .gray{
  555. color: #9c9c9c;
  556. }
  557. .item-btn{
  558. max-width: 200rpx;
  559. padding: 0rpx 15rpx;
  560. height: 48upx;
  561. border-radius: 24upx;
  562. line-height: 48upx;
  563. font-size: 24upx;
  564. color: #000;
  565. border: 1upx solid #d8d8d8;
  566. display: flex;
  567. align-items: center;
  568. justify-content: center;
  569. }
  570. }
  571. }
  572. .btn-box{
  573. height: 100rpx;
  574. z-index: 9999;
  575. width: 100%;
  576. padding: 0rpx 30upx;
  577. position: fixed;
  578. bottom: 0;
  579. left: 0;
  580. box-sizing: border-box;
  581. background-color: #ffffff;
  582. display: flex;
  583. align-items: center;
  584. justify-content: flex-end;
  585. .btn{
  586. padding: 15rpx 30rpx;
  587. margin-left: 10rpx;
  588. text-align: center;
  589. font-size: 28upx;
  590. font-family: PingFang SC;
  591. color: #FFFFFF;
  592. background: #FF5C03;
  593. border-radius: 45upx;
  594. }
  595. }
  596. }
  597. </style>