consultingInfo.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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" :key="index">{{itm}}</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">{{orderInfo.order_patient.appoint_end_time}}</text>
  46. </view>
  47. <view class="text-gray margin-top-xs padding-tb-xs">
  48. <text class="text-leftstyle">咨询时长:</text><text class="font_style"></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="gotoIm" :ripple="true">咨询会话</u-button>
  61. <u-button shape="circle" :custom-style="customStyle" :ripple="true">评价</u-button>
  62. <u-button shape="circle" :custom-style="customStylebtn" :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. }
  92. },
  93. methods: {
  94. getordersInfo: async function() {
  95. let res = await this.$request.post("/api/v1/order/orderDetail", {
  96. order_id: this.order_id
  97. })
  98. console.log(res)
  99. if (res.status == 0) {
  100. this.orderInfo = res.data
  101. console.log(this.orderInfo)
  102. }
  103. },
  104. gotochat() {
  105. if (orderInfo.product_type == 1) {
  106. } else if (orderInfo.product_type == 2) {
  107. uni.navigateTo({
  108. url: "conversation?doctor=" + JSON.stringify(this.orderInfo.docter)
  109. })
  110. }
  111. }
  112. }
  113. };
  114. </script>
  115. <style scoped lang="scss">
  116. .main {}
  117. .text-leftstyle {
  118. text-align: right;
  119. width: 138rpx;
  120. display: inline-block;
  121. }
  122. .font_style {
  123. color: rgb(51, 51, 51);
  124. }
  125. .footer {
  126. width: 100%;
  127. height: auto;
  128. display: flex;
  129. position: fixed;
  130. bottom: 0;
  131. }
  132. .round {
  133. height: 45rpx;
  134. width: 50rpx;
  135. border-radius: 50%;
  136. background-color: #ececec;
  137. }
  138. .card {
  139. padding: 30rpx 30rpx;
  140. box-sizing: border-box;
  141. .card_view {
  142. width: 100%;
  143. background-color: #ffffff;
  144. border-radius: 15rpx;
  145. .title {
  146. width: 100%;
  147. height: 20vh;
  148. display: flex;
  149. justify-content: center;
  150. align-items: flex-end;
  151. .img {
  152. width: 90%;
  153. height: 90%;
  154. }
  155. }
  156. .describe {
  157. width: 100%;
  158. height: 1;
  159. padding: 100rpx 40rpx 20rpx 40rpx;
  160. }
  161. }
  162. }
  163. .list {
  164. margin: 20rpx 0 10rpx 0;
  165. padding: 20rpx 0;
  166. align-items: center;
  167. display: flex;
  168. width: 100%;
  169. border-radius: 15rpx;
  170. background-color: #FFFFFF;
  171. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  172. .portrait {
  173. width: 20%;
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. .img {
  178. width: 100rpx;
  179. height: 100rpx;
  180. border-radius: 50%;
  181. }
  182. .bun_true {
  183. text-align: center;
  184. width: 80rpx;
  185. height: 36rpx;
  186. background-color: #D92975;
  187. margin: 0 10rpx;
  188. border-radius: 60rpx;
  189. position: relative;
  190. top: -20rpx;
  191. font-size: 20rpx;
  192. color: #FFFFFF;
  193. padding: 3rpx 0;
  194. }
  195. .bun_false {
  196. border: 1rpx solid #D92975;
  197. text-align: center;
  198. width: 80rpx;
  199. height: 36rpx;
  200. background-color: #FFFFFF;
  201. margin: 0 10rpx;
  202. border-radius: 60rpx;
  203. position: relative;
  204. top: -20rpx;
  205. font-size: 20rpx;
  206. color: #D92975;
  207. padding: 3rpx 0;
  208. }
  209. }
  210. //文字
  211. .text {
  212. width: 70%;
  213. //名字+标签
  214. .name {
  215. font-size: 30rpx;
  216. font-weight: bold;
  217. display: flex;
  218. align-items: center;
  219. .label {
  220. font-weight: 400;
  221. margin-right: 15rpx;
  222. background-color: #E5F5FF;
  223. color: #0B73B9;
  224. width: 100rpx;
  225. height: 28rpx;
  226. font-size: 20rpx;
  227. border-radius: 10rpx;
  228. text-align: center;
  229. }
  230. }
  231. //科室
  232. .department {
  233. margin-top: 15rpx;
  234. color: #666666;
  235. text {
  236. margin-right: 15rpx;
  237. }
  238. }
  239. // 选项
  240. .option {
  241. display: flex;
  242. view {
  243. background-color: #E4E4E4;
  244. width: 100rpx;
  245. height: 48rpx;
  246. border-radius: 12px;
  247. margin-right: 15rpx;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. }
  252. }
  253. }
  254. }
  255. </style>