|
|
@ -30,7 +30,7 @@ import * as Api from '@/api/order/event' |
|
|
|
import { Ueditor } from '@/components' |
|
|
|
import { Ueditor } from '@/components' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
Ueditor |
|
|
|
Ueditor, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -47,13 +47,11 @@ export default { |
|
|
|
// 当前表单元素 |
|
|
|
// 当前表单元素 |
|
|
|
form: this.$form.createForm(this), |
|
|
|
form: this.$form.createForm(this), |
|
|
|
// 当前记录 |
|
|
|
// 当前记录 |
|
|
|
record: {} |
|
|
|
record: {}, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created() {}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
// 显示对话框 |
|
|
|
// 显示对话框 |
|
|
|
show(record) { |
|
|
|
show(record) { |
|
|
|
// 显示窗口 |
|
|
|
// 显示窗口 |
|
|
@ -66,7 +64,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
// 设置默认值 |
|
|
|
// 设置默认值 |
|
|
|
setFieldsValue() { |
|
|
|
setFieldsValue() { |
|
|
|
const { record, $nextTick, form: { setFieldsValue } } = this |
|
|
|
const { |
|
|
|
|
|
|
|
record, |
|
|
|
|
|
|
|
$nextTick, |
|
|
|
|
|
|
|
form: { setFieldsValue }, |
|
|
|
|
|
|
|
} = this |
|
|
|
$nextTick(() => { |
|
|
|
$nextTick(() => { |
|
|
|
setFieldsValue({ content: record.merchant_remark }) |
|
|
|
setFieldsValue({ content: record.merchant_remark }) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -76,7 +78,9 @@ export default { |
|
|
|
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) |
|
|
@ -93,7 +97,7 @@ export default { |
|
|
|
onFormSubmit(values) { |
|
|
|
onFormSubmit(values) { |
|
|
|
this.isLoading = true |
|
|
|
this.isLoading = true |
|
|
|
Api.updateRemark({ orderId: this.record.order_id, form: values }) |
|
|
|
Api.updateRemark({ orderId: this.record.order_id, form: values }) |
|
|
|
.then(result => { |
|
|
|
.then((result) => { |
|
|
|
// 显示成功 |
|
|
|
// 显示成功 |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
// 关闭对话框事件 |
|
|
|
// 关闭对话框事件 |
|
|
@ -101,9 +105,8 @@ export default { |
|
|
|
// 通知父端组件提交完成了 |
|
|
|
// 通知父端组件提交完成了 |
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|