企业认证添加企业简称
Showing
3 changed files
with
34 additions
and
2 deletions
| ... | @@ -17,7 +17,7 @@ import { onUploadFilePreview } from "@/api/modules/common"; | ... | @@ -17,7 +17,7 @@ import { onUploadFilePreview } from "@/api/modules/common"; |
| 17 | const { proxy } = getCurrentInstance() as any; | 17 | const { proxy } = getCurrentInstance() as any; |
| 18 | const userData = JSON.parse(localStorage.userData); | 18 | const userData = JSON.parse(localStorage.userData); |
| 19 | const tenantData = JSON.parse(localStorage.tenantInfo); | 19 | const tenantData = JSON.parse(localStorage.tenantInfo); |
| 20 | const { staffName, staffNo } = userData; | 20 | const { staffName, staffNo, abbreviation } = userData; |
| 21 | const { required, isUSCCCode, idCode } = useValidator() | 21 | const { required, isUSCCCode, idCode } = useValidator() |
| 22 | const loading = ref(false); | 22 | const loading = ref(false); |
| 23 | const flowDetail: any = ref({}); | 23 | const flowDetail: any = ref({}); |
| ... | @@ -95,6 +95,16 @@ const contentFormItems: any = ref([ | ... | @@ -95,6 +95,16 @@ const contentFormItems: any = ref([ |
| 95 | required: true | 95 | required: true |
| 96 | }, | 96 | }, |
| 97 | { | 97 | { |
| 98 | label: '企业简称', | ||
| 99 | type: 'input', | ||
| 100 | placeholder: '请输入', | ||
| 101 | field: 'abbreviation', | ||
| 102 | default: abbreviation, | ||
| 103 | maxlength: 50, | ||
| 104 | clearable: true, | ||
| 105 | required: true | ||
| 106 | }, | ||
| 107 | { | ||
| 98 | label: '统一社会信用代码', | 108 | label: '统一社会信用代码', |
| 99 | type: 'input', | 109 | type: 'input', |
| 100 | placeholder: '请输入', | 110 | placeholder: '请输入', |
| ... | @@ -285,6 +295,9 @@ const contentFormRules = ref({ | ... | @@ -285,6 +295,9 @@ const contentFormRules = ref({ |
| 285 | tenantName: [ | 295 | tenantName: [ |
| 286 | { required: true, trigger: 'blur', message: "请填写企业名称" } | 296 | { required: true, trigger: 'blur', message: "请填写企业名称" } |
| 287 | ], | 297 | ], |
| 298 | abbreviation: [ | ||
| 299 | { required: true, trigger: 'blur', message: "请填写企业简称" } | ||
| 300 | ], | ||
| 288 | socialCreditCode: [ | 301 | socialCreditCode: [ |
| 289 | required(), | 302 | required(), |
| 290 | isUSCCCode() | 303 | isUSCCCode() |
| ... | @@ -738,8 +751,10 @@ const setFormItems = (info = null, setOther = true) => { | ... | @@ -738,8 +751,10 @@ const setFormItems = (info = null, setOther = true) => { |
| 738 | const datas = info ? JSON.parse(JSON.stringify(info)) : JSON.parse(JSON.stringify(flowDetail.value)); | 751 | const datas = info ? JSON.parse(JSON.stringify(info)) : JSON.parse(JSON.stringify(flowDetail.value)); |
| 739 | contentFormItems.value.map((a, index) => { | 752 | contentFormItems.value.map((a, index) => { |
| 740 | a.disabled = !isEdit.value; | 753 | a.disabled = !isEdit.value; |
| 741 | if (a.field == 'tenantName') { | 754 | if (a.field == 'abbreviation') { |
| 742 | a.default = datas[a.field] || staffName; | 755 | a.default = datas[a.field] || staffName; |
| 756 | } else if (a.field == '') { | ||
| 757 | a.default = datas[a.field] || abbreviation; | ||
| 743 | } else if (a.field == 'registeredCapital') { | 758 | } else if (a.field == 'registeredCapital') { |
| 744 | a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field]; | 759 | a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field]; |
| 745 | } else if (a.field == 'tenantTypeVal') { | 760 | } else if (a.field == 'tenantTypeVal') { | ... | ... |
| ... | @@ -68,6 +68,7 @@ const handleApprovalDialogCancel = () => { | ... | @@ -68,6 +68,7 @@ const handleApprovalDialogCancel = () => { |
| 68 | const tableFields: any = ref([ | 68 | const tableFields: any = ref([ |
| 69 | { label: "序号", type: "index", width: 56, align: "center" }, | 69 | { label: "序号", type: "index", width: 56, align: "center" }, |
| 70 | { label: "企业名称", field: "tenantName", width: 200, }, | 70 | { label: "企业名称", field: "tenantName", width: 200, }, |
| 71 | { label: "企业简称", field: "abbreviation", width: 160, }, | ||
| 71 | { | 72 | { |
| 72 | label: "机构类型", field: "tenantType", width: 120, getName: (scope) => { | 73 | label: "机构类型", field: "tenantType", width: 120, getName: (scope) => { |
| 73 | const datas = typeMap.value?.tenantType; | 74 | const datas = typeMap.value?.tenantType; | ... | ... |
| ... | @@ -104,6 +104,17 @@ const contentFormItems: any = ref([ | ... | @@ -104,6 +104,17 @@ const contentFormItems: any = ref([ |
| 104 | disabled: true | 104 | disabled: true |
| 105 | }, | 105 | }, |
| 106 | { | 106 | { |
| 107 | label: '企业简称', | ||
| 108 | type: 'input', | ||
| 109 | placeholder: '请输入', | ||
| 110 | field: 'abbreviation', | ||
| 111 | default: '', | ||
| 112 | maxlength: 50, | ||
| 113 | clearable: true, | ||
| 114 | required: true, | ||
| 115 | disabled: true | ||
| 116 | }, | ||
| 117 | { | ||
| 107 | label: '统一社会信用代码', | 118 | label: '统一社会信用代码', |
| 108 | type: 'input', | 119 | type: 'input', |
| 109 | placeholder: '请输入', | 120 | placeholder: '请输入', |
| ... | @@ -309,6 +320,9 @@ const contentFormRules = ref({ | ... | @@ -309,6 +320,9 @@ const contentFormRules = ref({ |
| 309 | tenantName: [ | 320 | tenantName: [ |
| 310 | { required: true, trigger: 'blur', message: "请填写企业名称" } | 321 | { required: true, trigger: 'blur', message: "请填写企业名称" } |
| 311 | ], | 322 | ], |
| 323 | abbreviation: [ | ||
| 324 | { required: true, trigger: 'blur', message: "请填写企业简称" } | ||
| 325 | ], | ||
| 312 | socialCreditCode: [ | 326 | socialCreditCode: [ |
| 313 | { required: true, trigger: 'blur', message: "请填写统一社会信用代码" } | 327 | { required: true, trigger: 'blur', message: "请填写统一社会信用代码" } |
| 314 | ], | 328 | ], |
| ... | @@ -717,6 +731,8 @@ const setFormItems = () => { | ... | @@ -717,6 +731,8 @@ const setFormItems = () => { |
| 717 | contentFormItems.value.map((a, index) => { | 731 | contentFormItems.value.map((a, index) => { |
| 718 | if (a.field == 'tenantName') { | 732 | if (a.field == 'tenantName') { |
| 719 | a.default = datas[a.field] || userData.staffName; | 733 | a.default = datas[a.field] || userData.staffName; |
| 734 | } else if (a.field == 'abbreviation') { | ||
| 735 | a.default = datas[a.field] || userData.abbreviation; | ||
| 720 | } else if (a.field == 'registeredCapital') { | 736 | } else if (a.field == 'registeredCapital') { |
| 721 | a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field]; | 737 | a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field]; |
| 722 | } else if (a.field == 'socialCreditCode') { | 738 | } else if (a.field == 'socialCreditCode') { | ... | ... |
-
Please register or sign in to post a comment