consultingInfo.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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. uni.navigateTo({
  147. url: "conversation?doctor=" + JSON.stringify(this.orderInfo.docter) + "&doctorstatus=" + this.orderInfo.order_status
  148. })
  149. }
  150. }
  151. }
  152. };
  153. </script>
  154. <style scoped lang="scss">
  155. .main {}
  156. .text-leftstyle {
  157. text-align: right;
  158. width: 140rpx;
  159. display: inline-block;
  160. }
  161. .font_style {
  162. color: rgb(51, 51, 51);
  163. }
  164. .footer {
  165. width: 100%;
  166. height: auto;
  167. display: flex;
  168. position: fixed;
  169. bottom: 0;
  170. }
  171. .round {
  172. height: 45rpx;
  173. width: 50rpx;
  174. border-radius: 50%;
  175. background-color: #ececec;
  176. }
  177. .card {
  178. padding: 30rpx 30rpx;
  179. box-sizing: border-box;
  180. .card_view {
  181. width: 100%;
  182. background-color: #ffffff;
  183. border-radius: 15rpx;
  184. .title {
  185. width: 100%;
  186. height: 20vh;
  187. display: flex;
  188. justify-content: center;
  189. align-items: flex-end;
  190. .img {
  191. width: 90%;
  192. height: 90%;
  193. }
  194. }
  195. .describe {
  196. width: 100%;
  197. height: 1;
  198. padding: 100rpx 40rpx 20rpx 40rpx;
  199. }
  200. }
  201. }
  202. .list {
  203. margin: 20rpx 0 10rpx 0;
  204. padding: 20rpx 0;
  205. align-items: center;
  206. display: flex;
  207. width: 100%;
  208. border-radius: 15rpx;
  209. background-color: #FFFFFF;
  210. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  211. .portrait {
  212. width: 20%;
  213. display: flex;
  214. justify-content: center;
  215. align-items: center;
  216. .img {
  217. width: 100rpx;
  218. height: 100rpx;
  219. border-radius: 50%;
  220. }
  221. .bun_true {
  222. text-align: center;
  223. width: 80rpx;
  224. height: 36rpx;
  225. background-color: #D92975;
  226. margin: 0 10rpx;
  227. border-radius: 60rpx;
  228. position: relative;
  229. top: -20rpx;
  230. font-size: 20rpx;
  231. color: #FFFFFF;
  232. padding: 3rpx 0;
  233. }
  234. .bun_false {
  235. border: 1rpx solid #D92975;
  236. text-align: center;
  237. width: 80rpx;
  238. height: 36rpx;
  239. background-color: #FFFFFF;
  240. margin: 0 10rpx;
  241. border-radius: 60rpx;
  242. position: relative;
  243. top: -20rpx;
  244. font-size: 20rpx;
  245. color: #D92975;
  246. padding: 3rpx 0;
  247. }
  248. }
  249. //文字
  250. .text {
  251. width: 70%;
  252. //名字+标签
  253. .name {
  254. font-size: 30rpx;
  255. font-weight: bold;
  256. display: flex;
  257. align-items: center;
  258. .label {
  259. font-weight: 400;
  260. margin-right: 15rpx;
  261. background-color: #E5F5FF;
  262. color: #0B73B9;
  263. width: 100rpx;
  264. height: 28rpx;
  265. font-size: 20rpx;
  266. border-radius: 10rpx;
  267. text-align: center;
  268. }
  269. }
  270. //科室
  271. .department {
  272. margin-top: 15rpx;
  273. color: #666666;
  274. text {
  275. margin-right: 15rpx;
  276. }
  277. }
  278. // 选项
  279. .option {
  280. display: flex;
  281. view {
  282. background-color: #E4E4E4;
  283. width: 100rpx;
  284. height: 48rpx;
  285. border-radius: 12px;
  286. margin-right: 15rpx;
  287. display: flex;
  288. justify-content: center;
  289. align-items: center;
  290. }
  291. }
  292. }
  293. }
  294. </style>