师傅入驻信息提交接口对接
This commit is contained in:
parent
48b7c74084
commit
c300ec60d9
|
|
@ -5,7 +5,6 @@ export default {
|
|||
VERTICAL_NAV_SEARCH: 'verticalNavSearch',
|
||||
CHOOSE_ADDRESS: 'chooseAddress',
|
||||
HIDE_MODAL: 'hideModal',
|
||||
SUBMIT_FAIL_REASON: 'submitFailReason',
|
||||
NEW_SERV_PRICE: 'newServPrice',
|
||||
LET_CUSTOMER_PAY: 'letCustomerPay'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default {
|
|||
// request 触发前拼接 url
|
||||
// args.url = 'https://www.opsoul.com' + args.url;
|
||||
args.url = 'http://127.0.0.1:80' + args.url;
|
||||
// args.url = 'http://10.45.110.174:80' + args.url;
|
||||
// args.url = 'http://10.45.137.214:80' + args.url;
|
||||
if (!args.data) {
|
||||
args.data = {}
|
||||
}
|
||||
|
|
@ -252,6 +252,14 @@ export default {
|
|||
}
|
||||
return resObj.url;
|
||||
},
|
||||
async qrySpecialSkillList(params = {goodsCategoryId : null}) {
|
||||
let res = await uni.request({
|
||||
url: '/special/skill/list',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async listByStep(params = {goodsCategoryId : null}) {
|
||||
let res = await uni.request({
|
||||
url: '/goods/deptcategory/listByStep',
|
||||
|
|
@ -392,7 +400,7 @@ export default {
|
|||
},
|
||||
async qryDetailOrderPage(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/list',
|
||||
url: '/order/detail/app/list',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header: {
|
||||
|
|
@ -401,5 +409,29 @@ export default {
|
|||
}
|
||||
})
|
||||
return res[1].data;
|
||||
}
|
||||
},
|
||||
async updateDetailOrder(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/edit',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getOrderDetail(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/detail/app/detail',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async workerSettled(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/settled',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
<template>
|
||||
<view class="flex justify-start">
|
||||
<view class="cu-avatar xxl-view" :style="'background-image:url(' + product.picUrl + ');'">
|
||||
<view class="cu-avatar xxl-view" :style="'background-image:url(' + product.goodsLogoUrl + ');'">
|
||||
</view>
|
||||
<view class="margin-left-sm product-content">
|
||||
<view>
|
||||
<view class="text-black">{{product.name}}</view>
|
||||
<view class="text-black">{{product.goodsName}}</view>
|
||||
<view class="text-sm" v-if="ifShowComments">{{product.comments}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between align-center">
|
||||
<view class="flex justify-start align-center">
|
||||
<view class="flex justify-start align-center" v-if="product.payMoney">
|
||||
<text class="text-price text-red text-bold text-xl">{{product.payMoney}}</text>
|
||||
</view>
|
||||
<view class="flex justify-start align-center" v-else>
|
||||
<text class="text-price text-red text-bold text-xl">{{product.salePrice}}</text>
|
||||
<text class="text-del">¥{{product.price}}</text>
|
||||
</view>
|
||||
<view class="padding-xs">
|
||||
<view class="padding-xs" v-if="product.type">
|
||||
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -8,25 +8,12 @@
|
|||
<view v-for="(title, index) in columnTitleArr" v-if="index >= 1" class="basis-df">{{title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="certern-height-with-scroll">
|
||||
<view class="flex justify-between margin-tb-xs align-center" v-for="(item,index) in pickedList" :key="item.id">
|
||||
<view class='cu-tag padding line-main-color basis-df'>{{item.name}}</view>
|
||||
<view v-if="numberBox" class="flex justify-end basis-xs">
|
||||
<uni-number-box :min="0" :max="item.maxPieces" :value="item.pickedNum"
|
||||
@change="changePiecesNum($event, item)">
|
||||
</uni-number-box>
|
||||
</view>
|
||||
<view v-else-if="item.valColArr && item.valColArr.length > 0" class="flex justify-end basis-sm text-center">
|
||||
<uni-number-box class="basis-df" v-for="(valCol, index0) in item.valColArr" v-if="valCol.numberBox"
|
||||
:min="0" :max="valCol.max" :value="valCol.value" @change="changePiecesNum($event, item)">
|
||||
</uni-number-box>
|
||||
<view class="basis-df" v-else>{{valCol.value}}</view>
|
||||
</view>
|
||||
<view v-else class="flex justify-end basis-sm text-center">
|
||||
<view class="basis-df"><text v-if="!showToServNum">×</text>{{item.pickedNum}}</view>
|
||||
<view class="basis-df" v-if="showToServNum">
|
||||
{{item.toServNum == undefined || item.toServNum == null ? item.secondColumnNum : item.toServNum}}
|
||||
</view>
|
||||
<view>
|
||||
<view class="flex justify-between margin-tb-xs align-center" v-for="(item,index) in pickedList" :key="index">
|
||||
<view class='cu-tag padding line-main-color basis-df'>{{item[valFieldArr[0]]}}</view>
|
||||
<view class="flex justify-end basis-sm text-center">
|
||||
<view class="basis-df">{{item[valFieldArr[1]]}}</view>
|
||||
<view class="basis-df">{{item[valFieldArr[2]]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -52,13 +39,9 @@
|
|||
type: Array,
|
||||
default: []
|
||||
},
|
||||
showToServNum: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
numberBox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
valFieldArr: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@
|
|||
<text>{{item0.goodsCategoryName}}</text>
|
||||
</view>
|
||||
</checkbox-group>
|
||||
<view>
|
||||
<!-- <view>
|
||||
<input type="text" class="radius-input" placeholder="输入其他服务,用“,”隔开。"
|
||||
v-model="servSkill[index].otherServSkill">
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center margin-top">
|
||||
|
|
@ -124,8 +124,10 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="padding">
|
||||
<view class="flex align-center">
|
||||
<view>
|
||||
<text>特殊技能:</text>
|
||||
<view>
|
||||
<view class="flex align-center margin-bottom-xs">
|
||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="specialTypeList"
|
||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||
v-model="specialSkill[index].specialTypeObj" @input="chooseSpecialSkill($event, 0, index)">
|
||||
|
|
@ -139,6 +141,12 @@
|
|||
v-model="specialSkill[index].specialSubSubTypeObj"
|
||||
@input="chooseSpecialSkill($event, 2, index)"></my-uni-combox>
|
||||
</view>
|
||||
<my-uni-combox :candidates="specialSkill[index].specialSkillList"
|
||||
:showField="'specialSkillName'" placeholder="请选择"
|
||||
v-model="specialSkill[index].specialSkillObj"
|
||||
@input="chooseSpecialSkill($event, 3, index)"></my-uni-combox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center margin-top-sm">
|
||||
<view>技能证书:</view>
|
||||
<view class="grid col-1 upload-pic-grid grid-square flex-sub">
|
||||
|
|
@ -149,7 +157,7 @@
|
|||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImage($event, specialSkill[index].skillCert)" v-if="specialSkill[index].skillCert.length < 2">
|
||||
<view class="solids" @tap="chooseImage($event, specialSkill[index].skillCert)" v-if="specialSkill[index].skillCert.length < 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -164,7 +172,7 @@
|
|||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImage($event, specialSkill[index].insurCert)" v-if="specialSkill[index].insurCert.length < 2">
|
||||
<view class="solids" @tap="chooseImage($event, specialSkill[index].insurCert)" v-if="specialSkill[index].insurCert.length < 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -205,6 +213,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
curUserInfo: {},
|
||||
curStep: 0,
|
||||
stepList: ['服务范围', '服务技能', '特殊技能'],
|
||||
provinceList: [],
|
||||
|
|
@ -233,6 +242,8 @@
|
|||
specialTypeObj: {},
|
||||
specialSubTypeObj: {},
|
||||
specialSubSubTypeObj: {},
|
||||
specialSkillList: [],
|
||||
specialSkillObj: {},
|
||||
skillCert: [],
|
||||
insurCert: [],
|
||||
insurStartDate: '',
|
||||
|
|
@ -242,6 +253,7 @@
|
|||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
this.loadProvinceList();
|
||||
this.loadTypeList();
|
||||
this.loadSpecialSkill();
|
||||
|
|
@ -354,7 +366,11 @@
|
|||
this.specialTypeList = res.data;
|
||||
},
|
||||
async chooseSpecialSkill(e, type, index) {
|
||||
let res = await this.$request.listByStep({
|
||||
let funName = "listByStep";
|
||||
if (type === 2) {
|
||||
funName = "qrySpecialSkillList";
|
||||
}
|
||||
let res = await this.$request[funName]({
|
||||
goodsCategoryId: e.goodsCategoryId
|
||||
});
|
||||
if (res.code == 0) {
|
||||
|
|
@ -370,6 +386,10 @@
|
|||
this.specialSkill[index].specialSubSubTypeList = res.data;
|
||||
this.specialSkill[index].specialSubSubTypeObj = {};
|
||||
}
|
||||
case 2: {
|
||||
this.specialSkill[index].specialSkillList = res.data;
|
||||
this.specialSkill[index].specialSkillObj = {};
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -398,15 +418,17 @@
|
|||
},
|
||||
async chooseImage(e, imgList) {
|
||||
uni.chooseImage({
|
||||
count: 2, //默认9
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
// 上传图片
|
||||
this.$request.uploadFile(res.tempFilePaths[0]).then((uploadRes) => {
|
||||
res.tempFilePaths.forEach((tmpPath) => {
|
||||
this.$request.uploadFile(tmpPath).then((url) => {
|
||||
// 存入缓存
|
||||
imgList.push(uploadRes.url);
|
||||
imgList.push(url);
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -432,14 +454,65 @@
|
|||
/* 特殊技能 end */
|
||||
nextStep() {
|
||||
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep;
|
||||
console.log(this.servSkill)
|
||||
},
|
||||
preStep() {
|
||||
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
|
||||
console.log(this.servSkill)
|
||||
},
|
||||
submit() {
|
||||
console.log(this.specialSkill)
|
||||
async submit() {
|
||||
let workerId = this.curUserInfo.workerId;
|
||||
let workerAreas = [];
|
||||
let goodsCategories = [];
|
||||
let specialSkills = [];
|
||||
// 区域参数
|
||||
this.servArea.forEach((item) => {
|
||||
item.streetIds.forEach((streetId) => {
|
||||
workerAreas.push({
|
||||
workerId: workerId,
|
||||
provinceId: item.provinceObj.areaId,
|
||||
cityId: item.cityObj.areaId,
|
||||
districtId: item.districtObj.areaId,
|
||||
streetId: streetId
|
||||
})
|
||||
});
|
||||
});
|
||||
// 服务品类参数
|
||||
this.servSkill.forEach((item) => {
|
||||
item.subSubTypeIds.forEach((goodsCategoryId) => {
|
||||
goodsCategories.push({
|
||||
workerId: workerId,
|
||||
goodsCategoryId: goodsCategoryId
|
||||
});
|
||||
});
|
||||
});
|
||||
// 特殊技能参数
|
||||
this.specialSkill.forEach((item) => {
|
||||
specialSkills.push({
|
||||
workerId: workerId,
|
||||
specialSkillId: item.specialSkillObj.specialSkillId,
|
||||
credential: item.skillCert[0],
|
||||
insurance: item.insurCert[0],
|
||||
insuranceStart: item.insurStartDate,
|
||||
insuranceEnd: item.insurEndDate
|
||||
});
|
||||
});
|
||||
|
||||
let params = {
|
||||
workerId: workerId,
|
||||
workerAreas: workerAreas,
|
||||
goodsCategories: goodsCategories,
|
||||
specialSkills: specialSkills
|
||||
}
|
||||
console.log(params)
|
||||
let res = await this.$request.workerSettled(params);
|
||||
if (res.code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '提交成功'
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: -1
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,13 +65,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import productPicked from '@/components/goods-card/product-picked.vue';
|
||||
// import productPicked from '@/components/goods-card/product-picked.vue';
|
||||
|
||||
export default {
|
||||
name: 'dispatch-order',
|
||||
components: {
|
||||
productPicked
|
||||
},
|
||||
// components: {
|
||||
// productPicked
|
||||
// },
|
||||
props: {
|
||||
singleServ: {
|
||||
type: Boolean,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<text class="text-xxl text-main-color"><text class="cuIcon-phone"></text></text>
|
||||
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone}}</text>
|
||||
</view>
|
||||
<button class="cu-btn line-main-color">拨打</button>
|
||||
<button class="cu-btn line-main-color" @click="makePhoneCall(data.customerPhone)">拨打</button>
|
||||
</view>
|
||||
<view class="text-sm">
|
||||
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
||||
|
|
@ -27,15 +27,15 @@
|
|||
</view>
|
||||
<view>
|
||||
<view class="margin-bottom-xs">选择时间:</view>
|
||||
<picker class="inline-input" mode="time" :value="'08:00'" :start="'08:00'" :end="'20:00'"
|
||||
<picker mode="time" :value="'08:00'" :start="'08:00'" :end="'20:00'"
|
||||
@change="timeChange">
|
||||
<input class="radius-input" v-model="time"></input>
|
||||
</picker>
|
||||
<text class="margin-lr-xs">或</text>
|
||||
<!-- <text class="margin-lr-xs">或</text>
|
||||
<picker class="inline-input" mode="selector" :value="timeRangeIndex" :range="timeRangeList"
|
||||
@change="timeRangeChange">
|
||||
<input class="radius-input" v-model="timeRange"></input>
|
||||
</picker>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-top-sm padding">
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action margin-0 flex-sub text-black" data-modal="showEditTimeArrangeModal" @click="submitFailReason">无法排单</view>
|
||||
<view class="action margin-0 flex-sub text-black" data-modal="showEditTimeArrangeModal" @click="cannotArrangeTime">无法排单</view>
|
||||
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showEditTimeArrangeModal"
|
||||
@click="arrangeTime">确认</view>
|
||||
</view>
|
||||
|
|
@ -71,6 +71,7 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'edit-time-arrange',
|
||||
emits: ['showArrangeFailTime', 'editServTime'],
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
|
|
@ -79,12 +80,15 @@
|
|||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
curDate: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
date: '',
|
||||
curDate: '',
|
||||
time: '',
|
||||
timeRangeList: [],
|
||||
timeRange: '',
|
||||
|
|
@ -96,12 +100,13 @@
|
|||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.getCurDateAndTime();
|
||||
this.timeRangeList = await this.$api.data('timeRangeList');
|
||||
},
|
||||
getCurDateAndTime() {
|
||||
let date = new Date();
|
||||
this.curDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00";
|
||||
resetData() {
|
||||
this.date = null;
|
||||
this.time = null;
|
||||
this.timeRange = null;
|
||||
this.timeRangeIndex = 0;
|
||||
},
|
||||
dateChange(e) {
|
||||
this.date = e.detail.value
|
||||
|
|
@ -114,17 +119,22 @@
|
|||
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
||||
},
|
||||
hideModal(e) {
|
||||
this.resetData();
|
||||
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
||||
},
|
||||
submitFailReason(e) {
|
||||
let reasonObj = {
|
||||
imgList: this.imgList,
|
||||
problemPerson: this.problemPerson,
|
||||
specificReason: this.specificReason
|
||||
}
|
||||
uni.$emit(this.$globalFun.SUBMIT_FAIL_REASON, e, reasonObj)
|
||||
cannotArrangeTime(e) {
|
||||
this.resetData();
|
||||
this.$emit('showArrangeFailTime', e)
|
||||
},
|
||||
arrangeTime(e) {
|
||||
if (!(this.time || this.timeRange)) {
|
||||
uni.showToast({
|
||||
title: '请选择时间'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let datetime = this.date + ' ' + (this.time || this.timeRange) + ':00';
|
||||
this.$emit('editServTime', this.data.orderDetailId, datetime);
|
||||
this.hideModal(e);
|
||||
},
|
||||
changeReasonRadio(e) {
|
||||
|
|
@ -132,6 +142,11 @@
|
|||
},
|
||||
inputSpecificReason(e) {
|
||||
this.specificReason = e.detail.value;
|
||||
},
|
||||
makePhoneCall(phoneNum) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNum
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<text class="text-xxl text-main-color"><text class="cuIcon-phone"></text></text>
|
||||
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone}}</text>
|
||||
</view>
|
||||
<button class="cu-btn line-main-color">拨打</button>
|
||||
<button class="cu-btn line-main-color" @click="makePhoneCall(data.customerPhone)">拨打</button>
|
||||
</view>
|
||||
<view class="text-sm">
|
||||
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'time-arrange',
|
||||
emits: ['showArrangeFailTime'],
|
||||
emits: ['showArrangeFailTime', 'editServTime'],
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
|
|
@ -101,9 +101,11 @@
|
|||
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
||||
},
|
||||
hideModal(e) {
|
||||
this.resetData();
|
||||
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
||||
},
|
||||
cannotArrangeTime(e) {
|
||||
this.resetData();
|
||||
this.$emit('showArrangeFailTime', e)
|
||||
},
|
||||
arrangeTime(e) {
|
||||
|
|
@ -114,10 +116,13 @@
|
|||
return;
|
||||
}
|
||||
let datetime = this.date + ' ' + (this.time || this.timeRange) + ':00';
|
||||
console.log(this.data)
|
||||
this.$emit('editServTime', this.data.orderMasterId, datetime);
|
||||
this.resetData();
|
||||
this.hideModal(e);
|
||||
},
|
||||
makePhoneCall(phoneNum) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNum
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@
|
|||
<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'"
|
||||
:day="$dateUtil.countDownDiff(order.deadlineDate).day"
|
||||
:hour="$dateUtil.countDownDiff(order.deadlineDate).hour"
|
||||
:minute="$dateUtil.countDownDiff(order.deadlineDate).min"
|
||||
:second="$dateUtil.countDownDiff(order.deadlineDate).seconds">
|
||||
:day="$dateUtil.countDownDiff(order.serverTime).day"
|
||||
:hour="$dateUtil.countDownDiff(order.serverTime).hour"
|
||||
:minute="$dateUtil.countDownDiff(order.serverTime).min"
|
||||
:second="$dateUtil.countDownDiff(order.serverTime).seconds">
|
||||
</uni-countdown>
|
||||
</view>
|
||||
<view class="margin-top-sm flex justify-start align-center" v-if="order.subState === 4 && order.chargeReachDate">
|
||||
|
|
@ -127,18 +127,19 @@
|
|||
</view>
|
||||
<view v-if="order.orderStatus === 1">
|
||||
<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>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="assignWork2MySelf(order)">自己承接</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showTimeArrangeModal" @tap="showModal($event, order)">预约时间</button>
|
||||
</view>
|
||||
<view v-if="order.orderStatus === 2">
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail('waitToServ')">查看</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.phoneNum)">联系客户</button>
|
||||
<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>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
||||
</view>
|
||||
<view v-if="order.orderStatus === 3">
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail('waitServing')">查看</button>
|
||||
<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" data-modal="showNewServPriceModal" @tap="showModal($event, order)">改价</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.phoneNum)">联系客户</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="finishOrder(order)">拍照回单</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" @tap="makePayQrcode($event, order)">生成付款码</button>
|
||||
|
|
@ -147,7 +148,7 @@
|
|||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="sendUrgentMsgModal" @tap="showModal($event, order)">师傅急报</button>
|
||||
</view>
|
||||
<view v-if="order.orderStatus === 'afterSaleService'">
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.phoneNum)">联系客户</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
||||
</view>
|
||||
|
|
@ -209,7 +210,7 @@
|
|||
<time-arrange-fail :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
|
||||
<new-serv-price :show="showNewServPriceModal" :data="curOrder"></new-serv-price>
|
||||
<pay-qrcode ref="payQrcode" :show="showPayQrcodeModal" :data="curOrder"></pay-qrcode>
|
||||
<edit-time-arrange :show="showEditTimeArrangeModal" :data="curOrder"></edit-time-arrange>
|
||||
<edit-time-arrange :show="showEditTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime"></edit-time-arrange>
|
||||
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
|
||||
<pic-modal ref="showPicModal" :imgList="picModalImgList"></pic-modal>
|
||||
<!-- popup -->
|
||||
|
|
@ -316,7 +317,8 @@
|
|||
sendUrgentMsgModal: false,
|
||||
ifShowPageMeta: false,
|
||||
picModalImgList: [],
|
||||
curDate: ''
|
||||
curDate: '',
|
||||
curUserInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -350,6 +352,8 @@
|
|||
this.loadRegionList();
|
||||
// 初始化指派成员
|
||||
this.loadTeamMembers();
|
||||
// 获取当前登录用户信息
|
||||
this.curUserInfo = this.getCurUserInfo();
|
||||
},
|
||||
reloadMasterOrderPage(params = {}) {
|
||||
this.pageParams = [];
|
||||
|
|
@ -438,11 +442,9 @@
|
|||
},
|
||||
bindEvent() {
|
||||
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
||||
uni.$on(this.$globalFun.SUBMIT_FAIL_REASON, this.submitFailReason);
|
||||
},
|
||||
offBindEvent() {
|
||||
uni.$off(this.$globalFun.HIDE_MODAL);
|
||||
uni.$off(this.$globalFun.SUBMIT_FAIL_REASON);
|
||||
},
|
||||
async regionColChange(e) {
|
||||
let colObj = e.detail;
|
||||
|
|
@ -558,7 +560,11 @@
|
|||
});
|
||||
},
|
||||
async editServTime(id, datetime) {
|
||||
let res = await this.$request.updateOrder({
|
||||
let reqFunName = "updateDetailOrder";
|
||||
if (this.tabCur === 0) {
|
||||
reqFunName = "updateOrder"
|
||||
}
|
||||
let res = await this.$request[reqFunName]({
|
||||
id: id,
|
||||
revTime: datetime
|
||||
});
|
||||
|
|
@ -572,12 +578,9 @@
|
|||
},
|
||||
showArrangeFailTime(e) {
|
||||
this.showTimeArrangeModal = false;
|
||||
this.showEditTimeArrangeModal = false;
|
||||
this.showArrangeFailTimeModal = true;
|
||||
},
|
||||
submitFailReason(e, reasonObj) {
|
||||
// TODO: 提交内容后隐藏modal(curOrder信息置null)
|
||||
this.hideModal(e);
|
||||
},
|
||||
togglePopup(e, orderInfo) {
|
||||
if (this.ifShowPageMeta) {
|
||||
this.$refs[e.currentTarget.dataset.popup].close();
|
||||
|
|
@ -603,9 +606,9 @@
|
|||
this.$refs.payQrcode.showQrcode('http://10.45.81.125:8081/portal/' + Math.random());
|
||||
this.showModal(e, orderInfo);
|
||||
},
|
||||
showServOrderDetail(process) {
|
||||
showServOrderDetail(order) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order-manage/serv-detail?process=' + process
|
||||
url: '/pages/order-manage/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
||||
})
|
||||
},
|
||||
finishOrder(order) {
|
||||
|
|
@ -637,6 +640,26 @@
|
|||
icon: 'success'
|
||||
})
|
||||
}
|
||||
},
|
||||
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,
|
||||
orderMasterId: orderInfo.orderMasterId
|
||||
}
|
||||
this.assignWork(params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<block slot="content">服务订单详情</block>
|
||||
</cu-custom>
|
||||
<!-- 任务进度跟踪 -->
|
||||
<view v-if="process === 'waitServing'" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
<view v-if="servDetail.orderStatus === 3" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
<uni-collapse v-model="value">
|
||||
<uni-collapse-item :open="true">
|
||||
<template v-slot:title>
|
||||
|
|
@ -31,43 +31,44 @@
|
|||
<!-- 服务单概况 -->
|
||||
<view class="bg-white margin-lr-sm margin-top-sm padding">
|
||||
<view class="flex align-center">
|
||||
<text class="text-xl margin-right">{{servDetail.mainServOrder.servTitle}}</text>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm'>服务中</view>
|
||||
<text class="text-xl margin-right">{{servDetail.goodsName}}</text>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 3">服务中</view>
|
||||
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">待上门</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<!-- <view class="margin-top-sm">
|
||||
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
|
||||
{{item}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
||||
<text>{{servDetail.mainServOrder.address}}</text>
|
||||
<text>{{servDetail.address}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
||||
<text>{{servDetail.mainServOrder.person2Contact.name}}</text>
|
||||
<text>{{servDetail.mainServOrder.person2Contact.phone}}</text>
|
||||
<text class="margin-right-sm">{{servDetail.customerName}}</text>
|
||||
<text>{{servDetail.customerPhone}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>预约时间:{{servDetail.mainServOrder.bookTime}}</text>
|
||||
<text>预约时间:{{servDetail.serverTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<!-- <view class="margin-top-sm">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>排单时间:{{servDetail.mainServOrder.boodTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
</view> -->
|
||||
<view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
|
||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||
<text>上门时间:{{servDetail.mainServOrder.doorTime}}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
|
||||
<text>任务金额:</text>
|
||||
<text class="text-price">{{servDetail.mainServOrder.taskPrice}}</text>
|
||||
<text class="text-price">{{servDetail.payMoney}}</text>
|
||||
</view>
|
||||
<view class="margin-top-xs text-sm text-gray"
|
||||
<!-- <view class="margin-top-xs text-sm text-gray"
|
||||
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
|
||||
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 待服务列 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||
|
|
@ -77,11 +78,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<product-picked :product="servDetail.product" :pickedList="servDetail.product.pickedList" :columnTitleArr="servingColumnHeaders" :showToServNum="true"></product-picked>
|
||||
<product-picked :product="servDetail" :pickedList="servDetail.standardList" :columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></product-picked>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 完成记录 -->
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.finishRecord">
|
||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.finishRecord" v-if="servDetail.orderStatus === 3">
|
||||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-titles text-main-color"></text> 完成记录({{item.finishList.length}})
|
||||
|
|
@ -94,7 +95,7 @@
|
|||
</view>
|
||||
<!-- 订单编码和时间 -->
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
||||
<view>订单编码:{{servDetail.serialCode}}</view>
|
||||
<view>订单编码:{{servDetail.orderDetailCode}}</view>
|
||||
<view class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
||||
</view>
|
||||
<!-- 底部操作栏 -->
|
||||
|
|
@ -108,7 +109,7 @@
|
|||
</view>
|
||||
发送急报
|
||||
</view>
|
||||
<view v-if="process === 'waitToServ'" class="bg-main-color submit">立即上门</view>
|
||||
<view v-if="servDetail.orderStatus === 2" class="bg-main-color submit">立即上门</view>
|
||||
</view>
|
||||
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
|
||||
<view class="bg-white text-center">
|
||||
|
|
@ -136,11 +137,13 @@
|
|||
data() {
|
||||
return {
|
||||
value: ['0'],
|
||||
order: {},
|
||||
servDetail: {},
|
||||
finishRecord4Show: [],
|
||||
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
|
||||
servedColumnHeaders: ['购买型号', '购买量', '已服务'],
|
||||
process: '',
|
||||
servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
|
||||
servedValFields: ['standardName', 'standardNum', 'serverNum'],
|
||||
ifShowPageMeta: false,
|
||||
orderManageMenu: [{
|
||||
name: '申请配件',
|
||||
|
|
@ -162,15 +165,18 @@
|
|||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options) {
|
||||
console.log(options)
|
||||
this.process = options.process;
|
||||
if (options && options.order) {
|
||||
this.order = JSON.parse(decodeURIComponent(options.order));
|
||||
}
|
||||
this.loadData();
|
||||
this.loadData(this.order.orderDetailId);
|
||||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.servDetail = await this.$api.data('servDetail');
|
||||
async loadData(orderDetailId) {
|
||||
// this.servDetail = await this.$api.data('servDetail');
|
||||
let servDetailRes = await this.$request.getOrderDetail({
|
||||
id: orderDetailId
|
||||
});
|
||||
this.servDetail = servDetailRes.data;
|
||||
this.finishList4Show = this.servDetail.finishRecord;
|
||||
for (let i = 0; i < this.finishList4Show.length; i++) {
|
||||
let finishList = this.finishList4Show[i].finishList;
|
||||
|
|
|
|||
|
|
@ -170,6 +170,12 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.flex-column-start {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.flex-column-between {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
Loading…
Reference in New Issue