田源
2023-10-18 59c9fdfeecda48c774660b04fe84f5992caa1893
Source/UBCS-WEB/src/views/code/code.vue
@@ -1324,6 +1324,7 @@
export default {
  data() {
    return {
      crudOption:{...optionRule},
      ruleForm: {},
      query: {},
      loading: true,
@@ -1650,7 +1651,6 @@
        } else {
          this.sendGridCodeBasicSec(conditionMaps, true);
        }
        //console.log(conditionMaps);
      }
    },
    /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */
@@ -1659,12 +1659,12 @@
    },
    /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */
    setReferConfigValue(content) {
      // console.log(content.referTypeName);
      this.form.referBtmId = content.referType || "";
      this.form.referBtmName = content.referTypeName || content.referType;
      //转换成JSON字符串进行父组件回显
      let submitFormJson = JSON.stringify(content);
      this.form.referConfig = submitFormJson || "";
      debugger;
    },
    /** 引用码段为【参照引用的业务类型】选取值之后的内容回显时调用 */
    echoReferBtmType(content) {
@@ -1676,7 +1676,6 @@
    /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */
    /** 保存当前父分类码段的选中行,并进行回显 */
    saveSelectedParentClassify() {
      //console.log(this.parentClsfyParams.parentClassifySelectionList.length);
      if (this.parentClsfyParams.parentClassifySelectionList.length != 1) {
        this.$message.warning("请选择一条数据!");
        return false;
@@ -1744,7 +1743,6 @@
        page.pageSize,
        conditionMaps
      ).then((res) => {
        //console.log(res.data);
        const data = res.data.data;
        parentClsParam.parentClassifyDataPage.total = data.total;
        parentClsParam.parentClassifyData = data.records;
@@ -1762,7 +1760,6 @@
    /** 加载分类连接属性表格数据 */
    loadlistClassifyLinkAttr() {
      let attrParam = this.selectAttrParams;
      //console.log(this.currentSelectTreeData);
      this.selectAttrParams.selectAttrOptionLoading = true;
      let conditionMaps = {};
      if (attrParam.selectAttrQeury) {
@@ -1780,7 +1777,6 @@
        this.$nextTick(() => {
          this.$refs[attrParam.ref].doLayout();
        });
        //console.log(data.data);
        this.selectAttrParams.selectAttrData = data.data;
        this.selectAttrParams.selectAttrOptionLoading = false;
        // 将搜索框内容置空
@@ -1850,13 +1846,11 @@
      this.fixedValueOptionLoading = true;
      gridCodeFixedValue(1, -1, { codeFixedSecOid: row.oid }).then((res) => {
        this.fixedValueData = res.data.data.records;
        //console.log(this.fixedValueData);
        this.fixedValueOptionLoading = false;
      });
    },
    /** 单击固定码段的码值表中行时触发的事件*/
    selectedCodeValueRow(row) {
      //console.log(row);
      this.selectedFixedOrCodeclassifyValue = row;
      this.codeFixdForm.id = row.id;
      this.codeFixdForm.description = row.description;
@@ -1868,8 +1862,7 @@
        if (!this.tipsCodeSecValueMessage(this.codeFixdForm.id)) {
          return;
        }
        this.codeFixdForm.codeFixedSecOid =
          this.codefixedsecOrCodeclassifysec.oid;
        this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysec.oid;
        addSaveCodeFixedValue(this.codeFixdForm).then(
          () => {
            this.loadFixedValueTableData({
@@ -1893,7 +1886,6 @@
        }
        this.codeClassifyForm.codeClassifySecOid =
          this.codefixedsecOrCodeclassifysec.oid;
        // console.log(this.codeClassifyForm);
        addSaveCodeClassifyValue(this.codeClassifyForm).then(
          () => {
            this.loadClassifyValueData({
@@ -1918,7 +1910,6 @@
    clearFixedOrClassifyForm(condition) {
      //点击取消时清空表单与当前选中的码值,并禁用按钮
      this.selectedFixedOrCodeclassifyValue = "";
      //console.log(condition);
      if (condition === "close") {
        this.codeFixdForm = this.$options.data().codeFixdForm;
        this.codeClassifyForm = this.$options.data().codeClassifyForm;
@@ -2471,7 +2462,6 @@
    },
    /** 添加*/
    rowSave(row, done, loading) {
      console.log(row);
      add(row).then(
        () => {
          this.onLoad(this.page);
@@ -2547,7 +2537,7 @@
      this.query = {};
      this.onLoad(this.page);
    },
    // 编码规则快速查询
    // 编码规则快速查询searchChange
    searchChange(params, done) {
      this.page.currentPage = 1;
      // 多个conditionMap这样传参,快速查询默认采用模糊查询
@@ -2560,6 +2550,11 @@
      }
      this.query = requestData;
      this.onLoad(this.page, this.query);
      // console.log(  this.findObject(this.optionRule.column,'id'))
      // console.log(this.crudOption.column[0])
      // this.crudOption.column && this.crudOption.column.length > 0
      //   ? (this.crudOption.column[0].value = '')
      //   : null;
      done();
    },
    /** 编码规则当前选中行变化的时候触发*/
@@ -3146,7 +3141,6 @@
    },
    /** 码段类型改变时,增加对应的form表单中的属性*/
    changeSectypeFormItems(row) {
      //console.log(row);
      if (
        func.isEmpty(this.enumParam.secTypeList) ||
        this.enumParam.secTypeList.length == 0
@@ -3180,7 +3174,6 @@
          componentCodeFlag: this.form.componentCodeFlag, //是否参与编码
          pkCodeRule: this.form.pkCodeRule, //所属编码规则
        };
        //console.log(this.form);
      }
      if (this.form.secType === "codefixedsec") {
        //固定码段
@@ -3246,8 +3239,6 @@
              ? row.customCodeSerialClass
              : "", //自定义流水算法
        });
        console.log(this.form);
        console.log(this.enumParam.codeFillType);
        this.loadCodeFillType();
        this.loadCodeFillSeparator();
      } else if (this.form.secType === "codelevelsec") {
@@ -3293,7 +3284,6 @@
              : "", //日期格式
        });
      } else if (this.form.secType === "codeclassifysec") {
        //console.log(this.form);
        //分类码段
        this.form = Object.assign({}, this.form, {
          codeSecLengthType:
@@ -3336,7 +3326,6 @@
        this.loadCodeFillType();
        this.loadCodeFillSeparator();
      }
      // console.log(this.form);
    },
    /** 第一次请求的枚举数据放缓存*/
    getLocalStorageEnum(enumKey) {
@@ -3393,11 +3382,14 @@
    },
    // 最大流水号
    maxSerialNum() {
      console.log(this.selectionList);
      if (this.selectionList.length === 0) {
      if (this.selectionList.length <= 0) {
        this.$message.warning("请选择一条编码规则!");
        return;
      }
      if(this.selectionList.length> 1){
        this.$message.warning("只能选择一条编码规则!");
        return;
      }
      this.maxSerial.visible = true;
      this.maxSerial.ruleOid = this.selectionList[0]["oid"];
    },