feat: 师傅拒接支持填写原因、订单详情页增加订单状态阶段数据
This commit is contained in:
parent
4664d43c79
commit
2b69628ce7
41
pages.json
41
pages.json
|
|
@ -40,32 +40,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/order/order-submit",
|
"path" : "pages/order/select-time",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "提交"
|
"navigationBarTitleText" : "已和客户沟通"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/order/arrived-on-site",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "完成上门"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/order/complete-service",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "完成服务"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/order/select-time",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "已和客户沟通"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/order/arrived-on-site",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "完成上门"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path" : "pages/order/complete-service",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "完成服务"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,33 @@
|
||||||
<view class="value flex-l">{{data.remark ? data.remark : '无备注信息'}}</view>
|
<view class="value flex-l">{{data.remark ? data.remark : '无备注信息'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 已拒接-->
|
||||||
|
<view class="info" v-if="data.status === enums.ORDER_DISPATCH_STATUS.STATUS_REFUSED">
|
||||||
|
<view class="item-multi-line">
|
||||||
|
<view class="title flex-l">拒接原因</view>
|
||||||
|
<view class="value flex-l">{{data.reject_reason ? data.reject_reason : '未填写原因'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 已上门-->
|
||||||
|
<view class="info" v-if="[enums.ORDER_DISPATCH_STATUS.STATUS_CLOCK, enums.ORDER_DISPATCH_STATUS.STATUS_FINISH].includes(data.status)">
|
||||||
|
<view class="item-row flex-sb line-after">
|
||||||
|
<view class="title flex-l">上门时间</view>
|
||||||
|
<view class="value flex-r">
|
||||||
|
<text>{{data.arrive_time}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="images">
|
||||||
|
<view class="title flex-l">上门图片</view>
|
||||||
|
<view class="imgs-ctr">
|
||||||
|
<view @click="previewImage(imgUrl)" v-for="(imgUrl, index) in data.arrive_images" :key="index" class="img-ctr" :style="{marginRight: (index+1) % 5 === 0 ? '0' : '36rpx'}">
|
||||||
|
<image class="img" mode="aspectFill" :src="imgUrl"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<me-empty-space height="376"></me-empty-space>
|
<me-empty-space height="376"></me-empty-space>
|
||||||
|
|
||||||
<!-- 待接单-->
|
<!-- 待接单-->
|
||||||
|
|
@ -134,10 +161,11 @@ const rejectOrder = () => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '拒接提示',
|
title: '拒接提示',
|
||||||
confirmText: '确认',
|
confirmText: '确认',
|
||||||
content: '确认拒接该单?',
|
editable: true,
|
||||||
|
placeholderText: '请输入拒接原因',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
api.orderConfirm({type: 'reject', order_dispatch_id: id.value}).then(() => {
|
api.orderConfirm({type: 'reject', order_dispatch_id: id.value, reject_reason: res.content}).then(() => {
|
||||||
helpers.showToast('已拒接')
|
helpers.showToast('已拒接')
|
||||||
init()
|
init()
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
|
|
@ -146,10 +174,6 @@ const rejectOrder = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const submit = () => {
|
|
||||||
helpers.jumpToPage('order-submit')
|
|
||||||
}
|
|
||||||
|
|
||||||
const id = ref(null)
|
const id = ref(null)
|
||||||
onLoad((params) => {
|
onLoad((params) => {
|
||||||
id.value = params.id
|
id.value = params.id
|
||||||
|
|
@ -185,6 +209,21 @@ const getPriceDescText = () => {
|
||||||
const getOrderStatusText = (status) => {
|
const getOrderStatusText = (status) => {
|
||||||
return enums.WORKBENCH_STATUS_TEXT[status]
|
return enums.WORKBENCH_STATUS_TEXT[status]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//预览图片
|
||||||
|
const previewImage = (url) => {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ['发送给朋友', '保存图片', '收藏'],
|
||||||
|
success: function(data) {
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
console.log(err.errMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -217,6 +256,7 @@ const getOrderStatusText = (status) => {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
.item-row {
|
.item-row {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|
@ -261,6 +301,47 @@ const getOrderStatusText = (status) => {
|
||||||
line-height: 48rpx;
|
line-height: 48rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.images {
|
||||||
|
width: 100%;
|
||||||
|
.title {
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: var(--summaryColor);
|
||||||
|
}
|
||||||
|
.imgs-ctr {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.img-ctr {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
margin-right: 36rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.up-ctr {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background: var(--contentBgColor);
|
||||||
|
border-radius: 8rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
.up {
|
||||||
|
width: 100%;
|
||||||
|
height: 36rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: var(--summaryColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.bottom {
|
.bottom {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ class helpers {
|
||||||
'login': '/pages/user/login',
|
'login': '/pages/user/login',
|
||||||
//订单详情
|
//订单详情
|
||||||
'order-info': '/pages/order/order-info',
|
'order-info': '/pages/order/order-info',
|
||||||
//提交订单
|
|
||||||
'order-submit': '/pages/order/order-submit',
|
|
||||||
//首页
|
//首页
|
||||||
'index': '/pages/index/index',
|
'index': '/pages/index/index',
|
||||||
//选择上门时间
|
//选择上门时间
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user