| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view class="content">
- <view class="page">
- <view class="block_2 flex-row justify-start" v-for="(item,index) in projects.projectVos" :key="index" @click="clickItem(item)">
- <view class="flex-col justify-center ">
- <u-icon v-if="item.id === serviceProjectId" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
- <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
- </view>
- <view class="outView ">
- <text lines="1" class="text_3">{{item.serviceName}}</text>
- <view class="group_2 ">
- <view class="image-text_2">
- <u-icon name="server-man" size="16"></u-icon>
- <text lines="1" class="text-group_2">服务人员:</text>
- <text lines="1" class="text_5">{{projects.personName}}</text>
- </view>
- <!-- <view class="group_3">-->
- <!-- <u-icon name="clock" size="16"></u-icon>-->
- <!-- <text lines="1" class="text-group_2">服务时间:</text>-->
- <!-- <text lines="1" decode="true" class="text_5">2023-8-14 12:33:55</text>-->
- <!-- </view>-->
- </view>
- <view class="text-wrapper_3 flex-row justify-start">
- <text lines="1" class="text_7">标准价:</text>
- <text lines="1" class="text_8">¥{{item.standardPrice}}</text>
- <!-- <text lines="1" class="text_9 text_7">会员价:</text>-->
- <!-- <text lines="1" class="text_8">¥{{item.memberPrice}}</text>-->
- </view>
- <view class="box_4"></view>
- </view>
- </view>
- <view class="tabBarLineHeight"></view>
- <view class="bottomView ">
- <view class="flex-row justify-center" @click="goUseCoupons">
- <view class="block_3 ">
- <text lines="1" class="text_15">优惠券</text>
- <view>
- <view class="flex-row justify-between" v-if="coupons.length>0">
- <view class="flex-row">
- <text class="text-group_5" v-for="(iter,i) in coupons" :key="i">{{iter.name}}:-¥{{iter.discountsPrice}}</text>
- </view>
- <u-icon name="arrow-right" color="#666" size="18"></u-icon>
- </view>
- <view v-else class="image-text_4 ">
- <text class="text-group_4">未选择</text>
- <u-icon name="arrow-right" color="#666" size="18"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <view class="flex-row justify-center">
- <view class="submitButton" @click="addChildProject">确定</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- components: {
- },
- data() {
- return {
- coupons:[],
- couponIds:'',
- tabIndex: 3,
- projects:{},
- serviceStationId:'',
- orderId:'',
- serviceProject:{},
- serviceProjectId:'',
- }
- },
- onLoad(e) {
- this.orderId=e.orderId
- this.serviceStationId=e.serviceStationId
- this.getStationById(e.serviceStationId)
- uni.$off('getUseCoupons')
- uni.$on('getUseCoupons',this.getUseCoupons)
- },
- methods: {
- getUseCoupons(e){
- console.log('++++++++getUseCoupons+++++++++++++++',e)
- this.coupons= e
- this.couponIds = ''
- for (let eElement of e) {
- this.couponIds += eElement.id + ','
- }
- if (this.couponIds.length>0){
- this.couponIds = this.couponIds.substring(0,this.couponIds.length-1)
- }
- },
- goUseCoupons(){
- if (this.serviceProjectId.length === 0){
- uni.$u.toast('请先选择服务项目')
- return
- }
- uni.navigateTo({
- url: '/orderPages/useCoupons/index?standardPrice='+this.serviceProject.standardPrice
- })
- },
- clickItem(item){
- this.serviceProjectId = item.id
- this.serviceProject = item
- },
- addChildProject(){
- if (this.id === ''){
- uni.$u.toast("请选择服务项目")
- }
- this.$api.addChildProject({
- orderId:this.orderId,
- serviceProjectId:this.serviceProjectId,
- servicePersonId:this.projects.personId,
- serviceStationId:this.serviceStationId,
- couponIds:this.couponIds
- }).then(res=>{
- uni.navigateTo({
- url:'/orderPages/orderDetail/index?id='+ this.orderId
- })
- })
- },
- getStationById(qeCode){
- this.$api.getStationById({
- stationId:qeCode
- }).then(res=>{
- console.log('++++++++getStationById+++++++++++',res)
- this.projects=res.data.data
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- @import '/common/css/common.css';
- @import './index.rpx.scss';
- </style>
|