批量审核调整-刘杰
This commit is contained in:
parent
d08aabc48c
commit
f11ed1a49e
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* @Author: guoyangf
|
* @Author: guoyangf
|
||||||
* @Date: 2020-07-06 15:09:29
|
* @Date: 2020-07-06 15:09:29
|
||||||
* @LastEditTime: 2025-03-28 11:03:25
|
* @LastEditTime: 2025-03-28 14:42:30
|
||||||
* @Description: 详情页头部按钮
|
* @Description: 详情页头部按钮
|
||||||
*/
|
*/
|
||||||
import { toast, promptBox, print } from "nc-lightapp-front";
|
import { toast, promptBox, print } from "nc-lightapp-front";
|
||||||
|
@ -158,14 +158,40 @@ export default function jobButtonEvent() {
|
||||||
},
|
},
|
||||||
//批量审核
|
//批量审核
|
||||||
'BatchApprove': async () => {
|
'BatchApprove': async () => {
|
||||||
console.log("this.tableCheckboxOnSelect",this.targetListConfig.cardData.listRows)
|
let checkedRows = this.props.table.getCheckedRows(this.state.activeTabKey)
|
||||||
debugger
|
let rows = checkedRows.map(row => ({ values: row.data.values }))
|
||||||
if (!this.selectedRows || Object.keys(this.selectedRows).length == 0) {
|
console.log("选择的行数据",rows)
|
||||||
|
if (!this.rows || Object.keys(this.rows).length == 0) {
|
||||||
toast({ color: 'danger', content: '请先选择行后重试' });
|
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 () => {
|
CancelApprove: async () => {
|
||||||
let grid = this.currentGridData;
|
let grid = this.currentGridData;
|
||||||
|
|
Loading…
Reference in New Issue