settlement.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <view style="width: 100%;height: 100%" >
  3. <view class="common-page">
  4. <view class="header-box" :style="{
  5. paddingBottom: '30rpx',
  6. }" id="headerBox" ref="headerBox">
  7. <view class="navbar-box display-flex-content-center" :style="{
  8. height: `${topData.height}px`,
  9. paddingTop: `${topData.top}px`,
  10. paddingBottom: '40rpx',
  11. color: '#666666',
  12. fontSize: '34rpx',
  13. fontWeight: 'bold'
  14. }">
  15. <view @click="toHome" style="position: absolute;left:-3rpx">
  16. <u-icon size="20" name="arrow-left" color="#666666"></u-icon>
  17. </view>
  18. <text></text>
  19. </view>
  20. <view class="success-con fs16">
  21. <view class="display-flex-content-center">
  22. <u-icon size="50rpx" name="checkmark-circle-fill" color="#E2B98E" ></u-icon>
  23. <text class="fw700 ml5 success-title-text">支付成功</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="list-item display-flex-content-center mt10" style="position: relative">
  28. <image
  29. :src="orderInfo.goods_cover"
  30. class="course-image"
  31. ></image>
  32. <view class="list-item-content ml15">
  33. <view class="list-item-content-title mb6">
  34. {{ orderInfo.goods_name }}
  35. </view>
  36. <view class="list-item-content-read display-flex">
  37. <text class="fw700 color-333 fs11 ">¥
  38. <text class="fw700 color-333 fs16 mb8">{{ orderInfo.amount_total }}</text>
  39. </text>
  40. </view>
  41. </view>
  42. <view class="fs12 lh18" style="position: absolute;right: 30rpx;bottom: 30rpx;color: #C29556 ">已支付</view>
  43. </view>
  44. <view class="display-flex mt15 mb10">
  45. <view class="tubiao mr10">
  46. </view>
  47. <view class="title">
  48. 预约信息
  49. </view>
  50. </view>
  51. <view class="list-item">
  52. <view class="display-flex-between" >
  53. <text class="left-title">预约人</text>
  54. <view class="h-view">
  55. {{orderInfo.user_name}}
  56. </view>
  57. </view>
  58. <u-divider ></u-divider>
  59. <view class="display-flex-between" >
  60. <text class="left-title">技师</text>
  61. <view class="h-view" :style="[{color:'#333333',fontSize: '15px'}]">
  62. {{orderInfo.tech_name || ""}}
  63. </view>
  64. </view>
  65. <u-divider ></u-divider>
  66. <view class="display-flex-between" >
  67. <text class="left-title">联系方式</text>
  68. <view class="h-view" >
  69. {{orderInfo.user_phone}}
  70. </view>
  71. </view>
  72. <u-divider ></u-divider>
  73. <view class="display-flex-between" >
  74. <text class="left-title">人数</text>
  75. <view class="h-view">
  76. {{orderInfo.order_num}}人
  77. </view>
  78. </view>
  79. <u-divider ></u-divider>
  80. <view class="display-flex-between" >
  81. <text class="left-title">预约时间</text>
  82. <view class="h-view">
  83. {{orderInfo.order_date}} &nbsp;{{orderInfo.order_time}}
  84. </view>
  85. </view>
  86. <u-divider ></u-divider>
  87. <view class="display-flex-between" >
  88. <text class="left-title">备注</text>
  89. <view class="h-view">
  90. {{orderInfo.order_remark}}
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="bottom-navigation">
  96. <view class="activity-button" :style="{background:'#F9F2E6',color:'#C29556',border: '1rpx solid #F9F2E6'}" @click="yvyueOrderCancel()">取消预约订单</view>
  97. <view class="activity-button" @click="setyvyueOrder()">修改预约信息</view>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. import {getGoodsDetail} from "@/common/api";
  103. import {getYvyueOrderInfo,yvyueOrderCancel} from "@/common/api/yvyeService";
  104. export default {
  105. data() {
  106. return {
  107. courseInfo: {},
  108. orderInfo: {},
  109. orderId: 0,
  110. order_no:"",
  111. goods_code:"",
  112. topData: {
  113. top: 0,
  114. height: 0
  115. },
  116. }
  117. },
  118. onLoad(options) {
  119. this.goods_code = options.code
  120. this.orderId = options.orderId
  121. },
  122. onShow() {
  123. // this.getCourseDetail()
  124. this.getYvyueOrderInfo()
  125. const topData = uni.getMenuButtonBoundingClientRect()
  126. this.topData.top = topData.top
  127. this.topData.height = topData.height
  128. },
  129. methods: {
  130. getCourseDetail() {
  131. getGoodsDetail({goods_code: this.goods_code}).then(({data}) => {
  132. this.courseInfo = data.goods
  133. });
  134. },
  135. getYvyueOrderInfo() {
  136. getYvyueOrderInfo({id: this.orderId}).then(({data}) => {
  137. this.orderInfo = data
  138. this.order_no=data.order_no
  139. });
  140. },
  141. yvyueOrderCancel() {
  142. yvyueOrderCancel({order_no: this.order_no}).then(({data}) => {
  143. uni.showToast({
  144. title:"取消成功",
  145. icon: 'none'
  146. })
  147. uni.navigateBack({
  148. delta: 1
  149. })
  150. });
  151. },
  152. setyvyueOrder() {
  153. uni.navigateTo({
  154. url: `/subPages/service/serviceSave?code=${this.goods_code}&setid=${this.orderId}`
  155. })
  156. },
  157. toHome() {
  158. uni.navigateBack({
  159. delta: 1
  160. })
  161. },
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. .common-page {
  167. height: 100vh;
  168. overflow-y: auto;
  169. padding: 30rpx;
  170. color: #2C2C2C;
  171. padding-bottom: 188rpx;
  172. box-sizing: border-box;
  173. background-color: #F8F9FA;
  174. .list-item {
  175. background: #FFFFFF;
  176. border-radius: 16rpx 16rpx 16rpx 16rpx;
  177. width: calc(100% - 54rpx);
  178. padding: 30rpx 27rpx;
  179. &-content {
  180. width: calc(100% - 210rpx);
  181. &-title {
  182. width: 100%;
  183. font-family: PingFang SC, PingFang SC;
  184. font-weight: 400;
  185. font-size: 28rpx;
  186. color: #333333;
  187. line-height: 40rpx;
  188. text-align: left;
  189. font-style: normal;
  190. text-transform: none;
  191. white-space: nowrap; /* 防止文本换行 */
  192. overflow: hidden; /* 隐藏溢出的文本 */
  193. text-overflow: ellipsis;
  194. }
  195. }
  196. .course-image {
  197. width: 176rpx;
  198. height: 176rpx;
  199. border-radius: 10rpx;
  200. }
  201. .h-view {
  202. flex: 1;
  203. display: flex;
  204. flex-direction: row;
  205. justify-content: flex-end;
  206. align-items: center;
  207. }
  208. .left-title {
  209. font-size: 28rpx;
  210. }
  211. }
  212. }
  213. .tubiao {
  214. width: 6rpx;
  215. height: 28rpx;
  216. background: #C29556;
  217. border-radius: 0rpx 0rpx 0rpx 0rpx;
  218. }
  219. .title {
  220. font-weight: 500;
  221. font-size: 28rpx;
  222. color: #333333;
  223. line-height: 40rpx;
  224. text-align: left;
  225. font-style: normal;
  226. text-transform: none;
  227. }
  228. .navbar-box {
  229. position: relative;
  230. }
  231. .success-title-text{
  232. font-family: PingFang SC, PingFang SC;
  233. font-weight: 400;
  234. font-size: 40rpx;
  235. color: #333333;
  236. line-height: 50rpx;
  237. text-align: center;
  238. font-style: normal;
  239. text-transform: none;
  240. // 加粗
  241. font-weight: bold;
  242. }
  243. .bottom-navigation{
  244. position: fixed;
  245. // 文字垂直居中
  246. display: flex;
  247. align-items: center;
  248. bottom: 0;
  249. height: 100rpx;
  250. width: calc(100% - 40rpx);
  251. background: #FFFFFF;
  252. box-shadow: 0rpx -2rpx 0rpx 0rpx #F1F3F6;
  253. border-radius: 24rpx 24rpx 0rpx 0rpx;
  254. border: 0rpx solid #979797;
  255. padding: 20rpx 20rpx 68rpx 20rpx ;
  256. z-index: 2;
  257. .activity-button {
  258. width: 336rpx;
  259. height: 84rpx;
  260. background: linear-gradient(315deg, #CA9359 0%, #E2B98E 100%);
  261. border-radius: 292rpx 292rpx 292rpx 292rpx;
  262. font-family: PingFang SC, PingFang SC;
  263. font-weight: 400;
  264. font-size: 28rpx;
  265. color: #FFFFFF;
  266. line-height: 36rpx;
  267. text-align: center;
  268. font-style: normal;
  269. text-transform: none;
  270. // 文字垂直居中
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. margin: 1rpx 9rpx;
  275. }
  276. }
  277. </style>