| | |
| | | } |
| | | //console.log(this.form); |
| | | //为form绑定值 |
| | | this.changeSectypeFormItems(condition == "add" ? null : row); |
| | | this.changeSectypeFormItems(condition == "add" ? null:row); |
| | | this.addBasicCodeSettingBox = true; |
| | | }, |
| | | /** 新增基础码段*/ |
| | | async saveOrEditBasicCode() { |
| | | this.isLoadingSecCodeAddBtn = true; |
| | | if ( |
| | | this.selectionList[0].oid == null || |
| | | this.selectionList[0].oid == "" |
| | |
| | | this.$message.warning("缺失必要参数,请重新选择编码规则后再试!"); |
| | | return; |
| | | } |
| | | if (!this.checkForm()) { |
| | | return; |
| | | } |
| | | this.isLoadingSecCodeAddBtn = true; |
| | | this.form.pkCodeRule = this.selectionList[0].oid; |
| | | if (this.form.oid == "" || this.form.oid == null) { |
| | | if (this.checkForm()) { |
| | | await addSave(this.form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | console.log(this.form) |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false; |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | } |
| | | await addSave(this.form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | console.log(this.form) |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false; |
| | | // 点击新增基础码段,关闭窗口之后触发重新加载 |
| | | this.loadBasic(this.selectionList[0]); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | } else { |
| | | // 可能参照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变 |
| | | if ( |
| | |
| | | // let referValueInfo = JSON.parse(this.form.referValueInfo); |
| | | // referValueInfo.referType = this.form.referBtmId; |
| | | } |
| | | let oldBasicSec = this.selectionBasicList.at(-1); |
| | | let oldBasicSec = this.selectionBasicList.slice(-1)[0]; |
| | | let secType = this.form.secType; |
| | | Vue.set(this.form, 'isClearValue', false); |
| | | if ((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType) { |
| | |
| | | if (!this.tipsMessage(this.selectionBasicList)) { |
| | | return; |
| | | } |
| | | if (this.selectionList.at(-1).lcStatus != "Editing") { |
| | | if (this.selectionList.slice(-1)[0].lcStatus != "Editing") { |
| | | this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!'); |
| | | return; |
| | | } |
| | |
| | | }, |
| | | /** 基础码段刷新时查询*/ |
| | | refreshChangeBasicSec() { |
| | | this.loadBasic(this.selectionList.at(-1)); |
| | | this.loadBasic(this.selectionList.slice(-1)[0]); |
| | | }, |
| | | /** 操作基础码段中搜索清空等按钮的显示/隐藏*/ |
| | | hideBasicTable(hideBoolean) { |
| | |
| | | }, |
| | | /** 码段类型改变时,增加对应的form表单中的属性*/ |
| | | changeSectypeFormItems(row) { |
| | | console.log(row) |
| | | //console.log(row) |
| | | if ( |
| | | func.isEmpty(this.enumParam.secTypeList) || |
| | | this.enumParam.secTypeList.length == 0 |