consultingInfo.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <view class="main">
  3. <view class="list">
  4. <!-- 头像 -->
  5. <view class="portrait">
  6. <view style="padding-top: 20rpx;">
  7. <!-- <image class="img" :src=""></image> -->
  8. <u-avatar :src="orderInfo.docter.avatar" mode="circle"></u-avatar>
  9. </view>
  10. </view>
  11. <!-- 文字 -->
  12. <view class="text">
  13. <!-- 名字+标签 -->
  14. <view class="name">
  15. <view style="margin-right: 15rpx;">{{orderInfo.docter.name}}</view>
  16. <view class="label" v-for="(itm,idx) in orderInfo.docter.label_texts" :key="index">{{itm.label_name}}</view>
  17. </view>
  18. <!-- 科室 -->
  19. <view class="department">
  20. <text>科室:</text>
  21. <text style="color: #333333;">{{orderInfo.docter.office.name}}</text>
  22. <text style="color: #333333;">{{orderInfo.docter.qualification.name}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="padding-sm bg-white margin-top-sm">
  27. <view class="text-lg text-black text-bold">
  28. 订单信息
  29. </view>
  30. <view class="text-gray margin-top-xs padding-tb-xs">
  31. <text class="text-leftstyle">订单号:</text>
  32. <text class="font_style">{{orderInfo.order_sn}}</text>
  33. </view>
  34. <view class="text-gray margin-top-xs padding-tb-xs">
  35. <text class="text-leftstyle">状态:</text><text v-if="orderInfo.order_status==1" class="font_style" style="color: rgb(238, 170, 63);">未支付</text>
  36. <text v-else-if="orderInfo.order_status==2" class="font_style" style="color: rgb(238, 170, 63);">待接单</text>
  37. <text v-else-if="orderInfo.order_status==3" class="font_style" style="color: rgb(238, 170, 63);">进行中</text>
  38. <text v-else-if="orderInfo.order_status==4" class="font_style" style="color: rgb(238, 170, 63);">已完成</text>
  39. <text v-else-if="orderInfo.order_status==5" class="font_style" style="color: rgb(238, 170, 63);">已取消</text>
  40. </view>
  41. <view class="text-gray margin-top-xs padding-tb-xs">
  42. <text class="text-leftstyle">下单时间:</text><text class="font_style">{{orderInfo.created_at}}</text>
  43. </view>
  44. <view class="text-gray margin-top-xs padding-tb-xs">
  45. <text class="text-leftstyle">结束时间:</text><text class="font_style">{{outtime}}</text>
  46. </view>
  47. <view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.product_type==1">
  48. <text class="text-leftstyle">咨询时长:</text><text class="font_style">{{parseInt(orderInfo.consult_duration/60)}}分钟</text>
  49. </view>
  50. <view class="text-gray margin-top-xs padding-tb-xs">
  51. <text class="text-leftstyle">咨询患者:</text><text class="font_style">{{orderInfo.order_patient.name}}</text>
  52. </view>
  53. <view class="text-gray margin-top-xs padding-tb-xs">
  54. <text class="text-leftstyle">已付款:</text><text class="font_style">¥{{orderInfo.total_amount/100}}</text>
  55. </view>
  56. </view>
  57. <view class="cu-tabbar-height"></view>
  58. <view class="cu-tabbar-height"></view>
  59. <view class="cu-bar bg-white tabbar" v-if="orderInfo.order_status==4&&orderInfo.product_type==2" style="position: fixed;bottom: 0;width: 100%;display: flex;justify-content: flex-end;height: 108rpx;">
  60. <u-button shape="circle" :custom-style="customStyle" @click="gotochat" :ripple="true">咨询会话</u-button>
  61. <u-button shape="circle" :custom-style="customStyle" @click="gotopinjia" :ripple="true">评价</u-button>
  62. <u-button shape="circle" :custom-style="customStylebtn" @click="gosuggest" :ripple="true">意见单</u-button>
  63. </view>
  64. <view class="cu-bar bg-white tabbar" v-else-if="orderInfo.order_status==3" style="position: fixed;bottom: 0;width: 100%;">
  65. <view class="submit" style="background-color: #0B73B9;color: white;" @click="gotochat">
  66. {{orderInfo.product_type==1?'回拨':'咨询会话'}}
  67. </view>
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. onLoad(options) {
  74. this.order_id = options.id
  75. },
  76. mounted() {
  77. this.getordersInfo()
  78. },
  79. data() {
  80. return {
  81. order_id: "",
  82. orderInfo: {},
  83. customStyle: {
  84. marginRight: '20rpx'
  85. },
  86. customStylebtn: {
  87. marginRight: '20rpx',
  88. color: "#0B73B9",
  89. borderColor: "#0B73B9"
  90. },
  91. outtime: ""
  92. }
  93. },
  94. onShow() {
  95. },
  96. methods: {
  97. gosuggest() {
  98. uni.navigateTo({
  99. url: "opinionInfo?id=" + this.orderInfo.suggest.id
  100. })
  101. },
  102. gotopinjia() {
  103. uni.navigateTo({
  104. url: "../me_evaluate"
  105. })
  106. },
  107. getordersInfo: async function() {
  108. let res = await this.$request.post("/api/v1/order/orderDetail", {
  109. order_id: this.order_id
  110. })
  111. console.log(res)
  112. if (res.status == 0) {
  113. this.orderInfo = res.data
  114. console.log(this.orderInfo)
  115. this.outtime = this.formatDate(this.orderInfo.outtime * 1000)
  116. }
  117. },
  118. gotochat() {
  119. if (this.orderInfo.product_type == 1) {
  120. if(this.orderInfo.callback_phone == ''){
  121. uni.showModal({
  122. title:"提示",
  123. content:"回拨需等首次医生拨打后才可回拨",
  124. showCancel:false,
  125. confirmText:"知道了",
  126. })
  127. return false
  128. }
  129. uni.makePhoneCall({
  130. phoneNumber: this.orderInfo.callback_phone
  131. })
  132. } else if (this.orderInfo.product_type == 2) {
  133. uni.navigateTo({
  134. url: "conversation?doctor=" + JSON.stringify(this.orderInfo.docter) + "&doctorstatus=" + this.orderInfo.order_status
  135. })
  136. }
  137. }
  138. }
  139. };
  140. </script>
  141. <style scoped lang="scss">
  142. .main {}
  143. .text-leftstyle {
  144. text-align: right;
  145. width: 140rpx;
  146. display: inline-block;
  147. }
  148. .font_style {
  149. color: rgb(51, 51, 51);
  150. }
  151. .footer {
  152. width: 100%;
  153. height: auto;
  154. display: flex;
  155. position: fixed;
  156. bottom: 0;
  157. }
  158. .round {
  159. height: 45rpx;
  160. width: 50rpx;
  161. border-radius: 50%;
  162. background-color: #ececec;
  163. }
  164. .card {
  165. padding: 30rpx 30rpx;
  166. box-sizing: border-box;
  167. .card_view {
  168. width: 100%;
  169. background-color: #ffffff;
  170. border-radius: 15rpx;
  171. .title {
  172. width: 100%;
  173. height: 20vh;
  174. display: flex;
  175. justify-content: center;
  176. align-items: flex-end;
  177. .img {
  178. width: 90%;
  179. height: 90%;
  180. }
  181. }
  182. .describe {
  183. width: 100%;
  184. height: 1;
  185. padding: 100rpx 40rpx 20rpx 40rpx;
  186. }
  187. }
  188. }
  189. .list {
  190. margin: 20rpx 0 10rpx 0;
  191. padding: 20rpx 0;
  192. align-items: center;
  193. display: flex;
  194. width: 100%;
  195. border-radius: 15rpx;
  196. background-color: #FFFFFF;
  197. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  198. .portrait {
  199. width: 20%;
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. .img {
  204. width: 100rpx;
  205. height: 100rpx;
  206. border-radius: 50%;
  207. }
  208. .bun_true {
  209. text-align: center;
  210. width: 80rpx;
  211. height: 36rpx;
  212. background-color: #D92975;
  213. margin: 0 10rpx;
  214. border-radius: 60rpx;
  215. position: relative;
  216. top: -20rpx;
  217. font-size: 20rpx;
  218. color: #FFFFFF;
  219. padding: 3rpx 0;
  220. }
  221. .bun_false {
  222. border: 1rpx solid #D92975;
  223. text-align: center;
  224. width: 80rpx;
  225. height: 36rpx;
  226. background-color: #FFFFFF;
  227. margin: 0 10rpx;
  228. border-radius: 60rpx;
  229. position: relative;
  230. top: -20rpx;
  231. font-size: 20rpx;
  232. color: #D92975;
  233. padding: 3rpx 0;
  234. }
  235. }
  236. //文字
  237. .text {
  238. width: 70%;
  239. //名字+标签
  240. .name {
  241. font-size: 30rpx;
  242. font-weight: bold;
  243. display: flex;
  244. align-items: center;
  245. .label {
  246. font-weight: 400;
  247. margin-right: 15rpx;
  248. background-color: #E5F5FF;
  249. color: #0B73B9;
  250. width: 100rpx;
  251. height: 28rpx;
  252. font-size: 20rpx;
  253. border-radius: 10rpx;
  254. text-align: center;
  255. }
  256. }
  257. //科室
  258. .department {
  259. margin-top: 15rpx;
  260. color: #666666;
  261. text {
  262. margin-right: 15rpx;
  263. }
  264. }
  265. // 选项
  266. .option {
  267. display: flex;
  268. view {
  269. background-color: #E4E4E4;
  270. width: 100rpx;
  271. height: 48rpx;
  272. border-radius: 12px;
  273. margin-right: 15rpx;
  274. display: flex;
  275. justify-content: center;
  276. align-items: center;
  277. }
  278. }
  279. }
  280. }
  281. </style>