feat: 师傅拒接支持填写原因、订单详情页增加订单状态阶段数据

This commit is contained in:
苟川东 2025-04-19 23:44:50 +08:00
parent 4664d43c79
commit 2b69628ce7
3 changed files with 104 additions and 32 deletions

View File

@ -40,32 +40,25 @@
}
},
{
"path" : "pages/order/order-submit",
"style" :
"path" : "pages/order/select-time",
"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": {

View File

@ -48,6 +48,33 @@
<view class="value flex-l">{{data.remark ? data.remark : '无备注信息'}}</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>
<!-- 待接单-->
@ -134,10 +161,11 @@ const rejectOrder = () => {
uni.showModal({
title: '拒接提示',
confirmText: '确认',
content: '确认拒接该单?',
editable: true,
placeholderText: '请输入拒接原因',
success: function (res) {
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('已拒接')
init()
}).catch(() => {})
@ -146,10 +174,6 @@ const rejectOrder = () => {
});
}
const submit = () => {
helpers.jumpToPage('order-submit')
}
const id = ref(null)
onLoad((params) => {
id.value = params.id
@ -185,6 +209,21 @@ const getPriceDescText = () => {
const getOrderStatusText = (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>
<style lang="scss" scoped>
@ -217,6 +256,7 @@ const getOrderStatusText = (status) => {
border-radius: 16rpx;
padding: 20rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
.item-row {
width: 100%;
height: 80rpx;
@ -261,6 +301,47 @@ const getOrderStatusText = (status) => {
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 {
width: 100%;

View File

@ -17,8 +17,6 @@ class helpers {
'login': '/pages/user/login',
//订单详情
'order-info': '/pages/order/order-info',
//提交订单
'order-submit': '/pages/order/order-submit',
//首页
'index': '/pages/index/index',
//选择上门时间