|
@@ -47,12 +47,12 @@ module.exports = options => {
|
|
|
change.sp_group = group ? group.id : 0;
|
|
|
yield this.service.changeProject.defaultUpdate({ id: change.id, sp_group: change.sp_group });
|
|
|
}
|
|
|
- if (change.sp_group === 0) {
|
|
|
+ const condition = { tid: this.tender.id, sp_type: shenpiConst.sp_type.change, sp_status: shenpi_status, sp_group: change.sp_group };
|
|
|
+ const shenpiList = yield this.service.shenpiAudit.getAllDataByCondition({ where: condition, orders: [['audit_order', 'asc']] });
|
|
|
+ yield this.service.shenpiAudit.noYbShenpiList(change.uid, shenpiList);
|
|
|
+ if (change.sp_group === 0 && shenpiList.length === 0) {
|
|
|
this.tender.info.shenpi.change = shenpiConst.sp_status.sqspr;
|
|
|
} else {
|
|
|
- const condition = { tid: this.tender.id, sp_type: shenpiConst.sp_type.change, sp_status: shenpi_status, sp_group: change.sp_group };
|
|
|
- const shenpiList = yield this.service.shenpiAudit.getAllDataByCondition({ where: condition, orders: [['audit_order', 'asc']] });
|
|
|
- yield this.service.shenpiAudit.noYbShenpiList(change.uid, shenpiList);
|
|
|
// 判断2个id数组是否相同,不同则删除原审批流,切换成固定的审批流
|
|
|
let sameAudit = auditList.length === shenpiList.length;
|
|
|
if (sameAudit) {
|