|
@@ -23,7 +23,7 @@ module.exports = app => {
|
|
|
super(ctx);
|
|
|
this.depart = 20;
|
|
|
this.tableName = 'stage_pos';
|
|
|
- this.qtyFields = ['contract_qty', 'qc_qty']
|
|
|
+ this.qtyFields = ['contract_qty', 'qc_qty', 'qc_minus_qty']
|
|
|
}
|
|
|
|
|
|
_getPosFilterSql(where, asTable = '') {
|
|
@@ -129,7 +129,7 @@ module.exports = app => {
|
|
|
const self = this;
|
|
|
const stagePos = await this.getLastestStageData2(tid, sid, where);
|
|
|
const pids = this._.map(stagePos, function (sp) {
|
|
|
- if (!self.ctx.helper.checkZero(sp.contract_qty) || !self.ctx.helper.checkZero(sp.qc_qty)) {
|
|
|
+ if (!self.ctx.helper.checkZero(sp.contract_qty) || !self.ctx.helper.checkZero(sp.qc_qty) || !self.ctx.helper.checkZero(sp.qc_minus_qty)) {
|
|
|
return sp.pid;
|
|
|
} else {
|
|
|
return -1;
|
|
@@ -310,6 +310,7 @@ module.exports = app => {
|
|
|
if (d.postil || osp) {
|
|
|
sp.postil = d.postil === undefined && osp ? osp.postil : d.postil;
|
|
|
}
|
|
|
+ sp.qc_minus_qty = osp ? osp.qc_minus_qty : 0;
|
|
|
insertPosStage.push(sp);
|
|
|
}
|
|
|
}
|