|
|
@ -14,10 +14,8 @@ |
|
|
|
<a-form-item label="售后类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-form-item label="售后类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-tag>{{ RefundTypeEnum[record.type].name }}</a-tag> |
|
|
|
<a-tag>{{ RefundTypeEnum[record.type].name }}</a-tag> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-form-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="false"> |
|
|
|
<a-radio-group |
|
|
|
<a-radio-group v-decorator="['audit_status', { initialValue: 20, rules: [{ required: true }] }]"> |
|
|
|
v-decorator="['audit_status', { initialValue: 10, rules: [{ required: true }] }]" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-radio :value="10">同意</a-radio> |
|
|
|
<a-radio :value="10">同意</a-radio> |
|
|
|
<a-radio :value="20">拒绝</a-radio> |
|
|
|
<a-radio :value="20">拒绝</a-radio> |
|
|
|
</a-radio-group> |
|
|
|
</a-radio-group> |
|
|
@ -32,11 +30,9 @@ |
|
|
|
v-decorator="['address_id', { rules: [{ required: true, message: '请选择退货地址' }] }]" |
|
|
|
v-decorator="['address_id', { rules: [{ required: true, message: '请选择退货地址' }] }]" |
|
|
|
placeholder="请选择退货地址" |
|
|
|
placeholder="请选择退货地址" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-select-option |
|
|
|
<a-select-option v-for="(item, index) in addressList" :key="index" :value="item.address_id">{{ |
|
|
|
v-for="(item, index) in addressList" |
|
|
|
item.full_address |
|
|
|
:key="index" |
|
|
|
}}</a-select-option> |
|
|
|
:value="item.address_id" |
|
|
|
|
|
|
|
>{{ item.full_address }}</a-select-option> |
|
|
|
|
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|
<div class="form-item-help"> |
|
|
|
<div class="form-item-help"> |
|
|
|
<router-link target="_blank" :to="{ path: '/store/address/index' }">地址管理</router-link> |
|
|
|
<router-link target="_blank" :to="{ path: '/store/address/index' }">地址管理</router-link> |
|
|
@ -44,13 +40,13 @@ |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item |
|
|
|
<a-form-item |
|
|
|
v-if="form.getFieldValue('audit_status') == AuditStatusEnum.REJECTED.value" |
|
|
|
v-if="form.getFieldValue('audit_status') == AuditStatusEnum.REJECTED.value" |
|
|
|
label="拒绝原因" |
|
|
|
label="回复内容" |
|
|
|
:labelCol="labelCol" |
|
|
|
:labelCol="labelCol" |
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
:wrapperCol="wrapperCol" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-textarea |
|
|
|
<a-textarea |
|
|
|
:autoSize="{ minRows: 4 }" |
|
|
|
:autoSize="{ minRows: 4 }" |
|
|
|
v-decorator="['refuse_desc', { rules: [{ required: true, message: '请输入拒绝原因' }] }]" |
|
|
|
v-decorator="['refuse_desc', { rules: [{ required: true, message: '请输入回复内容' }] }]" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</a-form> |
|
|
@ -66,7 +62,7 @@ import { AuditStatusEnum, RefundTypeEnum } from '@/common/enum/order/refund' |
|
|
|
import { AddressTypeEnum } from '@/common/enum/store/address' |
|
|
|
import { AddressTypeEnum } from '@/common/enum/store/address' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
// 对话框标题 |
|
|
|
// 对话框标题 |
|
|
|
title: '售后单审核', |
|
|
|
title: '售后单审核', |
|
|
@ -83,21 +79,20 @@ export default { |
|
|
|
// 退货地址列表 |
|
|
|
// 退货地址列表 |
|
|
|
addressList: [], |
|
|
|
addressList: [], |
|
|
|
// 当前记录 |
|
|
|
// 当前记录 |
|
|
|
record: {} |
|
|
|
record: {}, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeCreate () { |
|
|
|
beforeCreate() { |
|
|
|
// 批量给当前实例赋值 |
|
|
|
// 批量给当前实例赋值 |
|
|
|
assignment(this, { AuditStatusEnum, RefundTypeEnum }) |
|
|
|
assignment(this, { AuditStatusEnum, RefundTypeEnum }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created() { |
|
|
|
// 获取退货地址列表 |
|
|
|
// 获取退货地址列表 |
|
|
|
this.getAddressList() |
|
|
|
this.getAddressList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
// 显示对话框 |
|
|
|
// 显示对话框 |
|
|
|
show (record) { |
|
|
|
show(record) { |
|
|
|
// 显示窗口 |
|
|
|
// 显示窗口 |
|
|
|
this.visible = true |
|
|
|
this.visible = true |
|
|
|
// 当前记录 |
|
|
|
// 当前记录 |
|
|
@ -109,18 +104,20 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取退货地址列表 |
|
|
|
// 获取退货地址列表 |
|
|
|
getAddressList () { |
|
|
|
getAddressList() { |
|
|
|
this.isLoading = true |
|
|
|
this.isLoading = true |
|
|
|
AddressApi.all({ type: AddressTypeEnum.RETURN.value }) |
|
|
|
AddressApi.all({ type: AddressTypeEnum.RETURN.value }) |
|
|
|
.then(result => this.addressList = result.data.list) |
|
|
|
.then((result) => (this.addressList = result.data.list)) |
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确认按钮 |
|
|
|
// 确认按钮 |
|
|
|
handleSubmit (e) { |
|
|
|
handleSubmit(e) { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
|
// 表单验证 |
|
|
|
// 表单验证 |
|
|
|
const { form: { validateFields } } = this |
|
|
|
const { |
|
|
|
|
|
|
|
form: { validateFields }, |
|
|
|
|
|
|
|
} = this |
|
|
|
validateFields((errors, values) => { |
|
|
|
validateFields((errors, values) => { |
|
|
|
// 提交到后端api |
|
|
|
// 提交到后端api |
|
|
|
!errors && this.onFormSubmit(values) |
|
|
|
!errors && this.onFormSubmit(values) |
|
|
@ -128,16 +125,16 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 关闭对话框事件 |
|
|
|
// 关闭对话框事件 |
|
|
|
handleCancel () { |
|
|
|
handleCancel() { |
|
|
|
this.visible = false |
|
|
|
this.visible = false |
|
|
|
this.form.resetFields() |
|
|
|
this.form.resetFields() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 提交到后端api |
|
|
|
// 提交到后端api |
|
|
|
onFormSubmit (values) { |
|
|
|
onFormSubmit(values) { |
|
|
|
this.isLoading = true |
|
|
|
this.isLoading = true |
|
|
|
Api.audit({ orderRefundId: this.record.order_refund_id, form: values }) |
|
|
|
Api.audit({ orderRefundId: this.record.order_refund_id, form: values }) |
|
|
|
.then(result => { |
|
|
|
.then((result) => { |
|
|
|
// 显示成功 |
|
|
|
// 显示成功 |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
// 关闭对话框事件 |
|
|
|
// 关闭对话框事件 |
|
|
@ -145,10 +142,9 @@ export default { |
|
|
|
// 通知父端组件提交完成了 |
|
|
|
// 通知父端组件提交完成了 |
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|