appointmentInfo.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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" v-if="orderInfo.product_type == 3">
  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" :style="orderInfo.product_type == 4||orderInfo.product_type == 5?'width:100%;padding:15rpx':''">
  16. <!-- 名字+标签 -->
  17. <view class="name" v-if="orderInfo.product_type == 3">
  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. <view class="name" v-if="orderInfo.product_type == 4||orderInfo.product_type == 5">
  22. <view style="margin-right: 15rpx;">预约地址:{{orderInfo.organization.address}}</view>
  23. </view>
  24. <!-- 科室 -->
  25. <view class="department" v-if="orderInfo.product_type == 3">
  26. <text>科室:</text>
  27. <text style="color: #333333;">{{orderInfo.docter.office.name}}</text>
  28. <text style="color: #333333;">{{orderInfo.docter.qualification.name}}</text>
  29. </view>
  30. <view class="department" v-if="orderInfo.product_type == 4">
  31. <text>预约疫苗:</text>
  32. <text style="color: #333333;">{{orderInfo.order_vaccine.vaccine_name}}</text>
  33. </view>
  34. <view class="department flex align-center" v-if="orderInfo.product_type == 5">
  35. <text>预约儿保项目:</text>
  36. <view class="">
  37. <view class="" v-for="(ite,idxn) in orderInfo.order_nurse" :key="idxn">
  38. {{ite.nurse_name}}
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="padding-sm bg-white margin-top-sm">
  45. <view class="text-lg text-black text-bold">
  46. 订单信息
  47. </view>
  48. <view class="text-gray margin-top-xs padding-tb-xs">
  49. <text class="text-leftstyle">订单号:</text>
  50. <text class="font_style">{{orderInfo.order_sn}}</text>
  51. </view>
  52. <view class="text-gray margin-top-xs padding-tb-xs">
  53. <text class="text-leftstyle">状态:</text><text v-if="orderInfo.order_status==1" class="font_style" style="color: rgb(238, 170, 63);">未支付</text>
  54. <text v-else-if="orderInfo.order_status==2" class="font_style" style="color: rgb(238, 170, 63);">待接单</text>
  55. <text v-else-if="orderInfo.order_status==3" class="font_style" style="color: rgb(238, 170, 63);">进行中</text>
  56. <text v-else-if="orderInfo.order_status==4" class="font_style" style="color: rgb(238, 170, 63);">已完成</text>
  57. <text v-else-if="orderInfo.order_status==5" class="font_style" style="color: rgb(238, 170, 63);">已取消</text>
  58. <text v-else-if="orderInfo.order_status==6" class="font_style" style="color: rgb(238, 170, 63);">已超时</text>
  59. <text v-else-if="orderInfo.order_status==7" class="font_style" style="color: rgb(238, 170, 63);">已预约</text>
  60. </view>
  61. <view class="text-gray margin-top-xs padding-tb-xs">
  62. <text class="text-leftstyle">下单时间:</text><text class="font_style">{{orderInfo.created_at}}</text>
  63. </view>
  64. <view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.end_time!=0">
  65. <text class="text-leftstyle">结束时间:</text><text class="font_style">{{formatDate(orderInfo.end_time * 1000)}}</text>
  66. </view>
  67. <view class="text-gray margin-top-xs padding-tb-xs" v-if="orderInfo.product_type==1">
  68. <text class="text-leftstyle">咨询时长:</text><text class="font_style">{{orderInfo.consult_duration}}秒</text>
  69. </view>
  70. <view class="text-gray margin-top-xs padding-tb-xs">
  71. <text class="text-leftstyle">咨询患者:</text><text class="font_style">{{orderInfo.order_patient.name}}</text>
  72. </view>
  73. <view class="text-gray margin-top-xs padding-tb-xs">
  74. <text class="text-leftstyle">已付款:</text><text class="font_style">¥{{orderInfo.total_amount/100}}</text>
  75. </view>
  76. </view>
  77. <view class="cu-tabbar-height"></view>
  78. <view class="cu-tabbar-height"></view>
  79. </view>
  80. </load-refresh>
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. onLoad(options) {
  86. this.order_id = options.id
  87. },
  88. mounted() {
  89. this.getordersInfo()
  90. },
  91. data() {
  92. return {
  93. order_id: "",
  94. orderInfo: {},
  95. outtime: ""
  96. }
  97. },
  98. methods: {
  99. refresh() {
  100. this.getordersInfo()
  101. },
  102. getordersInfo: async function() {
  103. let res = await this.$request.post("/api/v1/order/orderDetail", {
  104. order_id: this.order_id
  105. }, false)
  106. console.log(res)
  107. if (res.status == 0) {
  108. this.orderInfo = res.data
  109. this.$refs.loadRefresh.loadOver()
  110. console.log(this.orderInfo)
  111. // this.outtime = this.formatDate(this.orderInfo.end_time * 1000)
  112. }
  113. },
  114. }
  115. };
  116. </script>
  117. <style scoped lang="scss">
  118. .main {
  119. min-height: 100vh;
  120. }
  121. .text-leftstyle {
  122. text-align: right;
  123. width: 140rpx;
  124. display: inline-block;
  125. }
  126. .font_style {
  127. color: rgb(51, 51, 51);
  128. }
  129. .footer {
  130. width: 100%;
  131. height: auto;
  132. display: flex;
  133. position: fixed;
  134. bottom: 0;
  135. }
  136. .round {
  137. height: 45rpx;
  138. width: 50rpx;
  139. border-radius: 50%;
  140. background-color: #ececec;
  141. }
  142. .card {
  143. padding: 30rpx 30rpx;
  144. box-sizing: border-box;
  145. .card_view {
  146. width: 100%;
  147. background-color: #ffffff;
  148. border-radius: 15rpx;
  149. .title {
  150. width: 100%;
  151. height: 20vh;
  152. display: flex;
  153. justify-content: center;
  154. align-items: flex-end;
  155. .img {
  156. width: 90%;
  157. height: 90%;
  158. }
  159. }
  160. .describe {
  161. width: 100%;
  162. height: 1;
  163. padding: 100rpx 40rpx 20rpx 40rpx;
  164. }
  165. }
  166. }
  167. .list {
  168. margin: 20rpx 0 10rpx 0;
  169. padding: 20rpx 0;
  170. align-items: center;
  171. display: flex;
  172. width: 100%;
  173. border-radius: 15rpx;
  174. background-color: #FFFFFF;
  175. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.08);
  176. .portrait {
  177. width: 20%;
  178. display: flex;
  179. justify-content: center;
  180. align-items: center;
  181. .img {
  182. width: 100rpx;
  183. height: 100rpx;
  184. border-radius: 50%;
  185. }
  186. .bun_true {
  187. text-align: center;
  188. width: 80rpx;
  189. height: 36rpx;
  190. background-color: #D92975;
  191. margin: 0 10rpx;
  192. border-radius: 60rpx;
  193. position: relative;
  194. top: -20rpx;
  195. font-size: 20rpx;
  196. color: #FFFFFF;
  197. padding: 3rpx 0;
  198. }
  199. .bun_false {
  200. border: 1rpx solid #D92975;
  201. text-align: center;
  202. width: 80rpx;
  203. height: 36rpx;
  204. background-color: #FFFFFF;
  205. margin: 0 10rpx;
  206. border-radius: 60rpx;
  207. position: relative;
  208. top: -20rpx;
  209. font-size: 20rpx;
  210. color: #D92975;
  211. padding: 3rpx 0;
  212. }
  213. }
  214. //文字
  215. .text {
  216. width: 70%;
  217. //名字+标签
  218. .name {
  219. font-size: 30rpx;
  220. font-weight: bold;
  221. display: flex;
  222. align-items: center;
  223. .label {
  224. font-weight: 400;
  225. margin-right: 15rpx;
  226. background-color: #E5F5FF;
  227. color: #0B73B9;
  228. width: 100rpx;
  229. height: 28rpx;
  230. font-size: 20rpx;
  231. border-radius: 10rpx;
  232. text-align: center;
  233. }
  234. }
  235. //科室
  236. .department {
  237. margin-top: 15rpx;
  238. color: #666666;
  239. text {
  240. margin-right: 15rpx;
  241. }
  242. }
  243. // 选项
  244. .option {
  245. display: flex;
  246. view {
  247. background-color: #E4E4E4;
  248. width: 100rpx;
  249. height: 48rpx;
  250. border-radius: 12px;
  251. margin-right: 15rpx;
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. }
  256. }
  257. }
  258. }
  259. </style>