| | |
| | | processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length!=0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter=res.data.data.records[0] |
| | | this.parameter.template = this.userName + "-发布" + "[物品]"; |
| | | this.parameter.type = 'PUBLIC'; |
| | | this.parameter.code=this.templateOid |
| | |
| | | showMessage = false; |
| | | } else if (this.selectRow.length > 1 && hasEditing && showMessage) { |
| | | processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length!=0) { |
| | | this.parameter=res.data.data.records[0] |
| | | if (res.data.records != [] && res.data.data.records.length!=0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "停用" + "[物品]"; |
| | | this.parameter.type = 'DISABLE' |
| | | this.parameter.type = 'DISABLE'; |
| | | this.parameter.code=this.templateOid |
| | | this.title = '停用(冻结)编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | this.parameter=res.data.data.records[0] |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "启用" + "[物品]"; |
| | | this.parameter.type = 'Released' |
| | | this.parameter.type = 'Released'; |
| | | this.parameter.code=this.templateOid |
| | | this.title = '启用编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | } else if (this.selectRow.length >=1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { |
| | | //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true |
| | | processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { |
| | | if (res.data.data.records && res.data.data.records.length!=0) { |
| | | this.parameter=res.data.data.records[0] |
| | | if (res.data.records != [] && res.data.data.records.length!=0) { |
| | | this.userName = localStorage.getItem("username"); |
| | | this.parameter.template = this.userName + "回收" + "[物品]"; |
| | | this.parameter.type = 'TakeBack' |
| | | this.parameter.type = 'TakeBack'; |
| | | this.parameter.code=this.templateOid |
| | | this.title = '回收编码数据' |
| | | this.visibleDeactivate = true; |
| | | } else { |
| | |
| | | }).then(() => { |
| | | const list=[]; |
| | | this.selectRow.forEach((item)=>{list.push(item.oid)}) |
| | | console.log(list) |
| | | deleteCode({codeClassifyOid:this.codeClassifyOid,oidList:list}).then(res=>{ |
| | | console.log(res) |
| | | if(res.data.code === 200){ |