index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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" @click="goUseCoupons">
  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. goUseCoupons(){
  71. uni.navigateTo({
  72. url: 'orderPages/useCoupons/index'
  73. })
  74. },
  75. clickItem(id){
  76. this.serviceProjectId = id
  77. },
  78. addChildProject(){
  79. if (this.id === ''){
  80. uni.$u.toast("请选择服务项目")
  81. }
  82. this.$api.addChildProject({
  83. orderId:this.orderId,
  84. serviceProjectId:this.serviceProjectId,
  85. servicePersonId:this.projects.personId,
  86. serviceStationId:this.serviceStationId,
  87. couponIds:''
  88. }).then(res=>{
  89. uni.navigateTo({
  90. url:'/orderPages/orderDetail/index?id='+ this.orderId
  91. })
  92. })
  93. },
  94. getStationById(qeCode){
  95. this.$api.getStationById({
  96. stationId:qeCode
  97. }).then(res=>{
  98. console.log('++++++++getStationById+++++++++++',res)
  99. this.projects=res.data.data
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. @import '/common/css/common.css';
  107. @import './index.rpx.scss';
  108. </style>