师傅完工图片上传,师傅完单备注
This commit is contained in:
parent
21ce6c9f9f
commit
dd5a2eb5f9
|
|
@ -434,6 +434,14 @@ export default {
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
},
|
},
|
||||||
|
async applyFinishOrder(params = {}) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/order/detail/app/applyFinishOrder',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
|
},
|
||||||
async getOrderDetail(params = {}) {
|
async getOrderDetail(params = {}) {
|
||||||
let res = await uni.request({
|
let res = await uni.request({
|
||||||
url: '/order/detail/app/detail',
|
url: '/order/detail/app/detail',
|
||||||
|
|
|
||||||
|
|
@ -6,53 +6,55 @@
|
||||||
<block slot="content">上传完工照片</block>
|
<block slot="content">上传完工照片</block>
|
||||||
</cu-custom>
|
</cu-custom>
|
||||||
<!-- 具体服务栏 -->
|
<!-- 具体服务栏 -->
|
||||||
<view class="bg-white margin-top-sm flex justify-start padding">
|
<view class="bg-white margin-top-sm flex justify-start padding" v-if="order">
|
||||||
<view class="cu-avatar"
|
<view class="cu-avatar"
|
||||||
:style="'width: 120rpx; height: 120rpx; background-image:url(' + servInfo.picUrl + ');'"></view>
|
:style="'width: 120rpx; height: 120rpx; background-image:url(' + order.goodsLogoUrl + ');'"></view>
|
||||||
<view class="flex flex-column-between margin-left">
|
<view class="flex flex-column-between margin-left">
|
||||||
<view class="text-bold">{{servInfo.name}}</view>
|
<view class="text-bold">{{order.goodsName}}</view>
|
||||||
<view>
|
<!-- <view>
|
||||||
<view v-for="(tag, index1) in servInfo.tags" v-if="tag.level === 'error'" class='cu-tag margin-right-xs radius line-red margin-top-xs'>{{tag.content}}</view>
|
<view v-for="(tag, index1) in servInfo.tags" v-if="tag.level === 'error'" class='cu-tag margin-right-xs radius line-red margin-top-xs'>{{tag.content}}</view>
|
||||||
<view v-else-if="tag.level === 'info'" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>{{tag.content}}</view>
|
<view v-else-if="tag.level === 'info'" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>{{tag.content}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
<view class='cu-tag margin-right-xs radius bg-main-color light margin-top-xs' v-if="order.orderType === 0">商城订单</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top-sm bg-white padding">
|
<view class="margin-top-sm bg-white padding">
|
||||||
<!-- 服务指标 -->
|
<!-- 服务指标 -->
|
||||||
<checkbox-group class="block" @change="checkServIndex">
|
<!-- <checkbox-group class="block" @change="checkServIndex">
|
||||||
<view style="min-width: 50%;" class="flex justify-start align-center margin-top-sm float-left" v-for="(item, index) in servIndex">
|
<view style="min-width: 50%;" class="flex justify-start align-center margin-top-sm float-left" v-for="(item, index) in servIndex">
|
||||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :checked="checkIndexArr[index] === '1'" value='1'>
|
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :checked="checkIndexArr[index] === '1'" value='1'>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
<text @click="checkedCurBox(index)">{{item}}</text>
|
<text @click="checkedCurBox(index)">{{item}}</text>
|
||||||
</view>
|
</view>
|
||||||
</checkbox-group>
|
</checkbox-group> -->
|
||||||
<!-- 完工图片上传 -->
|
<!-- 完工图片上传 -->
|
||||||
<view class="padding-top-lg float-clear">
|
<view class="padding-top-lg float-clear">
|
||||||
<view>
|
<view>
|
||||||
<text class="text-bold text-black">上传完工照片</text>
|
<text class="text-bold text-black">上传完工照片 {{finishImgList.length}}/3</text>
|
||||||
<text>(按订单要求上传)</text>
|
<text>(按订单要求上传)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="grid col-4 grid-square flex-sub margin-top-sm">
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
<view class="bg-img" v-for="(item,index) in finishImgList" :key="index"
|
||||||
@tap="viewImage($event, imgList)" :data-url="item">
|
@tap="viewImage($event, finishImgList)" :data-url="item">
|
||||||
<image :src="item" mode="aspectFill"></image>
|
<image :src="item" mode="aspectFill"></image>
|
||||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, imgList)" :data-index="index">
|
<view class="cu-tag bg-red" @tap.stop="delImg($event, finishImgList)" :data-index="index">
|
||||||
<text class='cuIcon-close'></text>
|
<text class='cuIcon-close'></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="solids" @tap="chooseImage" v-if="imgList.length < 4">
|
<view class="solids" @tap="chooseImgList(e, finishImgList)" v-if="finishImgList.length < 3">
|
||||||
<text class='cuIcon-cameraadd'></text>
|
<text class='cuIcon-cameraadd'></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 备注 -->
|
<!-- 备注 -->
|
||||||
<view class="padding-top-lg uni-textarea">
|
<view class="padding-top text-bold text-black">备注</view>
|
||||||
<textarea style="width: 100%;" class="solid padding-sm" maxlength="-1" @input="inputSpecificReason"
|
<view class="margin-top-sm">
|
||||||
placeholder="温馨提示: 服务过程中有分歧存在客诉隐患或未能及时处理彻底的,请急报说明情况,将由平台客服一起协调沟通,否则造成你有责任的客诉将不利于服务评价;上述勾选需真实,被反映虚假或回访不实属恶意反馈,可能会被商家投诉" />
|
<textarea style="width: 100%; height: 300rpx;" class="solid radius text-left padding-sm" v-model="remark"
|
||||||
|
maxlength="-1" placeholder="温馨提示: 服务过程中有分歧存在客诉隐患或未能及时处理彻底的,请急报说明情况,将由平台客服一起协调沟通,否则造成你有责任的客诉将不利于服务评价;上述勾选需真实,被反映虚假或回访不实属恶意反馈,可能会被商家投诉"></textarea>
|
||||||
</view>
|
</view>
|
||||||
<!-- 确认按钮 -->
|
<!-- 确认按钮 -->
|
||||||
<view class="margin-lr margin-bottom padding-top-xl">
|
<view class="margin-lr margin-bottom padding-top-xl">
|
||||||
<button class="cu-btn bg-main-color long-btn radius shadow-blur">提交</button>
|
<button class="cu-btn bg-main-color long-btn radius shadow-blur" @click="finishOrder">提交</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -62,14 +64,6 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
servInfo: {
|
|
||||||
name: '空调挂机柜机清洗服务',
|
|
||||||
picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big20000.jpg',
|
|
||||||
tags: [{
|
|
||||||
level: 'info',
|
|
||||||
content: '商城订单'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
checkIndexArr: [],
|
checkIndexArr: [],
|
||||||
servIndex: [
|
servIndex: [
|
||||||
'本单准时上门',
|
'本单准时上门',
|
||||||
|
|
@ -82,7 +76,9 @@
|
||||||
'产生的费用是服务前说明并报给予客户,客户同意',
|
'产生的费用是服务前说明并报给予客户,客户同意',
|
||||||
'已让客户验收,并提示客户验收内容,已完成此项'
|
'已让客户验收,并提示客户验收内容,已完成此项'
|
||||||
],
|
],
|
||||||
imgList: []
|
finishImgList: [],
|
||||||
|
remark: '',
|
||||||
|
order: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
@ -93,11 +89,95 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData (orderInfo) {
|
loadData (orderInfo) {
|
||||||
console.log(orderInfo)
|
this.order = orderInfo;
|
||||||
},
|
},
|
||||||
checkedCurBox(index) {
|
chooseImgList(e, imgList) {
|
||||||
this.checkIndexArr[index] = 1;
|
uni.chooseImage({
|
||||||
|
count: 3 - imgList.length, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['album'], //从相册选择
|
||||||
|
success: (res) => {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
res.tempFilePaths.forEach((tmpUrl, index) => {
|
||||||
|
this.$request.uploadFile(tmpUrl).then((url) => {
|
||||||
|
imgList.push(url);
|
||||||
|
if (index === res.tempFilePaths.length - 1) {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
viewImage(e, imgList) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: imgList,
|
||||||
|
current: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delImg(e, imgList) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: '确定要删除这张图片吗?',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确定',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
validData() {
|
||||||
|
let errMsg = null;
|
||||||
|
if (!this.finishImgList || this.finishImgList.length === 0) {
|
||||||
|
errMsg = "至少上传一张完工图片"
|
||||||
|
} else if (!this.order || !this.order.orderDetailId) {
|
||||||
|
errMsg = "订单信息异常,请稍后重新发起完单"
|
||||||
|
}
|
||||||
|
if (errMsg) {
|
||||||
|
uni.showToast({
|
||||||
|
title: errMsg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
async finishOrder() {
|
||||||
|
if (!this.validData()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await this.$request.applyFinishOrder({
|
||||||
|
orderDetailId: this.order.orderDetailId,
|
||||||
|
finishImgList: this.finishImgList,
|
||||||
|
remark: this.remark
|
||||||
|
});
|
||||||
|
if (res && res.code === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
title: '提交成功'
|
||||||
|
})
|
||||||
|
} else if (res && res.msg) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg,
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: '提交失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// checkedCurBox(index) {
|
||||||
|
// this.checkIndexArr[index] = 1;
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -687,11 +687,11 @@
|
||||||
url: '/pages/order-manage/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
url: '/pages/order-manage/serv-detail?order=' + encodeURIComponent(JSON.stringify(order))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// finishOrder(order) {
|
finishOrder(order) {
|
||||||
// uni.navigateTo({
|
uni.navigateTo({
|
||||||
// url: '/pages/order-manage/finish-order?order=' + encodeURIComponent(JSON.stringify(order))
|
url: '/pages/order-manage/finish-order?order=' + encodeURIComponent(JSON.stringify(order))
|
||||||
// })
|
})
|
||||||
// },
|
},
|
||||||
async updateMasterOrder(order, status) {
|
async updateMasterOrder(order, status) {
|
||||||
let res = await this.$request.updateMasterOrder({
|
let res = await this.$request.updateMasterOrder({
|
||||||
id: order.orderMasterId,
|
id: order.orderMasterId,
|
||||||
|
|
@ -704,23 +704,6 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async finishOrder(order) {
|
|
||||||
let curDate = new Date();
|
|
||||||
let formatCurDate = curDate.getFullYear() + '-' + (curDate.getMonth() + 1) + '-' + curDate.getDate()
|
|
||||||
+ ' ' + curDate.getHours() + ':' + curDate.getMinutes() + ':' + curDate.getSeconds();
|
|
||||||
|
|
||||||
let res = await this.updateOrderDetailStatus({
|
|
||||||
id: order.orderDetailId,
|
|
||||||
orderStatus: 4,
|
|
||||||
workFinishTime: formatCurDate
|
|
||||||
});
|
|
||||||
if (res && res.code === 0) {
|
|
||||||
this.reloadMasterOrderPage();
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'success'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updateRefundStatus(status, index) {
|
updateRefundStatus(status, index) {
|
||||||
this.orderList[index].refundStatus = status;
|
this.orderList[index].refundStatus = status;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,21 @@
|
||||||
<product-picked :pickedList="[item]" :columnTitleArr="servedColumnHeaders" :valFieldArr="servedValFields"></product-picked>
|
<product-picked :pickedList="[item]" :columnTitleArr="servedColumnHeaders" :valFieldArr="servedValFields"></product-picked>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="servDetail.orderStatus > 3 && servDetail.finishImgList && servDetail.finishImgList.length" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
||||||
|
<view class="cu-bar solid-bottom">
|
||||||
|
<view class="action bar-first-action">
|
||||||
|
<text class="cuIcon-titles text-main-color"></text> 完工图片
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="grid col-3 grid-square flex-sub margin-top-sm">
|
||||||
|
<view class="bg-img" v-for="(imgUrl, index) in servDetail.finishImgList" :key="index">
|
||||||
|
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text>备注:{{servDetail.workerRemark}}</text>
|
||||||
|
</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 v-if="[0, 1].indexOf(servDetail.orderStatus) !== -1">订单编码:{{servDetail.orderMasterCode}}</view>
|
<view v-if="[0, 1].indexOf(servDetail.orderStatus) !== -1">订单编码:{{servDetail.orderMasterCode}}</view>
|
||||||
|
|
@ -247,6 +262,12 @@
|
||||||
},
|
},
|
||||||
hideModal(e) {
|
hideModal(e) {
|
||||||
this[e.currentTarget.dataset.modal] = false;
|
this[e.currentTarget.dataset.modal] = false;
|
||||||
|
},
|
||||||
|
viewImage(e, imgList) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: imgList,
|
||||||
|
current: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue