serviceDetail.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="service-detail-container" @click="confirm">
  3. <view class="popup">
  4. <view class="header">
  5. 服务明细
  6. </view>
  7. <view class="detail-list">
  8. <view class="item" v-for="(item,index) in form.serviceDetails" :key="index">
  9. <view class="item_name" style="margin-bottom: 10rpx;">
  10. {{item.itemName}}
  11. </view>
  12. <view class="item_center" v-for="(subRow,subRowIndex) in item.subItem" :key="subRowIndex">
  13. <span><span class="dots"></span>{{subRow.itemContent}}</span>
  14. <span class="item_price"><text>¥</text>{{subRow.itemPrice}}</span>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="total-section">
  19. <text class="total-text">服务总计:</text>
  20. <text class="total-price">¥{{form.amount}}</text>
  21. </view>
  22. <button class="confirm-btn" @click="confirm">确定</button>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'serviceDetail',
  29. props:{
  30. subOrderId:{
  31. type:String,
  32. default:''
  33. }
  34. },
  35. data(){
  36. return{
  37. form:{},
  38. }
  39. },
  40. methods: {
  41. confirm() {
  42. this.$emit('cut')
  43. },
  44. getDetail(){
  45. this.$http.get("/ts/merchant/servicesDetails?subOrderId="+this.subOrderId+'&delFlag='+0).then(res => {
  46. console.log(res)
  47. if (res.data.code == 200) {
  48. this.form = res.data.result
  49. }
  50. })
  51. }
  52. },
  53. mounted() {
  54. this.getDetail()
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. /* 页面整体样式 */
  60. .service-detail-container {
  61. position: fixed;
  62. top: 0;
  63. left: 0;
  64. background: rgba(0, 0, 0, 0.7);
  65. width: 100%;
  66. // height: calc(100vh - 100rpx);
  67. height: 100vh;
  68. display: flex;
  69. align-items: end;
  70. z-index: 999;
  71. }
  72. .popup {
  73. width: 100%;
  74. background-color: #fff;
  75. padding: 24rpx 26rpx;
  76. border-radius: 20rpx 20rpx 0px 0px;
  77. }
  78. /* 头部标题 */
  79. .header {
  80. margin-bottom: 20rpx;
  81. font-size: 28rpx;
  82. font-weight: bold;
  83. color: #333;
  84. text-align: center;
  85. border-bottom: 1px solid #eeeeee;
  86. padding-bottom: 20rpx;
  87. }
  88. /* 明细列表样式 */
  89. .detail-list {
  90. background-color: #fff;
  91. border-radius: 10px;
  92. padding: 0 15px;
  93. margin-bottom: 15px;
  94. .item{
  95. width: 100%;
  96. background: #F7F8FC;
  97. border-radius: 12rpx;
  98. padding: 12rpx 24rpx;
  99. margin-bottom: 16rpx;
  100. .item_name{
  101. font-size: 26rpx;
  102. color: #333333;
  103. font-weight: 600;
  104. }
  105. .item_center{
  106. display: flex;
  107. align-items: center;
  108. justify-content: space-between;
  109. .dots{
  110. width: 10rpx;
  111. height: 10rpx;
  112. background-color: #85868A;
  113. border-radius: 50%;
  114. display: inline-block;
  115. margin-right: 10rpx;
  116. margin-bottom: 4rpx;
  117. }
  118. span{
  119. font-size: 24rpx;
  120. color: #888888;
  121. }
  122. .item_price{
  123. font-size: 24rpx;
  124. font-weight: 600;
  125. color: #000;
  126. margin-left: 46rpx;
  127. text{
  128. font-size: 20rpx;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. /* 总计部分 */
  135. .total-section {
  136. display: flex;
  137. justify-content: space-between;
  138. background-color: #fff;
  139. padding: 15px;
  140. border-radius: 10px;
  141. }
  142. .total-text {
  143. font-size: 30rpx;
  144. color: #333;
  145. font-weight: 600;
  146. }
  147. .total-price {
  148. font-size: 16px;
  149. color: #f56c6c;
  150. font-weight: bold;
  151. }
  152. /* 确认按钮 */
  153. .confirm-btn {
  154. background-color: #409eff;
  155. color: #fff;
  156. border-radius: 6px;
  157. font-size: 16px;
  158. border: none;
  159. height: 44px;
  160. line-height: 44px;
  161. }
  162. .confirm-btn:active {
  163. background-color: #3a8ee6;
  164. }
  165. </style>