consultingInfo.vue 9.2 KB

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