师傅入驻信息提交接口对接
This commit is contained in:
parent
48b7c74084
commit
c300ec60d9
|
|
@ -5,7 +5,6 @@ export default {
|
||||||
VERTICAL_NAV_SEARCH: 'verticalNavSearch',
|
VERTICAL_NAV_SEARCH: 'verticalNavSearch',
|
||||||
CHOOSE_ADDRESS: 'chooseAddress',
|
CHOOSE_ADDRESS: 'chooseAddress',
|
||||||
HIDE_MODAL: 'hideModal',
|
HIDE_MODAL: 'hideModal',
|
||||||
SUBMIT_FAIL_REASON: 'submitFailReason',
|
|
||||||
NEW_SERV_PRICE: 'newServPrice',
|
NEW_SERV_PRICE: 'newServPrice',
|
||||||
LET_CUSTOMER_PAY: 'letCustomerPay'
|
LET_CUSTOMER_PAY: 'letCustomerPay'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default {
|
||||||
// request 触发前拼接 url
|
// request 触发前拼接 url
|
||||||
// args.url = 'https://www.opsoul.com' + args.url;
|
// args.url = 'https://www.opsoul.com' + args.url;
|
||||||
args.url = 'http://127.0.0.1:80' + 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) {
|
if (!args.data) {
|
||||||
args.data = {}
|
args.data = {}
|
||||||
}
|
}
|
||||||
|
|
@ -252,6 +252,14 @@ export default {
|
||||||
}
|
}
|
||||||
return resObj.url;
|
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}) {
|
async listByStep(params = {goodsCategoryId : null}) {
|
||||||
let res = await uni.request({
|
let res = await uni.request({
|
||||||
url: '/goods/deptcategory/listByStep',
|
url: '/goods/deptcategory/listByStep',
|
||||||
|
|
@ -392,7 +400,7 @@ export default {
|
||||||
},
|
},
|
||||||
async qryDetailOrderPage(params = {}) {
|
async qryDetailOrderPage(params = {}) {
|
||||||
let res = await uni.request({
|
let res = await uni.request({
|
||||||
url: '/order/detail/list',
|
url: '/order/detail/app/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
|
|
@ -401,5 +409,29 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return res[1].data;
|
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>
|
<template>
|
||||||
<view class="flex justify-start">
|
<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>
|
||||||
<view class="margin-left-sm product-content">
|
<view class="margin-left-sm product-content">
|
||||||
<view>
|
<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 class="text-sm" v-if="ifShowComments">{{product.comments}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-between align-center">
|
<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-price text-red text-bold text-xl">{{product.salePrice}}</text>
|
||||||
<text class="text-del">¥{{product.price}}</text>
|
<text class="text-del">¥{{product.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-xs">
|
<view class="padding-xs" v-if="product.type">
|
||||||
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
<view class='cu-tag light bg-blue'>{{product.type}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,12 @@
|
||||||
<view v-for="(title, index) in columnTitleArr" v-if="index >= 1" class="basis-df">{{title}}</view>
|
<view v-for="(title, index) in columnTitleArr" v-if="index >= 1" class="basis-df">{{title}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="certern-height-with-scroll">
|
<view>
|
||||||
<view class="flex justify-between margin-tb-xs align-center" v-for="(item,index) in pickedList" :key="item.id">
|
<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.name}}</view>
|
<view class='cu-tag padding line-main-color basis-df'>{{item[valFieldArr[0]]}}</view>
|
||||||
<view v-if="numberBox" class="flex justify-end basis-xs">
|
<view class="flex justify-end basis-sm text-center">
|
||||||
<uni-number-box :min="0" :max="item.maxPieces" :value="item.pickedNum"
|
<view class="basis-df">{{item[valFieldArr[1]]}}</view>
|
||||||
@change="changePiecesNum($event, item)">
|
<view class="basis-df">{{item[valFieldArr[2]]}}</view>
|
||||||
</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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -51,14 +38,10 @@
|
||||||
columnTitleArr: {
|
columnTitleArr: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
showToServNum: {
|
valFieldArr: {
|
||||||
type: Boolean,
|
type: Array,
|
||||||
default: false
|
default: []
|
||||||
},
|
|
||||||
numberBox: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -92,10 +92,10 @@
|
||||||
<text>{{item0.goodsCategoryName}}</text>
|
<text>{{item0.goodsCategoryName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
<view>
|
<!-- <view>
|
||||||
<input type="text" class="radius-input" placeholder="输入其他服务,用“,”隔开。"
|
<input type="text" class="radius-input" placeholder="输入其他服务,用“,”隔开。"
|
||||||
v-model="servSkill[index].otherServSkill">
|
v-model="servSkill[index].otherServSkill">
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center margin-top">
|
<view class="text-center margin-top">
|
||||||
|
|
@ -123,21 +123,29 @@
|
||||||
<text class="text-main-color">删除</text>
|
<text class="text-main-color">删除</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding">
|
<view class="padding">
|
||||||
<view class="flex align-center">
|
<view>
|
||||||
<text>特殊技能:</text>
|
<text>特殊技能:</text>
|
||||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="specialTypeList"
|
<view>
|
||||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
<view class="flex align-center margin-bottom-xs">
|
||||||
v-model="specialSkill[index].specialTypeObj" @input="chooseSpecialSkill($event, 0, index)">
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="specialTypeList"
|
||||||
</my-uni-combox>
|
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||||
<my-uni-combox class="flex-sub margin-right-xs"
|
v-model="specialSkill[index].specialTypeObj" @input="chooseSpecialSkill($event, 0, index)">
|
||||||
:candidates="specialSkill[index].specialSubTypeList" :showField="'goodsCategoryName'"
|
</my-uni-combox>
|
||||||
placeholder="请选择" v-model="specialSkill[index].specialSubTypeObj"
|
<my-uni-combox class="flex-sub margin-right-xs"
|
||||||
@input="chooseSpecialSkill($event, 1, index)"></my-uni-combox>
|
:candidates="specialSkill[index].specialSubTypeList" :showField="'goodsCategoryName'"
|
||||||
<my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSubSubTypeList"
|
placeholder="请选择" v-model="specialSkill[index].specialSubTypeObj"
|
||||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
@input="chooseSpecialSkill($event, 1, index)"></my-uni-combox>
|
||||||
v-model="specialSkill[index].specialSubSubTypeObj"
|
<my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSubSubTypeList"
|
||||||
@input="chooseSpecialSkill($event, 2, index)"></my-uni-combox>
|
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||||
|
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>
|
||||||
<view class="flex justify-start align-center margin-top-sm">
|
<view class="flex justify-start align-center margin-top-sm">
|
||||||
<view>技能证书:</view>
|
<view>技能证书:</view>
|
||||||
|
|
@ -149,7 +157,7 @@
|
||||||
<text class='cuIcon-close'></text>
|
<text class='cuIcon-close'></text>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
<text class='cuIcon-cameraadd'></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -164,7 +172,7 @@
|
||||||
<text class='cuIcon-close'></text>
|
<text class='cuIcon-close'></text>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
<text class='cuIcon-cameraadd'></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -204,7 +212,8 @@
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
curUserInfo: {},
|
||||||
curStep: 0,
|
curStep: 0,
|
||||||
stepList: ['服务范围', '服务技能', '特殊技能'],
|
stepList: ['服务范围', '服务技能', '特殊技能'],
|
||||||
provinceList: [],
|
provinceList: [],
|
||||||
|
|
@ -232,7 +241,9 @@
|
||||||
specialSubSubTypeList: [],
|
specialSubSubTypeList: [],
|
||||||
specialTypeObj: {},
|
specialTypeObj: {},
|
||||||
specialSubTypeObj: {},
|
specialSubTypeObj: {},
|
||||||
specialSubSubTypeObj: {},
|
specialSubSubTypeObj: {},
|
||||||
|
specialSkillList: [],
|
||||||
|
specialSkillObj: {},
|
||||||
skillCert: [],
|
skillCert: [],
|
||||||
insurCert: [],
|
insurCert: [],
|
||||||
insurStartDate: '',
|
insurStartDate: '',
|
||||||
|
|
@ -241,7 +252,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData() {
|
loadData() {
|
||||||
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
this.loadProvinceList();
|
this.loadProvinceList();
|
||||||
this.loadTypeList();
|
this.loadTypeList();
|
||||||
this.loadSpecialSkill();
|
this.loadSpecialSkill();
|
||||||
|
|
@ -353,8 +365,12 @@
|
||||||
let res = await this.$request.listByStep();
|
let res = await this.$request.listByStep();
|
||||||
this.specialTypeList = res.data;
|
this.specialTypeList = res.data;
|
||||||
},
|
},
|
||||||
async chooseSpecialSkill(e, type, index) {
|
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
|
goodsCategoryId: e.goodsCategoryId
|
||||||
});
|
});
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
@ -369,6 +385,10 @@
|
||||||
case 1: {
|
case 1: {
|
||||||
this.specialSkill[index].specialSubSubTypeList = res.data;
|
this.specialSkill[index].specialSubSubTypeList = res.data;
|
||||||
this.specialSkill[index].specialSubSubTypeObj = {};
|
this.specialSkill[index].specialSubSubTypeObj = {};
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
this.specialSkill[index].specialSkillList = res.data;
|
||||||
|
this.specialSkill[index].specialSkillObj = {};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -398,15 +418,17 @@
|
||||||
},
|
},
|
||||||
async chooseImage(e, imgList) {
|
async chooseImage(e, imgList) {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 2, //默认9
|
count: 1, //默认9
|
||||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: ['album'], //从相册选择
|
sourceType: ['album'], //从相册选择
|
||||||
success: (res) => {
|
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 */
|
/* 特殊技能 end */
|
||||||
nextStep() {
|
nextStep() {
|
||||||
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep;
|
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep;
|
||||||
console.log(this.servSkill)
|
|
||||||
},
|
},
|
||||||
preStep() {
|
preStep() {
|
||||||
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
|
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
|
||||||
console.log(this.servSkill)
|
|
||||||
},
|
},
|
||||||
submit() {
|
async submit() {
|
||||||
console.log(this.specialSkill)
|
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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import productPicked from '@/components/goods-card/product-picked.vue';
|
// import productPicked from '@/components/goods-card/product-picked.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dispatch-order',
|
name: 'dispatch-order',
|
||||||
components: {
|
// components: {
|
||||||
productPicked
|
// productPicked
|
||||||
},
|
// },
|
||||||
props: {
|
props: {
|
||||||
singleServ: {
|
singleServ: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<text class="text-xxl text-main-color"><text class="cuIcon-phone"></text></text>
|
<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>
|
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<button class="cu-btn line-main-color">拨打</button>
|
<button class="cu-btn line-main-color" @click="makePhoneCall(data.customerPhone)">拨打</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-sm">
|
<view class="text-sm">
|
||||||
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
||||||
|
|
@ -27,15 +27,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="margin-bottom-xs">选择时间:</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">
|
@change="timeChange">
|
||||||
<input class="radius-input" v-model="time"></input>
|
<input class="radius-input" v-model="time"></input>
|
||||||
</picker>
|
</picker>
|
||||||
<text class="margin-lr-xs">或</text>
|
<!-- <text class="margin-lr-xs">或</text>
|
||||||
<picker class="inline-input" mode="selector" :value="timeRangeIndex" :range="timeRangeList"
|
<picker class="inline-input" mode="selector" :value="timeRangeIndex" :range="timeRangeList"
|
||||||
@change="timeRangeChange">
|
@change="timeRangeChange">
|
||||||
<input class="radius-input" v-model="timeRange"></input>
|
<input class="radius-input" v-model="timeRange"></input>
|
||||||
</picker>
|
</picker> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-top-sm padding">
|
<view class="padding-top-sm padding">
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-bar bg-white solid-top">
|
<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"
|
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showEditTimeArrangeModal"
|
||||||
@click="arrangeTime">确认</view>
|
@click="arrangeTime">确认</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -70,7 +70,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'edit-time-arrange',
|
name: 'edit-time-arrange',
|
||||||
|
emits: ['showArrangeFailTime', 'editServTime'],
|
||||||
props: {
|
props: {
|
||||||
show: {
|
show: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -79,12 +80,15 @@
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
|
},
|
||||||
|
curDate: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
date: '',
|
date: '',
|
||||||
curDate: '',
|
|
||||||
time: '',
|
time: '',
|
||||||
timeRangeList: [],
|
timeRangeList: [],
|
||||||
timeRange: '',
|
timeRange: '',
|
||||||
|
|
@ -96,12 +100,13 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
this.getCurDateAndTime();
|
|
||||||
this.timeRangeList = await this.$api.data('timeRangeList');
|
this.timeRangeList = await this.$api.data('timeRangeList');
|
||||||
},
|
},
|
||||||
getCurDateAndTime() {
|
resetData() {
|
||||||
let date = new Date();
|
this.date = null;
|
||||||
this.curDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00";
|
this.time = null;
|
||||||
|
this.timeRange = null;
|
||||||
|
this.timeRangeIndex = 0;
|
||||||
},
|
},
|
||||||
dateChange(e) {
|
dateChange(e) {
|
||||||
this.date = e.detail.value
|
this.date = e.detail.value
|
||||||
|
|
@ -113,25 +118,35 @@
|
||||||
this.timeRangeIndex = e.detail.value;
|
this.timeRangeIndex = e.detail.value;
|
||||||
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
||||||
},
|
},
|
||||||
hideModal(e) {
|
hideModal(e) {
|
||||||
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
this.resetData();
|
||||||
},
|
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
||||||
submitFailReason(e) {
|
},
|
||||||
let reasonObj = {
|
cannotArrangeTime(e) {
|
||||||
imgList: this.imgList,
|
this.resetData();
|
||||||
problemPerson: this.problemPerson,
|
this.$emit('showArrangeFailTime', e)
|
||||||
specificReason: this.specificReason
|
},
|
||||||
|
arrangeTime(e) {
|
||||||
|
if (!(this.time || this.timeRange)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择时间'
|
||||||
|
})
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
uni.$emit(this.$globalFun.SUBMIT_FAIL_REASON, e, reasonObj)
|
let datetime = this.date + ' ' + (this.time || this.timeRange) + ':00';
|
||||||
},
|
this.$emit('editServTime', this.data.orderDetailId, datetime);
|
||||||
arrangeTime(e) {
|
this.hideModal(e);
|
||||||
this.hideModal(e);
|
|
||||||
},
|
},
|
||||||
changeReasonRadio(e) {
|
changeReasonRadio(e) {
|
||||||
this.problemPerson = e.detail.value;
|
this.problemPerson = e.detail.value;
|
||||||
},
|
},
|
||||||
inputSpecificReason(e) {
|
inputSpecificReason(e) {
|
||||||
this.specificReason = e.detail.value;
|
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-xxl text-main-color"><text class="cuIcon-phone"></text></text>
|
||||||
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone}}</text>
|
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<button class="cu-btn line-main-color">拨打</button>
|
<button class="cu-btn line-main-color" @click="makePhoneCall(data.customerPhone)">拨打</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-sm">
|
<view class="text-sm">
|
||||||
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
拨打电话,按与客户约定的时间填入,完成排单,未完成排单将导致排单超时!
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'time-arrange',
|
name: 'time-arrange',
|
||||||
emits: ['showArrangeFailTime'],
|
emits: ['showArrangeFailTime', 'editServTime'],
|
||||||
props: {
|
props: {
|
||||||
show: {
|
show: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -100,10 +100,12 @@
|
||||||
this.timeRangeIndex = e.detail.value;
|
this.timeRangeIndex = e.detail.value;
|
||||||
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
this.timeRange = this.timeRangeList[this.timeRangeIndex];
|
||||||
},
|
},
|
||||||
hideModal(e) {
|
hideModal(e) {
|
||||||
|
this.resetData();
|
||||||
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
||||||
},
|
},
|
||||||
cannotArrangeTime(e) {
|
cannotArrangeTime(e) {
|
||||||
|
this.resetData();
|
||||||
this.$emit('showArrangeFailTime', e)
|
this.$emit('showArrangeFailTime', e)
|
||||||
},
|
},
|
||||||
arrangeTime(e) {
|
arrangeTime(e) {
|
||||||
|
|
@ -114,10 +116,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let datetime = this.date + ' ' + (this.time || this.timeRange) + ':00';
|
let datetime = this.date + ' ' + (this.time || this.timeRange) + ':00';
|
||||||
console.log(this.data)
|
this.$emit('editServTime', this.data.orderMasterId, datetime);
|
||||||
this.$emit('editServTime', this.data.orderMasterId, datetime);
|
|
||||||
this.resetData();
|
|
||||||
this.hideModal(e);
|
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 class="text-main-color text-lg margin-right-xs"><text class="cuIcon-repair"></text></text>
|
||||||
<text>距上门:</text>
|
<text>距上门:</text>
|
||||||
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
|
||||||
:day="$dateUtil.countDownDiff(order.deadlineDate).day"
|
:day="$dateUtil.countDownDiff(order.serverTime).day"
|
||||||
:hour="$dateUtil.countDownDiff(order.deadlineDate).hour"
|
:hour="$dateUtil.countDownDiff(order.serverTime).hour"
|
||||||
:minute="$dateUtil.countDownDiff(order.deadlineDate).min"
|
:minute="$dateUtil.countDownDiff(order.serverTime).min"
|
||||||
:second="$dateUtil.countDownDiff(order.deadlineDate).seconds">
|
:second="$dateUtil.countDownDiff(order.serverTime).seconds">
|
||||||
</uni-countdown>
|
</uni-countdown>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm flex justify-start align-center" v-if="order.subState === 4 && order.chargeReachDate">
|
<view class="margin-top-sm flex justify-start align-center" v-if="order.subState === 4 && order.chargeReachDate">
|
||||||
|
|
@ -127,18 +127,19 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-if="order.orderStatus === 1">
|
<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" 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>
|
<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>
|
||||||
<view v-if="order.orderStatus === 2">
|
<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" @click="showServOrderDetail(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" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="order.orderStatus === 3">
|
<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" 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" 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" @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>
|
<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>
|
<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>
|
||||||
<view v-if="order.orderStatus === 'afterSaleService'">
|
<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" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -209,7 +210,7 @@
|
||||||
<time-arrange-fail :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
|
<time-arrange-fail :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
|
||||||
<new-serv-price :show="showNewServPriceModal" :data="curOrder"></new-serv-price>
|
<new-serv-price :show="showNewServPriceModal" :data="curOrder"></new-serv-price>
|
||||||
<pay-qrcode ref="payQrcode" :show="showPayQrcodeModal" :data="curOrder"></pay-qrcode>
|
<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>
|
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
|
||||||
<pic-modal ref="showPicModal" :imgList="picModalImgList"></pic-modal>
|
<pic-modal ref="showPicModal" :imgList="picModalImgList"></pic-modal>
|
||||||
<!-- popup -->
|
<!-- popup -->
|
||||||
|
|
@ -316,7 +317,8 @@
|
||||||
sendUrgentMsgModal: false,
|
sendUrgentMsgModal: false,
|
||||||
ifShowPageMeta: false,
|
ifShowPageMeta: false,
|
||||||
picModalImgList: [],
|
picModalImgList: [],
|
||||||
curDate: ''
|
curDate: '',
|
||||||
|
curUserInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -349,7 +351,9 @@
|
||||||
this.loadCategoryList();
|
this.loadCategoryList();
|
||||||
this.loadRegionList();
|
this.loadRegionList();
|
||||||
// 初始化指派成员
|
// 初始化指派成员
|
||||||
this.loadTeamMembers();
|
this.loadTeamMembers();
|
||||||
|
// 获取当前登录用户信息
|
||||||
|
this.curUserInfo = this.getCurUserInfo();
|
||||||
},
|
},
|
||||||
reloadMasterOrderPage(params = {}) {
|
reloadMasterOrderPage(params = {}) {
|
||||||
this.pageParams = [];
|
this.pageParams = [];
|
||||||
|
|
@ -438,11 +442,9 @@
|
||||||
},
|
},
|
||||||
bindEvent() {
|
bindEvent() {
|
||||||
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
|
||||||
uni.$on(this.$globalFun.SUBMIT_FAIL_REASON, this.submitFailReason);
|
|
||||||
},
|
},
|
||||||
offBindEvent() {
|
offBindEvent() {
|
||||||
uni.$off(this.$globalFun.HIDE_MODAL);
|
uni.$off(this.$globalFun.HIDE_MODAL);
|
||||||
uni.$off(this.$globalFun.SUBMIT_FAIL_REASON);
|
|
||||||
},
|
},
|
||||||
async regionColChange(e) {
|
async regionColChange(e) {
|
||||||
let colObj = e.detail;
|
let colObj = e.detail;
|
||||||
|
|
@ -558,7 +560,11 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async editServTime(id, datetime) {
|
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,
|
id: id,
|
||||||
revTime: datetime
|
revTime: datetime
|
||||||
});
|
});
|
||||||
|
|
@ -572,12 +578,9 @@
|
||||||
},
|
},
|
||||||
showArrangeFailTime(e) {
|
showArrangeFailTime(e) {
|
||||||
this.showTimeArrangeModal = false;
|
this.showTimeArrangeModal = false;
|
||||||
|
this.showEditTimeArrangeModal = false;
|
||||||
this.showArrangeFailTimeModal = true;
|
this.showArrangeFailTimeModal = true;
|
||||||
},
|
},
|
||||||
submitFailReason(e, reasonObj) {
|
|
||||||
// TODO: 提交内容后隐藏modal(curOrder信息置null)
|
|
||||||
this.hideModal(e);
|
|
||||||
},
|
|
||||||
togglePopup(e, orderInfo) {
|
togglePopup(e, orderInfo) {
|
||||||
if (this.ifShowPageMeta) {
|
if (this.ifShowPageMeta) {
|
||||||
this.$refs[e.currentTarget.dataset.popup].close();
|
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.$refs.payQrcode.showQrcode('http://10.45.81.125:8081/portal/' + Math.random());
|
||||||
this.showModal(e, orderInfo);
|
this.showModal(e, orderInfo);
|
||||||
},
|
},
|
||||||
showServOrderDetail(process) {
|
showServOrderDetail(order) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/order-manage/serv-detail?process=' + process
|
url: '/pages/order-manage/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
finishOrder(order) {
|
finishOrder(order) {
|
||||||
|
|
@ -637,6 +640,26 @@
|
||||||
icon: 'success'
|
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>
|
<block slot="content">服务订单详情</block>
|
||||||
</cu-custom>
|
</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 v-model="value">
|
||||||
<uni-collapse-item :open="true">
|
<uni-collapse-item :open="true">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
|
|
@ -31,43 +31,44 @@
|
||||||
<!-- 服务单概况 -->
|
<!-- 服务单概况 -->
|
||||||
<view class="bg-white margin-lr-sm margin-top-sm padding">
|
<view class="bg-white margin-lr-sm margin-top-sm padding">
|
||||||
<view class="flex align-center">
|
<view class="flex align-center">
|
||||||
<text class="text-xl margin-right">{{servDetail.mainServOrder.servTitle}}</text>
|
<text class="text-xl margin-right">{{servDetail.goodsName}}</text>
|
||||||
<view class='cu-tag bg-purple radius light margin-right-sm'>服务中</view>
|
<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>
|
||||||
<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'>
|
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
|
||||||
{{item}}</view>
|
{{item}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm">
|
||||||
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
||||||
<text>{{servDetail.mainServOrder.address}}</text>
|
<text>{{servDetail.address}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm">
|
||||||
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
||||||
<text>{{servDetail.mainServOrder.person2Contact.name}}</text>
|
<text class="margin-right-sm">{{servDetail.customerName}}</text>
|
||||||
<text>{{servDetail.mainServOrder.person2Contact.phone}}</text>
|
<text>{{servDetail.customerPhone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm">
|
||||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||||
<text>预约时间:{{servDetail.mainServOrder.bookTime}}</text>
|
<text>预约时间:{{servDetail.serverTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm">
|
<!-- <view class="margin-top-sm">
|
||||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||||
<text>排单时间:{{servDetail.mainServOrder.boodTime}}</text>
|
<text>排单时间:{{servDetail.mainServOrder.boodTime}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
|
||||||
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
||||||
<text>上门时间:{{servDetail.mainServOrder.doorTime}}</text>
|
<text>上门时间:{{servDetail.mainServOrder.doorTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm">
|
||||||
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
|
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
|
||||||
<text>任务金额:</text>
|
<text>任务金额:</text>
|
||||||
<text class="text-price">{{servDetail.mainServOrder.taskPrice}}</text>
|
<text class="text-price">{{servDetail.payMoney}}</text>
|
||||||
</view>
|
</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">
|
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
|
||||||
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 待服务列 -->
|
<!-- 待服务列 -->
|
||||||
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||||
|
|
@ -77,11 +78,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm">
|
<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>
|
</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="cu-bar solid-bottom">
|
||||||
<view class="action bar-first-action">
|
<view class="action bar-first-action">
|
||||||
<text class="cuIcon-titles text-main-color"></text> 完成记录({{item.finishList.length}})
|
<text class="cuIcon-titles text-main-color"></text> 完成记录({{item.finishList.length}})
|
||||||
|
|
@ -94,7 +95,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单编码和时间 -->
|
<!-- 订单编码和时间 -->
|
||||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
<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 class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 底部操作栏 -->
|
<!-- 底部操作栏 -->
|
||||||
|
|
@ -108,7 +109,7 @@
|
||||||
</view>
|
</view>
|
||||||
发送急报
|
发送急报
|
||||||
</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>
|
</view>
|
||||||
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
|
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
|
||||||
<view class="bg-white text-center">
|
<view class="bg-white text-center">
|
||||||
|
|
@ -135,12 +136,14 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: ['0'],
|
value: ['0'],
|
||||||
|
order: {},
|
||||||
servDetail: {},
|
servDetail: {},
|
||||||
finishRecord4Show: [],
|
finishRecord4Show: [],
|
||||||
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
|
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
|
||||||
servedColumnHeaders: ['购买型号', '购买量', '已服务'],
|
servedColumnHeaders: ['购买型号', '购买量', '已服务'],
|
||||||
process: '',
|
servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
|
||||||
|
servedValFields: ['standardName', 'standardNum', 'serverNum'],
|
||||||
ifShowPageMeta: false,
|
ifShowPageMeta: false,
|
||||||
orderManageMenu: [{
|
orderManageMenu: [{
|
||||||
name: '申请配件',
|
name: '申请配件',
|
||||||
|
|
@ -162,15 +165,18 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (options) {
|
if (options && options.order) {
|
||||||
console.log(options)
|
this.order = JSON.parse(decodeURIComponent(options.order));
|
||||||
this.process = options.process;
|
|
||||||
}
|
}
|
||||||
this.loadData();
|
this.loadData(this.order.orderDetailId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData(orderDetailId) {
|
||||||
this.servDetail = await this.$api.data('servDetail');
|
// this.servDetail = await this.$api.data('servDetail');
|
||||||
|
let servDetailRes = await this.$request.getOrderDetail({
|
||||||
|
id: orderDetailId
|
||||||
|
});
|
||||||
|
this.servDetail = servDetailRes.data;
|
||||||
this.finishList4Show = this.servDetail.finishRecord;
|
this.finishList4Show = this.servDetail.finishRecord;
|
||||||
for (let i = 0; i < this.finishList4Show.length; i++) {
|
for (let i = 0; i < this.finishList4Show.length; i++) {
|
||||||
let finishList = this.finishList4Show[i].finishList;
|
let finishList = this.finishList4Show[i].finishList;
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,12 @@
|
||||||
.long-btn {
|
.long-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-column-start {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-column-between {
|
.flex-column-between {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue