inquiryOrderDetails.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  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,i) in item.option" :key="i" :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_order/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. import {navigateToDesignatedConversation,setConversation} from "@/pages_im/util/imCommon";
  282. import IMSDK, {SessionType} from "openim-uniapp-polyfill";
  283. export default {
  284. data() {
  285. return {
  286. report:null,
  287. patient:null,
  288. hospital:null,
  289. department:null,
  290. doctor:null,
  291. order:null,
  292. orderId:null,
  293. orderStatusOptions:[],
  294. orderTypeOptions:[],
  295. inquiryTypeOptions:[],
  296. reportImages: [],
  297. tongueImages:[],
  298. faceImages:[],
  299. forms:[],
  300. }
  301. },
  302. onLoad(options) {
  303. this.orderId=options.orderId;
  304. this.getDictByKey("sys_inquiry_order_type");
  305. this.getDictByKey("sys_inquiry_type");
  306. this.getDictByKey("sys_inquiry_status");
  307. },
  308. onShow() {
  309. this.getCompanyUserInquiryOrderById();
  310. },
  311. methods: {
  312. cancel(){
  313. var that=this;
  314. uni.showModal({
  315. title:"提示",
  316. content:"确认取消订单吗?",
  317. showCancel:true,
  318. cancelText:'取消',
  319. confirmText:'确定',
  320. success:res=>{
  321. if(res.confirm){
  322. // 用户点击确定
  323. var data={orderId:this.orderId}
  324. cancel(data).then(
  325. res => {
  326. if(res.code==200){
  327. that.getMyInquiryOrderById()
  328. uni.showToast({
  329. icon:'success',
  330. title: "操作成功",
  331. });
  332. }else{
  333. uni.showToast({
  334. icon:'none',
  335. title: res.msg,
  336. });
  337. }
  338. },
  339. rej => {}
  340. );
  341. }else{
  342. // 否则点击了取消
  343. }
  344. }
  345. })
  346. },
  347. ping(){
  348. uni.navigateTo({
  349. url: "/pages_order/pingOrder?orderId="+this.orderId+"&doctorId="+this.order.doctorId
  350. })
  351. },
  352. pay(){
  353. uni.navigateTo({
  354. url: "/pages_order/inquiryPay?orderId="+this.orderId
  355. })
  356. },
  357. toIM(){
  358. var that=this;
  359. var userId=uni.getStorageSync('userId');
  360. var did='D' + this.order.doctorId;
  361. var conversationID=`si_D${this.order.doctorId}_U${userId}`;
  362. var ex={imType:1,orderId:this.order.orderId,orderType:this.order.orderType,followId:"",type:"startInquiry"}
  363. this.$store.commit("timStore/setType","startInquiry");
  364. this.$store.commit("timStore/setOrderType",this.order.orderType);
  365. this.$store.commit("timStore/setOrderId",this.order.orderId);
  366. this.$store.commit("timStore/setFollowId", 0);
  367. this.$store.commit("timStore/setImType", 1);
  368. this.$store.commit("timStore/setConversationID", conversationID);
  369. navigateToDesignatedConversation(did,SessionType.Single,false).then((res) => {
  370. // setConversation(conversationID,JSON.stringify(ex)).then(() => {
  371. // }).catch(() => {});
  372. }).catch(() => uni.$u.toast("操作失败") );
  373. },
  374. navTo(url){
  375. uni.navigateTo({
  376. url: url
  377. })
  378. },
  379. copyOrderSn() {
  380. uni.setClipboardData({
  381. data: this.order.orderSn,
  382. success: function () {
  383. uni.showToast({
  384. title:'复制成功',
  385. icon:'none'
  386. })
  387. }
  388. })
  389. },
  390. getCompanyUserInquiryOrderById(){
  391. var that=this;
  392. var data={orderId:this.orderId}
  393. getCompanyUserInquiryOrderById(data).then(
  394. res => {
  395. if(res.code==200){
  396. this.order=res.data.order;
  397. this.report=res.data.report;
  398. this.patient=JSON.parse(res.data.order.patientJson);
  399. if(this.report!=null&&this.report.formJson!=null){
  400. this.forms=JSON.parse(this.report.formJson)
  401. }
  402. if(that.patient.reportImages!=null){
  403. that.reportImages=that.patient.reportImages.split(",");
  404. }
  405. if(that.patient.tongueImages!=null){
  406. that.tongueImages=that.patient.tongueImages.split(",");
  407. }
  408. if(that.patient.faceImages!=null){
  409. that.faceImages=that.patient.faceImages.split(",");
  410. }
  411. this.doctor=res.data.doctor;
  412. this.department=res.data.department;
  413. this.hospital=res.data.hospital;
  414. }
  415. },
  416. err => {
  417. }
  418. );
  419. },
  420. getDictByKey(key){
  421. var data={key:key}
  422. getDictByKey(data).then(
  423. res => {
  424. if(res.code==200){
  425. if(key=="sys_inquiry_order_type"){
  426. this.orderTypeOptions=res.data;
  427. }
  428. if(key=="sys_inquiry_type"){
  429. this.inquiryTypeOptions=res.data;
  430. }
  431. if(key=="sys_inquiry_status"){
  432. this.orderStatusOptions=res.data;
  433. }
  434. }
  435. },
  436. err => {
  437. }
  438. );
  439. },
  440. navTo(url){
  441. uni.navigateTo({
  442. url: url
  443. })
  444. }
  445. }
  446. }
  447. </script>
  448. <style lang="scss">
  449. page{
  450. background: #f6f6f6;
  451. }
  452. </style>
  453. <style scoped lang="scss">
  454. .content{
  455. position: relative;
  456. .cont{
  457. position: relative;
  458. padding: 0rpx 20rpx 120rpx;
  459. z-index: 999;
  460. width: 100%;
  461. display: flex;
  462. flex-direction: column;
  463. }
  464. .doc-box{
  465. margin: 20rpx 0rpx 0rpx;
  466. padding: 0rpx 30rpx;
  467. background-color: #fff;
  468. border-radius: 20upx;
  469. .title{
  470. height: 80upx;
  471. line-height: 80upx;
  472. font-size: 30upx;
  473. color: #000;
  474. font-weight: bold;
  475. border-bottom: 2upx solid #eeeeee;
  476. }
  477. .doc-name-box{
  478. margin-top: 15rpx;
  479. display: flex;
  480. align-items: center;
  481. justify-content: flex-start;
  482. .doc-name{
  483. font-size: 38rpx;
  484. font-weight: bold;
  485. }
  486. .doc-star{
  487. margin-left: 10rpx;
  488. }
  489. }
  490. .doc-dept-box{
  491. display: flex;
  492. align-items: center;
  493. justify-content: flex-start;
  494. margin-top: 15rpx;
  495. font-size: 28upx;
  496. font-family: PingFang SC;
  497. color: #2d2b36;
  498. }
  499. .doc-his-box{
  500. display: flex;
  501. align-items: center;
  502. justify-content: flex-start;
  503. margin-top: 15rpx;
  504. font-size: 28upx;
  505. font-family: PingFang SC;
  506. color: #9a9a9c;
  507. }
  508. .doc-spec-box{
  509. display: flex;
  510. align-items: center;
  511. justify-content: space-between;
  512. .left{
  513. display: flex;
  514. align-items: center;
  515. justify-content: flex-start;
  516. .title{
  517. font-size: 28upx;
  518. font-family: PingFang SC;
  519. color: #9a9a9c;
  520. }
  521. .spec{
  522. margin-left: 10rpx;
  523. font-size: 28upx;
  524. font-family: PingFang SC;
  525. color: #9a9a9c;
  526. }
  527. }
  528. .right{
  529. .btn{
  530. font-size: 28upx;
  531. font-family: PingFang SC;
  532. color: #C39A58;
  533. }
  534. }
  535. }
  536. }
  537. .other-info{
  538. margin-top: 20upx;
  539. background-color: #fff;
  540. border-radius: 20upx;
  541. padding: 0 30upx;
  542. .title{
  543. height: 80upx;
  544. line-height: 80upx;
  545. font-size: 30upx;
  546. color: #000;
  547. font-weight: bold;
  548. border-bottom: 2upx solid #eeeeee;
  549. }
  550. .item{
  551. min-height: 80upx;
  552. display: flex;
  553. align-items: center;
  554. justify-content: space-between;
  555. &:last-child{
  556. border-bottom: none;
  557. }
  558. .left{
  559. flex: 1;
  560. display: flex;
  561. align-items: center;
  562. .label{
  563. min-width: 140rpx;
  564. font-size: 28upx;
  565. color: #000;
  566. }
  567. .text{
  568. font-size: 28upx;
  569. color: #1b1b1b;
  570. }
  571. }
  572. .status{
  573. font-size: 28upx;
  574. font-family: PingFang SC;
  575. font-weight: bold;
  576. }
  577. .red{
  578. color: #db5053;
  579. }
  580. .green{
  581. color: #C39A58;
  582. }
  583. .gray{
  584. color: #9c9c9c;
  585. }
  586. .item-btn{
  587. max-width: 200rpx;
  588. padding: 0rpx 15rpx;
  589. height: 48upx;
  590. border-radius: 24upx;
  591. line-height: 48upx;
  592. font-size: 24upx;
  593. color: #000;
  594. border: 1upx solid #d8d8d8;
  595. display: flex;
  596. align-items: center;
  597. justify-content: center;
  598. }
  599. }
  600. }
  601. .btn-box{
  602. height: 100rpx;
  603. z-index: 9999;
  604. width: 100%;
  605. padding: 0rpx 30upx;
  606. position: fixed;
  607. bottom: 0;
  608. left: 0;
  609. box-sizing: border-box;
  610. background-color: #ffffff;
  611. display: flex;
  612. align-items: center;
  613. justify-content: flex-end;
  614. .btn{
  615. padding: 15rpx 30rpx;
  616. margin-left: 10rpx;
  617. text-align: center;
  618. font-size: 28upx;
  619. font-family: PingFang SC;
  620. color: #FFFFFF;
  621. background: #C39A58;
  622. border-radius: 45upx;
  623. }
  624. }
  625. }
  626. </style>