|
@@ -38,6 +38,13 @@
|
|
|
/>
|
|
|
</custom-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="企业名称 (英文)" prop="i18n.name">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.i18n.name"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="统一社会信用代码" prop="certNo">
|
|
|
<el-input
|
|
|
v-model="ruleForm.certNo"
|
|
@@ -95,6 +102,13 @@
|
|
|
disabled
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="注册地址 (英文)" prop="i18n.registerAddress">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.i18n.registerAddress"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item label="注册地址是否实际经营地址" prop="sameRegisterAndBusinessAddress">
|
|
|
<el-select
|
|
@@ -122,9 +136,27 @@
|
|
|
:disabled="disabled"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="ruleForm.sameRegisterAndBusinessAddress === 'N'"
|
|
|
+ label="经营地址 (英文)"
|
|
|
+ prop="i18n.businessAddress"
|
|
|
+ :rules="[{ required: true, message: '请输入经营地址', trigger: 'blur' }]"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.i18n.businessAddress"
|
|
|
+ placeholder="请输入经营地址(英文)"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item label="联系人(授权代理人)姓名" prop="contactPerson.name">
|
|
|
- <el-input v-model="ruleForm.contactPerson.name" :disabled="disabled" placeholder="请输入联系人(授权代理人)姓名" />
|
|
|
+ <el-form-item label="联系人(授权代理人)姓名(中英文)">
|
|
|
+ <span slot="label" class="required-label">联系人(授权代理人)姓名(中英文)</span>
|
|
|
+ <el-form-item prop="contactPerson.name" class="inline-item">
|
|
|
+ <el-input v-model="ruleForm.contactPerson.name" :disabled="disabled" placeholder="请输入中文" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="contactPerson.i18n.name" class="inline-item">
|
|
|
+ <el-input v-model="ruleForm.contactPerson.i18n.name" :disabled="disabled" placeholder="请输入英文" />
|
|
|
+ </el-form-item>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="联系人(授权代理人)手机号" prop="contactPerson.mobile">
|
|
|
<el-input v-model="ruleForm.contactPerson.mobile" :disabled="disabled" placeholder="请输入常用手机号" />
|
|
@@ -266,9 +298,26 @@ export default {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
+ const validateCharacter = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback()
|
|
|
+ } else if (/[\u4e00-\u9fa5]/.test(value)) {
|
|
|
+ callback(new Error('请输入英文'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
listData: [],
|
|
|
ruleForm: {
|
|
|
+ xtEid: '',
|
|
|
+ businessProduct: '',
|
|
|
+ taxRebateAgreementSignStatus: '',
|
|
|
+ taxRebateAgreementNo: '',
|
|
|
+ taxRebateAgreementSignDate: '',
|
|
|
+ taxRebateEffectiveStart: '',
|
|
|
+ taxRebateEffectiveEnd: '',
|
|
|
+ remark: '',
|
|
|
changeRecordId: '',
|
|
|
certificationStatus: '',
|
|
|
enterpriseType: '',
|
|
@@ -284,7 +333,15 @@ export default {
|
|
|
personalCertNo: '',
|
|
|
mobile: '',
|
|
|
email: '',
|
|
|
- isAuthorizedPerson: 'Y'
|
|
|
+ isAuthorizedPerson: 'Y',
|
|
|
+ enterpriseChangeRecordId: '',
|
|
|
+ authorizationFileSigned: '',
|
|
|
+ signDate: '',
|
|
|
+ remark: '',
|
|
|
+
|
|
|
+ i18n: {
|
|
|
+ name: ''
|
|
|
+ }
|
|
|
},
|
|
|
sameRegisterAndBusinessAddress: '',
|
|
|
businessAddress: '',
|
|
@@ -293,7 +350,13 @@ export default {
|
|
|
proxyDistrictCode: '',
|
|
|
customsEnterpriseCode: '',
|
|
|
taxAuthorityArea: '',
|
|
|
- emailAuthCode: null
|
|
|
+ emailAuthCode: null,
|
|
|
+
|
|
|
+ i18n: {
|
|
|
+ name: '',
|
|
|
+ registerAddress: '',
|
|
|
+ businessAddress: ''
|
|
|
+ }
|
|
|
},
|
|
|
rules: {
|
|
|
enterpriseType: [
|
|
@@ -318,13 +381,24 @@ export default {
|
|
|
registerAddress: [
|
|
|
{ required: true, message: `请输入注册地址`, trigger: 'blur' }
|
|
|
],
|
|
|
+
|
|
|
'contactPerson.name': [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
|
|
+ 'contactPerson.i18n.name': [{ required: true, message: '请输入英文', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }],
|
|
|
'contactPerson.mobile': [{ required: true, message: '请输入常用手机号', trigger: 'blur' }, { validator: validContactPhone, trigger: 'blur' }],
|
|
|
'contactPerson.email': [{ required: true, message: '请输入常用邮箱', trigger: 'blur' }, { validator: validContactEmail, trigger: 'blur' }],
|
|
|
'contactPerson.personalCertNo': [{ required: true, message: '请输入有效的身份证号码', trigger: 'blur' }, { validator: validContactIdcard, trigger: 'blur' }],
|
|
|
sameRegisterAndBusinessAddress: [{ required: true, message: '请选择注册地址是否实际经营地址', trigger: 'change' }],
|
|
|
exportType: [{ required: true, message: '请选择出口类型', trigger: 'change' }],
|
|
|
- customsEnterpriseCode: [{ required: true, message: '请输入海关企业代码', trigger: 'blur' }, { validator: validEnterCode, trigger: 'blur' }]
|
|
|
+ customsEnterpriseCode: [{ required: true, message: '请输入海关企业代码', trigger: 'blur' }, { validator: validEnterCode, trigger: 'blur' }],
|
|
|
+
|
|
|
+ i18n: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '请输入企业名称', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ registerAddress: [
|
|
|
+ { required: true, message: `请输入注册地址(英文)`, trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -339,14 +413,42 @@ export default {
|
|
|
if (Object.keys(newV).length) {
|
|
|
const details = JSON.parse(JSON.stringify(newV))
|
|
|
for (const k in this.ruleForm) {
|
|
|
- if (k !== 'contactPerson') {
|
|
|
+ if (k !== 'contactPerson' && k !== 'i18n') {
|
|
|
if (details[k] !== '' && details[k] !== null && details[k] !== undefined) {
|
|
|
this.ruleForm[k] = details[k]
|
|
|
}
|
|
|
} else {
|
|
|
- for (const key in this.ruleForm.contactPerson) {
|
|
|
- if (details[k][key] !== '' && details[k][key] !== null && details[k][key] !== undefined) {
|
|
|
- this.ruleForm[k][key] = details[k][key]
|
|
|
+ if (k === 'contactPerson') {
|
|
|
+ for (const key in this.ruleForm.contactPerson) {
|
|
|
+ if (key !== 'i18n') {
|
|
|
+ if (details[k][key] !== '' && details[k][key] !== null && details[k][key] !== undefined) {
|
|
|
+ this.ruleForm[k][key] = details[k][key]
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (details[k].i18n) {
|
|
|
+ for (const kk in this.ruleForm[k].i18n) {
|
|
|
+ if (details[k].i18n[kk].length) {
|
|
|
+ details[k].i18n[kk].map(item => {
|
|
|
+ if (item.language === 'en' && item.value !== '' && item.value !== null && item.value !== undefined) {
|
|
|
+ this.ruleForm.contactPerson.i18n[kk] = item.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (k === 'i18n') {
|
|
|
+ if (details.i18n) {
|
|
|
+ for (const key in this.ruleForm.i18n) {
|
|
|
+ if (details.i18n[key].length) {
|
|
|
+ details.i18n[key].map(item => {
|
|
|
+ if (item.language === 'en' && item.value !== '' && item.value !== null && item.value !== undefined) {
|
|
|
+ this.ruleForm.i18n[key] = item.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -399,11 +501,52 @@ export default {
|
|
|
},
|
|
|
async validate(type) {
|
|
|
const businessLicenseFiles = this.$refs.businessLicense.getFileLists
|
|
|
+ // var params = {
|
|
|
+ // ...this.ruleForm,
|
|
|
+ // businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null
|
|
|
+ // }
|
|
|
+ const { contactPerson, businessLicense, ...rest } = this.ruleForm
|
|
|
+ const { i18n, ...personRest } = this.ruleForm.contactPerson
|
|
|
var params = {
|
|
|
- ...this.ruleForm,
|
|
|
- businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null
|
|
|
+ businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null,
|
|
|
+ ...rest,
|
|
|
+ contactPerson: { ...personRest }
|
|
|
}
|
|
|
delete params.certificationStatus
|
|
|
+
|
|
|
+ const i18nRuleForm = {}
|
|
|
+ for (const k in this.ruleForm.i18n) {
|
|
|
+ if (this.ruleForm.i18n[k] !== '' && this.ruleForm.i18n[k] !== null && this.ruleForm.i18n[k] !== undefined) {
|
|
|
+ i18nRuleForm[k] = [
|
|
|
+ {
|
|
|
+ language: 'cn',
|
|
|
+ value: this.ruleForm[k]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ language: 'en',
|
|
|
+ value: this.ruleForm.i18n[k]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ params.i18n = Object.keys(i18nRuleForm).length ? i18nRuleForm : null
|
|
|
+
|
|
|
+ const i18nContactPerson = {}
|
|
|
+ for (const k in this.ruleForm.contactPerson.i18n) {
|
|
|
+ if (this.ruleForm.contactPerson.i18n[k] !== '' && this.ruleForm.contactPerson.i18n[k] !== null && this.ruleForm.contactPerson.i18n[k] !== undefined) {
|
|
|
+ i18nContactPerson[k] = [
|
|
|
+ {
|
|
|
+ language: 'cn',
|
|
|
+ value: this.ruleForm.contactPerson[k]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ language: 'en',
|
|
|
+ value: this.ruleForm.contactPerson.i18n[k]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ params.contactPerson.i18n = Object.keys(i18nContactPerson).length ? i18nContactPerson : null
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (type === 'submit') {
|
|
|
this.$refs.ruleFormRef.validate(valid => {
|
|
@@ -423,6 +566,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|