|
@@ -1302,6 +1302,12 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 获取是否已存在调用变更令
|
|
|
+ const changeUsedData = await ctx.service.stageChange.getFinalUsedData(ctx.tender.id, changeData.cid);
|
|
|
+ const stageChangeNum = this.ctx.helper.sum(changeUsedData.map(x => { return Math.abs(x.used_qty); }));
|
|
|
+ if (stageChangeNum !== 0) {
|
|
|
+ throw '该变更令已被调用,无法重新审批';
|
|
|
+ }
|
|
|
// 重新审批
|
|
|
const result = await ctx.service.change.checkAgain(changeData.cid);
|
|
|
if (!result) {
|