|
@@ -781,15 +781,15 @@ module.exports = app => {
|
|
|
if (changeUsedData.length > 0) { // 防止未创建期时调用
|
|
|
// const stage = await this.ctx.service.stage.getLastestStage(ctx.tender.id, true);
|
|
|
for (const cu of changeUsedData) {
|
|
|
- if (cu.sorder !== 0) {
|
|
|
- // (cu.sorder === 0 && !(stage.status === audit.stage.status.uncheck || stage.status === audit.stage.status.checkNo))) {
|
|
|
- const index = ctx.helper._.findIndex(useChangeUsedData, { cbid: cu.cbid });
|
|
|
- if (index !== -1) {
|
|
|
- useChangeUsedData[index].qty = ctx.helper.add(useChangeUsedData[index].qty, cu.qty);
|
|
|
- } else {
|
|
|
- useChangeUsedData.push(cu);
|
|
|
- }
|
|
|
+ // if (cu.sorder !== 0 ||
|
|
|
+ // (cu.sorder === 0 && !(stage.status === audit.stage.status.uncheck || stage.status === audit.stage.status.checkNo))) {
|
|
|
+ const index = ctx.helper._.findIndex(useChangeUsedData, { cbid: cu.cbid });
|
|
|
+ if (index !== -1) {
|
|
|
+ useChangeUsedData[index].qty = ctx.helper.add(useChangeUsedData[index].qty, cu.qty);
|
|
|
+ } else {
|
|
|
+ useChangeUsedData.push(cu);
|
|
|
}
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
renderData.changeUsedData = useChangeUsedData;
|