|
|
@ -158,6 +158,7 @@ export default { |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], // 用于导出的时候保存已选择的SIDs |
|
|
|
multipleSelection: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
// 翻页 |
|
|
@ -224,6 +225,7 @@ export default { |
|
|
|
}, |
|
|
|
// 信息条数 获取点击时当前的sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
this.multipleSelection = row |
|
|
|
const aa = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
@ -326,14 +328,18 @@ export default { |
|
|
|
}, |
|
|
|
toSettle() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
req.settle(this.sids[0]).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.viewState = 5 |
|
|
|
this.$refs['divSettle'].showAdd({ sid: this.sids[0] }) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: res.msg }) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (this.multipleSelection[0].state !== '已结算') { |
|
|
|
req.settle(this.sids[0]).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.viewState = 5 |
|
|
|
this.$refs['divSettle'].showAdd({ sid: this.sids[0] }) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: res.msg }) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择单据状态为未结算的进行操作' }) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) |
|
|
|
} |
|
|
|