|
@@ -779,10 +779,10 @@ module.exports = app => {
|
|
|
}), ['sorder'], ['desc']);
|
|
|
const useChangeUsedData = [];
|
|
|
if (changeUsedData.length > 0) { // 防止未创建期时调用
|
|
|
- const stage = await this.ctx.service.stage.getLastestStage(ctx.tender.id, true);
|
|
|
+ // 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))) {
|
|
|
+ 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);
|