index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="content">
  3. <view class="page">
  4. <view class="block_2 flex-row justify-start" v-for="(item,index) in projects.projectVos" :key="index" @click="clickItem(item.id)">
  5. <view class="flex-col justify-center ">
  6. <u-icon v-if="item.id === serviceProjectId" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
  7. <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
  8. </view>
  9. <view class="outView ">
  10. <text lines="1" class="text_3">{{item.serviceName}}</text>
  11. <view class="group_2 ">
  12. <view class="image-text_2">
  13. <u-icon name="server-man" size="16"></u-icon>
  14. <text lines="1" class="text-group_2">服务人员:</text>
  15. <text lines="1" class="text_5">{{projects.personName}}</text>
  16. </view>
  17. <view class="group_3">
  18. <u-icon name="clock" size="16"></u-icon>
  19. <text lines="1" class="text-group_2">服务时间:</text>
  20. <text lines="1" decode="true" class="text_5">2023-8-14&nbsp;12:33:55</text>
  21. </view>
  22. </view>
  23. <view class="text-wrapper_3 flex-row justify-start">
  24. <text lines="1" class="text_7">标准价:</text>
  25. <text lines="1" class="text_8">¥{{item.standardPrice}}</text>
  26. <text lines="1" class="text_9 text_7">会员价:</text>
  27. <text lines="1" class="text_8">¥{{item.memberPrice}}</text>
  28. </view>
  29. <view class="box_4"></view>
  30. </view>
  31. </view>
  32. <view class="tabBarLineHeight"></view>
  33. <view class="bottomView ">
  34. <view class="flex-row justify-center">
  35. <view class="block_3 ">
  36. <text lines="1" class="text_15">优惠券</text>
  37. <view class="image-text_4">
  38. <text lines="1" class="text-group_4">未选择</text>
  39. <u-icon name="arrow-right" color="#666" size="18"></u-icon>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="flex-row justify-center">
  44. <view class="submitButton" @click="addChildProject">确定</view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. components: {
  53. },
  54. data() {
  55. return {
  56. title: 'Hello',
  57. tabIndex: 3,
  58. projects:{},
  59. serviceStationId:'',
  60. orderId:'',
  61. serviceProjectId:''
  62. }
  63. },
  64. onLoad(e) {
  65. this.orderId=e.orderId
  66. this.serviceStationId=e.serviceStationId
  67. this.getStationById(e.serviceStationId)
  68. },
  69. methods: {
  70. clickItem(id){
  71. this.serviceProjectId = id
  72. },
  73. addChildProject(){
  74. if (this.id === ''){
  75. uni.$u.toast("请选择服务项目")
  76. }
  77. this.$api.addChildProject({
  78. orderId:this.orderId,
  79. serviceProjectId:this.serviceProjectId,
  80. servicePersonId:this.projects.personId,
  81. serviceStationId:this.serviceStationId,
  82. couponIds:''
  83. }).then(res=>{
  84. uni.navigateTo({
  85. url:'/orderPages/orderDetail/index?id='+ this.orderId
  86. })
  87. })
  88. },
  89. getStationById(qeCode){
  90. this.$api.getStationById({
  91. stationId:qeCode
  92. }).then(res=>{
  93. console.log('++++++++getStationById+++++++++++',res)
  94. this.projects=res.data.data
  95. })
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. @import '/common/css/common.css';
  102. @import './index.rpx.scss';
  103. </style>