批量审核-刘杰
This commit is contained in:
parent
13c6a47498
commit
13e9b2bccd
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* @Author: guoyangf
|
||||
* @Date: 2020-07-06 15:09:29
|
||||
* @LastEditTime: 2022-03-01 15:28:39
|
||||
* @LastEditTime: 2025-03-28 14:42:30
|
||||
* @Description: 详情页头部按钮
|
||||
*/
|
||||
import { toast, promptBox, print } from "nc-lightapp-front";
|
||||
|
@ -156,6 +156,42 @@ export default function jobButtonEvent() {
|
|||
|
||||
}
|
||||
},
|
||||
//批量审核
|
||||
'BatchApprove': async () => {
|
||||
let checkedRows = this.props.table.getCheckedRows(this.state.activeTabKey)
|
||||
let rows = checkedRows.map(row => ({ values: row.data.values }))
|
||||
console.log("选择的行数据",rows)
|
||||
if (!this.rows || Object.keys(this.rows).length == 0) {
|
||||
toast({ color: 'danger', content: '请先选择行后重试' });
|
||||
}else{
|
||||
let flagCount = 0;
|
||||
for(let i = 0; i < rows.length; i++){
|
||||
let grid = rows[i];
|
||||
let param = {
|
||||
...grid,
|
||||
userjson: JSON.stringify({
|
||||
reason: this.state.handleReason,
|
||||
skipcodes: this.skipcodes, //预算预警参数
|
||||
actiontype: "sscapprove",
|
||||
ntbCheck: this.ntbCheck || false, //预算预警参数
|
||||
jkCheck: this.jkCheck || '',
|
||||
...this.getSidebarSendData()
|
||||
})
|
||||
}
|
||||
let factor = this.currentRowData.module.value;
|
||||
|
||||
let result = await this.requestApi.taskApproveAction(param, factor);
|
||||
|
||||
if (result.success) {
|
||||
flagCount++;
|
||||
}
|
||||
}
|
||||
if(flagCount == rows.length){
|
||||
//审核成功之后跳转到已处理页面
|
||||
this.setState({ activeTabKey: 'done' })
|
||||
}
|
||||
}
|
||||
},
|
||||
//取消审核
|
||||
CancelApprove: async () => {
|
||||
let grid = this.currentGridData;
|
||||
|
|
Loading…
Reference in New Issue