提交 58626a36 authored 作者: yaoxinguo's avatar yaoxinguo

就业处批量审核

上级 579a0fac
......@@ -9,12 +9,14 @@ const initSignFunc = () => {
examineMap,
message,
setVisible,
callback
callback,
Modal
} = props;
let total = selectRows.length;
let selectTotal = 0;
let success = 0;
let fail = 0;
let messageList = [];
/**
*
......@@ -26,22 +28,16 @@ const initSignFunc = () => {
let json = {};
json.isSealOrNot = g['LLzXaxdAYHU'] || "0";
json.signaturePicture = g['LLMbGiXIkvE'];
json.setUp = g['LLtAdXHnnVM'] ? JSON.parse(g['LLtAdXHnnVM']) : {
setUp: []
};
json.setUp = g['LLtAdXHnnVM'] && ( g['LLtAdXHnnVM'] != undefined && g['LLtAdXHnnVM'] != null ) ? JSON.parse(g['LLtAdXHnnVM']) : {objs: []};
json.enclosure = g['LHfENWqbwZs'];
json.code = g['code'];
json.taskId = g['taskId'];
json.appId = g['appId'];
json.signTypeId = g['LHeyaYVWuJA'];
json.userName = g['LHexnzfpcdc'];
return json;
}) || [];
//console.log("selectList", selectList);
setSubmitLoading(true); // 显示为加载中
selectList.map((v, i) => {
if (v.isSealOrNot === "1") {
selectTotal++;
}
});
uaaRequest('/DataColumnApi/getSqlColumn', {
token: 1,
json: 'LLyJBlByfFM',
......@@ -65,21 +61,32 @@ const initSignFunc = () => {
taskId,
code,
appId,
isSealOrNot
isSealOrNot,
signTypeId,
userName
} = selectData;
if (enclosure.files == [] && enclosure.files.length == 0) {
console.log('->>>>>>>>>', '没有签章图片');
continue;
const oneStudentTask = async () => {
let resOneStudentRes;
if (enclosure.files == [] || enclosure.files.length == 0) {
console.log('->>>>>>>>>',`学生:${userName}`+'没有签章图片');
messageList.push({name:'学生没有上传签章图片',type:1,username:`学生:${userName}`});
return false;
}
if (setUp.objs == [] || setUp.objs.length == 0) {
console.log('->>>>>>>>>',`学生:${userName}`+'上级没有签章,批量签章不生效');
messageList.push({name:'上一级审核没有签章,批量签章不生效!',type:1,username:`学生:${userName}`});
return false;
}
selectTotal++;
let background = enclosure.files[enclosure.files.length - 1].path;
// 这里还要加判断 如果没得图片能签章. 直接跳过这条数据
const oneStudentTask = async () => {
let resOneStudentRes;
if (isSealOrNot === "1") { //盖章流程
if (Number(isSealOrNot) === 1) { //盖章流程
setUp.objs.forEach((sv, si) => {
let XGAxis = result[signTypeId] || null ;//根据下级类型配置了XY偏移量 否则使用最上级XY偏移量
if(XGAxis != null){
XAxisOffset = XGAxis.XAxisOffset;
YAxisOffset = XGAxis.YAxisOffset;
};
sv.x += XAxisOffset;
sv.y += YAxisOffset;
if (sv.key === 'photo') {
......@@ -92,6 +99,7 @@ const initSignFunc = () => {
}).then((merge) => {
if (!merge) {
console.log('->>>>>>>>>', '印章失败');
messageList.push({name:'印章失败',type:2,username:`学生:${userName}`});
return false;
}
enclosure.files[enclosure.files.length - 1].originPath = background;
......@@ -112,14 +120,15 @@ const initSignFunc = () => {
taskForm: JSON.stringify(taskForm),
};
//console.log('examineJson', examineJson);
return uaaRequest('/UnifiedAppFormApi/examineProcess', examineJson).then((resProcess) => {
if (!resProcess) {
console.log('->>>>>>>>>', '审核失败');
return false;
}
console.log('->>>>>>>>>', '审核成功');
return true;
});
// return uaaRequest('/UnifiedAppFormApi/examineProcess', examineJson).then((resProcess) => {
// if (!resProcess) {
// console.log('->>>>>>>>>', '审核失败');
// return false;
// }
// console.log('->>>>>>>>>', '审核成功');
// return true;
// });
});
} else { //无需盖章流程跳过
let examineMaps = {
......@@ -135,14 +144,16 @@ const initSignFunc = () => {
taskForm: JSON.stringify({}),
};
//console.log('examineJson', examineJson);
resOneStudentRes = await uaaRequest('/UnifiedAppFormApi/examineProcess', examineJson).then((resProcess) => {
if (!resProcess) {
console.log('->>>>>>>>>', '审核失败');
return false;
}
//console.log('->>>>>>>>>', '审核成功');
return true;
});
resOneStudentRes = true
// await uaaRequest('/UnifiedAppFormApi/examineProcess', examineJson).then((resProcess) => {
// if (!resProcess) {
// console.log('->>>>>>>>>', '审核失败');
// return false;
// }
// //console.log('->>>>>>>>>', '审核成功');
// return true;
// });
}
if (resOneStudentRes) {
success++;
......@@ -150,7 +161,7 @@ const initSignFunc = () => {
fail++;
}
message.destroy();
message.info(`正在进行批量签章审核,请耐心等待, 当前共审核成功${success}条, 失败${fail}条。共需审核${total}条,其中盖章${selectTotal}条,无需盖章${total - selectTotal}条`, 2);
//message.info(`正在进行批量签章审核,请耐心等待, 当前共审核成功${success}条, 失败${fail}条。共需审核${total}条,其中盖章${selectTotal}条,无需盖章${total - selectTotal}条`, 2);
return true;
};
promiseArray.push(oneStudentTask);
......@@ -168,7 +179,23 @@ const initSignFunc = () => {
}
taskFunc().then((g) => {
if (g) {
message.success('审核完成');
let modalContent1 = `正在进行批量签章审核,请耐心等待, 共审核成功${success}条, 失败${fail}条。共需审核${total}条,其中盖章${selectTotal}条,无需盖章${total - selectTotal}条。`;
let modalContent2 = ``;
for(var i in messageList){
modalContent2 += `【${messageList[i].username }${messageList[i].name};`
}
//message.success('审核完成');
let modalJosn = {
title: '批量审批错误的信息',
content: (
<div>
<p>{modalContent1}</p>
<p>{modalContent2}</p>
</div>
),
width:500
};
Modal.info(modalJosn);
setSubmitLoading(false);
setVisible(false);
callback(true);
......
......@@ -21,7 +21,7 @@ const getContent = (signConfig = [], ratioX) => {
if (g.type === 'text') {
g.fontSize = Math.ceil(g.fontSize * ratioX);
g.y = g.y + 20;
g.y = g.y + 25;
// g.x = g.x + 20;
}
if (g.type === 'image') {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论