|
@@ -77,7 +77,7 @@
|
|
|
<el-form-item label="企业名称:" prop="name">
|
|
<el-form-item label="企业名称:" prop="name">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- :maxlength="20"
|
|
|
|
|
|
|
+ :maxlength="50"
|
|
|
v-model="enterprise.name"
|
|
v-model="enterprise.name"
|
|
|
placeholder="请输入企业名称"
|
|
placeholder="请输入企业名称"
|
|
|
:disabled="true"
|
|
:disabled="true"
|
|
@@ -89,7 +89,7 @@
|
|
|
<el-form-item label="企业地址:" prop="address">
|
|
<el-form-item label="企业地址:" prop="address">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- :maxlength="20"
|
|
|
|
|
|
|
+ :maxlength="50"
|
|
|
v-model="enterprise.address"
|
|
v-model="enterprise.address"
|
|
|
placeholder="请输入企业地址"
|
|
placeholder="请输入企业地址"
|
|
|
/>
|
|
/>
|
|
@@ -122,7 +122,7 @@
|
|
|
<el-form-item label="统一社会性代码:" prop="unifiedSocialCreditCode">
|
|
<el-form-item label="统一社会性代码:" prop="unifiedSocialCreditCode">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- :maxlength="20"
|
|
|
|
|
|
|
+ :maxlength="50"
|
|
|
v-model="enterprise.unifiedSocialCreditCode"
|
|
v-model="enterprise.unifiedSocialCreditCode"
|
|
|
placeholder="请输入统一社会性代码"
|
|
placeholder="请输入统一社会性代码"
|
|
|
/>
|
|
/>
|
|
@@ -132,7 +132,8 @@
|
|
|
<el-form-item label="经营范围:" prop="businessScope">
|
|
<el-form-item label="经营范围:" prop="businessScope">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- :maxlength="20"
|
|
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :maxlength="100"
|
|
|
v-model="enterprise.businessScope"
|
|
v-model="enterprise.businessScope"
|
|
|
placeholder="请输入经营范围"
|
|
placeholder="请输入经营范围"
|
|
|
/>
|
|
/>
|
|
@@ -142,12 +143,22 @@
|
|
|
<el-form-item label="经营产品:" prop="mainProduct">
|
|
<el-form-item label="经营产品:" prop="mainProduct">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- :maxlength="20"
|
|
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :maxlength="100"
|
|
|
v-model="enterprise.mainProduct"
|
|
v-model="enterprise.mainProduct"
|
|
|
placeholder="请输入经营产品"
|
|
placeholder="请输入经营产品"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }" style="margin-bottom: 20px;">
|
|
|
|
|
+ <el-form-item label="企业传真:" prop="fax">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="enterprise.fax"
|
|
|
|
|
+ placeholder="请输入企业传真"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
|
<el-form-item prop="files" label="附件:">
|
|
<el-form-item prop="files" label="附件:">
|
|
|
<fileUpload
|
|
<fileUpload
|
|
@@ -178,6 +189,8 @@
|
|
|
import OrgTypeSelect from './org-type-select.vue';
|
|
import OrgTypeSelect from './org-type-select.vue';
|
|
|
import staffSelection from './staffSelection.vue';
|
|
import staffSelection from './staffSelection.vue';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
|
|
+ import { copyObj } from '@/utils/util';
|
|
|
|
|
+
|
|
|
const defEnterprise = {
|
|
const defEnterprise = {
|
|
|
businessLicenseFile: [],
|
|
businessLicenseFile: [],
|
|
|
name: null,
|
|
name: null,
|
|
@@ -187,11 +200,13 @@
|
|
|
unifiedSocialCreditCode: '',
|
|
unifiedSocialCreditCode: '',
|
|
|
businessScope: '',
|
|
businessScope: '',
|
|
|
mainProduct: '',
|
|
mainProduct: '',
|
|
|
- remark: ''
|
|
|
|
|
|
|
+ remark: '',
|
|
|
|
|
+ fax:''
|
|
|
};
|
|
};
|
|
|
import {
|
|
import {
|
|
|
addOrganization,
|
|
addOrganization,
|
|
|
- updateOrganization,getById
|
|
|
|
|
|
|
+ updateOrganization,
|
|
|
|
|
+ getById
|
|
|
} from '@/api/system/organization';
|
|
} from '@/api/system/organization';
|
|
|
export default {
|
|
export default {
|
|
|
components: { OrgSelect, OrgTypeSelect, staffSelection, fileUpload },
|
|
components: { OrgSelect, OrgTypeSelect, staffSelection, fileUpload },
|
|
@@ -218,7 +233,7 @@
|
|
|
responsibleName: '',
|
|
responsibleName: '',
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
form: { ...defaultForm },
|
|
form: { ...defaultForm },
|
|
|
- enterprise: {...defEnterprise},
|
|
|
|
|
|
|
+ enterprise: { ...defEnterprise },
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
rules: {
|
|
rules: {
|
|
|
name: [
|
|
name: [
|
|
@@ -265,10 +280,10 @@
|
|
|
) {
|
|
) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- let form={
|
|
|
|
|
|
|
+ let form = {
|
|
|
...this.form,
|
|
...this.form,
|
|
|
- enterprise:this.enterprise
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ enterprise: this.enterprise
|
|
|
|
|
+ };
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
const data = {
|
|
const data = {
|
|
|
...form,
|
|
...form,
|
|
@@ -324,25 +339,33 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- 'form.name'(n){
|
|
|
|
|
- this.enterprise.name=n
|
|
|
|
|
-
|
|
|
|
|
|
|
+ form: {
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ handler(n) {
|
|
|
|
|
+ this.enterprise.name = n.name;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
visible(visible) {
|
|
visible(visible) {
|
|
|
if (visible) {
|
|
if (visible) {
|
|
|
if (this.data) {
|
|
if (this.data) {
|
|
|
- getById(this.data.id).then(res=>{
|
|
|
|
|
- this.$util.assignObject(this.form, {
|
|
|
|
|
- ...res,
|
|
|
|
|
- parentId: res.parentId == 0 ? '' : res.parentId ?? ''
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ getById(this.data.id).then((res) => {
|
|
|
|
|
+ for (const key in res.enterprise) {
|
|
|
|
|
+ this.$set(this.enterprise, key, res.enterprise[key]);
|
|
|
|
|
+ }
|
|
|
|
|
+ for (const key in res) {
|
|
|
|
|
+ if (key == 'parentId') {
|
|
|
|
|
+ this.$set(this.form, key, res[key] == 0 ? '' :res[key] ?? '');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (key != 'enterprise') {
|
|
|
|
|
+ this.$set(this.form, key, res[key]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.form.type = '' + this.form.type; //回显
|
|
this.form.type = '' + this.form.type; //回显
|
|
|
this.responsibleName =
|
|
this.responsibleName =
|
|
|
- res.manager &&
|
|
|
|
|
- res.manager.map((item) => item.name).toString();
|
|
|
|
|
- this.enterprise=res.enterprise
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ res.manager && res.manager.map((item) => item.name).toString();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
// this.form.type = '' + this.form.type; //回显
|
|
// this.form.type = '' + this.form.type; //回显
|
|
|
// this.responsibleName =
|
|
// this.responsibleName =
|
|
|
// this.data.manager &&
|
|
// this.data.manager &&
|
|
@@ -354,9 +377,10 @@
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
this.$refs.form.clearValidate();
|
|
this.$refs.form.clearValidate();
|
|
|
- this.$refs.enterpriseForm&&this.$refs.enterpriseForm.clearValidate();
|
|
|
|
|
|
|
+ this.$refs.enterpriseForm &&
|
|
|
|
|
+ this.$refs.enterpriseForm.clearValidate();
|
|
|
this.form = { ...this.defaultForm };
|
|
this.form = { ...this.defaultForm };
|
|
|
- this.enterprise = { ...this.defEnterprise };
|
|
|
|
|
|
|
+ this.enterprise = { ...defEnterprise };
|
|
|
this.responsibleName = '';
|
|
this.responsibleName = '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|