Commit 125b277c authored by dragondean@qq.com's avatar dragondean@qq.com

新建报价单后清理表单

parent 21919e10
...@@ -520,13 +520,15 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer' ...@@ -520,13 +520,15 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
window.Decimal= Decimal window.Decimal= Decimal
const defaultForm = { const createDefaultForm = () => {
sendstatus:0, return {
type: [], sendstatus:0,
control: false, type: [],
isCargoControl: false, control: false,
prodCreateReqVOList:[], isCargoControl: false,
transportVO: {} prodCreateReqVOList:[],
transportVO: {}
}
} }
export default { export default {
name: "EcwOfferEdit", name: "EcwOfferEdit",
...@@ -550,7 +552,7 @@ export default { ...@@ -550,7 +552,7 @@ export default {
// couponList: [], // couponList: [],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: {...defaultForm}, form: {...createDefaultForm()},
// 表单校验 // 表单校验
labelStyle: 'width:120px', labelStyle: 'width:120px',
...@@ -1037,7 +1039,11 @@ export default { ...@@ -1037,7 +1039,11 @@ export default {
// 添加的提交 // 添加的提交
createOffer(data).then(response => { createOffer(data).then(response => {
// 重置表单内容 // 重置表单内容
this.$set(this, 'form', {...defaultForm}) this.$set(this, 'form', {...createDefaultForm()})
this.$nextTick(() => {
console.log('清理表单校验')
this.$refs.form.clearValidate()
})
this.$modal.msgSuccess(this.$t("新增成功")); this.$modal.msgSuccess(this.$t("新增成功"));
this.$redirect('index') this.$redirect('index')
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment