2022-05-06 23:47:18 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<!-- 顶部操作条 -->
|
|
|
|
|
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
|
|
|
|
|
<block slot="backText">返回</block>
|
|
|
|
|
|
<block slot="content">接收的任务</block>
|
|
|
|
|
|
</cu-custom>
|
|
|
|
|
|
<view class="sticky-bar" :style="[{top: stickyTop + 'px'}]">
|
|
|
|
|
|
<!-- 条件筛选栏 -->
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view class="padding-tb bg-white solid-bottom">
|
|
|
|
|
|
<view class="flex justify-start align-center padding-lr">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<text class="margin-right-xs inline-lable">全部</text>
|
|
|
|
|
|
<!-- <my-uni-combox class="inline-combox margin-right-xs" :candidates="stateList" placeholder="请选择"
|
|
|
|
|
|
v-model="formData.state"></my-uni-combox>
|
|
|
|
|
|
<my-uni-combox class="inline-combox" :candidates="subStateList" placeholder="请选择"
|
|
|
|
|
|
v-model="formData.subState"></my-uni-combox> -->
|
|
|
|
|
|
<!-- 区域筛选picker -->
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<picker class="inline-combox margin-right-xs" :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange" :value="areaMultiIndex" :range-key="'areaName'" :range="areaList">
|
|
|
|
|
|
<input class="radius-input" disabled :value="formData.area ? formData.area[0].areaName + '-' + formData.area[1].areaName + '-' + formData.area[2].areaName : ''"
|
2022-05-06 23:47:18 +08:00
|
|
|
|
placeholder="请选择区域"></input>
|
|
|
|
|
|
</picker>
|
|
|
|
|
|
<!-- 品类筛选picker -->
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<picker class="inline-combox" :mode="'multiSelector'" @change="categoryChange" @columnchange="categoryColChange" :value="categoryMultiIndex" :range-key="'goodsCategoryName'" :range="categoryList">
|
|
|
|
|
|
<input class="line-input radius-input" disabled :value="formData.category ? formData.category[0].goodsCategoryName + '-' + formData.category[1].goodsCategoryName + '-' + formData.category[2].goodsCategoryName : ''"
|
2022-05-06 23:47:18 +08:00
|
|
|
|
placeholder="请选择品类"></input>
|
|
|
|
|
|
</picker>
|
|
|
|
|
|
</view>
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view class="flex justify-between align-center margin-top-xs padding-left">
|
|
|
|
|
|
<view class="flex justify-between align-center" style="flex-basis: 55%;">
|
|
|
|
|
|
<input class="line-input radius-input margin-right-sm" v-model="formData.orderKeywords"
|
|
|
|
|
|
placeholder="请输入订单关键字"></input>
|
|
|
|
|
|
<view class="text-xl text-bold">
|
|
|
|
|
|
<text class="cuIcon-search margin-right-sm" @click="searchOrder"></text>
|
|
|
|
|
|
<text class="cuIcon-refresh" @click="resetConditions"></text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-list grid no-border col-2 padding-top-sm bg-white" style="flex-basis: 42%;">
|
|
|
|
|
|
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect" v-if="item.code > 103">
|
|
|
|
|
|
<view class="margin-bottom-xs">{{item.name}}</view>
|
|
|
|
|
|
<view v-if="item.code === 105">({{orderStatistics.monitoredOrderNum}})</view>
|
|
|
|
|
|
<view v-else-if="item.code === 104">({{orderStatistics.shelvedOrderNum}})</view>
|
|
|
|
|
|
<view v-else>(0)</view>
|
|
|
|
|
|
</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 状态分类tab -->
|
|
|
|
|
|
<view class="cu-list grid no-border col-5 padding-top-sm bg-white">
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect" v-if="item.code <= 103">
|
2022-06-22 17:40:50 +08:00
|
|
|
|
<view class="margin-bottom-xs">{{item.name}}</view>
|
2022-07-13 21:38:54 +08:00
|
|
|
|
<view v-if="item.code === 0">({{orderStatistics.newOrderNum}})</view>
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<view v-else-if="item.code === 101">({{orderStatistics.tomorrowOrderNum}})</view>
|
|
|
|
|
|
<view v-else-if="item.code === 102">({{orderStatistics.todayOrderNum}})</view>
|
|
|
|
|
|
<view v-else-if="item.code === 103">({{orderStatistics.overTimeOrderNum}})</view>
|
2022-07-13 21:38:54 +08:00
|
|
|
|
<view v-else>(0)</view>
|
2022-06-22 17:40:50 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="0" @tap="statusSelect">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<view class="margin-bottom-xs">超时单</view>
|
|
|
|
|
|
<view>({{myOrders.summary.overtimeOrderNum}})</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item" :class="stateCur === 1 ? 'bg-main-color light' : ''" :data-id="1" @tap="statusSelect">
|
|
|
|
|
|
<view class="margin-bottom-xs">今日单</view>
|
|
|
|
|
|
<view>({{myOrders.summary.todayOrderNum}})</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item" :class="stateCur === 2 ? 'bg-main-color light' : ''" :data-id="2" @tap="statusSelect">
|
|
|
|
|
|
<view class="margin-bottom-xs">明日单</view>
|
|
|
|
|
|
<view>({{myOrders.summary.tomorrowOrderNum}})</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item" :class="stateCur === 3 ? 'bg-main-color light' : ''" :data-id="3" @tap="statusSelect">
|
|
|
|
|
|
<view class="margin-bottom-xs">急报单</view>
|
|
|
|
|
|
<view>({{myOrders.summary.urgentMsgOrderNum}})</view>
|
|
|
|
|
|
</view>
|
2022-06-22 17:40:50 +08:00
|
|
|
|
<view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="4" @tap="statusSelect">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<view class="margin-bottom-xs">新订单</view>
|
|
|
|
|
|
<view>({{myOrders.summary.newOrderNum}})</view>
|
2022-06-22 17:40:50 +08:00
|
|
|
|
</view> -->
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 子状态分类tab -->
|
|
|
|
|
|
<scroll-view scroll-x class="bg-white nav text-center" :scroll-with-animation="true" :scroll-left="scrollLeft">
|
|
|
|
|
|
<view class="cu-item" :class="index==tabCur?'text-main-color cur':''" v-for="(item,index) in subStateList"
|
|
|
|
|
|
:key="index" @tap="tabSelect" :data-id="index">
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<text class="margin-right-xs">{{item.name}}</text>
|
|
|
|
|
|
<text v-if="item.code === 1">({{orderStatistics.planOrderNum}})</text>
|
|
|
|
|
|
<text v-else-if="item.code === 2">({{orderStatistics.waitServOrderNum}})</text>
|
|
|
|
|
|
<text v-else-if="item.code === 3">({{orderStatistics.servingOrderNum}})</text>
|
|
|
|
|
|
<text v-else-if="item.code === 4">({{orderStatistics.waitSureOrderNum}})</text>
|
2023-02-26 01:16:12 +08:00
|
|
|
|
<text v-else-if="item.code === 5 && item.isChild">({{orderStatistics.finishedOrderNum}})</text>
|
|
|
|
|
|
<text v-else-if="item.code === 5 && !item.isChild">({{orderStatistics.finishedMasterOrderNum}})</text>
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<text v-else-if="item.other === 0">({{orderStatistics.afterListNum}})</text>
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<text v-else>(0)</text>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- tab content -->
|
|
|
|
|
|
<view class="padding bg-white margin-top-sm margin-lr-sm" v-for="(order, index) in orderList">
|
|
|
|
|
|
<view class="flex justify-between">
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<view class="text-lg text-bold text-cut">{{order.goodsName}}</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<!-- 不同状态订单使用不同角标 -->
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view v-if="([2, 5].indexOf(stateCur) >= 0 || tabCur === 4) && order.orderDetailId == null" class="right-tag padding-lr-sm padding-tb-xs bg-orange">监</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 0" class="right-tag padding-lr-sm padding-tb-xs bg-cyan">新</view>
|
2022-06-02 17:39:45 +08:00
|
|
|
|
<view v-else-if="order.orderStatus === 1" class="right-tag padding-lr-sm padding-tb-xs bg-main-color">未</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 2" class="right-tag padding-lr-sm padding-tb-xs bg-yellow">待</view>
|
2022-06-18 02:03:07 +08:00
|
|
|
|
<view v-else-if="order.orderStatus === 3" class="right-tag padding-lr-sm padding-tb-xs bg-purple">服</view>
|
2022-06-22 22:38:07 +08:00
|
|
|
|
<view v-else-if="order.orderStatus === 4" class="right-tag padding-lr-sm padding-tb-xs bg-orange">确</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 5" class="right-tag padding-lr-sm padding-tb-xs bg-green">完</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-10-21 00:37:07 +08:00
|
|
|
|
<view class="float-left">
|
|
|
|
|
|
<view v-if="order.payType === 1" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>到付单</view>
|
|
|
|
|
|
<view v-if="order.changeMoney || order.payStatus != 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>有待付款</view>
|
|
|
|
|
|
<view v-else class='cu-tag margin-right-xs radius line-red margin-top-xs'>款已付清</view>
|
|
|
|
|
|
</view>
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<view>
|
|
|
|
|
|
<view v-if="order.isOverTime" class="float-left">
|
|
|
|
|
|
<view v-if="order.orderStatus === 0" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未接单</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未预约</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 2" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未上门</view>
|
|
|
|
|
|
<view v-else-if="order.orderStatus === 3" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未完单</view>
|
|
|
|
|
|
</view>
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view class="float-left" v-else-if="order.orderTimeoutRecords" v-for="(timeoutRecord, recordIndex) in order.orderTimeoutRecords">
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<view v-if="timeoutRecord.orderStatus === 0" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未接单</view>
|
|
|
|
|
|
<view v-else-if="timeoutRecord.orderStatus === 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未预约</view>
|
|
|
|
|
|
<view v-else-if="timeoutRecord.orderStatus === 2" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未上门</view>
|
|
|
|
|
|
<view v-else-if="timeoutRecord.orderStatus === 3" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未完单</view>
|
|
|
|
|
|
</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-10-21 00:37:07 +08:00
|
|
|
|
<view class="float-left" v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList">
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<view v-if="afterServiceRecord.createBy && !afterServiceRecord.updateBy" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后发起中</view>
|
|
|
|
|
|
<view v-if="afterServiceRecord.workerFeedbackResult == 1 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>售后已同意</view>
|
|
|
|
|
|
<view v-if="afterServiceRecord.workerFeedbackResult == 0 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后已拒绝</view>
|
|
|
|
|
|
<view v-if="afterServiceRecord.customerFinalCheck == 0" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后纠纷中</view>
|
|
|
|
|
|
<view v-if="afterServiceRecord.customerFinalCheck == 1" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>售后已完成</view>
|
|
|
|
|
|
</view>
|
2022-09-22 01:13:05 +08:00
|
|
|
|
<view class="float-clear"></view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-people"></text></text>
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<text>姓名:{{order.customerName}}</text>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-location"></text></text>
|
|
|
|
|
|
<text class="margin-right-xs">{{order.address}}</text>
|
|
|
|
|
|
<text class="text-lg" @tap="copyData(order.address)"><text class="cuIcon-copy"></text></text>
|
|
|
|
|
|
</view>
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<view class="margin-top-sm">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
|
2022-10-27 00:44:47 +08:00
|
|
|
|
<text v-if="order.expectTimeEndFront">服务时间:{{order.expectTimeStartFront + '~' + order.expectTimeEndFront}}</text>
|
|
|
|
|
|
<text v-else>服务时间:{{order.expectTimeStartFront}}</text>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-09-12 00:21:19 +08:00
|
|
|
|
<view class="margin-top-sm" v-if="order.orderDetailId != null && order.orderStatus > 2">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
|
2022-06-17 18:34:14 +08:00
|
|
|
|
<text>上门时间:{{order.workBeginTime}}</text>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-06-02 17:39:45 +08:00
|
|
|
|
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderStatus === 2">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-repair"></text></text>
|
|
|
|
|
|
<text>距上门:</text>
|
|
|
|
|
|
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
2022-10-27 00:44:47 +08:00
|
|
|
|
:day="$dateUtil.countDownDiff(order.expectTimeStart).day"
|
|
|
|
|
|
:hour="$dateUtil.countDownDiff(order.expectTimeStart).hour"
|
|
|
|
|
|
:minute="$dateUtil.countDownDiff(order.expectTimeStart).min"
|
|
|
|
|
|
:second="$dateUtil.countDownDiff(order.expectTimeStart).seconds">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</uni-countdown>
|
|
|
|
|
|
</view>
|
2022-09-12 00:21:19 +08:00
|
|
|
|
<view class="margin-top-sm" v-if="order.orderDetailId != null && order.orderStatus > 3">
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
|
|
|
|
|
|
<text>完成时间:{{order.workFinishTime}}</text>
|
|
|
|
|
|
</view>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
<view class="margin-top-sm flex justify-start align-center" v-if="order.orderDetailId != null && tabCur === 3 && order.drawCashStatus === 0 && $dateUtil.addHours(order.workFinishTime, 1).getTime() > new Date().getTime()">
|
2022-05-22 21:52:14 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-time"></text></text>
|
2022-11-21 01:01:40 +08:00
|
|
|
|
<text>距完单分帐:</text>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
<uni-countdown :show-colon="false" :backgroundColor="'#e35b33'" :color="'#faf3f0'"
|
|
|
|
|
|
:day="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).day"
|
|
|
|
|
|
:hour="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).hour"
|
|
|
|
|
|
:minute="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).min"
|
|
|
|
|
|
:second="$dateUtil.countDownDiff($dateUtil.addHours(order.workFinishTime, 1)).seconds">
|
2022-05-22 21:52:14 +08:00
|
|
|
|
</uni-countdown>
|
|
|
|
|
|
</view>
|
2023-02-02 23:13:21 +08:00
|
|
|
|
<view class="margin-top-sm text-red" @click="normalShowModalByRef('ledgerAccountRemark')"
|
2023-03-25 22:05:31 +08:00
|
|
|
|
v-if="order.orderDetailId != null && tabCur === 3 && order.drawCashStatus === 0 && $dateUtil.addHours(order.workFinishTime, 1).getTime() < new Date().getTime()">
|
2022-11-28 01:28:39 +08:00
|
|
|
|
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
|
2023-03-27 01:53:43 +08:00
|
|
|
|
<text>银联发起(T+1)支付中,发起时间:{{order.drawCashTime}}</text>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
<text class="cuIcon-question"></text>
|
2022-11-28 01:28:39 +08:00
|
|
|
|
</view>
|
2023-02-02 23:13:21 +08:00
|
|
|
|
<view class="margin-top-sm text-red"
|
2023-03-25 22:05:31 +08:00
|
|
|
|
v-if="order.orderDetailId != null && order.drawCashStatus === 1">
|
2023-02-02 23:13:21 +08:00
|
|
|
|
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
<text>银联确认已划帐(到帐中),分账时间:{{order.drawCashTime}}</text>
|
2023-02-02 23:13:21 +08:00
|
|
|
|
</view>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
<!-- <view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === 2">
|
2022-11-28 01:28:39 +08:00
|
|
|
|
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
|
2023-02-02 23:13:21 +08:00
|
|
|
|
<text>本单银联已确认货款结算完毕(订单支付完成),款项已到达或即将到达您所绑定帐户,同意退款的需同意后您线下与客户另行操作,系统无法提供原路返回退款!</text>
|
2023-03-25 22:05:31 +08:00
|
|
|
|
</view> -->
|
|
|
|
|
|
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === 2">
|
|
|
|
|
|
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
|
|
|
|
|
|
<text>已到帐:{{order.arrivalTime}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm text-red" v-if="order.orderDetailId != null && order.drawCashStatus === -1">
|
|
|
|
|
|
<text class="text-lg margin-right-xs"><text class="cuIcon-notice"></text></text>
|
|
|
|
|
|
<text>提现失败</text>
|
2022-11-28 01:28:39 +08:00
|
|
|
|
</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<!-- 不同状态订单支持不同操作按钮 -->
|
2022-06-02 17:39:45 +08:00
|
|
|
|
<view v-if="order.orderStatus === 0">
|
2022-06-22 22:38:07 +08:00
|
|
|
|
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-popup="dispatchOrder" @click="getCanAssignList(order)" @tap="togglePopup($event, order)">派单</button>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">改价</button>
|
2022-06-22 22:38:07 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">转发</button> -->
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
2023-03-05 18:25:19 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="acceptOrder(order.orderMasterId, order.orderMasterCode, 1, 'updateMasterOrder')" v-if="order.orderDetailId == null">确认接单</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="acceptOrder(order.orderDetailId, order.orderDetailCode, 1, 'updateDetailOrder')" v-else>确认接单</button>
|
2022-09-12 14:50:12 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId == null" @click="rejectMasterOrder(order)">拒绝接单</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-else @click="rejectDetailOrder(order)">拒绝接单</button>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-11-09 01:07:15 +08:00
|
|
|
|
<view v-if="order.orderStatus === 1 && tabCur === 0">
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
2022-09-12 00:21:19 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-popup="dispatchOrderPopup" @click="getCanAssignList(order)" @tap="togglePopup($event, order)" v-show="order.orderDetailId == null">派单</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="assignWork2MySelf(order)" v-show="order.orderDetailId == null">自己承接</button>
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showTimeArrangeModal" @tap="showModal($event, order)">预约时间</button>
|
2023-02-26 00:26:41 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId != null" @click="rejectDetailOrder(order)">退单</button>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-11-09 01:07:15 +08:00
|
|
|
|
<view v-else-if="order.orderStatus === 1">
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
|
|
|
|
|
</view>
|
2022-06-02 17:39:45 +08:00
|
|
|
|
<view v-if="order.orderStatus === 2">
|
2022-06-16 23:14:43 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
2022-09-12 00:21:19 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">修改时间</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="workBegin(order)" v-show="order.orderDetailId != null">立即上门</button>
|
2023-02-26 00:26:41 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId != null" @click="rejectDetailOrder(order)">退单</button>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-06-02 17:39:45 +08:00
|
|
|
|
<view v-if="order.orderStatus === 3">
|
2022-06-16 23:14:43 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
2022-12-02 02:27:42 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="recordClockInLocation(order)" v-if="hasAuthLocation && order.orderDetailId != null && !order.clockInLocation">打卡到达</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" open-type="openSetting" @opensetting="authLocationCallback" v-else-if="order.orderDetailId != null && !order.clockInLocation">授权打卡</button>
|
2022-10-21 00:37:07 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOffline" data-modal="showNewServPriceOfflineModal" v-show="order.orderDetailId != null && order.clockInLocation && order.payType === 1">报价/完单</button>
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.clockInLocation && order.payType === 0">报价/完单</button>
|
2022-10-23 00:40:08 +08:00
|
|
|
|
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOffline" data-modal="showNewServPriceOfflineModal" v-show="order.orderDetailId != null && order.payType === 1">报价/完单</button> -->
|
|
|
|
|
|
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.payType === 0">报价/完单</button> -->
|
2022-06-16 23:14:43 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
2022-09-12 00:21:19 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">重新排期</button>
|
2022-10-15 01:44:49 +08:00
|
|
|
|
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="finishOrder(order)" v-if="order.payStatus === 1" v-show="order.orderDetailId != null">发起完单</button> -->
|
|
|
|
|
|
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" v-if="order.payStatus === 0" @tap="makePayQrcode($event, order)" v-show="order.orderDetailId != null">生成收款码</button> -->
|
2023-02-26 00:26:41 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId != null" @click="rejectDetailOrder(order)">退单</button>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<view v-if="order.orderStatus === 4 || order.orderStatus === 5">
|
|
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
|
|
|
|
|
|
</view>
|
2022-06-18 02:03:07 +08:00
|
|
|
|
<!-- <view v-if="order.orderStatus === 'afterSaleService'">
|
2022-06-16 23:14:43 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
2022-05-22 21:52:14 +08:00
|
|
|
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
2022-06-18 02:03:07 +08:00
|
|
|
|
</view> -->
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view v-if="order.afterServiceRecordList && order.afterServiceRecordList.length && order.orderDetailId != null" class="bg-white margin-top-sm">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList">
|
|
|
|
|
|
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb solid-top">
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<view v-if="afterServiceRecord.operType === 1">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="flex justify-start align-end">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<text>退款申请:</text>
|
|
|
|
|
|
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
|
|
|
|
|
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).day"
|
|
|
|
|
|
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).hour"
|
|
|
|
|
|
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).min"
|
|
|
|
|
|
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).seconds">
|
|
|
|
|
|
</uni-countdown>
|
|
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<text>退款金额:</text>
|
2022-10-09 23:17:12 +08:00
|
|
|
|
<text v-if="afterServiceRecord.refund">{{afterServiceRecord.refund}}</text>
|
2022-10-10 22:47:53 +08:00
|
|
|
|
<text v-else-if="order.payMoney">{{order.payMoney}}</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<text>退款原因:</text>
|
|
|
|
|
|
<text>{{afterServiceRecord.customerReason}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList" :key="imgIndex" v-if="imgObj.imgUploadBy === 1">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-else-if="afterServiceRecord.operType === 2">
|
|
|
|
|
|
<view class="flex justify-start align-end">
|
|
|
|
|
|
<text>待处理售后:</text>
|
|
|
|
|
|
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
|
|
|
|
|
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).day"
|
|
|
|
|
|
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).hour"
|
|
|
|
|
|
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).min"
|
|
|
|
|
|
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).seconds">
|
|
|
|
|
|
</uni-countdown>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<text>售后原因:</text>
|
|
|
|
|
|
<text>{{afterServiceRecord.customerReason}}</text>
|
|
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view>
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<text>完成操作:点击“操作处理”提交由客服回访!</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList" :key="imgIndex" v-if="imgObj.imgUploadBy === 1">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="flex justify-end align-end margin-tb-sm" v-if="!afterServiceRecord.updateBy">
|
|
|
|
|
|
<button class="cu-btn sm bg-yellow margin-right-sm" data-modal="rejectAfterSale" @tap="showModal($event, order)">拒绝处理</button>
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<button class="cu-btn sm bg-yellow margin-right-sm" data-modal="agreeAfterSale" @tap="showModal($event, order)">操作处理</button>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
</view>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb solid-top">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<view class='cu-tag bg-main-color radius light'>师傅反馈</view>
|
|
|
|
|
|
<view v-if="afterServiceRecord.operType === 1">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="margin-top-xs">
|
|
|
|
|
|
<text>师傅反馈结果:</text>
|
|
|
|
|
|
<text>{{afterServiceRecord.workerFeedbackResult === 1 ? '同意' : '拒绝'}}</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view v-if="afterServiceRecord.workerFeedbackResult === 1">
|
|
|
|
|
|
<text>同意退款金额:</text>
|
2022-10-09 23:17:12 +08:00
|
|
|
|
<text v-if="afterServiceRecord.agreedRefund">{{afterServiceRecord.agreedRefund}}</text>
|
|
|
|
|
|
<text v-else-if="afterServiceRecord.refund">{{afterServiceRecord.refund}}</text>
|
|
|
|
|
|
<text v-else-if="order.payMoney">{{order.payMoney}}</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view>
|
|
|
|
|
|
<text>师傅反馈:</text>
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
|
|
|
|
|
|
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
|
2022-10-10 22:47:53 +08:00
|
|
|
|
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 3">其他</text>
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReason">
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReasonType">,</text>
|
|
|
|
|
|
{{afterServiceRecord.workerFeedbackReason}}
|
|
|
|
|
|
</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList" :key="imgIndex" v-if="imgObj.imgUploadBy === 2">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-else-if="afterServiceRecord.operType === 2">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="margin-top-xs">
|
|
|
|
|
|
<text>师傅反馈结果:</text>
|
|
|
|
|
|
<text>{{afterServiceRecord.workerFeedbackResult === 1 ? '同意' : '拒绝'}}</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<text>师傅反馈:</text>
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
|
|
|
|
|
|
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
|
2022-10-10 22:47:53 +08:00
|
|
|
|
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 3">其他</text>
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReason">
|
|
|
|
|
|
<text v-if="afterServiceRecord.workerFeedbackReasonType">,</text>
|
|
|
|
|
|
{{afterServiceRecord.workerFeedbackReason}}
|
|
|
|
|
|
</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList" :key="imgIndex" v-if="imgObj.imgUploadBy === 2">
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb solid-top">
|
|
|
|
|
|
<view class='cu-tag bg-main-color radius light'>客户最终确认</view>
|
|
|
|
|
|
<view class="margin-top-xs">{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}}</view>
|
|
|
|
|
|
<view class="text-red" v-if="afterServiceRecord.customerFinalCheck === 0">订单交由平台协商处理</view>
|
2022-10-17 01:15:59 +08:00
|
|
|
|
<view v-else-if="afterServiceRecord.customerFinalCheck === 1">
|
|
|
|
|
|
<view v-if="afterServiceRecord.originalRefund > 0">
|
2022-10-21 00:37:07 +08:00
|
|
|
|
<view>
|
2022-10-30 15:33:49 +08:00
|
|
|
|
<text>本单退款,系统已发起按客户支付的帐户原路退回</text>
|
2022-10-21 00:37:07 +08:00
|
|
|
|
<text class="text-red">{{afterServiceRecord.originalRefund}}</text>
|
2022-10-30 15:33:49 +08:00
|
|
|
|
<text>元,银行按工作日退款,节假日顺延到帐。遇客户问询,请其耐心等待,到账时会在客户端”客户最终确认“处有到账时间。</text>
|
2022-10-21 00:37:07 +08:00
|
|
|
|
</view>
|
2022-10-30 15:33:49 +08:00
|
|
|
|
<view>退款支付到账:{{afterServiceRecord.refundApplyTime}}</view>
|
2022-10-17 01:15:59 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view v-else-if="afterServiceRecord.originalRefund == 0 && order.payStatus == 0">
|
|
|
|
|
|
<text>本单未支付,实际退回0.00元</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-05-22 21:52:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-06-30 17:26:47 +08:00
|
|
|
|
<view class="margin-top-sm solid-top padding-top-sm" v-if="Boolean(order.customerRemark)">
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-comment"></text></text>
|
2022-06-30 17:26:47 +08:00
|
|
|
|
<text>备注:{{order.customerRemark}}</text>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2023-02-26 01:16:12 +08:00
|
|
|
|
<load-status-bar v-show="[5,6].indexOf(tabCur) >= 0 || (stateCur != null && stateList[stateCur].code === 105)" ref="loadStatusBar" @loadMore="loadMasterOrderPage"></load-status-bar>
|
2022-11-01 23:53:43 +08:00
|
|
|
|
<view v-show="tabCur !== 5 && stateCur !== 0" class="cu-tabbar-height"></view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<!-- 模态框 -->
|
2022-11-09 01:07:15 +08:00
|
|
|
|
<agree-after-sale v-if="agreeAfterSale" :show="agreeAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage"></agree-after-sale>
|
|
|
|
|
|
<reject-after-sale v-if="rejectAfterSale" :show="rejectAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage"></reject-after-sale>
|
|
|
|
|
|
<time-arrange v-if="showTimeArrangeModal" :show="showTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime"></time-arrange>
|
|
|
|
|
|
<time-arrange-fail v-if="showArrangeFailTimeModal" :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
|
|
|
|
|
|
<new-serv-price-online v-if="showNewServPriceOnlineModal" ref="newServPriceOnline" :show="showNewServPriceOnlineModal" :data="curOrder" @finishOrder="finishOrder"></new-serv-price-online>
|
|
|
|
|
|
<new-serv-price-offline v-if="showNewServPriceOfflineModal" ref="newServPriceOffline" :show="showNewServPriceOfflineModal" :data="curOrder" @finishOrder="finishOrder"></new-serv-price-offline>
|
|
|
|
|
|
<pay-qrcode v-if="showPayQrcodeModal" ref="payQrcode" :show="showPayQrcodeModal" :data="curOrder" @finishQrPay="finishQrPay"></pay-qrcode>
|
|
|
|
|
|
<edit-time-arrange v-if="showEditTimeArrangeModal" :show="showEditTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime" :ifRollback2WS="true"></edit-time-arrange>
|
|
|
|
|
|
<urgent-msg v-if="sendUrgentMsgModal" :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
|
2022-05-22 21:52:14 +08:00
|
|
|
|
<pic-modal ref="showPicModal" :imgList="picModalImgList"></pic-modal>
|
2023-01-29 15:38:37 +08:00
|
|
|
|
<confirm-modal ref="ledgerAccountRemark" :showCancel="false" :showConfirm="true">
|
|
|
|
|
|
<block slot="contentView">
|
|
|
|
|
|
<view class="text-left">
|
|
|
|
|
|
<view class="text-bold">T+1银联结算动态:</view>
|
|
|
|
|
|
<view>订单款项已进入发起银联分帐付款指令中,请确保您的银行帐户已绑定(银联支持任意个人银行帐户绑定结算)。根据支付规则,分帐支付按T+1结算方式(即按发起时间,次日内清算机构【银联】根据清算信息,完成支付到帐,如遇节假日,则节假日后的次日内完成支付到帐)!</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
</confirm-modal>
|
|
|
|
|
|
|
2022-05-06 23:47:18 +08:00
|
|
|
|
<!-- popup -->
|
2022-07-19 11:34:36 +08:00
|
|
|
|
<uni-popup ref="dispatchOrderPopup" type="bottom" @change="changePopupState">
|
|
|
|
|
|
<view class="text-bold text-gray text-lg text-center left-top-sm-bar" data-popup="dispatchOrderPopup" @click="togglePopup"><text
|
2022-05-06 23:47:18 +08:00
|
|
|
|
class="cuIcon-close"></text></view>
|
2023-03-05 18:25:19 +08:00
|
|
|
|
<view class="bg-white padding" style="padding-top: 74rpx; min-height: 1000rpx;">
|
2022-11-09 01:07:15 +08:00
|
|
|
|
<dispatch-order ref="dispatchOrder" v-if="myTeamMembers && myTeamMembers.length > 0" @assignWork="assignWork" :members="myTeamMembers" :totalMoney="curOrder.serverMoney"></dispatch-order>
|
2022-06-13 16:13:10 +08:00
|
|
|
|
<view v-else class="align-center-view text-xl">无可指派的师傅</view>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 底部占位 -->
|
|
|
|
|
|
<view class="cu-bar bg-white fixed-bottom-bar"></view>
|
2022-08-23 16:21:00 +08:00
|
|
|
|
</uni-popup>
|
|
|
|
|
|
<!-- 账户及实名弹窗 -->
|
|
|
|
|
|
<vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind>
|
2022-11-09 01:07:15 +08:00
|
|
|
|
<vertify-certify ref="vertifyCertify"></vertify-certify>
|
2022-05-06 23:47:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
|
|
|
|
|
import timeArrange from '@/pages/order-manage/modal/time-arrange.vue';
|
|
|
|
|
|
import timeArrangeFail from '@/pages/order-manage/modal/time-arrange-fail.vue';
|
2022-05-09 10:00:16 +08:00
|
|
|
|
import editTimeArrange from '@/pages/order-manage/modal/edit-time-arrange.vue';
|
2022-05-06 23:47:18 +08:00
|
|
|
|
import dispatchOrder from '@/pages/order-manage/dispatch-order.vue';
|
2022-09-22 01:13:05 +08:00
|
|
|
|
import newServPriceOnline from '@/pages/order-manage/modal/new-serv-price-online.vue';
|
2022-09-25 00:22:59 +08:00
|
|
|
|
import newServPriceOffline from '@/pages/order-manage/modal/new-serv-price-offline.vue';
|
2022-05-09 10:00:16 +08:00
|
|
|
|
import payQrcode from '@/pages/order-manage/modal/pay-qrcode.vue';
|
2022-05-22 21:52:14 +08:00
|
|
|
|
import urgentMsg from '@/pages/order-manage/modal/urgent-msg.vue';
|
|
|
|
|
|
import picModal from '@/components/modal/pic-modal.vue';
|
2022-06-02 17:39:45 +08:00
|
|
|
|
import loadStatusBar from '@/components/custom-bar/load-status-bar.vue';
|
2022-09-26 02:30:57 +08:00
|
|
|
|
import agreeAfterSale from '@/pages/order-manage/modal/agree-after-sale.vue';
|
|
|
|
|
|
import rejectAfterSale from '@/pages/order-manage/modal/reject-after-sale.vue';
|
2022-05-06 23:47:18 +08:00
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
myUniCombox,
|
|
|
|
|
|
timeArrange,
|
|
|
|
|
|
timeArrangeFail,
|
2022-05-09 10:00:16 +08:00
|
|
|
|
editTimeArrange,
|
|
|
|
|
|
dispatchOrder,
|
2022-09-22 01:13:05 +08:00
|
|
|
|
newServPriceOnline,
|
|
|
|
|
|
newServPriceOffline,
|
2022-05-22 21:52:14 +08:00
|
|
|
|
payQrcode,
|
|
|
|
|
|
urgentMsg,
|
2022-06-02 17:39:45 +08:00
|
|
|
|
picModal,
|
2022-09-26 02:30:57 +08:00
|
|
|
|
loadStatusBar,
|
|
|
|
|
|
agreeAfterSale,
|
|
|
|
|
|
rejectAfterSale
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
formData: {
|
|
|
|
|
|
category: null,
|
|
|
|
|
|
area: null,
|
|
|
|
|
|
orderKeywords: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
areaList: [],
|
|
|
|
|
|
areaMultiIndex: [0, 0, 0],
|
|
|
|
|
|
categoryList: [],
|
|
|
|
|
|
categoryMultiIndex: [0, 0, 0],
|
2022-06-22 17:40:50 +08:00
|
|
|
|
stateList: [{
|
2022-11-01 23:53:43 +08:00
|
|
|
|
code: 105,
|
|
|
|
|
|
name: '监控单'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
code: 104,
|
|
|
|
|
|
name: '搁置单'
|
|
|
|
|
|
}, {
|
2022-09-22 01:13:05 +08:00
|
|
|
|
code: 103,
|
2022-06-22 17:40:50 +08:00
|
|
|
|
name: '超时单'
|
|
|
|
|
|
}, {
|
2022-09-22 01:13:05 +08:00
|
|
|
|
code: 102,
|
2022-06-22 17:40:50 +08:00
|
|
|
|
name: '今日单'
|
|
|
|
|
|
}, {
|
2022-09-22 01:13:05 +08:00
|
|
|
|
code: 101,
|
2022-06-22 17:40:50 +08:00
|
|
|
|
name: '明日单'
|
|
|
|
|
|
}, {
|
2022-09-22 01:13:05 +08:00
|
|
|
|
code: 100,
|
2022-06-22 17:40:50 +08:00
|
|
|
|
name: '急报单'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
code: 0,
|
|
|
|
|
|
name: '新订单'
|
|
|
|
|
|
}],
|
2022-05-06 23:47:18 +08:00
|
|
|
|
subStateList: [{
|
|
|
|
|
|
code: 1,
|
|
|
|
|
|
name: '未约/未排'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
code: 2,
|
|
|
|
|
|
name: '待上门'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
code: 3,
|
|
|
|
|
|
name: '服务中'
|
|
|
|
|
|
}, {
|
2022-06-22 22:38:07 +08:00
|
|
|
|
code: 4,
|
2022-10-09 23:17:12 +08:00
|
|
|
|
name: '确认中'
|
2022-06-13 16:13:10 +08:00
|
|
|
|
},
|
|
|
|
|
|
// {
|
|
|
|
|
|
// code: '-',
|
|
|
|
|
|
// name: '售后中'
|
|
|
|
|
|
// },
|
2022-09-26 02:30:57 +08:00
|
|
|
|
{
|
2022-10-17 01:15:59 +08:00
|
|
|
|
other: 0,
|
|
|
|
|
|
name: '售后中',
|
2022-09-26 02:30:57 +08:00
|
|
|
|
}, {
|
2022-06-22 22:38:07 +08:00
|
|
|
|
code: 5,
|
2023-02-26 01:16:12 +08:00
|
|
|
|
name: '已完成/子',
|
|
|
|
|
|
isChild: true
|
|
|
|
|
|
}, {
|
|
|
|
|
|
code: 5,
|
|
|
|
|
|
name: '已完成/主',
|
|
|
|
|
|
isChild: false
|
2022-05-06 23:47:18 +08:00
|
|
|
|
}],
|
|
|
|
|
|
myOrders: {},
|
|
|
|
|
|
orderList: [],
|
2022-06-22 22:38:07 +08:00
|
|
|
|
// pageParams: [],
|
2022-07-09 18:41:34 +08:00
|
|
|
|
pageNum: 1,
|
2022-06-22 22:38:07 +08:00
|
|
|
|
pageSize: 0,
|
2022-05-06 23:47:18 +08:00
|
|
|
|
curOrder: {},
|
|
|
|
|
|
myTeamMembers: [],
|
|
|
|
|
|
scrollLeft: 0,
|
|
|
|
|
|
stickyTop: this.CustomBar,
|
|
|
|
|
|
tabCur: 0,
|
2022-06-22 17:40:50 +08:00
|
|
|
|
stateCur: null,
|
2022-05-06 23:47:18 +08:00
|
|
|
|
showTimeArrangeModal: false,
|
|
|
|
|
|
showArrangeFailTimeModal: false,
|
2022-09-22 01:13:05 +08:00
|
|
|
|
showNewServPriceOnlineModal: false,
|
|
|
|
|
|
showNewServPriceOfflineModal: false,
|
2022-05-09 10:00:16 +08:00
|
|
|
|
showPayQrcodeModal: false,
|
|
|
|
|
|
showEditTimeArrangeModal: false,
|
2022-05-22 21:52:14 +08:00
|
|
|
|
sendUrgentMsgModal: false,
|
2022-09-26 02:30:57 +08:00
|
|
|
|
agreeAfterSale: false,
|
|
|
|
|
|
rejectAfterSale: false,
|
2022-05-22 21:52:14 +08:00
|
|
|
|
ifShowPageMeta: false,
|
2022-06-13 16:13:10 +08:00
|
|
|
|
picModalImgList: [],
|
2022-06-16 23:14:43 +08:00
|
|
|
|
curDate: '',
|
2022-07-13 21:38:54 +08:00
|
|
|
|
curUserInfo: {},
|
2022-12-02 02:27:42 +08:00
|
|
|
|
orderStatistics: {},
|
|
|
|
|
|
hasAuthLocation: true
|
2022-05-06 23:47:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-11-30 02:20:20 +08:00
|
|
|
|
onLoad(option) {
|
|
|
|
|
|
if (option && option.tabCur) {
|
|
|
|
|
|
this.tabCur = option.tabCur;
|
|
|
|
|
|
}
|
2022-05-06 23:47:18 +08:00
|
|
|
|
this.loadData();
|
|
|
|
|
|
this.bindEvent();
|
|
|
|
|
|
},
|
|
|
|
|
|
onUnload() {
|
|
|
|
|
|
this.offBindEvent();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
async loadData() {
|
2022-06-29 21:21:16 +08:00
|
|
|
|
// 获取当前登录用户信息
|
|
|
|
|
|
this.curUserInfo = this.$request.getCurUserInfo();
|
2022-06-13 16:13:10 +08:00
|
|
|
|
// let myTeamInfo = await this.$api.data('myTeamInfo');
|
|
|
|
|
|
// this.myTeamMembers = myTeamInfo.members;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
this.myOrders = await this.$api.data('myOrders');
|
2022-06-02 17:39:45 +08:00
|
|
|
|
// this.orderList = this.myOrders.orderList;
|
2022-06-13 16:13:10 +08:00
|
|
|
|
// this.areaList = await this.$api.data('areaList');
|
|
|
|
|
|
// this.categoryList = await this.$api.data('categoryList');
|
2022-06-02 17:39:45 +08:00
|
|
|
|
|
2022-06-13 16:13:10 +08:00
|
|
|
|
// 初始化分页参数
|
2022-06-22 22:38:07 +08:00
|
|
|
|
// for(let i = 0; i < this.subStateList.length; i++) {
|
|
|
|
|
|
// this.pageParams.push({
|
|
|
|
|
|
// pageNum: 0
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
2022-06-02 17:39:45 +08:00
|
|
|
|
// 初始化订单列表
|
|
|
|
|
|
this.loadMasterOrderPage({
|
|
|
|
|
|
orderStatus: this.subStateList[0].code
|
2022-06-13 16:13:10 +08:00
|
|
|
|
});
|
|
|
|
|
|
// 初始化品类及区域列表
|
|
|
|
|
|
this.loadCategoryList();
|
|
|
|
|
|
this.loadRegionList();
|
|
|
|
|
|
// 初始化指派成员
|
2022-07-13 21:38:54 +08:00
|
|
|
|
this.loadTeamMembers();
|
|
|
|
|
|
// 订单统计
|
|
|
|
|
|
this.loadOrderStatistics();
|
2022-06-02 17:39:45 +08:00
|
|
|
|
},
|
|
|
|
|
|
reloadMasterOrderPage(params = {}) {
|
2022-06-22 22:38:07 +08:00
|
|
|
|
// this.pageParams = [];
|
|
|
|
|
|
// for(let i = 0; i < this.subStateList.length; i++) {
|
|
|
|
|
|
// this.pageParams.push({
|
|
|
|
|
|
// pageNum: 0
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
2022-07-09 18:41:34 +08:00
|
|
|
|
this.pageNum = 1;
|
2022-06-02 17:39:45 +08:00
|
|
|
|
this.orderList = [];
|
2022-09-12 00:21:19 +08:00
|
|
|
|
// this.$refs.loadStatusBar.showLoadMore();
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.loadMasterOrderPage();
|
2022-07-13 21:38:54 +08:00
|
|
|
|
// 订单统计
|
|
|
|
|
|
this.loadOrderStatistics();
|
2022-06-02 17:39:45 +08:00
|
|
|
|
},
|
|
|
|
|
|
async loadMasterOrderPage(params = {}) {
|
2022-11-01 23:53:43 +08:00
|
|
|
|
// 公共条件
|
|
|
|
|
|
params.shelveStatus = 0;
|
2022-07-04 22:31:08 +08:00
|
|
|
|
params.goodsName = this.formData.orderKeywords;
|
|
|
|
|
|
params.countryId = this.formData.area && this.formData.area.length > 2 ? this.formData.area[2].areaId : null;
|
|
|
|
|
|
params.goodsCategoryId = this.formData.category && this.formData.category.length > 2 ? this.formData.category[2].goodsCategoryId : null;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
// 状态
|
2022-06-22 22:38:07 +08:00
|
|
|
|
if (this.tabCur != null) {
|
|
|
|
|
|
params.orderStatus = this.subStateList[this.tabCur].code;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
} else if (this.stateCur != null && (this.stateList[this.stateCur].code === 0 || this.stateList[this.stateCur].code === 100)) {
|
2022-06-22 22:38:07 +08:00
|
|
|
|
params.orderStatus = this.stateList[this.stateCur].code;
|
|
|
|
|
|
}
|
2022-11-01 23:53:43 +08:00
|
|
|
|
// 分页
|
2023-02-26 01:16:12 +08:00
|
|
|
|
if ((this.stateCur != null && [105].indexOf(this.stateList[this.stateCur].code) >= 0) || [0, 4, 5, 6].indexOf(this.tabCur) >= 0) {
|
2022-11-01 23:53:43 +08:00
|
|
|
|
params.pageSize = this.$globalData.initPageSize;
|
|
|
|
|
|
params.pageNum = this.pageNum;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
params.pageSize = 10000;
|
2022-09-22 01:13:05 +08:00
|
|
|
|
params.pageNum = 1;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
// 其他需要特别处理的条件
|
|
|
|
|
|
let date = new Date();
|
|
|
|
|
|
if (this.stateCur != null) {
|
|
|
|
|
|
if (this.stateList[this.stateCur].code === 102) {
|
|
|
|
|
|
// 今日单
|
|
|
|
|
|
params.orderStatus = 2;
|
|
|
|
|
|
params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
|
|
|
|
|
params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
|
|
|
|
|
} else if (this.stateList[this.stateCur].code === 101) {
|
|
|
|
|
|
// 明日单
|
|
|
|
|
|
params.orderStatus = 2;
|
|
|
|
|
|
params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
|
|
|
|
|
params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
|
|
|
|
|
} else if (this.stateList[this.stateCur].code === 104) {
|
|
|
|
|
|
// 搁置单
|
|
|
|
|
|
params.shelveStatus = 1;
|
2022-12-03 22:11:59 +08:00
|
|
|
|
// params.isMonitoredOrder = true;
|
|
|
|
|
|
// params.allSelfAssigned = 0;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
} else if (this.stateList[this.stateCur].code === 105) {
|
|
|
|
|
|
// 监控单
|
|
|
|
|
|
// params.orderStatuses = "2,3,4,5";
|
2022-11-04 00:29:56 +08:00
|
|
|
|
params.isMonitoredOrder = true;
|
2022-11-09 01:07:15 +08:00
|
|
|
|
} else if (this.stateList[this.stateCur].code === 103) {
|
|
|
|
|
|
// 超时单
|
|
|
|
|
|
params.isMonitoredOrder = true;
|
2022-11-21 01:01:40 +08:00
|
|
|
|
params.allSelfAssigned = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
// else if (this.stateList[this.stateCur].code === 100) {
|
|
|
|
|
|
// // 急报单
|
|
|
|
|
|
// params.isMonitoredOrder = true;
|
|
|
|
|
|
// params.allSelfAssigned = 0;
|
|
|
|
|
|
// }
|
|
|
|
|
|
} else if (this.tabCur != null) {
|
|
|
|
|
|
if (this.tabCur === 4) {
|
|
|
|
|
|
// 售后中的单
|
|
|
|
|
|
params.isMonitoredOrder = true;
|
|
|
|
|
|
params.allSelfAssigned = 0;
|
2023-03-27 22:27:30 +08:00
|
|
|
|
} else if (this.tabCur === 3) {
|
|
|
|
|
|
// 确认中的单
|
|
|
|
|
|
params.workFinishTimeExisted = true;
|
2023-03-28 00:55:41 +08:00
|
|
|
|
params.drawCashStatusList = [0,1];
|
|
|
|
|
|
params.orderStatus = null;
|
|
|
|
|
|
} else if (this.tabCur === 5) {
|
|
|
|
|
|
// 已完成/子单
|
|
|
|
|
|
params.workFinishTimeExisted = true;
|
|
|
|
|
|
params.drawCashStatus = 2;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
}
|
2022-09-22 01:13:05 +08:00
|
|
|
|
}
|
2022-06-02 17:39:45 +08:00
|
|
|
|
try {
|
2022-06-13 16:13:10 +08:00
|
|
|
|
let res = null;
|
2022-11-09 01:07:15 +08:00
|
|
|
|
let tmpStateCur = this.stateCur;
|
|
|
|
|
|
let tmpTabCur = this.tabCur;
|
2022-06-13 16:13:10 +08:00
|
|
|
|
// 不同状态的单需要请求不同接口
|
2023-02-26 01:16:12 +08:00
|
|
|
|
if ((this.stateCur != null && [105].indexOf(this.stateList[this.stateCur].code) >= 0) || (this.tabCur === 6)) {
|
2022-11-01 23:53:43 +08:00
|
|
|
|
// 只查询主单,需要进行分页处理
|
2022-09-12 00:21:19 +08:00
|
|
|
|
this.$refs.loadStatusBar.showLoading();
|
2022-11-01 23:53:43 +08:00
|
|
|
|
res = await this.$request.qryMasterOrderPage(params);
|
2022-11-09 01:07:15 +08:00
|
|
|
|
// 如果选中的状态栏已经切换,则直接返回
|
|
|
|
|
|
if (this.stateCur !== tmpStateCur || this.tabCur !== tmpTabCur) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
if (res && res.rows) {
|
|
|
|
|
|
let rowsLength = res.rows.length;
|
|
|
|
|
|
if (rowsLength > 0) {
|
|
|
|
|
|
this.orderList = this.orderList.concat(res.rows);
|
|
|
|
|
|
this.pageNum++;
|
|
|
|
|
|
if (rowsLength === params.pageSize) {
|
|
|
|
|
|
this.$refs.loadStatusBar.showLoadMore();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-06-13 16:13:10 +08:00
|
|
|
|
}
|
2022-06-02 17:39:45 +08:00
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
this.$refs.loadStatusBar.showLoadOver();
|
2022-12-03 22:11:59 +08:00
|
|
|
|
} else if ((this.stateCur != null && [103, 100, 0].indexOf(this.stateList[this.stateCur].code) >= 0) || [0, 4].indexOf(this.tabCur) >= 0) {
|
2022-11-01 23:53:43 +08:00
|
|
|
|
let funName = "qryMixOrderList";
|
|
|
|
|
|
// 展示混合单,不做分页处理
|
|
|
|
|
|
if (this.stateCur != null && this.stateList[this.stateCur].code === 103) {
|
2022-09-22 01:13:05 +08:00
|
|
|
|
// 超时单
|
|
|
|
|
|
params.orderStatus = null;
|
|
|
|
|
|
params.isOverTime = true;
|
2022-11-01 23:53:43 +08:00
|
|
|
|
} else if (this.tabCur === 4) {
|
|
|
|
|
|
funName = "qryMixAfterList";
|
2022-09-22 01:13:05 +08:00
|
|
|
|
}
|
2022-11-01 23:53:43 +08:00
|
|
|
|
res = await this.$request[funName](params);
|
2022-11-09 01:07:15 +08:00
|
|
|
|
// 如果选中的状态栏已经切换,则直接返回
|
|
|
|
|
|
if (this.stateCur !== tmpStateCur || this.tabCur !== tmpTabCur) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
if (res && res.data) {
|
|
|
|
|
|
this.orderList = res.data;
|
|
|
|
|
|
}
|
2022-11-01 23:53:43 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
// 只查询子单,需要进行分页处理
|
|
|
|
|
|
this.$refs.loadStatusBar.showLoading();
|
|
|
|
|
|
let funName = "qryDetailOrderPage";
|
|
|
|
|
|
if (this.tabCur === 4) {
|
|
|
|
|
|
funName = "getAfterList";
|
|
|
|
|
|
}
|
|
|
|
|
|
res = await this.$request[funName](params);
|
2022-11-09 01:07:15 +08:00
|
|
|
|
// 如果选中的状态栏已经切换,则直接返回
|
|
|
|
|
|
if (this.stateCur !== tmpStateCur || this.tabCur !== tmpTabCur) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-11-01 23:53:43 +08:00
|
|
|
|
if (res && res.rows) {
|
|
|
|
|
|
let rowsLength = res.rows.length;
|
|
|
|
|
|
if (rowsLength > 0) {
|
|
|
|
|
|
this.orderList = this.orderList.concat(res.rows);
|
|
|
|
|
|
this.pageNum++;
|
|
|
|
|
|
if (rowsLength === params.pageSize) {
|
|
|
|
|
|
this.$refs.loadStatusBar.showLoadMore();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$refs.loadStatusBar.showLoadOver();
|
2022-06-02 17:39:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.error(e)
|
|
|
|
|
|
this.$refs.loadStatusBar.showLoadErr();
|
|
|
|
|
|
}
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
async loadCategoryList(idArr) {
|
2022-08-04 22:08:49 +08:00
|
|
|
|
let typeList = await this.$request.listByStep({
|
|
|
|
|
|
type: 1
|
|
|
|
|
|
});
|
2022-06-13 16:13:10 +08:00
|
|
|
|
typeList = typeList.data;
|
|
|
|
|
|
let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId;
|
|
|
|
|
|
let subTypeList = await this.$request.listByStep({
|
2022-08-04 22:08:49 +08:00
|
|
|
|
type: 1,
|
2022-06-13 16:13:10 +08:00
|
|
|
|
goodsCategoryId: col1Id
|
|
|
|
|
|
});
|
|
|
|
|
|
subTypeList = subTypeList.data;
|
|
|
|
|
|
let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId;
|
|
|
|
|
|
let subSubTypeList = await this.$request.listByStep({
|
2022-08-04 22:08:49 +08:00
|
|
|
|
type: 1,
|
2022-06-13 16:13:10 +08:00
|
|
|
|
goodsCategoryId: col2Id
|
|
|
|
|
|
});
|
|
|
|
|
|
subSubTypeList = subSubTypeList.data;
|
2022-08-04 22:08:49 +08:00
|
|
|
|
let col3Id = idArr ? idArr[2] : subSubTypeList[0].goodsCategoryId;
|
|
|
|
|
|
let thirdTypeList = await this.$request.listByStep({
|
|
|
|
|
|
type: 1,
|
|
|
|
|
|
goodsCategoryId: col3Id
|
|
|
|
|
|
});
|
|
|
|
|
|
thirdTypeList = thirdTypeList.data;
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.categoryList.push(subTypeList);
|
|
|
|
|
|
this.categoryList.push(subSubTypeList);
|
2022-08-04 22:08:49 +08:00
|
|
|
|
this.categoryList.push(thirdTypeList);
|
2022-06-13 16:13:10 +08:00
|
|
|
|
},
|
|
|
|
|
|
async loadRegionList() {
|
|
|
|
|
|
let regionList = await this.$request.areaListByStep();
|
|
|
|
|
|
regionList = regionList.data;
|
|
|
|
|
|
let subRegionList = [];
|
|
|
|
|
|
let subSubRegionList = [];
|
|
|
|
|
|
if (regionList && regionList.length > 0) {
|
|
|
|
|
|
subRegionList = await this.$request.areaListByStep({
|
|
|
|
|
|
parentCode: regionList[0].areaCode
|
|
|
|
|
|
});
|
|
|
|
|
|
subRegionList = subRegionList.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (subRegionList && subRegionList.length > 0) {
|
|
|
|
|
|
subSubRegionList = await this.$request.areaListByStep({
|
|
|
|
|
|
parentCode: subRegionList[0].areaCode
|
|
|
|
|
|
});
|
|
|
|
|
|
subSubRegionList = subSubRegionList.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.areaList.push(regionList);
|
|
|
|
|
|
this.areaList.push(subRegionList);
|
|
|
|
|
|
this.areaList.push(subSubRegionList);
|
|
|
|
|
|
},
|
|
|
|
|
|
async loadTeamMembers() {
|
2022-06-29 21:21:16 +08:00
|
|
|
|
let res = await this.$request.getTeamPage({
|
2022-08-16 23:26:51 +08:00
|
|
|
|
leaderId: this.curUserInfo.workerId,
|
|
|
|
|
|
workerId: null
|
2022-06-29 21:21:16 +08:00
|
|
|
|
});
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.myTeamMembers = res.rows;
|
|
|
|
|
|
},
|
2022-07-13 21:38:54 +08:00
|
|
|
|
async loadOrderStatistics() {
|
|
|
|
|
|
let res = await this.$request.orderStatistics();
|
|
|
|
|
|
this.orderStatistics = res.data;
|
|
|
|
|
|
},
|
2022-05-06 23:47:18 +08:00
|
|
|
|
bindEvent() {
|
|
|
|
|
|
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
|
|
|
|
|
},
|
|
|
|
|
|
offBindEvent() {
|
|
|
|
|
|
uni.$off(this.$globalFun.HIDE_MODAL);
|
|
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
async regionColChange(e) {
|
|
|
|
|
|
let colObj = e.detail;
|
|
|
|
|
|
if (colObj.column == 0) {
|
|
|
|
|
|
// 通过一级查二级
|
|
|
|
|
|
let subAreaList = await this.$request.areaListByStep({parentCode: this.areaList[0][colObj.value].areaCode});
|
|
|
|
|
|
subAreaList = subAreaList.data;
|
|
|
|
|
|
let subSubAreaList = [];
|
|
|
|
|
|
if (subAreaList.length) {
|
|
|
|
|
|
subSubAreaList = await this.$request.areaListByStep({parentCode: subAreaList[0].areaCode});
|
|
|
|
|
|
subSubAreaList = subSubAreaList.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.areaList.pop();
|
|
|
|
|
|
this.areaList.pop();
|
|
|
|
|
|
this.areaList.push(subAreaList);
|
|
|
|
|
|
this.areaList.push(subSubAreaList);
|
|
|
|
|
|
this.areaMultiIndex = [colObj.value, 0, 0];
|
|
|
|
|
|
} else if (colObj.column == 1) {
|
|
|
|
|
|
// 通过二级查三级
|
2022-06-23 17:33:19 +08:00
|
|
|
|
let subAreaList = await this.$request.areaListByStep({parentCode: this.areaList[1][colObj.value].areaCode});
|
2022-06-13 16:13:10 +08:00
|
|
|
|
subAreaList = subAreaList.data;
|
|
|
|
|
|
this.areaList.pop();
|
|
|
|
|
|
this.areaList.push(subAreaList);
|
|
|
|
|
|
this.areaMultiIndex = [this.areaMultiIndex[0], colObj.value, 0];
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-05-06 23:47:18 +08:00
|
|
|
|
regionChange(e) {
|
|
|
|
|
|
this.areaMultiIndex = e.detail.value;
|
|
|
|
|
|
let chosenArea = [];
|
|
|
|
|
|
for(let i = 0; i < this.areaList.length; i++) {
|
|
|
|
|
|
chosenArea.push(this.areaList[i][this.areaMultiIndex[i]]);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.formData.area = chosenArea;
|
|
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
async categoryColChange(e) {
|
|
|
|
|
|
let colObj = e.detail;
|
|
|
|
|
|
if (colObj.column == 0) {
|
|
|
|
|
|
// 通过一级查询二级
|
|
|
|
|
|
let subTypeList = await this.$request.listByStep({
|
2022-08-04 22:08:49 +08:00
|
|
|
|
type: 1,
|
2022-06-13 16:13:10 +08:00
|
|
|
|
goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId
|
|
|
|
|
|
});
|
|
|
|
|
|
subTypeList = subTypeList.data;
|
2022-08-04 22:08:49 +08:00
|
|
|
|
let subSubTypeList = [];
|
|
|
|
|
|
if (subTypeList && subTypeList.length) {
|
|
|
|
|
|
subSubTypeList = await this.$request.listByStep({
|
|
|
|
|
|
type: 1,
|
|
|
|
|
|
goodsCategoryId: subTypeList[0].goodsCategoryId
|
|
|
|
|
|
});
|
|
|
|
|
|
subSubTypeList = subSubTypeList.data;
|
|
|
|
|
|
}
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.categoryList.pop();
|
|
|
|
|
|
this.categoryList.pop();
|
|
|
|
|
|
this.categoryList.push(subTypeList);
|
|
|
|
|
|
this.categoryList.push(subSubTypeList);
|
|
|
|
|
|
this.categoryMultiIndex = [colObj.value, 0, 0];
|
|
|
|
|
|
} else if (colObj.column == 1) {
|
|
|
|
|
|
// 通过二级查三级
|
|
|
|
|
|
let subSubTypeList = await this.$request.listByStep({
|
2022-08-04 22:08:49 +08:00
|
|
|
|
type: 1,
|
2022-06-13 16:13:10 +08:00
|
|
|
|
goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId
|
|
|
|
|
|
});
|
|
|
|
|
|
subSubTypeList = subSubTypeList.data;
|
|
|
|
|
|
this.categoryList.pop();
|
|
|
|
|
|
this.categoryList.push(subSubTypeList);
|
|
|
|
|
|
this.categoryMultiIndex = [this.categoryMultiIndex[0], colObj.value, 0];
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-05-06 23:47:18 +08:00
|
|
|
|
categoryChange(e) {
|
|
|
|
|
|
this.categoryMultiIndex = e.detail.value;
|
|
|
|
|
|
let chosenCategory = [];
|
|
|
|
|
|
for(let i = 0; i < this.categoryList.length; i++) {
|
|
|
|
|
|
chosenCategory.push(this.categoryList[i][this.categoryMultiIndex[i]]);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.formData.category = chosenCategory;
|
|
|
|
|
|
},
|
2022-07-04 22:31:08 +08:00
|
|
|
|
searchOrder() {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
2022-06-13 16:13:10 +08:00
|
|
|
|
},
|
|
|
|
|
|
resetConditions() {
|
|
|
|
|
|
this.formData = {
|
|
|
|
|
|
category: null,
|
|
|
|
|
|
area: null,
|
|
|
|
|
|
orderKeywords: ''
|
|
|
|
|
|
}
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
2022-06-22 17:40:50 +08:00
|
|
|
|
tabSelect(e) {
|
|
|
|
|
|
this.stateCur = null;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
this.tabCur = e.currentTarget.dataset.id;
|
|
|
|
|
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
2022-06-02 17:39:45 +08:00
|
|
|
|
// this.reloadMasterOrderPage(this.stateCur, this.subStateList[this.tabCur].code);
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.reloadMasterOrderPage();
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
statusSelect(e) {
|
2022-06-22 17:40:50 +08:00
|
|
|
|
this.tabCur = null;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
this.stateCur = e.currentTarget.dataset.id;
|
2022-06-22 17:40:50 +08:00
|
|
|
|
this.reloadMasterOrderPage();
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
getCurDateAndTime() {
|
|
|
|
|
|
let date = new Date();
|
|
|
|
|
|
this.curDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00";
|
2022-05-06 23:47:18 +08:00
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
showModal(e, orderInfo) {
|
|
|
|
|
|
this.getCurDateAndTime();
|
|
|
|
|
|
if (orderInfo) {
|
|
|
|
|
|
this.curOrder = orderInfo;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = true;
|
|
|
|
|
|
},
|
2022-09-26 02:30:57 +08:00
|
|
|
|
showModalByRef(refName, curOrder, params) {
|
|
|
|
|
|
this.$refs[refName].showModal(curOrder, params);
|
|
|
|
|
|
this.curOrder = curOrder;
|
2022-05-22 21:52:14 +08:00
|
|
|
|
},
|
2023-01-29 15:38:37 +08:00
|
|
|
|
normalShowModalByRef(refName) {
|
|
|
|
|
|
this.$refs[refName].showModal();
|
|
|
|
|
|
},
|
2022-05-06 23:47:18 +08:00
|
|
|
|
hideModal(e) {
|
|
|
|
|
|
this.curOrder = null;
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
copyData(data) {
|
|
|
|
|
|
uni.setClipboardData({
|
|
|
|
|
|
data: data
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2022-09-12 00:21:19 +08:00
|
|
|
|
async editServTime(id, datetimeArr, ifRollback2WS, order) {
|
2022-06-20 18:08:22 +08:00
|
|
|
|
// 确定方法名
|
2022-09-12 00:21:19 +08:00
|
|
|
|
let reqFunName = "updateOrder";
|
|
|
|
|
|
if (this.tabCur === 0 && order.orderDetailId == null) {
|
|
|
|
|
|
id = order.orderMasterId;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
reqFunName = "updateDetailOrder";
|
|
|
|
|
|
id = order.orderDetailId;
|
2022-06-16 23:14:43 +08:00
|
|
|
|
}
|
2022-06-20 18:08:22 +08:00
|
|
|
|
// 确定参数
|
|
|
|
|
|
let params = datetimeArr && datetimeArr.length > 1 ? {
|
|
|
|
|
|
id: id,
|
|
|
|
|
|
expectTimeStart: datetimeArr[0],
|
2022-10-27 00:44:47 +08:00
|
|
|
|
expectTimeEnd: datetimeArr[1],
|
|
|
|
|
|
useTimeNotRange: datetimeArr[1] == null ? true : false
|
2022-06-20 18:08:22 +08:00
|
|
|
|
} : {
|
2022-06-13 16:13:10 +08:00
|
|
|
|
id: id,
|
|
|
|
|
|
revTime: datetime
|
2022-06-20 18:08:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let res = await this.$request[reqFunName](params);
|
2022-06-13 16:13:10 +08:00
|
|
|
|
if (res.code === 0) {
|
2022-06-18 02:03:07 +08:00
|
|
|
|
let finishFlag = false;
|
|
|
|
|
|
if (ifRollback2WS) {
|
2022-06-22 22:38:07 +08:00
|
|
|
|
let statusUpdateRes = await this.updateOrderDetailStatus({
|
|
|
|
|
|
id: id,
|
|
|
|
|
|
orderStatus: 2,
|
|
|
|
|
|
workBeginTime: ''
|
|
|
|
|
|
});
|
2022-06-18 02:03:07 +08:00
|
|
|
|
if (statusUpdateRes && statusUpdateRes.code === 0) {
|
|
|
|
|
|
finishFlag = true;
|
|
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
} else if (order && order.orderDetailId == null) {
|
|
|
|
|
|
finishFlag = await this.assignWork2MySelf(order);
|
2022-06-20 18:08:22 +08:00
|
|
|
|
} else {
|
2022-09-12 00:21:19 +08:00
|
|
|
|
finishFlag = await this.updateOrderStatus(order.orderDetailId, 2, 'updateDetailOrder');
|
2022-06-18 02:03:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (finishFlag) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
|
|
|
|
|
uni.showToast({
|
2022-09-12 00:21:19 +08:00
|
|
|
|
title: '预约时间成功',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 2000
|
2022-06-18 02:03:07 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
2022-06-13 16:13:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-06-22 22:38:07 +08:00
|
|
|
|
async updateOrderDetailStatus(params = {}) {
|
|
|
|
|
|
let res = await this.$request.updateDetailOrder(params);
|
2022-06-18 02:03:07 +08:00
|
|
|
|
return res;
|
|
|
|
|
|
},
|
2023-03-25 22:05:31 +08:00
|
|
|
|
// async ledgerAccountcountdownTimeup(order = {}, index) {
|
|
|
|
|
|
// let res = await this.$request.updateDetailOrder({
|
|
|
|
|
|
// id: order.orderDetailId,
|
|
|
|
|
|
// ledgerAccountStatus: 1
|
|
|
|
|
|
// });
|
|
|
|
|
|
// if (!res || res.code !== 0) {
|
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
|
// title: '分账倒计时异常,订单号:' + order.orderDetailId,
|
|
|
|
|
|
// duration: 2000
|
|
|
|
|
|
// })
|
|
|
|
|
|
// } else if (this.tabCur === 3) {
|
|
|
|
|
|
// // TODO:更新此订单信息
|
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
|
// title: '订单编码:' + order.orderDetailCode + '已进入分账中,请再次点击确认中栏目',
|
|
|
|
|
|
// duration: 3000
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
2022-05-06 23:47:18 +08:00
|
|
|
|
showArrangeFailTime(e) {
|
|
|
|
|
|
this.showTimeArrangeModal = false;
|
2022-06-16 23:14:43 +08:00
|
|
|
|
this.showEditTimeArrangeModal = false;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
this.showArrangeFailTimeModal = true;
|
|
|
|
|
|
},
|
2022-06-18 02:03:07 +08:00
|
|
|
|
finishQrPay(e) {
|
|
|
|
|
|
this.hideModal(e);
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
|
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
togglePopup(e, orderInfo) {
|
2022-05-06 23:47:18 +08:00
|
|
|
|
if (this.ifShowPageMeta) {
|
|
|
|
|
|
this.$refs[e.currentTarget.dataset.popup].close();
|
|
|
|
|
|
let timeout = setTimeout(() => {
|
|
|
|
|
|
this.curOrder = null;
|
|
|
|
|
|
}, 100);
|
|
|
|
|
|
} else {
|
2022-06-13 16:13:10 +08:00
|
|
|
|
if (orderInfo) {
|
|
|
|
|
|
this.curOrder = orderInfo;
|
2022-05-06 23:47:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
this.$refs[e.currentTarget.dataset.popup].open();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
changePopupState(e) {
|
|
|
|
|
|
this.ifShowPageMeta = e.show;
|
|
|
|
|
|
},
|
|
|
|
|
|
makePhoneCall(phoneNum) {
|
|
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
|
phoneNumber: phoneNum
|
|
|
|
|
|
})
|
2022-05-09 10:00:16 +08:00
|
|
|
|
},
|
2022-06-18 02:03:07 +08:00
|
|
|
|
async makePayQrcode(e, orderInfo) {
|
|
|
|
|
|
if (orderInfo.payStatus === 1) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '订单已支付,不要重复付款!',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let res = await this.$request.qrPay(orderInfo);
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
this.showModal(e, orderInfo);
|
2022-06-22 17:40:50 +08:00
|
|
|
|
this.$refs.payQrcode.showQrcode(res.data.expend.qrcode_url);
|
2022-06-18 02:03:07 +08:00
|
|
|
|
}
|
2022-05-09 10:00:16 +08:00
|
|
|
|
},
|
2022-06-16 23:14:43 +08:00
|
|
|
|
showServOrderDetail(order) {
|
2022-05-09 10:00:16 +08:00
|
|
|
|
uni.navigateTo({
|
2022-06-16 23:14:43 +08:00
|
|
|
|
url: '/pages/order-manage/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
2022-05-09 10:00:16 +08:00
|
|
|
|
})
|
2022-05-09 14:28:35 +08:00
|
|
|
|
},
|
2022-08-23 16:21:00 +08:00
|
|
|
|
async finishOrder(order) {
|
|
|
|
|
|
let checkRes = await this.checkBankAndCertify();
|
|
|
|
|
|
if (!checkRes) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-07-28 02:02:20 +08:00
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: '/pages/order-manage/finish-order?order=' + encodeURIComponent(JSON.stringify(order))
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-08-23 16:21:00 +08:00
|
|
|
|
async checkBankAndCertify() {
|
|
|
|
|
|
// 查询账户绑定信息
|
|
|
|
|
|
let bankCardRes = await this.$request.getBindBankCardByWorkerId({
|
|
|
|
|
|
workerId: this.curUserInfo.workerId
|
|
|
|
|
|
});
|
|
|
|
|
|
this.bankCard = bankCardRes.data;
|
|
|
|
|
|
// 查询实名信息
|
|
|
|
|
|
let certifyInfoRes = await this.$request.getWorkerCertify();
|
|
|
|
|
|
this.certifyInfo = certifyInfoRes.data;
|
2022-10-06 03:07:08 +08:00
|
|
|
|
if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) {
|
2022-08-23 16:21:00 +08:00
|
|
|
|
this.$refs.vertifyCertify.showModal();
|
|
|
|
|
|
return false;
|
2023-03-12 17:07:20 +08:00
|
|
|
|
} else if (this.certifyInfo.status != 1) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '实名认证审核通过后才可进行操作',
|
|
|
|
|
|
duration: 2500
|
|
|
|
|
|
})
|
|
|
|
|
|
return false;
|
2022-10-06 03:07:08 +08:00
|
|
|
|
} else if (!this.bankCard || !this.bankCard.bankNum) {
|
|
|
|
|
|
this.$refs.vertifyBankBind.showModal();
|
|
|
|
|
|
return false;
|
2022-08-23 16:21:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
|
|
|
},
|
2023-03-05 18:25:19 +08:00
|
|
|
|
acceptOrder(id, code, status, funName) {
|
|
|
|
|
|
let _this = this;
|
2023-03-27 01:52:25 +08:00
|
|
|
|
_this.updateOrderStatus(id, status, funName);
|
2023-03-05 18:25:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
async noticeMsg(params = {}) {
|
|
|
|
|
|
this.$request.noticeMsg({
|
|
|
|
|
|
openId: this.curUserInfo.openId,
|
|
|
|
|
|
remind: params.remind,
|
|
|
|
|
|
orderId: params.orderId,
|
|
|
|
|
|
name: params.name,
|
|
|
|
|
|
orderStatus: 'RECEIVE'
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2022-09-12 00:21:19 +08:00
|
|
|
|
async updateOrderStatus(id, status, funName) {
|
|
|
|
|
|
let res = await this.$request[funName]({
|
|
|
|
|
|
id: id,
|
2022-06-22 22:38:07 +08:00
|
|
|
|
orderStatus: status,
|
|
|
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'success'
|
|
|
|
|
|
})
|
2022-09-12 00:21:19 +08:00
|
|
|
|
return true;
|
2022-06-22 22:38:07 +08:00
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
return false;
|
2022-06-22 22:38:07 +08:00
|
|
|
|
},
|
2022-05-22 21:52:14 +08:00
|
|
|
|
updateRefundStatus(status, index) {
|
2022-06-02 17:39:45 +08:00
|
|
|
|
this.orderList[index].refundStatus = status;
|
2022-05-22 21:52:14 +08:00
|
|
|
|
},
|
|
|
|
|
|
updateAfterSaleDealStatus(status, index) {
|
2022-06-02 17:39:45 +08:00
|
|
|
|
this.orderList[index].afterSaleDealStatus = status;
|
2022-05-22 21:52:14 +08:00
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
getCanAssignList(order) {
|
2022-07-29 23:05:47 +08:00
|
|
|
|
if (this.myTeamMembers && this.myTeamMembers.length) {
|
|
|
|
|
|
this.$refs.dispatchOrderPopup.$children[0].loadData(order);
|
|
|
|
|
|
}
|
2022-06-13 16:13:10 +08:00
|
|
|
|
},
|
2022-06-18 02:03:07 +08:00
|
|
|
|
async workBegin(order) {
|
|
|
|
|
|
let curDate = new Date();
|
|
|
|
|
|
let formatCurDate = curDate.getFullYear() + '-' + (curDate.getMonth() + 1) + '-' + curDate.getDate()
|
|
|
|
|
|
+ ' ' + curDate.getHours() + ':' + curDate.getMinutes() + ':' + curDate.getSeconds();
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
id: order.orderDetailId,
|
|
|
|
|
|
orderStatus: 3,
|
|
|
|
|
|
workBeginTime: formatCurDate
|
|
|
|
|
|
}
|
|
|
|
|
|
let res = await this.$request.updateDetailOrder(params);
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
2022-09-12 00:21:19 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'success',
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
})
|
2022-06-18 02:03:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-06-13 16:13:10 +08:00
|
|
|
|
/* modal,popup确认或关闭后的回调 */
|
2022-05-22 21:52:14 +08:00
|
|
|
|
async showAfterSalePic() {
|
|
|
|
|
|
// TODO:查询该售后单中的拒绝原因中上传的截图
|
|
|
|
|
|
this.picModalImgList = await this.$api.data('picImgList');
|
|
|
|
|
|
console.log(this.picModalImgList)
|
2022-06-13 16:13:10 +08:00
|
|
|
|
},
|
|
|
|
|
|
async assignWork(params) {
|
|
|
|
|
|
let res = await this.$request.assign(params);
|
2022-07-19 15:11:32 +08:00
|
|
|
|
if (res && res.code === 0) {
|
2022-06-13 16:13:10 +08:00
|
|
|
|
this.getCanAssignList(this.curOrder);
|
2022-06-22 22:38:07 +08:00
|
|
|
|
this.reloadMasterOrderPage();
|
2022-06-13 16:13:10 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '派单成功',
|
|
|
|
|
|
icon: 'success'
|
|
|
|
|
|
})
|
2022-09-12 00:21:19 +08:00
|
|
|
|
return true;
|
2022-07-19 15:11:32 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '派单失败,请确认派单价格不高于本订单价格',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
2022-09-12 00:21:19 +08:00
|
|
|
|
return false;
|
2022-06-13 16:13:10 +08:00
|
|
|
|
}
|
2022-06-16 23:14:43 +08:00
|
|
|
|
},
|
|
|
|
|
|
async assignWork2MySelf(orderInfo) {
|
|
|
|
|
|
let res = await this.$request.getCanAssignList({
|
|
|
|
|
|
orderMasterId: orderInfo.orderMasterId
|
|
|
|
|
|
});
|
|
|
|
|
|
let pickedList = res.data;
|
|
|
|
|
|
let goodsToAssign = [];
|
|
|
|
|
|
pickedList.forEach((goods) => {
|
|
|
|
|
|
goodsToAssign.push({
|
|
|
|
|
|
goodsStandardId: goods.goodsStandardId,
|
|
|
|
|
|
num: goods.goodsNum
|
|
|
|
|
|
})
|
|
|
|
|
|
});
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
goodsList: goodsToAssign,
|
|
|
|
|
|
workerId: this.curUserInfo.workerId,
|
|
|
|
|
|
totalPay: orderInfo.totalMoney,
|
2022-06-22 22:38:07 +08:00
|
|
|
|
orderMasterId: orderInfo.orderMasterId,
|
|
|
|
|
|
isAll: 1
|
2022-06-16 23:14:43 +08:00
|
|
|
|
}
|
2022-09-12 00:21:19 +08:00
|
|
|
|
return await this.assignWork(params);
|
2022-09-12 14:50:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
async rejectMasterOrder(order) {
|
|
|
|
|
|
let res = await this.$request.updateOrder({
|
|
|
|
|
|
id: order.orderMasterId,
|
|
|
|
|
|
workerId: -1
|
|
|
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '拒绝接单成功',
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '拒绝接单失败'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async rejectDetailOrder(order) {
|
|
|
|
|
|
let res = await this.$request.rejectDetailOrder({
|
|
|
|
|
|
id: order.orderDetailId
|
|
|
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '拒绝接单成功',
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '拒绝接单失败'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2022-09-25 00:22:59 +08:00
|
|
|
|
},
|
|
|
|
|
|
async getChangedPrice(order) {
|
|
|
|
|
|
let res = await this.$request.getChangeOrderPrice(order);
|
|
|
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
|
|
|
return res.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
},
|
|
|
|
|
|
async changePrice(e, order) {
|
|
|
|
|
|
let priceObj = await this.getChangedPrice(order);
|
|
|
|
|
|
let refName = e.currentTarget.dataset.ref;
|
|
|
|
|
|
this.showModal(e, order);
|
2022-11-13 23:23:59 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs[refName].init(priceObj);
|
|
|
|
|
|
})
|
2022-09-26 23:51:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
viewImage(e, imgList) {
|
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
|
urls: imgList,
|
|
|
|
|
|
current: e.currentTarget.dataset.url
|
|
|
|
|
|
});
|
2022-10-21 00:37:07 +08:00
|
|
|
|
},
|
2022-12-02 02:27:42 +08:00
|
|
|
|
async authLocationCallback(res) {
|
|
|
|
|
|
if (res.detail.authSetting['scope.userLocation']) {
|
|
|
|
|
|
this.hasAuthLocation = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-10-21 00:37:07 +08:00
|
|
|
|
async recordClockInLocation(order) {
|
2022-12-11 21:12:38 +08:00
|
|
|
|
let _this = this;
|
|
|
|
|
|
// 通过 wx.getSetting 先查询一下用户是否授权了authScope
|
|
|
|
|
|
let res1 = await wx.getSetting();
|
|
|
|
|
|
if (res1) {
|
|
|
|
|
|
if (!res1.authSetting['scope.userLocation']) {
|
|
|
|
|
|
let res2 = await wx.getLocation({
|
|
|
|
|
|
type: 'gcj02',
|
|
|
|
|
|
fail: async (result) => {
|
|
|
|
|
|
console.log(result)
|
|
|
|
|
|
if (result.errno === 103) {
|
|
|
|
|
|
this.hasAuthLocation = false;
|
|
|
|
|
|
// 用户授权
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '请先授权',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 1500
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// 用户授权
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '请确认是否开启定位',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 1500
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
success: async (result) => {
|
|
|
|
|
|
_this.persistClockInLocation(order, result);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
wx.getLocation({
|
|
|
|
|
|
type: 'gcj02',
|
|
|
|
|
|
fail: async (result) => {
|
|
|
|
|
|
console.log(result)
|
|
|
|
|
|
if (result.errCode === 2 || result.errCode === 404) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '定位获取失败,请确认是否开启定位',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 2500
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '定位获取失败,请稍后重试',
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
duration: 2500
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
success: async (result) => {
|
|
|
|
|
|
_this.persistClockInLocation(order, result);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2022-12-02 02:27:42 +08:00
|
|
|
|
}
|
2022-12-11 21:12:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
async persistClockInLocation(order, res) {
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
id: order.orderDetailId,
|
|
|
|
|
|
clockInLocation: res.longitude + "," + res.latitude
|
|
|
|
|
|
}
|
|
|
|
|
|
let updateOrderRes = await this.$request.updateDetailOrder(params);
|
|
|
|
|
|
if (updateOrderRes && updateOrderRes.code === 0) {
|
|
|
|
|
|
this.reloadMasterOrderPage();
|
2022-10-21 00:37:07 +08:00
|
|
|
|
uni.showToast({
|
2022-12-11 21:12:38 +08:00
|
|
|
|
icon: 'success',
|
|
|
|
|
|
duration: 1000
|
2022-10-21 00:37:07 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-05-06 23:47:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.inline-combox {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: calc((90vw - 80rpx)/2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cu-list.grid.no-border {
|
|
|
|
|
|
padding: unset;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cu-list.grid.no-border>.cu-item {
|
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
|
padding-bottom: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-tag {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
right: -30rpx;
|
|
|
|
|
|
border-radius: 40rpx 0 0 40rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cu-tag+.cu-tag {
|
|
|
|
|
|
margin-left: unset;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.left-top-sm-bar {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 25rpx;
|
|
|
|
|
|
top: 25rpx;
|
|
|
|
|
|
z-index: 99;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|