2022-09-26 02:30:57 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="cu-modal" :class="show?'show':''">
|
|
|
|
|
|
<view class="cu-dialog bg-white">
|
|
|
|
|
|
<view class="cu-bar">
|
|
|
|
|
|
<view class="content">同意售后</view>
|
|
|
|
|
|
<view class="action" data-modal="agreeAfterSale" @click="hideModal">
|
|
|
|
|
|
<text class="cuIcon-close text-red"></text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="padding text-left">
|
|
|
|
|
|
<view class="text-lg">
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<text>退款金额:</text>
|
2022-10-09 23:17:12 +08:00
|
|
|
|
<text class="text-price text-red">{{data.afterServiceRecordList[0].refund ? data.afterServiceRecordList[0].refund : data.payMoney}}</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
</view>
|
2022-10-10 22:47:53 +08:00
|
|
|
|
<view v-if="data.afterServiceRecordList[0].refund && data.payMoney < data.afterServiceRecordList[0].refund" class="padding-top text-red">警报:该单关联其它订单,客户申请的退款金额有效,具体操作请沟通派单处。</view>
|
2022-09-26 23:51:22 +08:00
|
|
|
|
<view class="text-lg padding-top flex justify-start align-center">
|
2022-10-07 02:26:02 +08:00
|
|
|
|
<text>更改退款金额:</text>
|
2022-09-26 02:30:57 +08:00
|
|
|
|
<input class="radius-input inline-input" v-model="agreedRefund"></input>
|
|
|
|
|
|
<text class="margin-left-xs">元</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="padding-top">
|
|
|
|
|
|
<view class="flex justify-start">
|
|
|
|
|
|
<view>原因选择:</view>
|
|
|
|
|
|
<radio-group @change="changeReasonRadio">
|
|
|
|
|
|
<label class="radio margin-right-sm">
|
|
|
|
|
|
<radio style="transform:scale(0.7)" class="main-color" value="1" :checked="data.reasonType === 1"/>
|
|
|
|
|
|
<text>客户原因</text>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="radio">
|
|
|
|
|
|
<radio style="transform:scale(0.7)" class="main-color" value="2" :checked="data.reasonType === 2"/>
|
|
|
|
|
|
<text>师傅原因</text>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="radio">
|
|
|
|
|
|
<radio style="transform:scale(0.7)" class="main-color" value="3" :checked="data.reasonType === 3"/>
|
|
|
|
|
|
<text>其他</text>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</radio-group>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top">
|
|
|
|
|
|
<textarea style="width: 100%; height: 200rpx;" class="solid radius text-left padding-sm"
|
|
|
|
|
|
v-model="remark" maxlength="-1"
|
|
|
|
|
|
placeholder="请输入具体原因或直接同意,更改到帐金额需与客户协商一致,否则可能被拒绝或引起客诉升级"></textarea>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-bar solid-top">
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-black" data-modal="agreeAfterSale" @click="hideModal">取消</view>
|
|
|
|
|
|
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="agreeAfterSale"
|
|
|
|
|
|
@click="submit">确认</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'agreeAfterSale',
|
|
|
|
|
|
props: {
|
|
|
|
|
|
show: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false
|
|
|
|
|
|
},
|
|
|
|
|
|
data: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: {}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
agreedRefund: null,
|
|
|
|
|
|
reasonType: null,
|
|
|
|
|
|
remark: null
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
hideModal(e) {
|
|
|
|
|
|
this.resetData();
|
|
|
|
|
|
uni.$emit(this.$globalFun.HIDE_MODAL, e);
|
|
|
|
|
|
},
|
|
|
|
|
|
resetData() {
|
|
|
|
|
|
this.data = null;
|
|
|
|
|
|
this.agreedRefund = null;
|
|
|
|
|
|
this.reasonType = null;
|
|
|
|
|
|
this.remark = null;
|
|
|
|
|
|
},
|
|
|
|
|
|
changeReasonRadio(e) {
|
|
|
|
|
|
this.reasonType = e.detail.value;
|
|
|
|
|
|
},
|
|
|
|
|
|
async submit(e) {
|
2022-10-10 22:47:53 +08:00
|
|
|
|
let agreedRefund = this.agreedRefund;
|
|
|
|
|
|
if (!agreedRefund && this.data.afterServiceRecordList[0].refund != null) {
|
|
|
|
|
|
agreedRefund = this.data.afterServiceRecordList[0].refund;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
agreedRefund = this.data.payMoney;
|
|
|
|
|
|
}
|
2022-09-26 02:30:57 +08:00
|
|
|
|
let res = await this.$request.editAfterServiceRecord({
|
|
|
|
|
|
id: this.data.afterServiceRecordList[0].id,
|
|
|
|
|
|
workerFeedbackReasonType: this.reasonType,
|
2022-10-10 22:47:53 +08:00
|
|
|
|
agreedRefund: agreedRefund,
|
2022-09-26 02:30:57 +08:00
|
|
|
|
workerFeedbackReason: this.remark,
|
2022-09-26 23:51:22 +08:00
|
|
|
|
workerFeedbackResult: 1,
|
2022-09-26 02:30:57 +08:00
|
|
|
|
updateBy: 2
|
|
|
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0) {
|
2022-10-10 22:47:53 +08:00
|
|
|
|
this.hideModal(e);
|
|
|
|
|
|
this.$emit('confirmFeedback');
|
2022-09-26 02:30:57 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'success',
|
2022-10-10 22:47:53 +08:00
|
|
|
|
title: '提交成功',
|
2022-09-26 02:30:57 +08:00
|
|
|
|
duration: 1000
|
|
|
|
|
|
})
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'error',
|
2022-10-10 22:47:53 +08:00
|
|
|
|
duration: 1000,
|
|
|
|
|
|
title: '提交失败',
|
2022-09-26 02:30:57 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.inline-input {
|
|
|
|
|
|
flex-basis: 25%;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|