| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | crudOption:{...optionRule}, |
| | | ruleForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | 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); |
| | |
| | | queryField: "lcStatus", |
| | | comboxKey: "codeSearchLCStatus", |
| | | }, |
| | | { |
| | | data: [], |
| | | title: "所有者", |
| | | fieldType: "text", |
| | | queryField: "ownerText", |
| | | }, |
| | | ]; |
| | | } else { |
| | | this.advancedQueryParam.options = [ |
| | |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | // 编码规则快速查询 |
| | | // 编码规则快速查询searchChange |
| | | searchChange(params, done) { |
| | | this.page.currentPage = 1; |
| | | // 多个conditionMap这样传参,快速查询默认采用模糊查询 |
| | |
| | | } |
| | | 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(); |
| | | }, |
| | | /** 编码规则当前选中行变化的时候触发*/ |
| | |
| | | }, |
| | | 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; |
| | |
| | | /** 基础码段删除*/ |
| | | deleteBasicCode() { |
| | | if (!this.tipsMessage(this.selectionBasicList)) { |
| | | return; |
| | | } |
| | | if (this.selectionBasicList[0].lcStatus != "Editing") { |
| | | this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!'); |
| | | return; |
| | | } |
| | | let oid = this.selectionBasicList[0].oid; |
| | |
| | | }, |
| | | // 最大流水号 |
| | | maxSerialNum() { |
| | | 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"]; |
| | | }, |