|
|
@ -217,44 +217,51 @@ export default { |
|
|
|
})*/ |
|
|
|
}, |
|
|
|
doDel(row) { |
|
|
|
|
|
|
|
if (this.multipleSelection.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const _this = this |
|
|
|
const sids = [] |
|
|
|
this.multipleSelection.forEach(row => { |
|
|
|
sids.push(row.sid) |
|
|
|
}) |
|
|
|
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req |
|
|
|
.delBySids(sids) |
|
|
|
.then(resp => { |
|
|
|
loading.close() |
|
|
|
if (resp.success) { |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.loadList() |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
this.multipleSelection.forEach(row => { |
|
|
|
if(row.nodeState==''||(row.nodeState!=''&&row.nodeState=='外采申请')){ |
|
|
|
sids.push(row.sid) |
|
|
|
}else{ |
|
|
|
alert('已经发起的审批业务数据不能进行删除。'); |
|
|
|
sids = []; |
|
|
|
} |
|
|
|
}) |
|
|
|
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req |
|
|
|
.delBySids(sids) |
|
|
|
.then(resp => { |
|
|
|
loading.close() |
|
|
|
if (resp.success) { |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
this.queryParams.current = 1 |
|
|
|
_this.loadList() |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
}, |
|
|
|
doImport(row) { |
|
|
|
// 导入的代码 |
|
|
|