091aefdf by lihua

企业认证添加企业简称

1 parent 1054bf13
......@@ -17,7 +17,7 @@ import { onUploadFilePreview } from "@/api/modules/common";
const { proxy } = getCurrentInstance() as any;
const userData = JSON.parse(localStorage.userData);
const tenantData = JSON.parse(localStorage.tenantInfo);
const { staffName, staffNo } = userData;
const { staffName, staffNo, abbreviation } = userData;
const { required, isUSCCCode, idCode } = useValidator()
const loading = ref(false);
const flowDetail: any = ref({});
......@@ -95,6 +95,16 @@ const contentFormItems: any = ref([
required: true
},
{
label: '企业简称',
type: 'input',
placeholder: '请输入',
field: 'abbreviation',
default: abbreviation,
maxlength: 50,
clearable: true,
required: true
},
{
label: '统一社会信用代码',
type: 'input',
placeholder: '请输入',
......@@ -285,6 +295,9 @@ const contentFormRules = ref({
tenantName: [
{ required: true, trigger: 'blur', message: "请填写企业名称" }
],
abbreviation: [
{ required: true, trigger: 'blur', message: "请填写企业简称" }
],
socialCreditCode: [
required(),
isUSCCCode()
......@@ -738,8 +751,10 @@ const setFormItems = (info = null, setOther = true) => {
const datas = info ? JSON.parse(JSON.stringify(info)) : JSON.parse(JSON.stringify(flowDetail.value));
contentFormItems.value.map((a, index) => {
a.disabled = !isEdit.value;
if (a.field == 'tenantName') {
if (a.field == 'abbreviation') {
a.default = datas[a.field] || staffName;
} else if (a.field == '') {
a.default = datas[a.field] || abbreviation;
} else if (a.field == 'registeredCapital') {
a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field];
} else if (a.field == 'tenantTypeVal') {
......
......@@ -68,6 +68,7 @@ const handleApprovalDialogCancel = () => {
const tableFields: any = ref([
{ label: "序号", type: "index", width: 56, align: "center" },
{ label: "企业名称", field: "param1", width: 200, },
{ label: "企业简称", field: "abbreviation", width: 160, },
{ label: "统一社会信用代码", field: "param3", width: 160 },
{
label: "法人姓名", field: "juridicalPerson", width: TableColumnWidth.USERNAME, getName: (scope) => {
......
......@@ -104,6 +104,17 @@ const contentFormItems: any = ref([
disabled: true
},
{
label: '企业简称',
type: 'input',
placeholder: '请输入',
field: 'abbreviation',
default: '',
maxlength: 50,
clearable: true,
required: true,
disabled: true
},
{
label: '统一社会信用代码',
type: 'input',
placeholder: '请输入',
......@@ -309,6 +320,9 @@ const contentFormRules = ref({
tenantName: [
{ required: true, trigger: 'blur', message: "请填写企业名称" }
],
abbreviation: [
{ required: true, trigger: 'blur', message: "请填写企业简称" }
],
socialCreditCode: [
{ required: true, trigger: 'blur', message: "请填写统一社会信用代码" }
],
......@@ -717,6 +731,8 @@ const setFormItems = () => {
contentFormItems.value.map((a, index) => {
if (a.field == 'tenantName') {
a.default = datas[a.field] || userData.staffName;
} else if (a.field == 'abbreviation') {
a.default = datas[a.field] || userData.abbreviation;
} else if (a.field == 'registeredCapital') {
a.default = Number.isNaN(datas[a.field]) ? '' : datas[a.field];
} else if (a.field == 'socialCreditCode') {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!