|
|
|
@ -1,289 +0,0 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-modal
|
|
|
|
|
title="编辑客户信息"
|
|
|
|
|
:width="1100"
|
|
|
|
|
:visible="visible"
|
|
|
|
|
:confirmLoading="confirmLoading"
|
|
|
|
|
@ok="handleSubmit"
|
|
|
|
|
@cancel="handleCancel"
|
|
|
|
|
>
|
|
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
|
|
<a-form :form="form">
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入助记码"
|
|
|
|
|
v-decorator="['codeName', { rules: [{ required: true, message: '请输入助记码!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="简称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入简称"
|
|
|
|
|
v-decorator="['shortName', { rules: [{ required: true, message: '请输入简称!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="全称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入全称"
|
|
|
|
|
v-decorator="['fullName', { rules: [{ required: true, message: '请输入全称!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入负责人"
|
|
|
|
|
v-decorator="['chief', { rules: [{ required: true, message: '请输入负责人!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入电话"
|
|
|
|
|
v-decorator="['tel', { rules: [{ required: true, message: '请输入电话!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入邮箱"
|
|
|
|
|
v-decorator="['email', { rules: [{ required: true, message: '请输入邮箱!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="QQ" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入QQ"
|
|
|
|
|
v-decorator="['qq', { rules: [{ required: true, message: '请输入QQ!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="网址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入网址"
|
|
|
|
|
v-decorator="['webUrl', { rules: [{ required: true, message: '请输入网址!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="省份" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入省份"
|
|
|
|
|
v-decorator="['province', { rules: [{ required: true, message: '请输入省份!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入城市"
|
|
|
|
|
v-decorator="['city', { rules: [{ required: true, message: '请输入城市!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入地址"
|
|
|
|
|
v-decorator="['addr', { rules: [{ required: true, message: '请输入地址!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="英文全名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入英文全名"
|
|
|
|
|
v-decorator="['fullNameEN', { rules: [{ required: true, message: '请输入英文全名!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="英文地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入英文地址"
|
|
|
|
|
v-decorator="['addrEN', { rules: [{ required: true, message: '请输入英文地址!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="发票抬头" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入发票抬头"
|
|
|
|
|
v-decorator="['invTitle', { rules: [{ required: true, message: '请输入发票抬头!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="纳税人识别号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入纳税人识别号"
|
|
|
|
|
v-decorator="['taxNO', { rules: [{ required: true, message: '请输入纳税人识别号!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="发票地址电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入发票地址电话"
|
|
|
|
|
v-decorator="['invAddrTel', { rules: [{ required: true, message: '请输入发票地址电话!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="人民币开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入人民币开户行"
|
|
|
|
|
v-decorator="['rmbBank', { rules: [{ required: true, message: '请输入人民币开户行!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="人民币账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入人民币账号"
|
|
|
|
|
v-decorator="['rmbAccount', { rules: [{ required: true, message: '请输入人民币账号!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="美元开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入美元开户行"
|
|
|
|
|
v-decorator="['usdBank', { rules: [{ required: true, message: '请输入美元开户行!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="美元账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入美元账号"
|
|
|
|
|
v-decorator="['usdAccount', { rules: [{ required: true, message: '请输入美元账号!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { DjyCustomerEdit } from '@/api/modular/main/CustomerInformationManagement'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
labelCol: {
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 7 }
|
|
|
|
|
},
|
|
|
|
|
wrapperCol: {
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 15 }
|
|
|
|
|
},
|
|
|
|
|
typeData: [],
|
|
|
|
|
visible: false,
|
|
|
|
|
confirmLoading: false,
|
|
|
|
|
form: this.$form.createForm(this)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 初始化方法
|
|
|
|
|
edit(record) {
|
|
|
|
|
console.log(record)
|
|
|
|
|
this.visible = true
|
|
|
|
|
const typeOption = this.$options
|
|
|
|
|
this.typeData = typeOption.filters['dictData']('edi_type')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
codeName: record.codeName,
|
|
|
|
|
addr: record.addr,
|
|
|
|
|
addrEN: record.addrEN,
|
|
|
|
|
chief: record.chief,
|
|
|
|
|
city: record.city,
|
|
|
|
|
createdTime: record.createdTime,
|
|
|
|
|
createdUserId: record.createdUserId,
|
|
|
|
|
createdUserName: record.createdUserName,
|
|
|
|
|
email: record.email,
|
|
|
|
|
fullName: record.fullName,
|
|
|
|
|
fullNameEN: record.fullNameEN,
|
|
|
|
|
id: record.id,
|
|
|
|
|
invAddrTel: record.invAddrTel,
|
|
|
|
|
invTitle: record.invTitle,
|
|
|
|
|
isDeleted: record.isDeleted,
|
|
|
|
|
province: record.province,
|
|
|
|
|
qq: record.qq,
|
|
|
|
|
rmbAccount: record.rmbAccount,
|
|
|
|
|
rmbBank: record.rmbBank,
|
|
|
|
|
shortName: record.shortName,
|
|
|
|
|
taxNO: record.taxNO,
|
|
|
|
|
tel: record.tel,
|
|
|
|
|
tenantId: record.tenantId,
|
|
|
|
|
usdAccount: record.usdAccount,
|
|
|
|
|
usdBank: record.usdBank,
|
|
|
|
|
webUrl: record.webUrl
|
|
|
|
|
})
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|
}, 100)
|
|
|
|
|
},
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
const {
|
|
|
|
|
form: { validateFields }
|
|
|
|
|
} = this
|
|
|
|
|
this.confirmLoading = true
|
|
|
|
|
validateFields((errors, values) => {
|
|
|
|
|
console.log(errors, values)
|
|
|
|
|
if (!errors) {
|
|
|
|
|
for (const key in values) {
|
|
|
|
|
console.log(key, 1)
|
|
|
|
|
if (typeof values[key] === 'object' && !(values[key] === null)) {
|
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(this.form, values.id)
|
|
|
|
|
DjyCustomerEdit(values)
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
this.$emit('ok', values)
|
|
|
|
|
this.handleCancel()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('编辑失败') // + res.message
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.finally(res => {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleCancel() {
|
|
|
|
|
this.form.resetFields()
|
|
|
|
|
this.visible = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|