|
@@ -2202,7 +2202,10 @@ module.exports = app => {
|
|
|
throw '变更立项书编号不能为空';
|
|
|
}
|
|
|
|
|
|
+ // 在生成新变更立项后,需要copy前一个变更立项报表的签名信息
|
|
|
+ const lastChange = await ctx.service.changeProject.getLastChange(tenderId);
|
|
|
const change = await ctx.service.changeProject.add(tenderId, ctx.session.sessionUser.accountId, data.code, data.name);
|
|
|
+ await ctx.service.roleRptRel.createRoleRelationshipFromOtherBz(tenderId, '-302', change.id, lastChange ? lastChange.id : null);
|
|
|
|
|
|
ctx.body = { err: 0, msg: '', data: change };
|
|
|
} catch (err) {
|
|
@@ -2984,7 +2987,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 新增变更立项 (Post)
|
|
|
+ * 新增变更申请 (Post)
|
|
|
*
|
|
|
* @param {Object} ctx - egg全局变量
|
|
|
* @return {void}
|
|
@@ -3000,7 +3003,10 @@ module.exports = app => {
|
|
|
throw '变更申请编号不能为空';
|
|
|
}
|
|
|
|
|
|
+ // 在生成新变更申请后,需要copy前一个变更申请报表的签名信息
|
|
|
+ const lastChange = await ctx.service.changeApply.getLastChange(tenderId);
|
|
|
const change = await ctx.service.changeApply.add(tenderId, ctx.session.sessionUser.accountId, data.code, data.project_code, data.name);
|
|
|
+ await ctx.service.roleRptRel.createRoleRelationshipFromOtherBz(tenderId, '-303', change.id, lastChange ? lastChange.id : null);
|
|
|
|
|
|
ctx.body = { err: 0, msg: '', data: change };
|
|
|
} catch (err) {
|
|
@@ -3757,7 +3763,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 新增变更立项 (Post)
|
|
|
+ * 新增变更方案 (Post)
|
|
|
*
|
|
|
* @param {Object} ctx - egg全局变量
|
|
|
* @return {void}
|
|
@@ -3773,7 +3779,10 @@ module.exports = app => {
|
|
|
throw '变更方案编号不能为空';
|
|
|
}
|
|
|
|
|
|
+ // 在生成新变更方案后,需要copy前一个变更方案报表的签名信息
|
|
|
+ const lastChange = await ctx.service.changePlan.getLastChange(tenderId);
|
|
|
const change = await ctx.service.changePlan.add(tenderId, ctx.session.sessionUser.accountId, data.code, data.apply_code, data.name);
|
|
|
+ await ctx.service.roleRptRel.createRoleRelationshipFromOtherBz(tenderId, '-301', change.id, lastChange ? lastChange.id : null);
|
|
|
|
|
|
ctx.body = { err: 0, msg: '', data: change };
|
|
|
} catch (err) {
|