浏览代码

永久材料,类型问题

MaiXinRong 11 月之前
父节点
当前提交
61499169a4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/service/stage_yjcl.js

+ 2 - 2
app/service/stage_yjcl.js

@@ -146,7 +146,7 @@ module.exports = app => {
                 }
                 if (d.qty !== undefined) {
                     nd.qty = d.qty ? this.ctx.helper.round(d.qty, decimal.qty) : 0;
-                } else {
+                } else if (nd.unit_price) {
                     nd.qty = od.qty;
                 }
                 if (nd.qty !== undefined) nd.tp = this.ctx.helper.mul(unit_price, nd.qty, tpDecimal);
@@ -215,7 +215,7 @@ module.exports = app => {
                 throw '标段数据有误';
             }
             const preDatas = await this.getAllDataByCondition({
-                columns: ['uuid', 'add_sid', 'add_sorder', 'add_uid', 'tid', 'name', 'm_order', 'unit', 'tax', 'arrive_time', 'source', 'bills_code', 'location', 'prepare_pos', 'memo',
+                columns: ['uuid', 'add_sid', 'add_sorder', 'add_uid', 'tid', 'name', 'spec', 'm_order', 'unit', 'tax', 'arrive_time', 'source', 'bills_code', 'location', 'prepare_pos', 'memo',
                     'arrive_qty', 'arrive_tp', 'unit_price', 'ex_tax_up', 'qty', 'tp', 'pre_qty', 'pre_tp', 'pre_used'],
                 where: { sid: preStage.id },
             });