|
@@ -663,9 +663,10 @@ module.exports = app => {
|
|
* 多期清单数据整合 (材料调差调用)
|
|
* 多期清单数据整合 (材料调差调用)
|
|
* @param {Number} tid - 标段id
|
|
* @param {Number} tid - 标段id
|
|
* @param {String} stage_id_list - 期id列表
|
|
* @param {String} stage_id_list - 期id列表
|
|
|
|
+ * @param {String} comefrom - 来源(部分不调用计量不获取)
|
|
* @returns {Promise<void>}
|
|
* @returns {Promise<void>}
|
|
*/
|
|
*/
|
|
- async getStagesData(tid, stage_id_list) {
|
|
|
|
|
|
+ async getStagesData(tid, stage_id_list, comefrom = '') {
|
|
const sids = stage_id_list.split(',');
|
|
const sids = stage_id_list.split(',');
|
|
const result = [];
|
|
const result = [];
|
|
for (const sid of sids) {
|
|
for (const sid of sids) {
|
|
@@ -680,7 +681,7 @@ module.exports = app => {
|
|
if (rsp) {
|
|
if (rsp) {
|
|
rsp.contract_qty = this.ctx.helper.add(rsp.contract_qty, sp.contract_qty);
|
|
rsp.contract_qty = this.ctx.helper.add(rsp.contract_qty, sp.contract_qty);
|
|
rsp.qc_qty = this.ctx.helper.add(rsp.qc_qty, sp.qc_qty);
|
|
rsp.qc_qty = this.ctx.helper.add(rsp.qc_qty, sp.qc_qty);
|
|
- } else {
|
|
|
|
|
|
+ } else if (!comefrom || (comefrom === 'list' && (sp.contract_qty || sp.qc_qty))) {
|
|
result.push({
|
|
result.push({
|
|
id: sp.id, tid: sp.tid, lid: sp.lid, pid: sp.pid,
|
|
id: sp.id, tid: sp.tid, lid: sp.lid, pid: sp.pid,
|
|
contract_qty: sp.contract_qty, qc_qty: sp.qc_qty,
|
|
contract_qty: sp.contract_qty, qc_qty: sp.qc_qty,
|