2022-05-03 14:59:33 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<!-- 顶部操作条 -->
|
|
|
|
|
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
|
|
|
|
|
<block slot="backText">返回</block>
|
|
|
|
|
|
<block slot="content">任务详情</block>
|
|
|
|
|
|
</cu-custom>
|
|
|
|
|
|
<view class="padding bg-white margin-top-sm margin-lr-sm">
|
|
|
|
|
|
<view class="flex justify-between">
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<view class="text-lg text-bold text-cut" style="width: 70%;">{{order.goodsName}}</view>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
<view class="text-right">
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<view class="text-lg text-price text-red text-bold">{{order.totalMoney}}</view>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
<view v-if="order.expeditedPrice">
|
|
|
|
|
|
<text>加急:</text><text class="text-price text-red text-bold">{{order.expeditedPrice}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<view class="flex justify-start" v-if="order.tag">
|
2022-05-03 14:59:33 +08:00
|
|
|
|
<view v-for="(tagContent, index1) in order.tag" class='cu-tag margin-right-xs'>{{tagContent}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-locationfill"></text></text>
|
|
|
|
|
|
<text>{{order.address}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-timefill"></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-03 14:59:33 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-phone"></text></text>
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<text class="margin-right-xs">{{order.customerName}}</text>
|
2023-03-05 23:50:56 +08:00
|
|
|
|
<text>{{order.customerPhone.substring(0, 3) + "****" + order.customerPhone.substring(7)}}</text>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm bg-white margin-lr-sm margin-bottom-with-bar">
|
|
|
|
|
|
<view class="cu-bar solid-bottom">
|
|
|
|
|
|
<view class="action bar-first-action">
|
|
|
|
|
|
<text class="cuIcon-titles text-main-color"></text> 商品信息
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="padding">
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<!-- <view class="cu-avatar margin-bottom-sm" :style="'background-image:url(' + order.goodsLogoUrl + '); width: 180rpx; height: 180rpx'"></view> -->
|
|
|
|
|
|
<!-- <view class="margin-bottom-sm"><text class="text-bold">商品规格:</text>{{order.spec}}</view> -->
|
|
|
|
|
|
<!-- <view class="margin-bottom-sm"><text class="text-bold">服务类别:</text>{{order.servType}}</view> -->
|
|
|
|
|
|
<view class="margin-bottom-sm">
|
|
|
|
|
|
<product-picked :product="order" :pickedList="order.standardList" :columnTitleArr="specColumnHeaders" :valFieldArr="specValFields"></product-picked>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-bottom-sm"><text class="text-bold">订单编码:</text>{{order.orderMasterCode}}</view>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
<view class="margin-bottom-sm"><text class="text-bold">订单时间:</text>{{order.createTime}}</view>
|
2022-06-29 18:07:15 +08:00
|
|
|
|
<view class="margin-bottom-sm"><text class="text-bold">备注:</text>{{order.remark}}</view>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-bar tabbar border shop fixed-bottom-bar">
|
|
|
|
|
|
<button class="bg-main-color long-btn margin-lr-sm" data-take-modal="showTakeSuccessModal" data-certify-modal="showTakeCertifiedModal" @click="takeTask">立即接单</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 接单认证模态框 -->
|
|
|
|
|
|
<view class="cu-modal" :class="showTakeCertifiedModal?'show':''">
|
|
|
|
|
|
<view class="cu-dialog">
|
|
|
|
|
|
<view class="padding-xl">
|
|
|
|
|
|
<view class="cuIcon-profile big-icon padding-tb text-main-color"></view>
|
|
|
|
|
|
<view>您还未进行认证</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-bar bg-white solid-top">
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal" @tap="hideModal">以后认证</view>
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeCertifiedModal" @tap="hideModal"
|
|
|
|
|
|
@click="goToCertify">立即认证</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 接单成功模态框 -->
|
|
|
|
|
|
<view class="cu-modal" :class="showTakeSuccessModal?'show':''">
|
|
|
|
|
|
<view class="cu-dialog">
|
|
|
|
|
|
<view class="padding-xl">
|
|
|
|
|
|
<view class="cuIcon-roundcheck big-icon padding-tb text-main-color"></view>
|
|
|
|
|
|
<view class="text-bold text-lg margin-bottom-sm">接单成功</view>
|
|
|
|
|
|
<view>请在30分钟内联系客户,预约好上门时间,并在订单中操作排单时间,超时6倍将受平台处罚管理;该订单佣金在完成任务24小时内计入您的账户</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-bar bg-white solid-top">
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-black" data-modal="showTakeSuccessModal" @click="contactCustomer">联系客户</view>
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeSuccessModal" @tap="hideModal" @click="continueAcceptDemand">继续接单</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-08-23 20:22:21 +08:00
|
|
|
|
<!-- 账户及实名弹窗 -->
|
|
|
|
|
|
<vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind>
|
|
|
|
|
|
<vertify-certify ref="vertifyCertify"></vertify-certify>
|
2022-05-03 14:59:33 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-06-29 18:07:15 +08:00
|
|
|
|
import productPicked from '@/components/goods-card/product-picked.vue';
|
|
|
|
|
|
|
2022-05-03 14:59:33 +08:00
|
|
|
|
export default {
|
2022-06-29 18:07:15 +08:00
|
|
|
|
components: {
|
|
|
|
|
|
productPicked
|
|
|
|
|
|
},
|
2022-05-03 14:59:33 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2022-06-29 18:07:15 +08:00
|
|
|
|
inParams: {},
|
2022-05-03 14:59:33 +08:00
|
|
|
|
order: {},
|
|
|
|
|
|
takeCertify: false,
|
|
|
|
|
|
showTakeCertifiedModal: false,
|
2022-06-29 18:07:15 +08:00
|
|
|
|
showTakeSuccessModal: false,
|
|
|
|
|
|
specColumnHeaders: ['商品规格', '购买量'],
|
|
|
|
|
|
specValFields: ['standardName', 'standardNum'],
|
2022-08-23 20:22:21 +08:00
|
|
|
|
curUserInfo: {},
|
|
|
|
|
|
bankCard: null,
|
|
|
|
|
|
certifyInfo: null,
|
|
|
|
|
|
hasNotice: false
|
2022-05-03 14:59:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
2022-06-29 18:07:15 +08:00
|
|
|
|
this.inParams = JSON.parse(decodeURIComponent(options.paramObj));
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
this.loadData(this.inParams.orderMasterId);
|
2022-05-03 14:59:33 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2022-06-29 18:07:15 +08:00
|
|
|
|
async loadData(orderMasterId) {
|
|
|
|
|
|
// this.order = await this.$api.data('order');
|
|
|
|
|
|
this.curUserInfo = this.$request.getCurUserInfo();
|
|
|
|
|
|
let servDetailRes = await this.$request.getOrderMasterDetail({
|
|
|
|
|
|
id: orderMasterId
|
|
|
|
|
|
});
|
|
|
|
|
|
this.order = servDetailRes.data;
|
2022-05-03 14:59:33 +08:00
|
|
|
|
this.takeCertify = await this.$api.data('takeCertify');
|
|
|
|
|
|
},
|
2022-08-23 20:22:21 +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;
|
|
|
|
|
|
|
|
|
|
|
|
let res = true;
|
|
|
|
|
|
if (!this.bankCard || !this.bankCard.bankNum) {
|
|
|
|
|
|
this.$refs.vertifyBankBind.showModal();
|
|
|
|
|
|
res = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!this.certifyInfo || this.certifyInfo.status !== 1) {
|
|
|
|
|
|
this.$refs.vertifyCertify.showModal();
|
|
|
|
|
|
res = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
return res;
|
|
|
|
|
|
},
|
2022-06-29 18:07:15 +08:00
|
|
|
|
async takeTask(e) {
|
2022-08-23 20:22:21 +08:00
|
|
|
|
if (!this.hasNotice) {
|
|
|
|
|
|
let checkRes = await this.checkBankAndCertify();
|
|
|
|
|
|
this.hasNotice = true;
|
|
|
|
|
|
if (!checkRes) {
|
|
|
|
|
|
return;
|
2022-06-29 18:07:15 +08:00
|
|
|
|
}
|
2022-05-03 14:59:33 +08:00
|
|
|
|
}
|
2022-08-23 20:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
// 已认证可直接接单
|
|
|
|
|
|
let res = await this.$request.updateOrder({
|
|
|
|
|
|
workerId: this.curUserInfo.workerId,
|
|
|
|
|
|
id: this.order.orderMasterId,
|
|
|
|
|
|
orderStatus: 1
|
|
|
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0) {
|
|
|
|
|
|
e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal;
|
|
|
|
|
|
}
|
2022-05-03 14:59:33 +08:00
|
|
|
|
this.showModal(e);
|
|
|
|
|
|
},
|
|
|
|
|
|
showModal(e) {
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
hideModal(e) {
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
continueAcceptDemand() {
|
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
|
delta: -1
|
|
|
|
|
|
})
|
2022-06-29 18:07:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
goToCertify() {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: '/pages/my/master-settled-info'
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
contactCustomer(e) {
|
|
|
|
|
|
uni.makePhoneCall({
|
|
|
|
|
|
phoneNumber: this.order.customerPhone
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-05-03 14:59:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
</style>
|