| | |
| | | if (JSON.stringify(conditionMaps) != "{}") { |
| | | if (this.advancedQueryParam.currentOpen == "codeRule") { |
| | | this.query = conditionMaps; |
| | | // console.log(this.query); |
| | | this.onLoad(this.page); |
| | | } else { |
| | | this.sendGridCodeBasicSec(conditionMaps, true); |
| | | } |
| | | //console.log(conditionMaps); |
| | | } |
| | | }, |
| | | /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */ |
| | |
| | | }, |
| | | /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */ |
| | | 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) { |
| | |
| | | /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */ |
| | | /** 保存当前父分类码段的选中行,并进行回显 */ |
| | | saveSelectedParentClassify() { |
| | | //console.log(this.parentClsfyParams.parentClassifySelectionList.length); |
| | | if (this.parentClsfyParams.parentClassifySelectionList.length != 1) { |
| | | this.$message.warning("请选择一条数据!"); |
| | | return false; |
| | |
| | | page.pageSize, |
| | | conditionMaps |
| | | ).then((res) => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | parentClsParam.parentClassifyDataPage.total = data.total; |
| | | parentClsParam.parentClassifyData = data.records; |
| | |
| | | /** 加载分类连接属性表格数据 */ |
| | | loadlistClassifyLinkAttr() { |
| | | let attrParam = this.selectAttrParams; |
| | | //console.log(this.currentSelectTreeData); |
| | | this.selectAttrParams.selectAttrOptionLoading = true; |
| | | let conditionMaps = {}; |
| | | if (attrParam.selectAttrQeury) { |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout(); |
| | | }); |
| | | //console.log(data.data); |
| | | this.selectAttrParams.selectAttrData = data.data; |
| | | this.selectAttrParams.selectAttrOptionLoading = false; |
| | | // 将搜索框内容置空 |
| | |
| | | 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; |
| | |
| | | } |
| | | this.codeClassifyForm.codeClassifySecOid = |
| | | this.codefixedsecOrCodeclassifysec.oid; |
| | | // console.log(this.codeClassifyForm); |
| | | addSaveCodeClassifyValue(this.codeClassifyForm).then( |
| | | () => { |
| | | this.loadClassifyValueData({ |
| | |
| | | clearFixedOrClassifyForm(condition) { |
| | | //点击取消时清空表单与当前选中的码值,并禁用按钮 |
| | | this.selectedFixedOrCodeclassifyValue = ""; |
| | | //console.log(condition); |
| | | if (condition === "close") { |
| | | this.codeFixdForm = this.$options.data().codeFixdForm; |
| | | this.codeClassifyForm = this.$options.data().codeClassifyForm; |
| | |
| | | queryField: "lcStatus", |
| | | comboxKey: "codeSearchLCStatus", |
| | | }, |
| | | { |
| | | data: [], |
| | | title: "所有者", |
| | | fieldType: "text", |
| | | queryField: "ownerText", |
| | | }, |
| | | ]; |
| | | } else { |
| | | this.advancedQueryParam.options = [ |
| | |
| | | }, |
| | | /** 添加*/ |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, params).then((res) => { |
| | | gridCodeRule( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign({},params,this.query), |
| | | ).then((res) => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | |
| | | if (!this.tipsMessage(this.selectionBasicList)) { |
| | | return; |
| | | } |
| | | if (this.selectionBasicList[0].lcStatus != "Editing") { |
| | | this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!'); |
| | | return; |
| | | } |
| | | let oid = this.selectionBasicList[0].oid; |
| | | this.$confirm("是否删除这条数据?如果被引用将不能被删除!", { |
| | | confirmButtonText: "确定", |
| | |
| | | }, |
| | | /** 码段类型改变时,增加对应的form表单中的属性*/ |
| | | changeSectypeFormItems(row) { |
| | | //console.log(row); |
| | | if ( |
| | | func.isEmpty(this.enumParam.secTypeList) || |
| | | this.enumParam.secTypeList.length == 0 |
| | |
| | | componentCodeFlag: this.form.componentCodeFlag, //是否参与编码 |
| | | pkCodeRule: this.form.pkCodeRule, //所属编码规则 |
| | | }; |
| | | //console.log(this.form); |
| | | } |
| | | if (this.form.secType === "codefixedsec") { |
| | | //固定码段 |
| | |
| | | ? row.customCodeSerialClass |
| | | : "", //自定义流水算法 |
| | | }); |
| | | console.log(this.form); |
| | | console.log(this.enumParam.codeFillType); |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | } else if (this.form.secType === "codelevelsec") { |
| | |
| | | : "", //日期格式 |
| | | }); |
| | | } else if (this.form.secType === "codeclassifysec") { |
| | | //console.log(this.form); |
| | | //分类码段 |
| | | this.form = Object.assign({}, this.form, { |
| | | codeSecLengthType: |
| | |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | } |
| | | // console.log(this.form); |
| | | }, |
| | | /** 第一次请求的枚举数据放缓存*/ |
| | | getLocalStorageEnum(enumKey) { |
| | |
| | | }, |
| | | // 最大流水号 |
| | | 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"]; |
| | | }, |