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

就业处批量审核

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