From c10680b719be331f404c5c275205ff5cd9aefb4b Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Thu, 21 Mar 2024 23:18:59 +0800 Subject: [PATCH] 1 --- src/views/order/refund/modules/AuditForm.vue | 54 +++++++++----------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/views/order/refund/modules/AuditForm.vue b/src/views/order/refund/modules/AuditForm.vue index f318926..dc3d409 100644 --- a/src/views/order/refund/modules/AuditForm.vue +++ b/src/views/order/refund/modules/AuditForm.vue @@ -14,10 +14,8 @@ {{ RefundTypeEnum[record.type].name }} - - + + 同意 拒绝 @@ -32,11 +30,9 @@ v-decorator="['address_id', { rules: [{ required: true, message: '请选择退货地址' }] }]" placeholder="请选择退货地址" > - {{ item.full_address }} + {{ + item.full_address + }}
地址管理 @@ -44,13 +40,13 @@ @@ -66,7 +62,7 @@ import { AuditStatusEnum, RefundTypeEnum } from '@/common/enum/order/refund' import { AddressTypeEnum } from '@/common/enum/store/address' export default { - data () { + data() { return { // 对话框标题 title: '售后单审核', @@ -83,21 +79,20 @@ export default { // 退货地址列表 addressList: [], // 当前记录 - record: {} + record: {}, } }, - beforeCreate () { + beforeCreate() { // 批量给当前实例赋值 assignment(this, { AuditStatusEnum, RefundTypeEnum }) }, - created () { + created() { // 获取退货地址列表 this.getAddressList() }, methods: { - // 显示对话框 - show (record) { + show(record) { // 显示窗口 this.visible = true // 当前记录 @@ -109,18 +104,20 @@ export default { }, // 获取退货地址列表 - getAddressList () { + getAddressList() { this.isLoading = true AddressApi.all({ type: AddressTypeEnum.RETURN.value }) - .then(result => this.addressList = result.data.list) - .finally(() => this.isLoading = false) + .then((result) => (this.addressList = result.data.list)) + .finally(() => (this.isLoading = false)) }, // 确认按钮 - handleSubmit (e) { + handleSubmit(e) { e.preventDefault() // 表单验证 - const { form: { validateFields } } = this + const { + form: { validateFields }, + } = this validateFields((errors, values) => { // 提交到后端api !errors && this.onFormSubmit(values) @@ -128,16 +125,16 @@ export default { }, // 关闭对话框事件 - handleCancel () { + handleCancel() { this.visible = false this.form.resetFields() }, // 提交到后端api - onFormSubmit (values) { + onFormSubmit(values) { this.isLoading = true Api.audit({ orderRefundId: this.record.order_refund_id, form: values }) - .then(result => { + .then((result) => { // 显示成功 this.$message.success(result.message, 1.5) // 关闭对话框事件 @@ -145,10 +142,9 @@ export default { // 通知父端组件提交完成了 this.$emit('handleSubmit', values) }) - .finally(() => this.isLoading = false) - } - - } + .finally(() => (this.isLoading = false)) + }, + }, }