售后金额校验修改成主单金额;主订单列表展示总加价及加价后的总金额,点击进入订单详情展示各个子单的加价记录;订单状态合并;

This commit is contained in:
donqi 2022-10-06 17:50:56 +08:00
parent eef33e9e7e
commit de74d28e12
5 changed files with 81 additions and 56 deletions

View File

@ -11,9 +11,9 @@ export default {
title: '加载中' title: '加载中'
}) })
// request 触发前拼接 url // request 触发前拼接 url
args.url = 'https://www.opsoul.com' + args.url; // args.url = 'https://www.opsoul.com' + args.url;
// args.url = 'http://192.168.2.20:80' + args.url; // args.url = 'http://192.168.2.20:80' + args.url;
// args.url = 'http://127.0.0.1:80' + args.url; args.url = 'http://127.0.0.1:80' + args.url;
if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') { if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') {
args.data.deptId = globalData.deptId; args.data.deptId = globalData.deptId;
args.data.from = globalData.from; args.data.from = globalData.from;

View File

@ -82,7 +82,7 @@
</view> </view>
<text>待付款</text> <text>待付款</text>
</view> </view>
<view class="cu-item" @click="showMyOrders(servOrderTabList, 1, servOrderType)"> <!-- <view class="cu-item" @click="showMyOrders(servOrderTabList, 1, servOrderType)">
<view class="cuIcon-list"> <view class="cuIcon-list">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Serv > 0"> <view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Serv > 0">
<block>{{myInfo.serOrderNum.wait2Serv}}</block> <block>{{myInfo.serOrderNum.wait2Serv}}</block>
@ -105,24 +105,32 @@
</view> </view>
</view> </view>
<text>待上门</text> <text>待上门</text>
</view> -->
<view class="cu-item" @click="showMyOrders(servOrderTabList, 1, servOrderType)">
<view class="cuIcon-repair">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.processing > 0">
<block>{{myInfo.serOrderNum.processing}}</block>
</view> </view>
<view class="cu-item" @click="showMyOrders(servOrderTabList, 4, servOrderType)"> </view>
<text>待服务</text>
</view>
<view class="cu-item" @click="showMyOrders(servOrderTabList, 2, servOrderType)">
<view class="cuIcon-comment"> <view class="cuIcon-comment">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0"> <view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0">
<block>{{myInfo.serOrderNum.afterServ}}</block> <block>{{myInfo.serOrderNum.afterServ}}</block>
</view> </view>
</view> </view>
<text>服务</text> <text>进行</text>
</view> </view>
<view class="cu-item" @click="showMyOrders(servOrderTabList, 5, servOrderType)"> <!-- <view class="cu-item" @click="showMyOrders(servOrderTabList, 3, servOrderType)">
<view class="cuIcon-notice"> <view class="cuIcon-notice">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0"> <view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0">
<block>{{myInfo.serOrderNum.afterServ}}</block> <block>{{myInfo.serOrderNum.afterServ}}</block>
</view> </view>
</view> </view>
<text>确认</text> <text>确认</text>
</view> </view> -->
<view class="cu-item" @click="showMyOrders(servOrderTabList, 6, servOrderType)"> <view class="cu-item" @click="showMyOrders(servOrderTabList, 3, servOrderType)">
<view class="cuIcon-service"> <view class="cuIcon-service">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0"> <view class="cu-tag badge" v-if="myInfo.serOrderNum.afterServ > 0">
<block>{{myInfo.serOrderNum.afterServ}}</block> <block>{{myInfo.serOrderNum.afterServ}}</block>
@ -130,7 +138,7 @@
</view> </view>
<text>售后中</text> <text>售后中</text>
</view> </view>
<view class="cu-item" @click="showMyOrders(servOrderTabList, 7, servOrderType)"> <view class="cu-item" @click="showMyOrders(servOrderTabList, 4, servOrderType)">
<view class="cuIcon-forward"> <view class="cuIcon-forward">
<view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Forward > 0"> <view class="cu-tag badge" v-if="myInfo.serOrderNum.wait2Forward > 0">
<block>{{myInfo.serOrderNum.wait2Forward}}</block> <block>{{myInfo.serOrderNum.wait2Forward}}</block>
@ -300,22 +308,29 @@
servOrderTabList: [{ servOrderTabList: [{
// type: -1, // type: -1,
name: '待付款' name: '待付款'
},
// {
// type: 0,
// name: ''
// }, {
// type: 1,
// name: ''
// }, {
// type: 2,
// name: ''
// },
{
type: '0,1,2',
name: '待服务'
}, { }, {
type: 0, type: '3,4',
name: '待接单'
}, {
type: 1,
name: '待排期'
}, {
type: 2,
name: '待上门'
}, {
type: 3,
name: '服务中' name: '服务中'
}, { },
type: 4, // {
name: '待确认' // type: 4,
}, { // name: ''
// },
{
// type: 4, // type: 4,
name: '售后中' name: '售后中'
}, { }, {

View File

@ -207,13 +207,13 @@
}); });
} }
if (updateStatusRes && updateStatusRes.code === 0) { if (updateStatusRes && updateStatusRes.code === 0) {
this.hideModal();
this.$emit('confirmFeedback');
uni.showToast({ uni.showToast({
title: '已发起售后,进度可在订单详情内查看', title: '已发起售后,进度可在订单详情内查看',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
this.hideModal();
this.$emit('confirmFeedback');
return; return;
} }
} }

View File

@ -38,31 +38,17 @@
</view> </view>
<view class="margin-right-sm"><text>优惠</text><text class="text-price text-red">{{shopOrder.discountMoney}}</text> <view class="margin-right-sm"><text>优惠</text><text class="text-price text-red">{{shopOrder.discountMoney}}</text>
</view> </view>
<view class="margin-right-sm" v-if="shopOrder.changeMoney"><text>加价</text><text class="text-price text-red">{{shopOrder.changeMoney}}</text>
</view>
<view class="text-lg"><text>需付款</text><text <view class="text-lg"><text>需付款</text><text
class="text-price text-red text-lg text-bold">{{shopOrder.payMoney}}</text></view> class="text-price text-red text-lg text-bold">{{shopOrder.payMoney}}</text></view>
</view> </view>
<view v-if="orderType === 0" class="padding-tb-sm"> <view v-if="orderType === 0" class="padding-tb-sm">
<view class="flex justify-end" v-if="tabCur === 0"> <view class="flex justify-end">
<button class="cu-btn bg-gray margin-right-sm shadow-blur" @click="showModalByRef('confirmModal', shopOrder)" v-if="shopOrder.orderStatus < 2">取消订单</button> <button v-if="[0,1,2].indexOf(shopOrder.orderStatus) > 0" class="cu-btn bg-gray margin-right-sm shadow-blur" @click="showModalByRef('confirmModal', shopOrder)">取消订单</button>
<button v-if="shopOrder.payStatus === 0" class="cu-btn bg-main-color shadow-blur" @click="wxpay(shopOrder)">付款</button> <button v-if="shopOrder.payStatus === 0" class="cu-btn bg-main-color shadow-blur margin-right-sm" @click="wxpay(shopOrder)">付款</button>
<button class="cu-btn bg-main-color shadow-blur" @click="showServDetail(shopOrder)">查看</button>
</view> </view>
<view class="flex justify-end" v-if="tabCur === 1">
<button class="cu-btn bg-gray margin-right-sm shadow-blur" @click="showModalByRef('confirmModal', shopOrder)">取消订单</button>
<!-- <button class="cu-btn bg-gray margin-right-sm shadow-blur">撤换师傅</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-sm shadow-blur">催单</button> -->
</view>
<view class="flex justify-end" v-if="tabCur === 2">
<button class="cu-btn bg-gray margin-right-sm shadow-blur" @click="showModalByRef('confirmModal', shopOrder)">取消订单</button>
<!-- <button class="cu-btn bg-gray margin-right-sm shadow-blur">撤换师傅</button> -->
<button class="cu-btn bg-main-color margin-right-sm shadow-blur" @click="showServDetail(shopOrder)">查看</button>
</view>
<view class="flex justify-end" v-if="tabCur === 3">
<!-- <button class="cu-btn bg-gray margin-right-sm shadow-blur">申请售后</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-sm shadow-blur">加价</button> -->
</view>
<!-- <view class="flex justify-end" v-if="tabCur === 4">
<button class="cu-btn bg-main-color margin-right-sm shadow-blur">评价</button>
</view> -->
</view> </view>
<view v-if="orderType === 0 && shopOrder.orderStatus === 4" <view v-if="orderType === 0 && shopOrder.orderStatus === 4"
class="padding-tb-sm solid-top"> class="padding-tb-sm solid-top">
@ -78,7 +64,7 @@
</view> </view>
</view> </view>
<view <view
v-if="orderType === 0 && (tabCur === 1 || tabCur === 2)" v-if="orderType === 0"
class="padding-tb-sm solid-top"> class="padding-tb-sm solid-top">
<view>约定服务时间</view> <view>约定服务时间</view>
<view class="flex justify-between align-end"> <view class="flex justify-between align-end">
@ -180,13 +166,18 @@
try { try {
params.customerId = this.curUserInfo.customerId; params.customerId = this.curUserInfo.customerId;
params.orderType = this.orderType; params.orderType = this.orderType;
params.orderStatus = this.tabHeaderList[this.tabCur].type; let orderStatus = this.tabHeaderList[this.tabCur].type;
if (typeof orderStatus == 'string' && orderStatus.indexOf(",") > 0) {
params.orderStatuses = orderStatus;
} else {
params.orderStatus = orderStatus;
}
if (this.tabCur === 0) { if (this.tabCur === 0) {
params.payStatus = 0; params.payStatus = 0;
params.exceptOrderStatus = 6; params.exceptOrderStatus = 6;
} }
let res = null; let res = null;
if (this.tabCur === 6) { if (this.tabCur === 3) {
res = await this.$request.getAfterList({ res = await this.$request.getAfterList({
customerId: params.customerId customerId: params.customerId
}); });

View File

@ -107,6 +107,23 @@
<simple-product-picked :pickedList="item.orderStandardList" :columnTitleArr="servedColumnHeaders" <simple-product-picked :pickedList="item.orderStandardList" :columnTitleArr="servedColumnHeaders"
:valFieldArr="servedValFields"></simple-product-picked> :valFieldArr="servedValFields"></simple-product-picked>
</view> </view>
<view v-if="item.financialChangeRecord" class="bg-white">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-title text-main-color"></text> 加价记录
</view>
</view>
<view class="padding-tb-sm">
<view>
<text>加价金额</text>
<text>{{item.financialChangeRecord.changeMoney}}</text>
</view>
<view>
<text>加价备注</text>
<text>{{item.financialChangeRecord.remark}}</text>
</view>
</view>
</view>
<view v-if="servDetail.orderStatus > 3 && item.finishImgList && item.finishImgList.length" class="bg-white"> <view v-if="servDetail.orderStatus > 3 && item.finishImgList && item.finishImgList.length" class="bg-white">
<view class="cu-bar solid-bottom"> <view class="cu-bar solid-bottom">
<view class="action bar-first-action"> <view class="action bar-first-action">
@ -131,10 +148,8 @@
</view> </view>
</view> </view>
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList"> <view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList">
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb solid-top"> <view v-if="afterServiceRecord.createBy == 1" class="padding-tb-sm solid-top">
<view class='cu-tag bg-main-color radius light'>客户发起</view> <view class='cu-tag bg-main-color radius light'>客户发起</view>
<button class="cu-btn sm bg-yellow margin-left" v-show="afterServiceRecord.customerFinalCheck !== 1"
@click="cancelAfterService(afterServiceRecord.id)">撤销</button>
<view v-if="afterServiceRecord.operType === 1"> <view v-if="afterServiceRecord.operType === 1">
<view class="text-gray text-sm margin-bottom-xs">退单退款已提交至商家其最大时限24小时内需完成操作</view> <view class="text-gray text-sm margin-bottom-xs">退单退款已提交至商家其最大时限24小时内需完成操作</view>
<view class="flex justify-start align-end"> <view class="flex justify-start align-end">
@ -188,8 +203,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="flex justify-end align-end margin-tb-sm">
<button class="cu-btn sm bg-yellow margin-left" v-show="afterServiceRecord.customerFinalCheck !== 1"
@click="cancelAfterService(afterServiceRecord.id)">撤销</button>
</view> </view>
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb solid-top"> </view>
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb-sm solid-top">
<view class='cu-tag bg-main-color radius light'>师傅反馈</view> <view class='cu-tag bg-main-color radius light'>师傅反馈</view>
<view v-if="afterServiceRecord.operType === 1"> <view v-if="afterServiceRecord.operType === 1">
<view class="margin-top-xs"> <view class="margin-top-xs">
@ -244,7 +263,7 @@
@click="afterServiceFinalCheck(afterServiceRecord.id, 0)">不同意</button> @click="afterServiceFinalCheck(afterServiceRecord.id, 0)">不同意</button>
</view> </view>
</view> </view>
<view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb solid-top"> <view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb-sm solid-top">
<view class='cu-tag bg-main-color radius light'>客户最终确认</view> <view class='cu-tag bg-main-color radius light'>客户最终确认</view>
<view class="margin-top-xs">{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}} <view class="margin-top-xs">{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}}
</view> </view>