|
|
@ -146,6 +146,13 @@ export default { |
|
|
|
btnKey: 'toAdd', |
|
|
|
btnLabel: '新增' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toPush', |
|
|
|
btnLabel: '重推' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
@ -167,6 +174,7 @@ export default { |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], // 用于导出的时候保存已选择的SIDs |
|
|
|
multipleSelection: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
// 翻页 |
|
|
@ -242,6 +250,9 @@ export default { |
|
|
|
case 'toAdd': |
|
|
|
this.toAdd() |
|
|
|
break |
|
|
|
case 'toPush': |
|
|
|
this.toPush() |
|
|
|
break |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
@ -255,6 +266,7 @@ export default { |
|
|
|
// 信息条数 获取点击时当前的sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
this.multipleSelection = row |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
@ -317,6 +329,33 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
toPush() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.multipleSelection[0].nodeState !== '已办结') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择状态为已办结的记录进行重推操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '数据推送中', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.rePushVoucher({ sid: this.sids[0] }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
loading.close() |
|
|
|
this.$message({ showClose: true, type: 'success', message: '重推成功' }) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
loading.close() |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行重推操作' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
toEdit(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divAdd'].showEdit(row) |
|
|
|