consultingInfo.vue 7.3 KB

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