|
@@ -74,10 +74,12 @@ class srCache {
|
|
|
|
|
|
async _loadPosData() {
|
|
async _loadPosData() {
|
|
const pos = await this.ctx.service.pos.getPosData({tid: this.stage.tid});
|
|
const pos = await this.ctx.service.pos.getPosData({tid: this.stage.tid});
|
|
- const curPosData = await this.ctx.service.stagePos.getLastestStageData(this.stage.tid, this.stage.id);
|
|
|
|
|
|
+ console.log(this.stage);
|
|
|
|
+ const curPosData = await this.ctx.service.stagePos.getLastestStageData2(this.stage.tid, this.stage.id);
|
|
const preStagePos = this.preRelaStage
|
|
const preStagePos = this.preRelaStage
|
|
? this.ctx.service.stageRelaPosFinal.getAllDataByCondition({ where: { sid: this.preRelaStage.sid, rela_tid: this.preRelaStage.rela_tid } })
|
|
? this.ctx.service.stageRelaPosFinal.getAllDataByCondition({ where: { sid: this.preRelaStage.sid, rela_tid: this.preRelaStage.rela_tid } })
|
|
: [];
|
|
: [];
|
|
|
|
+ console.log(curPosData);
|
|
this.ctx.helper.assignRelaData(pos, [
|
|
this.ctx.helper.assignRelaData(pos, [
|
|
{ data: curPosData, fields: ['contract_qty', 'qc_qty', 'postil', 'pid'], prefix: '', relaId: 'pid' },
|
|
{ data: curPosData, fields: ['contract_qty', 'qc_qty', 'postil', 'pid'], prefix: '', relaId: 'pid' },
|
|
{ data: preStagePos, fields: ['contract_qty', 'qc_qty', 'postil', 'pid'], prefix: 'pre_', relaId: 'pid' },
|
|
{ data: preStagePos, fields: ['contract_qty', 'qc_qty', 'postil', 'pid'], prefix: 'pre_', relaId: 'pid' },
|
|
@@ -184,11 +186,11 @@ class srCache {
|
|
}
|
|
}
|
|
|
|
|
|
async _getCacheStageIm() {
|
|
async _getCacheStageIm() {
|
|
|
|
+ this.stageIm = [];
|
|
|
|
+ this.stageImBills = [];
|
|
const stageIm = new StageIm(this.ctx);
|
|
const stageIm = new StageIm(this.ctx);
|
|
this.details = await this.ctx.service.stageDetail.getLastestStageData(this.stage.tid, this.stage.id);
|
|
this.details = await this.ctx.service.stageDetail.getLastestStageData(this.stage.tid, this.stage.id);
|
|
stageIm.buildRelaStageIm(this.stage, this.billsTree, this.pos, this.details, this.changes);
|
|
stageIm.buildRelaStageIm(this.stage, this.billsTree, this.pos, this.details, this.changes);
|
|
- this.stageIm = [];
|
|
|
|
- this.stageImBills = [];
|
|
|
|
for (const i of stageIm.ImData) {
|
|
for (const i of stageIm.ImData) {
|
|
this.stageIm.push({
|
|
this.stageIm.push({
|
|
tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
|
|
tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
|