dingdong-master/pages/order-manage/modal/agree-after-sale.vue

121 lines
3.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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">
<text>退款金额</text>
<text class="text-price text-red">{{data.afterServiceRecordList[0].refund ? data.afterServiceRecordList[0].refund : data.payMoney}}</text>
</view>
<view v-if="data.payMoney < data.afterServiceRecordList[0].refund" class="padding-top text-red">警报:该单关联其它订单,客户申请的退款金额有效,具体操作请沟通派单处。</view>
<view class="text-lg padding-top flex justify-start align-center">
<text>更改退款金额:</text>
<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) {
let res = await this.$request.editAfterServiceRecord({
id: this.data.afterServiceRecordList[0].id,
workerFeedbackReasonType: this.reasonType,
agreedRefund: this.agreedRefund,
workerFeedbackReason: this.remark,
workerFeedbackResult: 1,
updateBy: 2
});
if (res && res.code === 0) {
uni.showToast({
icon: 'success',
duration: 1000
})
this.hideModal(e);
this.$emit('confirmFeedback');
return;
}
uni.showToast({
icon: 'error',
duration: 1000
})
}
},
}
</script>
<style scoped>
.inline-input {
flex-basis: 25%;
}
</style>