|
@@ -752,7 +752,7 @@ module.exports = app => {
|
|
|
return { groupName: item, groupList };
|
|
|
});
|
|
|
for (const sp of shenpiConst.sp_lc) {
|
|
|
- sp.status = ctx.tender.info.shenpi ? JSON.parse(ctx.tender.info.shenpi)[sp.code] : shenpiConst.sp_status.sqspr;
|
|
|
+ sp.status = ctx.tender.info.shenpi ? ctx.tender.info.shenpi[sp.code] : shenpiConst.sp_status.sqspr;
|
|
|
if (sp.status === shenpiConst.sp_status.gdspl) {
|
|
|
sp.auditList = await ctx.service.shenpiAudit.getAuditList(ctx.tender.id, sp.type, sp.status);
|
|
|
} else if (sp.status === shenpiConst.sp_status.gdzs) {
|
|
@@ -778,20 +778,21 @@ module.exports = app => {
|
|
|
if (ctx.session.sessionUser.is_admin === 0) {
|
|
|
throw '你没有权限修改审批流程';
|
|
|
}
|
|
|
- let postData = {};
|
|
|
- if (!ctx.tender.info.shenpi) {
|
|
|
- for (const sp of shenpiConst.sp_lc) {
|
|
|
- if (sp.code === data.code) {
|
|
|
- postData[sp.code] = data.status;
|
|
|
- } else {
|
|
|
- postData[sp.code] = shenpiConst.sp_status.sqspr;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- postData = JSON.parse(ctx.tender.info.shenpi);
|
|
|
- postData[data.code] = data.status;
|
|
|
- }
|
|
|
- await ctx.service.tenderInfo.saveTenderInfo(ctx.tender.id, { shenpi: JSON.stringify(postData) });
|
|
|
+ // let postData = {};
|
|
|
+ // if (!ctx.tender.info.shenpi) {
|
|
|
+ // for (const sp of shenpiConst.sp_lc) {
|
|
|
+ // if (sp.code === data.code) {
|
|
|
+ // postData[sp.code] = data.status;
|
|
|
+ // } else {
|
|
|
+ // postData[sp.code] = shenpiConst.sp_status.sqspr;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ const postData = ctx.tender.info.shenpi;
|
|
|
+ postData[data.code] = data.status;
|
|
|
+ // }
|
|
|
+ // console.log(postData);
|
|
|
+ await ctx.service.tenderInfo.saveTenderInfo(ctx.tender.id, { shenpi: postData });
|
|
|
let auditList = [];
|
|
|
if (data.status === shenpiConst.sp_status.gdspl) {
|
|
|
auditList = await ctx.service.shenpiAudit.getAuditList(ctx.tender.id, shenpiConst.sp_type[data.code], data.status);
|