|
@@ -124,7 +124,7 @@ module.exports = app => {
|
|
|
if (data.sgfh_qty !== undefined || data.sjcl_qty !== undefined || data.qtcl_qty !== undefined) {
|
|
|
const op = await this.getDataById(data.id);
|
|
|
const bills = await this.ctx.service.reviseBills.getDataById(op.lid);
|
|
|
- const billsPos = await this.getAllDataByCondition({where: {lid: op.lid} });
|
|
|
+ const billsPos = await this.getAllDataByCondition({where: {tid: tid, lid: op.lid} });
|
|
|
|
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, bills.unit);
|
|
|
if (data.sgfh_qty !== undefined) {
|
|
@@ -182,7 +182,7 @@ module.exports = app => {
|
|
|
if (data.length === 0) return;
|
|
|
const op = await this.getDataById(data[0].id);
|
|
|
const bills = await this.ctx.service.reviseBills.getDataById(op.lid);
|
|
|
- const billsPos = await this.getAllDataByCondition({where: {lid: op.lid} });
|
|
|
+ const billsPos = await this.getAllDataByCondition({where: {tid: tid, lid: op.lid} });
|
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, bills.unit);
|
|
|
for (const d of data) {
|
|
|
if (d.sgfh_qty !== undefined || d.sjcl_qty !== undefined || d.qtcl_qty !== undefined) {
|
|
@@ -244,7 +244,7 @@ module.exports = app => {
|
|
|
|
|
|
const pos = await this.getPosData({tid: tid, id: data});
|
|
|
const bills = await this.ctx.service.reviseBills.getDataById(pos[0].lid);
|
|
|
- const billsPos = await this.getAllDataByCondition({ where: {lid: bills.id} });
|
|
|
+ const billsPos = await this.getAllDataByCondition({ where: {tid: tid, lid: bills.id} });
|
|
|
const updateBills = {id: bills.id, sgfh_qty: null, sjcl_qty: null, qtcl_qty: null, quantity: null};
|
|
|
for (const bp of billsPos) {
|
|
|
if (data.indexOf(bp.id) >= 0) continue;
|