|
@@ -238,10 +238,10 @@ module.exports = app => {
|
|
|
this.resultDealBills = [];
|
|
|
}
|
|
|
|
|
|
- async _getValidStages(tenderId) {
|
|
|
+ async _getValidStages(tenderId, sort = 'desc') {
|
|
|
const stages = await this.db.select(this.ctx.service.stage.tableName, {
|
|
|
where: { tid: tenderId },
|
|
|
- orders: [['order', 'desc']],
|
|
|
+ orders: [['order', sort]],
|
|
|
});
|
|
|
if (stages.length !== 0) {
|
|
|
const lastStage = stages[0];
|
|
@@ -281,34 +281,70 @@ module.exports = app => {
|
|
|
const beginTime = moment(times[0], 'YYYY-MM');
|
|
|
const endTime = moment(times[1], 'YYYY-MM');
|
|
|
|
|
|
- const stages = await this._getValidStages(tender.id), validStages = [];
|
|
|
+ const stages = await this._getValidStages(tender.id, 'asc'), validStages = [];
|
|
|
+ let preStage, endStage;
|
|
|
for (const stage of stages) {
|
|
|
const sTime = moment(stage.s_time, 'YYYY-MM');
|
|
|
if (sTime.isBetween(beginTime, endTime, null, '[]')) {
|
|
|
validStages.push(stage);
|
|
|
+ } else if (sTime.isBefore(beginTime)) {
|
|
|
+ if (!preStage || moment(preStage.s_time, 'YYYY-MM').isBefore(sTime)) preStage = stage;
|
|
|
+ } else if (sTime.isAfter(endTime)) {
|
|
|
+ if (!endStage || moment(endStage.s_time, 'YYYY-MM').isAfter(sTime)) endStage = stage;
|
|
|
}
|
|
|
}
|
|
|
- return validStages;
|
|
|
+ return [validStages, preStage, endStage];
|
|
|
}
|
|
|
-
|
|
|
async _getOrderZoneStages (tender, zone) {
|
|
|
let [iBegin, iEnd] = zone.split(':');
|
|
|
iBegin = this.ctx.helper._.toInteger(iBegin) || 0;
|
|
|
iEnd = this.ctx.helper._.toInteger(iEnd) || 0;
|
|
|
- const stages = await this._getValidStages(tender.id), validStages = [];
|
|
|
+ const stages = await this._getValidStages(tender.id, 'asc'), validStages = [];
|
|
|
+ let preStage, endStage;
|
|
|
for (const stage of stages) {
|
|
|
- if (stage.order < iBegin || stage.order > iEnd) continue;
|
|
|
+ if (stage.order < iBegin) {
|
|
|
+ if (!preStage || preStage.order < stage.order) preStage = stage;
|
|
|
+ } else if (stage.order > iEnd) {
|
|
|
+ if (!endStage || endStage.order > stage.order) endStage = stage;
|
|
|
+ } else {
|
|
|
+ validStages.push(stage);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return [validStages, preStage, endStage];
|
|
|
+ }
|
|
|
+ async _getCheckedZoneStages(tender, zone) {
|
|
|
+ const times = zone.split(' - ');
|
|
|
+ if (times.length !== 2) throw '选择的汇总周期无效';
|
|
|
+ const beginTime = moment(times[0], 'YYYY-MM-DD');
|
|
|
+ const endTime = moment(times[1], 'YYYY-MM-DD');
|
|
|
+
|
|
|
+ const stages = await this._getValidStages(tender.id, 'asc'), validStages = [];
|
|
|
+ let preStage, endStage;
|
|
|
+ for (const stage of stages) {
|
|
|
+ if (stage.status !== auditConst.stage.status.checked) continue;
|
|
|
+
|
|
|
+ const finalAudit = await this.ctx.service.stageAudit.getLastestAuditor(stage.id, stage.times, stage.status);
|
|
|
+ if (!finalAudit) continue;
|
|
|
|
|
|
- validStages.push(stage);
|
|
|
+ const sTime = moment(moment(finalAudit.end_time).format('YYYY-MM-DD'), 'YYYY-MM-DD');
|
|
|
+ stage.checked_day = sTime;
|
|
|
+ stage.checked_time = moment(finalAudit.end_time);
|
|
|
+ if (sTime.isBetween(beginTime, endTime, null, '[]')) {
|
|
|
+ validStages.push(stage);
|
|
|
+ } else if (sTime.isBefore(beginTime)) {
|
|
|
+ if (!preStage || preStage.checked_time.isBefore(stage.checked_time)) preStage = stage;
|
|
|
+ } else if (sTime.isAfter(endTime)) {
|
|
|
+ if (!endStage || endStage.checked_time.isAfter(stage.checked_time)) endStage = stage;
|
|
|
+ }
|
|
|
}
|
|
|
- return validStages;
|
|
|
+ return [validStages, preStage, endStage];
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 台账数据
|
|
|
*/
|
|
|
|
|
|
- async _gatherStagesData(completeData, tender, stages) {
|
|
|
+ async _gatherStagesData(completeData, tender, stages, preStage) {
|
|
|
const resultPos = this.resultPos;
|
|
|
const helper = this.ctx.helper;
|
|
|
completeData.id = tender.id;
|
|
@@ -344,12 +380,20 @@ module.exports = app => {
|
|
|
rootId: -1,
|
|
|
keys: ['id', 'tender_id', 'ledger_id'],
|
|
|
stageId: 'id',
|
|
|
- calcFields: ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp'],
|
|
|
+ calcFields: ['deal_tp', 'total_price', 'contract_tp', 'qc_tp', 'gather_tp', 'contract_pc_tp', 'qc_pc_tp', 'pc_tp', 'pre_contract_tp', 'pre_qc_tp', 'pre_gather_tp'],
|
|
|
calc: function (node) {
|
|
|
if (node.children && node.children.length === 0) {
|
|
|
+ node.pre_gather_qty = helper.add(node.pre_contract_qty, node.pre_qc_qty);
|
|
|
node.gather_qty = helper.add(node.contract_qty, node.qc_qty);
|
|
|
+ node.end_contract_qty = helper.add(node.pre_contract_qty, node.contract_qty);
|
|
|
+ node.end_qc_qty = helper.add(node.pre_qc_qty, node.qc_qty);
|
|
|
+ node.end_gather_qty = helper.add(node.pre_gather_qty, node.gather_qty);
|
|
|
}
|
|
|
+ node.pre_gather_tp = helper.add(node.pre_contract_tp, node.pre_qc_tp);
|
|
|
node.gather_tp = helper.add(node.contract_tp, node.qc_tp);
|
|
|
+ node.end_contract_tp = helper.add(node.pre_contract_tp, node.contract_tp);
|
|
|
+ node.end_qc_tp = helper.add(node.pre_qc_tp, node.qc_tp);
|
|
|
+ node.end_gather_tp = helper.add(node.pre_gather_tp, node.gather_tp);
|
|
|
}
|
|
|
});
|
|
|
const billsData = await this.ctx.service.ledger.getData(tender.id);
|
|
@@ -361,7 +405,11 @@ module.exports = app => {
|
|
|
const pos = new Ledger.pos({
|
|
|
id: 'id', ledgerId: 'lid',
|
|
|
calc: function (node) {
|
|
|
- node.gather_qty = helper.add(node.contract_qty, node.qc_qty);
|
|
|
+ node.pre_gather_qty = helper.add(node.pre_contract_qty, node.pre_qc_qty);
|
|
|
+ node.gather_tp = helper.sum([node.contract_tp, node.qc_tp, node.pc_tp]);
|
|
|
+ node.end_contract_tp = helper.sum([node.pre_contract_tp, node.contract_tp, node.contract_pc_tp]);
|
|
|
+ node.end_qc_tp = helper.sum([node.pre_qc_tp, node.qc_tp, node.qc_pc_tp]);
|
|
|
+ node.end_gather_qty = helper.add(node.pre_gather_qty, node.gather_qty);
|
|
|
},
|
|
|
});
|
|
|
const posData = await this.ctx.service.pos.getAllDataByCondition({ where: { tid: tender.id} });
|
|
@@ -374,6 +422,18 @@ module.exports = app => {
|
|
|
posIndexData[indexPre + p.id] = p;
|
|
|
}
|
|
|
|
|
|
+ if (preStage) {
|
|
|
+ await this.ctx.service.stage.doCheckStage(preStage);
|
|
|
+ const endStage = await this.ctx.service.stageBillsFinal.getFinalData(tender, preStage.order);
|
|
|
+ sumAssignRelaData(billsIndexData, [
|
|
|
+ { data: endStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: 'pre_', relaId: 'lid' },
|
|
|
+ ]);
|
|
|
+ const endStagePos = await this.ctx.service.stagePosFinal.getFinalData(tender, preStage.order);
|
|
|
+ sumAssignRelaData(posIndexData, [
|
|
|
+ {data: endStagePos, fields: ['contract_qty', 'qc_qty'], prefix: 'pre_', relaId: 'lid'},
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
for (const stage of stages) {
|
|
|
await this.ctx.service.stage.doCheckStage(stage);
|
|
|
const curStage = stage.readOnly
|
|
@@ -397,18 +457,26 @@ module.exports = app => {
|
|
|
pos.loadDatas(posData);
|
|
|
pos.calculateAll();
|
|
|
this.resultTree.loadGatherTree(billsTree, function (gatherNode, sourceNode) {
|
|
|
- gatherUtils.gatherZone(tender, gatherNode, sourceNode, completeData.prefix, helper);
|
|
|
+ gatherUtils.gatherStage(tender, gatherNode, sourceNode, completeData.prefix, helper);
|
|
|
}, function (gatherNode, sourceNode) {
|
|
|
const posRange = pos.getLedgerPos(sourceNode.id);
|
|
|
if (!posRange || posRange.length === 0) return;
|
|
|
resultPos.loadGatherPos(gatherNode.id, posRange, (gatherPos, sourcePos) => {
|
|
|
- gatherUtils.gatherZonePos(tender, gatherPos, sourcePos, completeData.prefix, helper);
|
|
|
+ gatherUtils.gatherStagePos(tender, gatherPos, sourcePos, completeData.prefix, helper);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
async _gatherZoneData(tender, completeData, zone) {
|
|
|
- const stages = await this._getTimeZoneStages(tender, zone);
|
|
|
- await this._gatherStagesData(completeData, tender, stages);
|
|
|
+ const [stages, preStage, endStage] = await this._getTimeZoneStages(tender, zone);
|
|
|
+ await this._gatherStagesData(completeData, tender, stages, preStage);
|
|
|
+ }
|
|
|
+ async _gatherIndexZoneData(tender, completeData, stageZone) {
|
|
|
+ const [stages, preStage, endStage] = await this._getOrderZoneStages(tender, stageZone);
|
|
|
+ await this._gatherStagesData(completeData, tender, stages, preStage);
|
|
|
+ }
|
|
|
+ async _gatherCheckedZoneData(tender, completeData, zone) {
|
|
|
+ const [stages, preStage, endStage] = await this._getCheckedZoneStages(tender, zone);
|
|
|
+ await this._gatherStagesData(completeData, tender, stages, preStage);
|
|
|
}
|
|
|
|
|
|
async _gatherStageData(completeData, tender, stage, hasPre) {
|
|
@@ -505,10 +573,6 @@ module.exports = app => {
|
|
|
const stage = this.ctx.helper._.find(stages, {order: index});
|
|
|
await this._gatherStageData(completeData, tender, stage, hasPre);
|
|
|
}
|
|
|
- async _gatherIndexZoneData(tender, completeData, stageZone) {
|
|
|
- const stages = await this._getOrderZoneStages(tender, stageZone);
|
|
|
- await this._gatherStagesData(completeData, tender, stages);
|
|
|
- }
|
|
|
async _gatherFinalData(tender, completeData, hasPre) {
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
|
await this._gatherStageData(completeData, tender, stages[0], hasPre);
|
|
@@ -618,6 +682,9 @@ module.exports = app => {
|
|
|
case 'stage-zone':
|
|
|
await this._gatherIndexZoneData(tender, completeData, gsCustom.stage_zone);
|
|
|
break;
|
|
|
+ case 'checked-zone':
|
|
|
+ await this._gatherCheckedZoneData(tender, completeData, gsCustom.checked_zone);
|
|
|
+ break;
|
|
|
}
|
|
|
commonIndex++;
|
|
|
} else {
|
|
@@ -694,19 +761,49 @@ module.exports = app => {
|
|
|
info.end_sf_tp = helper.add(stage.sf_tp, stage.pre_sf_tp);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- async _getStagesTenderInfo(stages, info) {
|
|
|
+ async _getStagesTenderInfo(stages, info, preStage) {
|
|
|
const helper = this.ctx.helper;
|
|
|
+ if (preStage) {
|
|
|
+ info.pre_contract_tp = helper.add(preStage.contract_tp, preStage.pre_contract_tp);
|
|
|
+ info.pre_qc_tp = helper.add(preStage.qc_tp, preStage.pre_qc_tp);
|
|
|
+ info.pre_gather_tp = helper.add(info.pre_contract_tp, info.pre_qc_tp);
|
|
|
+ info.pre_yf_tp = helper.add(preStage.yf_tp, preStage.pre_yf_tp);
|
|
|
+ }
|
|
|
+
|
|
|
for (const stage of stages) {
|
|
|
await this.ctx.service.stage.doCheckStage(stage);
|
|
|
await this.ctx.service.stage.checkStageGatherData(stage, this.ctx.session.sessionUser.is_admin);
|
|
|
|
|
|
+
|
|
|
info.contract_tp = helper.add(info.contract_tp, stage.contract_tp);
|
|
|
info.qc_tp = helper.add(info.qc_tp, stage.qc_tp);
|
|
|
|
|
|
info.yf_tp = helper.add(info.yf_tp, stage.yf_tp);
|
|
|
}
|
|
|
info.gather_tp = helper.add(info.contract_tp, info.qc_tp);
|
|
|
+ info.end_contract_tp = helper.add(info.pre_contract_tp, info.contract_tp);
|
|
|
+ info.end_qc_tp = helper.add(info.pre_qc_tp, info.qc_tp);
|
|
|
+ info.end_gather_tp = helper.add(info.pre_gather_tp, info.gather_tp);
|
|
|
+ info.end_yf_tp = helper.add(info.pre_yf_tp, info.yf_tp);
|
|
|
+ }
|
|
|
+
|
|
|
+ async _gatherZoneTenderInfo(tender, index, zone) {
|
|
|
+ const info = await this._getBaseTenderInfo(tender);
|
|
|
+ const [stages, preStage, endStage] = await this._getTimeZoneStages(tender, zone);
|
|
|
+ await this._getStagesTenderInfo(stages, info, preStage);
|
|
|
+ this.resultTenderInfo.push(info);
|
|
|
+ }
|
|
|
+ async _gatherOrderZoneTenderInfo(tender, index, stageZone) {
|
|
|
+ const info = await this._getBaseTenderInfo(tender);
|
|
|
+ const [stages, preStage, endStage] = await this._getOrderZoneStages(tender, stageZone);
|
|
|
+ await this._getStagesTenderInfo(stages, info, preStage);
|
|
|
+ this.resultTenderInfo.push(info);
|
|
|
+ }
|
|
|
+ async _gatherCheckedZoneTenderInfo(tender, index, zone) {
|
|
|
+ const info = await this._getBaseTenderInfo(tender);
|
|
|
+ const [stages, preStage, endStage] = await this._getCheckedZoneStages(tender, zone);
|
|
|
+ await this._getStagesTenderInfo(stages, info, preStage);
|
|
|
+ this.resultTenderInfo.push(info);
|
|
|
}
|
|
|
|
|
|
async _gatherMonthTenderInfo(tender, index, month, hasPre) {
|
|
@@ -716,7 +813,6 @@ module.exports = app => {
|
|
|
await this._getStageTenderInfo(stage, info);
|
|
|
this.resultTenderInfo.push(info);
|
|
|
}
|
|
|
-
|
|
|
async _gatherOrderTenderInfo(tender, index, order, hasPre) {
|
|
|
const info = await this._getBaseTenderInfo(tender);
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
@@ -724,28 +820,12 @@ module.exports = app => {
|
|
|
await this._getStageTenderInfo(stage, info);
|
|
|
this.resultTenderInfo.push(info);
|
|
|
}
|
|
|
-
|
|
|
- async _gatherZoneTenderInfo(tender, index, zone) {
|
|
|
- const info = await this._getBaseTenderInfo(tender);
|
|
|
- const stages = await this._getTimeZoneStages(tender, zone);
|
|
|
- await this._getStagesTenderInfo(stages, info);
|
|
|
- this.resultTenderInfo.push(info);
|
|
|
- }
|
|
|
-
|
|
|
- async _gatherOrderZoneTenderInfo(tender, index, stageZone) {
|
|
|
- const info = await this._getBaseTenderInfo(tender);
|
|
|
- const stages = await this._getOrderZoneStages(tender, stageZone);
|
|
|
- await this._getStagesTenderInfo(stages, info);
|
|
|
- this.resultTenderInfo.push(info);
|
|
|
- }
|
|
|
-
|
|
|
async _gatherFinalTenderInfo(tender, index, hasPre) {
|
|
|
const info = await this._getBaseTenderInfo(tender);
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
|
await this._getStageTenderInfo(stages[0], info);
|
|
|
this.resultTenderInfo.push(info);
|
|
|
}
|
|
|
-
|
|
|
async _gatherCheckedFinalTenderInfo(tender, index, hasPre) {
|
|
|
const info = await this._getBaseTenderInfo(tender);
|
|
|
const stages = await this._getCheckedStages(tender.id);
|
|
@@ -757,7 +837,6 @@ module.exports = app => {
|
|
|
const info = await this._getBaseTenderInfo(tender);
|
|
|
this.resultTenderInfo.push(info);
|
|
|
}
|
|
|
-
|
|
|
async _gatherSpecialTenderInfo(tender, sKey) {
|
|
|
const info = await this._getBaseTenderInfo(tender);
|
|
|
info.spec = sKey;
|
|
@@ -797,6 +876,9 @@ module.exports = app => {
|
|
|
case 'stage-zone':
|
|
|
await this._gatherOrderZoneTenderInfo(tender, commonIndex, gsCustom.stage_zone);
|
|
|
break;
|
|
|
+ case 'checked-zone':
|
|
|
+ await this._gatherCheckedZoneTenderInfo(tender, commonIndex, gsCustom.checked_zone);
|
|
|
+ break;
|
|
|
}
|
|
|
commonIndex++;
|
|
|
} else {
|
|
@@ -866,12 +948,27 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- async _gatherStagesPay(completeData, tender, stages) {
|
|
|
+ async _gatherStagesPay(completeData, tender, stages, preStage) {
|
|
|
const helper = this.ctx.helper;
|
|
|
completeData.id = tender.id;
|
|
|
completeData.name = tender.name;
|
|
|
|
|
|
+ if (preStage) await this.ctx.service.stage.doCheckStage(preStage);
|
|
|
+ const preDealPay = preStage ? await this.ctx.service.stagePay.getStagePays(preStage) : [];
|
|
|
+ for (const dp of preDealPay) {
|
|
|
+ dp.end_tp = helper.add(dp.pre_tp, dp.tp);
|
|
|
+ this._gatherPayRecord(dp, function (gatherData, sourceData) {
|
|
|
+ gatherData[completeData.prefix + 'id'] = tender.id;
|
|
|
+ gatherData[completeData.prefix + 'name'] = tender.name;
|
|
|
+
|
|
|
+ gatherData[completeData.prefix + 'pre_tp'] = sourceData.end_tp;
|
|
|
+ gatherData.s_pre_tp = helper.add(gatherData.s_pre_tp, sourceData.end_tp);
|
|
|
+
|
|
|
+ gatherData[completeData.prefix + 'end_tp'] = sourceData.end_tp;
|
|
|
+ gatherData.s_end_tp = helper.add(gatherData.s_end_tp, sourceData.end_tp);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
for (const stage of stages) {
|
|
|
await this.ctx.service.stage.doCheckStage(stage);
|
|
|
|
|
@@ -885,43 +982,47 @@ module.exports = app => {
|
|
|
|
|
|
gatherData[completeData.prefix + 'tp'] = helper.add(gatherData[completeData.prefix + 'tp'], sourceData.tp);
|
|
|
gatherData['s_' + 'tp'] = helper.add(gatherData['s_' + 'tp'], sourceData.tp);
|
|
|
+
|
|
|
+ gatherData[completeData.prefix + 'end_tp'] = helper.add(gatherData[completeData.prefix + 'end_tp'], sourceData.tp);
|
|
|
+ gatherData['s_' + 'end_tp'] = helper.add(gatherData['s_' + 'end_tp'], sourceData.tp);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ async _gatherZoneStagePay(sTender, completeData, zone) {
|
|
|
+ const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
+ const [stages, preStage, endStage] = await this._getTimeZoneStages(tender, zone);
|
|
|
+ await this._gatherStagesPay(completeData, tender, stages, preStage);
|
|
|
+ }
|
|
|
+ async _gatherOrderZoneStagePay(sTender, completeData, stageZone) {
|
|
|
+ const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
+ const [stages, preStage, endStage] = await this._getOrderZoneStages(tender, stageZone);
|
|
|
+ await this._gatherStagesPay(completeData, tender, stages, preStage);
|
|
|
+ }
|
|
|
+ async _gatherCheckedZoneStagePay(sTender, completeData, zone) {
|
|
|
+ const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
+ const [stages, preStage, endStage] = await this._getCheckedZoneStages(tender, zone);
|
|
|
+ await this._gatherStagesPay(completeData, tender, stages, preStage);
|
|
|
+ }
|
|
|
+
|
|
|
async _gatherMonthStagePay(sTender, completeData, month, hasPre) {
|
|
|
const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
|
const stage = this.ctx.helper._.find(stages, {s_time: month});
|
|
|
await this._gatherStagePay(completeData, tender, stage, hasPre);
|
|
|
}
|
|
|
-
|
|
|
async _gatherOrderStagePay(sTender, completeData, order, hasPre) {
|
|
|
const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
|
const stage = this.ctx.helper._.find(stages, {order: order});
|
|
|
await this._gatherStagePay(completeData, tender, stage, hasPre);
|
|
|
}
|
|
|
-
|
|
|
- async _gatherZoneStagePay(sTender, completeData, zone) {
|
|
|
- const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
- const stages = await this._getTimeZoneStages(tender, zone);
|
|
|
- await this._gatherStagesPay(completeData, tender, stages);
|
|
|
- }
|
|
|
-
|
|
|
- async _gatherOrderZoneStagePay(sTender, completeData, stageZone) {
|
|
|
- const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
- const stages = await this._getOrderZoneStages(tender, stageZone)
|
|
|
- await this._gatherStagesPay(completeData, tender, stages);
|
|
|
- }
|
|
|
-
|
|
|
async _gatherFinalStagePay(sTender, completeData, hasPre) {
|
|
|
const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
const stages = await this._getValidStages(tender.id);
|
|
|
await this._gatherStagePay(completeData, tender, stages[0], hasPre);
|
|
|
}
|
|
|
-
|
|
|
async _gatherCheckedFinalStagePay(sTender, completeData, hasPre) {
|
|
|
const tender = await this.ctx.service.tender.getCheckTender(sTender.tid);
|
|
|
const stages = await this._getCheckedStages(tender.id);
|
|
@@ -962,6 +1063,9 @@ module.exports = app => {
|
|
|
case 'stage-zone':
|
|
|
await this._gatherOrderZoneStagePay(tender, completeData, gsCustom.stage_zone);
|
|
|
break;
|
|
|
+ case 'checked-zone':
|
|
|
+ await this._gatherCheckedZoneStagePay(tender, completeData, gsCustom.checked_zone);
|
|
|
+ break;
|
|
|
}
|
|
|
commonIndex++;
|
|
|
}
|