ludc
2023-06-27 f86fc75d6bfefc449a554240e6545de340c55e51
Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
已修改4个文件
522 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/batchImport/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/mixins/codeApply.js 483 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/batchImport/index.js
@@ -46,7 +46,7 @@
  })
}
// 获取历史数据正确数据
export const getHistoryLeftTree = (redisOid) => {
export const getHistorySuccessTable = (redisOid) => {
  return request({
    url: '/api/ubcs-code/mdmEngineController/gridValidata',
    method: 'get',
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -138,6 +138,8 @@
      } else if(this.type === 'batchImportApply') {
        return {
          codeClassifyOid: this.codeClassifyOid,
          secDTOList: this.secDTOList,
          ...this.codeApplyForm
        }
      }
    }
@@ -145,7 +147,6 @@
  data() {
    return {
      classifyAttr: "id",
      uploadParams: {},
      downloadLoading: false,
      showVisible: false,
      leftTree: [],
@@ -180,28 +181,6 @@
    };
  },
  methods: {
    // getDataByType() {
    //   if (this.type === "historyImport") {
    //   } else if (this.type === "codeApply_leaf") {
    //     this.title = "批量编码申请";
    //     this.tipList = [
    //       "1.标题带五角星的表示关键属性,带星号表示必输项",
    //       "2.分类的路径需要用#分隔。从当前选择分类节点的下级开始填写,直到最末尾节点,如 产品#主机产品#主机产品",
    //     ];
    //     this.action =
    //       "/api/ubcs-code/mdmEngineController/batchImportHistoryData";
    //   } else {
    //     this.title = "历史数据导入";
    //     this.tipList = [
    //       "1.标题带五角星的表示关键属性,带星号表示必输项",
    //       "2.企业编码,集团码和状态都需要导入",
    //       "3.每次仅能最多导入10000条数据,如果出错会返回错误的数据和原因,但是正确的数据会保存",
    //       "4.分类的路径需要用#分隔。仅填写当前选的分类树上的下级分类的路径,如果当前分类已经是叶子节点,则不填写",
    //     ];
    //     this.action =
    //       "/api/ubcs-code/mdmEngineController/batchImportHistoryData";
    //   }
    // },
    async beforeUpload(file) {
      console.log(223344);
      const fileType = file.name.split(".").pop();
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -251,7 +251,7 @@
            "coderefersec",
          ];
          this.secVOList = (res.data.data.secVOList || []).filter((item) =>
            typeList.includes(item.sectype)
            typeList.includes(item.secType)
          );
          this.$nextTick(() => {
            if (this.secVOList.length > 0 && this.type === "add") {
@@ -359,11 +359,11 @@
      };
    },
    getType(item) {
      return this.selfColumnType[item.sectype];
      return this.selfColumnType[item.secType];
    },
    getReferConfig(item) {
      let params = {};
      if (item.sectype == "codeclassifysec") {
      if (item.secType == "codeclassifysec") {
        params = {
          isMuti: false,
          type: "grid",
@@ -407,13 +407,13 @@
              : "",
          },
        };
      } else if (item.sectype == "coderefersec") {
        params = JSON.parse(item.referValueInfo);
      } else if (item.secType == "coderefersec") {
        params = JSON.parse(item.referConfig);
      }
      return params;
    },
    getDisabled(item) {
      if (item.sectype === "codeclassifysec") {
      if (item.secType === "codeclassifysec") {
        if (item.parentClassifySecOid) {
          if (!this.codeApplyForm[item.parentClassifySecOid]) {
            return true;
Source/UBCS-WEB/src/mixins/codeApply.js
@@ -46,7 +46,7 @@
  methods: {
    // 获取码值申请数据
    getCodeRule() {
      getCodeRule({ codeClassifyOid: '1673234841140858880' }).then((res) => {
      getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
        if (res.data && res.data.code === 200) {
          const typeList = [
            "codefixedsec",
@@ -54,473 +54,14 @@
            "codevariablesec",
            "coderefersec",
          ];
          this.secVOList = (res.data.data.secVOList || []).filter((item) =>
            typeList.includes(item.sectype)
          this.secVOList = res.data.data.secVOList || []
          let localSecVOList = (res.data.data.secVOList || []).filter((item) =>
            typeList.includes(item.secType)
          );
          this.secVOList = [
            {
              "oid": "1673235191453323264",
              "id": "gdmd",
              "name": "固定码段",
              "tenantId": "",
              "description": "",
              "revisionOid": "1673235191453323267",
              "nameOid": "1673235191453323265",
              "btmname": "codebasicsec",
              "lastR": "1",
              "firstR": "1",
              "lastV": "1",
              "firstV": "1",
              "creator": "0",
              "createTime": "2023-06-26 15:42:11",
              "lastModifier": "0",
              "lastModifyTime": "2023-06-26 15:42:11",
              "revisionRule": "",
              "revisionSeq": 1,
              "revisionValue": "",
              "versionRule": "0",
              "versionSeq": 1,
              "versionValue": "1",
              "lctid": "",
              "lcStatus": "",
              "lcStatusText": "",
              "ts": "2023-06-26 15:42:11.506",
              "owner": "1",
              "copyFromVersion": "",
              "secretGrade": -1,
              "secretGradeText": "",
              "data": {},
              "sectype": "codefixedsec",
              "secTypeText": "固定码段",
              "pkCodeRule": "1673234841140858880",
              "orderNum": 1,
              "codeSecLengthType": "code_sec_length_variable",
              "codeSecLengthTypeText": "可变长度",
              "codeSecLength": "10",
              "referAttributeName": "",
              "referAttributeId": "",
              "getValueClass": "",
              "codeDateFormatStr": "",
              "codeLevelType": "",
              "codeLevelTypeText": "",
              "codeLevelValue": -1,
              "valueCutLength": -1,
              "valueCutType": "",
              "valueCutTypeText": "",
              "codeGetValueType": "",
              "codeGetValueTypeText": "",
              "referCodeClassifyOid": "",
              "referCodeClassifyOidName": "",
              "referBtmId": "",
              "referBtmName": "",
              "referConfig": "",
              "referValueInfo": "",
              "filterSql": "",
              "serialStart": "",
              "serialStep": -1,
              "codeFillType": "",
              "codeFillTypeText": "",
              "codeFillSeparator": "0",
              "codeFillLength": "",
              "codeFillLimit": -1,
              "codeFillFlag": "false",
              "customCodeSerialClass": "",
              "matchClassifyValueFlag": "false",
              "parentClassifySecOid": "",
              "parentClassifySecText": "",
              "nullableFlag": "false",
              "componentCodeFlag": "false",
              "serialDependFlag": "false",
              "displayFlag": "false",
              "serialDependOrder": 0,
              "fixedValueVOList": [
                {
                  "oid": "1673235247598276608",
                  "id": "001",
                  "name": "",
                  "tenantId": "",
                  "description": "",
                  "revisionOid": "1673235247615053824",
                  "nameOid": "1673235247598276609",
                  "btmname": "codefixedvalue",
                  "lastR": "1",
                  "firstR": "1",
                  "lastV": "1",
                  "firstV": "1",
                  "creator": "0",
                  "createTime": "2023-06-26 15:42:24",
                  "lastModifier": "0",
                  "lastModifyTime": "2023-06-26 15:42:24",
                  "revisionRule": "",
                  "revisionSeq": 1,
                  "revisionValue": "",
                  "versionRule": "0",
                  "versionSeq": 1,
                  "versionValue": "1",
                  "lctid": "",
                  "lcStatus": "",
                  "lcStatusText": "",
                  "ts": "2023-06-26 15:42:24.892",
                  "owner": "1",
                  "copyFromVersion": "",
                  "secretGrade": -1,
                  "secretGradeText": "",
                  "data": {},
                  "codeFixedSecOid": "1673235191453323264",
                  "codefixedsecoidName": "",
                  "orderNum": 1
                },
                {
                  "oid": "1673235273523269632",
                  "id": "002",
                  "name": "",
                  "tenantId": "",
                  "description": "",
                  "revisionOid": "1673235273535852544",
                  "nameOid": "1673235273523269633",
                  "btmname": "codefixedvalue",
                  "lastR": "1",
                  "firstR": "1",
                  "lastV": "1",
                  "firstV": "1",
                  "creator": "0",
                  "createTime": "2023-06-26 15:42:31",
                  "lastModifier": "0",
                  "lastModifyTime": "2023-06-26 15:42:31",
                  "revisionRule": "",
                  "revisionSeq": 1,
                  "revisionValue": "",
                  "versionRule": "0",
                  "versionSeq": 1,
                  "versionValue": "1",
                  "lctid": "",
                  "lcStatus": "",
                  "lcStatusText": "",
                  "ts": "2023-06-26 15:42:31.073",
                  "owner": "1",
                  "copyFromVersion": "",
                  "secretGrade": -1,
                  "secretGradeText": "",
                  "data": {},
                  "codeFixedSecOid": "1673235191453323264",
                  "codefixedsecoidName": "",
                  "orderNum": 2
                }
              ]
            },
            {
              "oid": "1673235394948370432",
              "id": "flmdf",
              "name": "分类码段父",
              "tenantId": "",
              "description": "",
              "revisionOid": "1673235394948370435",
              "nameOid": "1673235394948370433",
              "btmname": "codebasicsec",
              "lastR": "1",
              "firstR": "1",
              "lastV": "1",
              "firstV": "1",
              "creator": "0",
              "createTime": "2023-06-26 15:43:00",
              "lastModifier": "0",
              "lastModifyTime": "2023-06-26 15:43:00",
              "revisionRule": "",
              "revisionSeq": 1,
              "revisionValue": "",
              "versionRule": "0",
              "versionSeq": 1,
              "versionValue": "1",
              "lctid": "",
              "lcStatus": "",
              "lcStatusText": "",
              "ts": "2023-06-26 15:43:00.023",
              "owner": "1",
              "copyFromVersion": "",
              "secretGrade": -1,
              "secretGradeText": "",
              "data": {},
              "sectype": "codeclassifysec",
              "secTypeText": "分类码段",
              "pkCodeRule": "1673234841140858880",
              "orderNum": 2,
              "codeSecLengthType": "code_sec_length_variable",
              "codeSecLengthTypeText": "可变长度",
              "codeSecLength": "10",
              "referAttributeName": "",
              "referAttributeId": "",
              "getValueClass": "",
              "codeDateFormatStr": "",
              "codeLevelType": "",
              "codeLevelTypeText": "",
              "codeLevelValue": -1,
              "valueCutLength": -1,
              "valueCutType": "",
              "valueCutTypeText": "",
              "codeGetValueType": "",
              "codeGetValueTypeText": "",
              "referCodeClassifyOid": "",
              "referCodeClassifyOidName": "",
              "referBtmId": "",
              "referBtmName": "",
              "referConfig": "",
              "referValueInfo": "",
              "filterSql": "",
              "serialStart": "",
              "serialStep": -1,
              "codeFillType": "",
              "codeFillTypeText": "",
              "codeFillSeparator": "0",
              "codeFillLength": "",
              "codeFillLimit": -1,
              "codeFillFlag": "false",
              "customCodeSerialClass": "",
              "matchClassifyValueFlag": "false",
              "parentClassifySecOid": "",
              "parentClassifySecText": "",
              "nullableFlag": "false",
              "componentCodeFlag": "false",
              "serialDependFlag": "false",
              "displayFlag": "false",
              "serialDependOrder": 0,
              "fixedValueVOList": []
            },
            {
              "oid": "1673235616541839360",
              "id": "flmdz",
              "name": "分类码段子",
              "tenantId": "",
              "description": "",
              "revisionOid": "1673235616541839363",
              "nameOid": "1673235616541839361",
              "btmname": "codebasicsec",
              "lastR": "1",
              "firstR": "1",
              "lastV": "1",
              "firstV": "1",
              "creator": "0",
              "createTime": "2023-06-26 15:43:52",
              "lastModifier": "0",
              "lastModifyTime": "2023-06-26 15:43:52",
              "revisionRule": "",
              "revisionSeq": 1,
              "revisionValue": "",
              "versionRule": "0",
              "versionSeq": 1,
              "versionValue": "1",
              "lctid": "",
              "lcStatus": "",
              "lcStatusText": "",
              "ts": "2023-06-26 15:43:52.855",
              "owner": "1",
              "copyFromVersion": "",
              "secretGrade": -1,
              "secretGradeText": "",
              "data": {},
              "sectype": "codeclassifysec",
              "secTypeText": "分类码段",
              "pkCodeRule": "1673234841140858880",
              "orderNum": 3,
              "codeSecLengthType": "code_sec_length_variable",
              "codeSecLengthTypeText": "可变长度",
              "codeSecLength": "10",
              "referAttributeName": "",
              "referAttributeId": "",
              "getValueClass": "",
              "codeDateFormatStr": "",
              "codeLevelType": "",
              "codeLevelTypeText": "",
              "codeLevelValue": -1,
              "valueCutLength": -1,
              "valueCutType": "",
              "valueCutTypeText": "",
              "codeGetValueType": "",
              "codeGetValueTypeText": "",
              "referCodeClassifyOid": "",
              "referCodeClassifyOidName": "",
              "referBtmId": "",
              "referBtmName": "",
              "referConfig": "",
              "referValueInfo": "",
              "filterSql": "",
              "serialStart": "",
              "serialStep": -1,
              "codeFillType": "",
              "codeFillTypeText": "",
              "codeFillSeparator": "0",
              "codeFillLength": "",
              "codeFillLimit": -1,
              "codeFillFlag": "false",
              "customCodeSerialClass": "",
              "matchClassifyValueFlag": "false",
              "parentClassifySecOid": "1673235394948370432",
              "parentClassifySecText": "分类码段父",
              "nullableFlag": "false",
              "componentCodeFlag": "false",
              "serialDependFlag": "false",
              "displayFlag": "false",
              "serialDependOrder": 0,
              "fixedValueVOList": []
            },
            {
              "oid": "1673235886290112512",
              "id": "kbmd",
              "name": "可变码段",
              "tenantId": "",
              "description": "",
              "revisionOid": "1673235886290112515",
              "nameOid": "1673235886290112513",
              "btmname": "codebasicsec",
              "lastR": "1",
              "firstR": "1",
              "lastV": "1",
              "firstV": "1",
              "creator": "0",
              "createTime": "2023-06-26 15:44:57",
              "lastModifier": "0",
              "lastModifyTime": "2023-06-26 15:44:57",
              "revisionRule": "",
              "revisionSeq": 1,
              "revisionValue": "",
              "versionRule": "0",
              "versionSeq": 1,
              "versionValue": "1",
              "lctid": "",
              "lcStatus": "",
              "lcStatusText": "",
              "ts": "2023-06-26 15:44:57.168",
              "owner": "1",
              "copyFromVersion": "",
              "secretGrade": -1,
              "secretGradeText": "",
              "data": {},
              "sectype": "codevariablesec",
              "secTypeText": "可变码段",
              "pkCodeRule": "1673234841140858880",
              "orderNum": 4,
              "codeSecLengthType": "code_sec_length_variable",
              "codeSecLengthTypeText": "可变长度",
              "codeSecLength": "10",
              "referAttributeName": "",
              "referAttributeId": "",
              "getValueClass": "",
              "codeDateFormatStr": "",
              "codeLevelType": "",
              "codeLevelTypeText": "",
              "codeLevelValue": -1,
              "valueCutLength": -1,
              "valueCutType": "",
              "valueCutTypeText": "",
              "codeGetValueType": "",
              "codeGetValueTypeText": "",
              "referCodeClassifyOid": "",
              "referCodeClassifyOidName": "",
              "referBtmId": "",
              "referBtmName": "",
              "referConfig": "",
              "referValueInfo": "",
              "filterSql": "",
              "serialStart": "",
              "serialStep": -1,
              "codeFillType": "code_fill_left",
              "codeFillTypeText": "",
              "codeFillSeparator": "0",
              "codeFillLength": "",
              "codeFillLimit": -1,
              "codeFillFlag": "false",
              "customCodeSerialClass": "",
              "matchClassifyValueFlag": "false",
              "parentClassifySecOid": "",
              "parentClassifySecText": "",
              "nullableFlag": "false",
              "componentCodeFlag": "false",
              "serialDependFlag": "false",
              "displayFlag": "false",
              "serialDependOrder": 0,
              "fixedValueVOList": []
            },
            {
              "oid": "1673236217442996224",
              "id": "yymd",
              "name": "引用码段",
              "tenantId": "",
              "description": "",
              "revisionOid": "1673236217442996227",
              "nameOid": "1673236217442996225",
              "btmname": "codebasicsec",
              "lastR": "1",
              "firstR": "1",
              "lastV": "1",
              "firstV": "1",
              "creator": "0",
              "createTime": "2023-06-26 15:46:16",
              "lastModifier": "0",
              "lastModifyTime": "2023-06-26 15:46:16",
              "revisionRule": "",
              "revisionSeq": 1,
              "revisionValue": "",
              "versionRule": "0",
              "versionSeq": 1,
              "versionValue": "1",
              "lctid": "",
              "lcStatus": "",
              "lcStatusText": "",
              "ts": "2023-06-26 15:46:16.121",
              "owner": "1",
              "copyFromVersion": "",
              "secretGrade": -1,
              "secretGradeText": "",
              "data": {},
              "sectype": "coderefersec",
              "secTypeText": "引用码段",
              "pkCodeRule": "1673234841140858880",
              "orderNum": 5,
              "codeSecLengthType": "code_sec_length_variable",
              "codeSecLengthTypeText": "可变长度",
              "codeSecLength": "",
              "referAttributeName": "",
              "referAttributeId": "",
              "getValueClass": "",
              "codeDateFormatStr": "",
              "codeLevelType": "",
              "codeLevelTypeText": "",
              "codeLevelValue": -1,
              "valueCutLength": -1,
              "valueCutType": "",
              "valueCutTypeText": "",
              "codeGetValueType": "",
              "codeGetValueTypeText": "",
              "referCodeClassifyOid": "",
              "referCodeClassifyOidName": "",
              "referBtmId": "referconfig",
              "referBtmName": "参照配置表",
              "referConfig": "{\"codeSrchCondConfigVOS\":[],\"codeShowFieldConfigVOS\":[{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":0,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"mapfields\",\"title\":\"mapfields\",\"sort\":false,\"attrSortField\":\"mapfields\",\"isquery\":false,\"$cellEdit\":false,\"$index\":1,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":2,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"}],\"referTypeName\":\"参照配置表\",\"referType\":\"referconfig\",\"textField\":\"name\",\"valueField\":\"oid\",\"type\":\"default\",\"url\":\"\",\"backPath\":\"\",\"method\":\"GET\",\"height\":\"\",\"useFormKey\":\"\",\"paramForFormKey\":\"\",\"isMuti\":false,\"mapFields\":\"\",\"isOpenGlobal\":true,\"isPersistence\":true,\"id\":\"004\",\"name\":\"测试引用码段\",\"limit\":\"\",\"sortField\":\"\",\"sortType\":\"\"}",
              "referValueInfo": "{\"codeSrchCondConfigVOS\":[],\"codeShowFieldConfigVOS\":[{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":0,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"mapfields\",\"title\":\"mapfields\",\"sort\":false,\"attrSortField\":\"mapfields\",\"isquery\":false,\"$cellEdit\":false,\"$index\":1,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":2,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"}],\"referTypeName\":\"参照配置表\",\"referType\":\"referconfig\",\"textField\":\"name\",\"valueField\":\"oid\",\"type\":\"default\",\"url\":\"\",\"backPath\":\"\",\"method\":\"GET\",\"height\":\"\",\"useFormKey\":\"\",\"paramForFormKey\":\"\",\"isMuti\":false,\"mapFields\":\"\",\"isOpenGlobal\":true,\"isPersistence\":true,\"id\":\"004\",\"name\":\"测试引用码段\",\"limit\":\"\",\"sortField\":\"\",\"sortType\":\"\"}",
              "filterSql": "",
              "serialStart": "",
              "serialStep": -1,
              "codeFillType": "",
              "codeFillTypeText": "",
              "codeFillSeparator": "0",
              "codeFillLength": "",
              "codeFillLimit": -1,
              "codeFillFlag": "false",
              "customCodeSerialClass": "",
              "matchClassifyValueFlag": "false",
              "parentClassifySecOid": "",
              "parentClassifySecText": "",
              "nullableFlag": "false",
              "componentCodeFlag": "false",
              "serialDependFlag": "false",
              "displayFlag": "false",
              "serialDependOrder": 0,
              "fixedValueVOList": []
            }
          ]
          if (this.secVOList.length > 0) {
          if (localSecVOList.length > 0) {
            this.showCodeApply = true
            this.$nextTick(() => {
              this.$refs.CodeApply.templateRender(this.secVOList);
              this.$refs.CodeApply.templateRender(localSecVOList);
            });
          }
@@ -531,12 +72,12 @@
      this.codeApplyForm = codeApplyForm;
    },
    getType(item) {
      console.log(item.sectype, 'item.sectype');
      return this.selfColumnType[item.sectype];
      console.log(item.secType, 'item.secType');
      return this.selfColumnType[item.secType];
    },
    getReferConfig(item) {
      let params = {};
      if (item.sectype == "codeclassifysec") {
      if (item.secType == "codeclassifysec") {
        params = {
          isMuti: false,
          type: "grid",
@@ -580,13 +121,13 @@
              : "",
          },
        };
      } else if (item.sectype == "coderefersec") {
        params = JSON.parse(item.referValueInfo);
      } else if (item.secType == "coderefersec") {
        params = JSON.parse(item.referConfig);
      }
      return params;
    },
    getDisabled(item) {
      if (item.sectype === "codeclassifysec") {
      if (item.secType === "codeclassifysec") {
        if (item.parentClassifySecOid) {
          if (!this.codeApplyForm[item.parentClassifySecOid]) {
            return true;