|
|
@ -9,10 +9,15 @@
|
|
|
|
> -->
|
|
|
|
> -->
|
|
|
|
<!-- <a-spin :spinning="confirmLoading"> -->
|
|
|
|
<!-- <a-spin :spinning="confirmLoading"> -->
|
|
|
|
<a-form :form="form" class="CsForm">
|
|
|
|
<a-form :form="form" class="CsForm">
|
|
|
|
<a-row type="flex" justify="end">
|
|
|
|
<a-row type="flex" justify="end" :gutter="16">
|
|
|
|
|
|
|
|
<a-col :span="2" v-if="!id">
|
|
|
|
|
|
|
|
<a-button type="primary" @click="handleSubmit('New')">
|
|
|
|
|
|
|
|
保存并新增
|
|
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="1">
|
|
|
|
<a-col :span="1">
|
|
|
|
<a-button type="primary" @click="handleSubmit">
|
|
|
|
<a-button type="primary" @click="handleSubmit">
|
|
|
|
{{ this.id ? '修改' : '新增' }}
|
|
|
|
{{ this.id ? '修改' : '保存' }}
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-row>
|
|
|
@ -367,7 +372,7 @@ export default {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 提交表单
|
|
|
|
* 提交表单
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
handleSubmit() {
|
|
|
|
handleSubmit(WebType) {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
form: { validateFields }
|
|
|
|
form: { validateFields }
|
|
|
|
} = this
|
|
|
|
} = this
|
|
|
@ -421,10 +426,15 @@ export default {
|
|
|
|
DjyCustomerAdd({ ...values, propString: propString, contacts: this.ContactsData })
|
|
|
|
DjyCustomerAdd({ ...values, propString: propString, contacts: this.ContactsData })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.id = res.data
|
|
|
|
|
|
|
|
this.$message.success('新增成功')
|
|
|
|
this.$message.success('新增成功')
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.$emit('ok', values)
|
|
|
|
this.$emit('ok', values)
|
|
|
|
|
|
|
|
if (WebType == 'New') {
|
|
|
|
|
|
|
|
this.form.resetFields()
|
|
|
|
|
|
|
|
this.ContactsData = []
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.id = res.data
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`新增失败,${res.message}`)
|
|
|
|
this.$message.error(`新增失败,${res.message}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|