Browse Source

上传

master
前端-胡立永 5 months ago
parent
commit
59fcea1607
2 changed files with 75 additions and 41 deletions
  1. +31
    -11
      pages_order/components/order/orderTypeBtn.vue
  2. +44
    -30
      pages_order/order/orderDetail.vue

+ 31
- 11
pages_order/components/order/orderTypeBtn.vue View File

@ -1,23 +1,26 @@
<template>
<!-- 水洗店的操作按钮 -->
<view class="orderTypeBtn">
<!-- 租赁 -->
<view class="btns" v-if="type==0">
<view class="btn1" @click="confirmReceiveGoods">
确认
<view class="btns" v-if="type == 0">
<view class="btn1"
v-if="status == 2"
@click="confirmReceiveGoods">
确认收货
</view>
<view class="btn2">
<view class="btn2"
v-if="status > 1">
查看物流
</view>
</view>
<!-- 水洗 -->
<view class="btns" v-if="type==1">
<view class="btns" v-if="type == 1">
<!--
水洗订单3待支付 4水洗店接单 5水洗店检查 6开始清洗
-->
<view class="btn1" @click="confirmReceiveGoods">
{{status==3}}
<view class="btn1">
开始清洗
</view>
<!-- <view class="btn2">
@ -54,8 +57,15 @@
<script>
export default {
props: {
type: null,
status: null,
type: {
default : 0,
},
status: {
default : 0,
},
detail : {
default : {}
}
},
data() {
return {
@ -63,7 +73,16 @@
}
},
methods: {
//
confirmReceiveGoods() {
this.$api('orderConfirm', {
id: this.detail.id
}, res => {
if (res.code == 200) {
uni.navigateBack(-1)
}
})
},
}
}
</script>
@ -82,8 +101,9 @@
align-items: center;
color: #fff;
background-color: $uni-color;
padding: 15rpx 40rpx;
padding: 10rpx 30rpx;
border-radius: 40rpx;
font-size: 26rpx;
}
.btn1 {


+ 44
- 30
pages_order/order/orderDetail.vue View File

@ -3,24 +3,29 @@
<navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" />
<!-- 水洗店 -->
<view class="" v-if="userShop">
<view class="">
<view class="controls">
<view class="title">
<image :src="order.pic" mode=""></image>
<!-- 服务完成 -->
{{order.typeDictText}}
</view>
<view class="tips">
<!-- 待送回 -->
{{order.statusDictText}}
</view>
<view class="btns">
<orderTypeBtn :type='order.type' :status='order.status'></orderTypeBtn>
<image src="../static/order/icon.png" mode=""></image>
{{ order.statusDictText }}
</view>
<!-- <view class="tips">
待送回
</view> -->
<orderTypeBtn
:type="order.type"
:status="order.status"
:detail="order"></orderTypeBtn>
</view>
<view class="steps">
<uv-steps activeColor="#FD5100" :current="stepsCurrent" dot>
<uv-steps-item :title="item" :key="index" v-for="(item, index) in steps"></uv-steps-item>
<uv-steps activeColor="#FD5100"
:current="order.status" dot>
<uv-steps-item :title="item"
:key="index"
v-for="(item, index) in steps[order.type] || []">
</uv-steps-item>
</uv-steps>
</view>
</view>
@ -222,11 +227,32 @@
data() {
return {
stepsCurrent: 0,
steps: [
'接单',
'检查',
'开始清洗',
'服务完成',
steps: [//
[//
'客户待支付',
'平台待发货',
'待收货',//
'服务完成',
],
[//
'客户待支付',
'检查破损',//
'开始清洗',//
'服务完成',
],
[//
'下单',
'寄回商品',//
'平台待收货',
'客户待支付',
'服务完成',
],
[//退
'下单',
'寄回商品',//
'平台待收货',
'服务完成',
],
],
order: {},
orderId: 0,
@ -261,18 +287,6 @@
}
})
},
//
confirmReceiveGoods() {
this.$api('orderConfirm', {
id: this.orderId
}, res => {
if (res.code == 200) {
uni.navigateBack({
delta: -1
})
}
})
},
}
}
</script>


Loading…
Cancel
Save