consultingInfo.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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" v-if="orderInfo.end_time!=0">
  45. <text class="text-leftstyle">结束时间:</text><text class="font_style">{{formatDate(orderInfo.end_time * 1000)}}</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">{{orderInfo.consult_duration}}秒</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. onPullDownRefresh() {
  97. this.getordersInfo()
  98. uni.stopPullDownRefresh()
  99. },
  100. methods: {
  101. gosuggest() {
  102. uni.navigateTo({
  103. url: "opinionInfo?id=" + this.orderInfo.suggest.id
  104. })
  105. },
  106. gotopinjia() {
  107. uni.navigateTo({
  108. url: "../me_evaluate"
  109. })
  110. },
  111. getordersInfo: async function() {
  112. let res = await this.$request.post("/api/v1/order/orderDetail", {
  113. order_id: this.order_id
  114. })
  115. console.log(res)
  116. if (res.status == 0) {
  117. this.orderInfo = res.data
  118. console.log(this.orderInfo)
  119. // this.outtime = this.formatDate(this.orderInfo.end_time * 1000)
  120. }
  121. },
  122. gotochat() {
  123. if (this.orderInfo.product_type == 1) {
  124. if (this.orderInfo.callback_phone == '') {
  125. uni.showModal({
  126. title: "提示",
  127. content: "回拨需等首次医生拨打后才可回拨",
  128. showCancel: false,
  129. confirmText: "知道了",
  130. })
  131. return false
  132. }
  133. uni.makePhoneCall({
  134. phoneNumber: this.orderInfo.callback_phone
  135. })
  136. } else if (this.orderInfo.product_type == 2) {
  137. uni.navigateTo({
  138. url: "conversation?doctor=" + JSON.stringify(this.orderInfo.docter) + "&doctorstatus=" + this.orderInfo.order_status
  139. })
  140. }
  141. }
  142. }
  143. };
  144. </script>
  145. <style scoped lang="scss">
  146. .main {}
  147. .text-leftstyle {
  148. text-align: right;
  149. width: 140rpx;
  150. display: inline-block;
  151. }
  152. .font_style {
  153. color: rgb(51, 51, 51);
  154. }
  155. .footer {
  156. width: 100%;
  157. height: auto;
  158. display: flex;
  159. position: fixed;
  160. bottom: 0;
  161. }
  162. .round {
  163. height: 45rpx;
  164. width: 50rpx;
  165. border-radius: 50%;
  166. background-color: #ececec;
  167. }
  168. .card {
  169. padding: 30rpx 30rpx;
  170. box-sizing: border-box;
  171. .card_view {
  172. width: 100%;
  173. background-color: #ffffff;
  174. border-radius: 15rpx;
  175. .title {
  176. width: 100%;
  177. height: 20vh;
  178. display: flex;
  179. justify-content: center;
  180. align-items: flex-end;
  181. .img {
  182. width: 90%;
  183. height: 90%;
  184. }
  185. }
  186. .describe {
  187. width: 100%;
  188. height: 1;
  189. padding: 100rpx 40rpx 20rpx 40rpx;
  190. }
  191. }
  192. }
  193. .list {
  194. margin: 20rpx 0 10rpx 0;
  195. padding: 20rpx 0;
  196. align-items: center;
  197. display: flex;
  198. width: 100%;
  199. border-radius: 15rpx;
  200. background-color: #FFFFFF;
  201. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  202. .portrait {
  203. width: 20%;
  204. display: flex;
  205. justify-content: center;
  206. align-items: center;
  207. .img {
  208. width: 100rpx;
  209. height: 100rpx;
  210. border-radius: 50%;
  211. }
  212. .bun_true {
  213. text-align: center;
  214. width: 80rpx;
  215. height: 36rpx;
  216. background-color: #D92975;
  217. margin: 0 10rpx;
  218. border-radius: 60rpx;
  219. position: relative;
  220. top: -20rpx;
  221. font-size: 20rpx;
  222. color: #FFFFFF;
  223. padding: 3rpx 0;
  224. }
  225. .bun_false {
  226. border: 1rpx solid #D92975;
  227. text-align: center;
  228. width: 80rpx;
  229. height: 36rpx;
  230. background-color: #FFFFFF;
  231. margin: 0 10rpx;
  232. border-radius: 60rpx;
  233. position: relative;
  234. top: -20rpx;
  235. font-size: 20rpx;
  236. color: #D92975;
  237. padding: 3rpx 0;
  238. }
  239. }
  240. //文字
  241. .text {
  242. width: 70%;
  243. //名字+标签
  244. .name {
  245. font-size: 30rpx;
  246. font-weight: bold;
  247. display: flex;
  248. align-items: center;
  249. .label {
  250. font-weight: 400;
  251. margin-right: 15rpx;
  252. background-color: #E5F5FF;
  253. color: #0B73B9;
  254. width: 100rpx;
  255. height: 28rpx;
  256. font-size: 20rpx;
  257. border-radius: 10rpx;
  258. text-align: center;
  259. }
  260. }
  261. //科室
  262. .department {
  263. margin-top: 15rpx;
  264. color: #666666;
  265. text {
  266. margin-right: 15rpx;
  267. }
  268. }
  269. // 选项
  270. .option {
  271. display: flex;
  272. view {
  273. background-color: #E4E4E4;
  274. width: 100rpx;
  275. height: 48rpx;
  276. border-radius: 12px;
  277. margin-right: 15rpx;
  278. display: flex;
  279. justify-content: center;
  280. align-items: center;
  281. }
  282. }
  283. }
  284. }
  285. </style>