index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view class="page">
  3. <view class="state ">
  4. <view class="flex-row justify-center">
  5. <u-icon name="cut" color="#93D21A" size="18"></u-icon>
  6. <text>{{order.orderStatusDesc}}</text>
  7. </view>
  8. <view class="box_4 flex-row justify-center">
  9. <text>{{order.orderDesc}}</text>
  10. </view>
  11. </view>
  12. <view class="detail">
  13. <view class="serviceAttrDesc">
  14. <text>{{order.serviceAttrDesc}}</text>
  15. </view>
  16. <view class="flex-row justify-start">
  17. <u-icon name="/static/index/u217.png" color="#93D21A" size="18"></u-icon>
  18. <text class="key">订单编号:</text>
  19. <text class="value">{{order.orderNo}}</text>
  20. </view>
  21. <view>
  22. <text class="serviceType">{{order.serviceType}}</text>
  23. </view>
  24. <view class="flex-row justify-between">
  25. <view class="flex-col">
  26. <view class=" flex-row">
  27. <u-icon name="/static/order/ud1.png" color="#93D21A" size="18"></u-icon>
  28. <text class="key">服务对象:</text>
  29. <text class="value">{{order.serviceObjectName}}</text>
  30. </view>
  31. <view class="flex-row">
  32. <u-icon name="/static/order/ud2.png" color="#93D21A" size="18"></u-icon>
  33. <text class="key">服务门店:</text>
  34. <text class="value">{{order.storeName}}</text>
  35. </view>
  36. <view class="flex-row">
  37. <u-icon name="clock" size="16"></u-icon>
  38. <text class="key">下单时间:</text>
  39. <text class="value">{{order.createTime}}</text>
  40. </view>
  41. </view>
  42. <view class="flex-col">
  43. <view class="planNumber flex-row justify-center">
  44. <text>{{order.planNumber}}</text>
  45. </view>
  46. <view class="plan flex-row justify-center">
  47. <text class="plan">排号</text>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="flex-row justify-center">
  52. <view class="scan flex-row justify-center">
  53. <u-icon name="scan" size="18"></u-icon>
  54. <text>扫码</text>
  55. </view>
  56. </view>
  57. <view class="line"></view>
  58. <view class="flex-row justify-between borderBottom" v-for="(item,index) in order.child" :key="index">
  59. <view class="flex-col justify-center">
  60. <u-icon v-if="item.tick" name="checkmark-circle-fill" color="#38db38" size="20" @click="tick(item,index)"></u-icon>
  61. <u-icon v-else name="/static/order/ud9.png" color="green" size="20" @click="tick(item,index)"></u-icon>
  62. </view>
  63. <view class="flex-col right">
  64. <view class="flex-row justify-between">
  65. <text class="serviceType">{{item.serviceName}}</text>
  66. <text class="projectState">{{item.statusDesc}}</text>
  67. </view>
  68. <view class="box_11">
  69. <view class="group_2"></view>
  70. <view class="group_3">
  71. <view class="flex-row">
  72. <u-icon name="server-man" size="16"></u-icon>
  73. <text class="key">服务人员:</text>
  74. <text class="value">{{item.servicePerson || ''}}</text>
  75. </view>
  76. <view class="flex-row">
  77. <u-icon name="clock" size="16"></u-icon>
  78. <text class="key">服务时间:</text>
  79. <text class="value">{{item.serviceTime || ''}}</text>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="flex-row justify-between">
  84. <view>
  85. <text class="key">金额:</text>
  86. <text class="projectMoney">¥{{item.servicePrice}}</text>
  87. </view>
  88. <view class="flex-row" v-if="item.status === 1" @click="appeal(item.orderServiceId)">
  89. <u-icon name="/static/order/ud17.png" color="#93D21A" size="18"></u-icon>
  90. <text class="key">申诉</text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="bottomHeight"></view>
  97. <view class="bottom flex-col">
  98. <text class="allMoney">合计价格:¥{{allPrice}}</text>
  99. <view class="bottomBtn flex-row justify-between">
  100. <view class=" flex-row">
  101. <text class="unpaid">待支付</text>
  102. <text class="preferentialPrice">¥{{allPrice}}</text>
  103. <text class="originalPrice">¥{{allPrice}}</text>
  104. <text class="priceDetail">价格明细</text>
  105. </view>
  106. <view class="btn" @click="">
  107. <text lines="1" class="text_33">提交</text>
  108. </view>
  109. </view>
  110. </view>
  111. <uni-popup ref="appealPopup" :animation="false" :catchtouchmove="true">
  112. <view class="appealView flex-col justify-around">
  113. <view class="popupTitle">
  114. <text>请输入申诉理由</text>
  115. </view>
  116. <view class="lex-row justify-center">
  117. <textarea class="textarea" v-model="appealReason" placeholder="请输入申诉理由"></textarea>
  118. </view>
  119. <view class="flex-row justify-around">
  120. <view class="leftBtn" @click="appealPopupClose">
  121. <text>取消</text>
  122. </view>
  123. <view class="rightBtn" @click="commitAppeal">
  124. <text>确定</text>
  125. </view>
  126. </view>
  127. </view>
  128. </uni-popup>
  129. </view>
  130. </template>
  131. <script>
  132. import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup";
  133. export default {
  134. components: {
  135. UniPopup
  136. },
  137. data() {
  138. return {
  139. title: 'Hello',
  140. tabIndex: 3,
  141. order:{},
  142. allPrice:0,
  143. appealId:'',
  144. appealReason:'',
  145. orderId:''
  146. }
  147. },
  148. onLoad(e) {
  149. this.orderId = e.id
  150. this.getOrderDetailByOrderId(e.id)
  151. },
  152. methods: {
  153. commitAppeal(){
  154. this.$api.appeal({
  155. childOrderId:this.appealId,
  156. appealReason:this.appealReason
  157. }).then(res=>{
  158. this.appealReason=''
  159. uni.$u.toast('申诉已提交')
  160. this.$refs.appealPopup.close()
  161. this.getOrderDetailByOrderId(this.orderId)
  162. })
  163. },
  164. appealPopupClose(){
  165. this.appealReason=''
  166. this.$refs.appealPopup.close()
  167. },
  168. appeal(id){
  169. this.appealId = id
  170. this.$refs.appealPopup.open()
  171. },
  172. tick(item,index){
  173. if (item.status === 1 || item.status === 4){
  174. this.allPrice = 0
  175. item.tick = !item.tick
  176. this.$set(this.order.child,index,item)
  177. this.order.child.forEach(i=>{
  178. if (i.tick){
  179. this.allPrice += i.servicePrice *1
  180. }
  181. })
  182. this.allPrice = this.allPrice.toFixed(2)
  183. }
  184. },
  185. getOrderDetailByOrderId(id){
  186. this.$api.getOrderDetailByOrderId({
  187. id:id
  188. }).then(res=>{
  189. this.order= res.data.data
  190. })
  191. }
  192. }
  193. }
  194. </script>
  195. <style>
  196. @import '/common/css/common.css';
  197. @import './index.rpx.scss';</style>