appointmentInfo.vue 7.3 KB

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