Commit 1aff1c13 authored by dragondean@qq.com's avatar dragondean@qq.com

创建报价单后重置表单

parent 78e16748
...@@ -520,6 +520,14 @@ import QuickCreateCustomer from '@/components/QuickCreateCustomer' ...@@ -520,6 +520,14 @@ 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 = {
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
}
export default { export default {
name: "EcwOfferEdit", name: "EcwOfferEdit",
components: { components: {
...@@ -542,14 +550,7 @@ export default { ...@@ -542,14 +550,7 @@ export default {
// couponList: [], // couponList: [],
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: {...defaultForm},
sendstatus:0,
type: [],
control: false,
isCargoControl: false,
prodCreateReqVOList:[],
transportVO: {}
},
// 表单校验 // 表单校验
labelStyle: 'width:120px', labelStyle: 'width:120px',
...@@ -846,7 +847,7 @@ export default { ...@@ -846,7 +847,7 @@ export default {
}) })
}, },
'form.transportVO.packageTypeArr'(val){ 'form.transportVO.packageTypeArr'(val){
this.$set(this.form.transportVO, 'packageType', val.join(',')) this.$set(this.form.transportVO, 'packageType', (val || []).join(','))
}, },
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
...@@ -1035,6 +1036,8 @@ export default { ...@@ -1035,6 +1036,8 @@ export default {
}) })
// 添加的提交 // 添加的提交
createOffer(data).then(response => { createOffer(data).then(response => {
// 重置表单内容
this.$set(this, 'form', {...defaultForm})
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