consultingInfo.vue 8.8 KB

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