| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('停用成功') |
| | | this.onLoad() |
| | |
| | | this.$message.warning("请选择一条数据"); |
| | | } else { |
| | | let hasEditing = this.selectRow.every(item => item.lcstatus == 'Disabled'); |
| | | console.log('hasEditing',hasEditing) |
| | | let showMessage = true; |
| | | this.selectRow.forEach(item => { |
| | | if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) { |
| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('启用成功') |
| | | this.onLoad() |
| | |
| | | // 停用-只能启用、回收 |
| | | const disabledCount = this.selectRow.filter(item => item.lcstatus === 'Disabled').length; |
| | | const releasedCount = this.selectRow.filter(item => item.lcstatus === 'Released').length; |
| | | console.log('hasEditing',disabledCount,releasedCount) |
| | | let showMessage = true; |
| | | this.selectRow.forEach(item => { |
| | | if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) { |
| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('回收成功') |
| | | this.onLoad() |
| | |
| | | }, |
| | | doLayout() { |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs) |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | }, |
| | |
| | | list.forEach((item) => { |
| | | this.parameter.ids.push(item.oid); |
| | | }); |
| | | console.log(this.selectRow) |
| | | }, |
| | | //选择 |
| | | handleSelection(list, row) { |
| | |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total |
| | | }); |
| | |
| | | //增加保存 |
| | | AddSumbit(val) { |
| | | this.addvisible = false; |
| | | console.log(val) |
| | | addSaveCode(val).then(res => { |
| | | console.log(res) |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | |
| | | }, |
| | | EditSumbit(val) { |
| | | this.editvisible = false; |
| | | console.log(val) |
| | | editSaveCode(val).then(res => { |
| | | console.log(res) |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |