|
@@ -63,6 +63,7 @@ class StageIm {
|
|
//
|
|
//
|
|
this.imFields = ['uuid', 'doc_code', 'peg', 'bw', 'xm', 'drawing_code', 'calc_memo', 'calc_memo_org', 'calc_img_remark', 'calc_img', 'position', 'jldy'];
|
|
this.imFields = ['uuid', 'doc_code', 'peg', 'bw', 'xm', 'drawing_code', 'calc_memo', 'calc_memo_org', 'calc_img_remark', 'calc_img', 'position', 'jldy'];
|
|
this.splitChar = '-';
|
|
this.splitChar = '-';
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// 加载数据
|
|
// 加载数据
|
|
@@ -328,7 +329,7 @@ class StageIm {
|
|
(!im.code || im.code === d.code) &&
|
|
(!im.code || im.code === d.code) &&
|
|
(!im.name || im.name === d.name) &&
|
|
(!im.name || im.name === d.name) &&
|
|
(!im.unit || im.unit === d.unit) &&
|
|
(!im.unit || im.unit === d.unit) &&
|
|
- self.ctx.helper.checkZero(self.ctx.helper.sub(im.unit_price, d.unit_price)) &&
|
|
|
|
|
|
+ self.ctx.helper.checkZero(self.ctx.helper.sub(im[up_field], d[up_field])) &&
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
});
|
|
});
|
|
@@ -339,7 +340,7 @@ class StageIm {
|
|
(!im.code || im.code === d.code) &&
|
|
(!im.code || im.code === d.code) &&
|
|
(!im.name || im.name === d.name) &&
|
|
(!im.name || im.name === d.name) &&
|
|
(!im.unit || im.unit === d.unit) &&
|
|
(!im.unit || im.unit === d.unit) &&
|
|
- self.ctx.helper.checkZero(self.ctx.helper.sub(im.unit_price, d.unit_price)) &&
|
|
|
|
|
|
+ self.ctx.helper.checkZero(self.ctx.helper.sub(im[up_field], d[up_field])) &&
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pid || im.pid === d.pid) &&
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
(!im.pos_name || im.pos_name === d.pos_name);
|
|
});
|
|
});
|
|
@@ -838,13 +839,13 @@ class StageIm {
|
|
let im = nodeImData.find(function(d) {
|
|
let im = nodeImData.find(function(d) {
|
|
return d.lid === node.id &&
|
|
return d.lid === node.id &&
|
|
d.code === p.b_code && p.name === d.name && p.unit === d.unit &&
|
|
d.code === p.b_code && p.name === d.name && p.unit === d.unit &&
|
|
- self.ctx.helper.checkZero(self.ctx.helper.sub(p.unit_price, d.unit_price));
|
|
|
|
|
|
+ self.ctx.helper.checkZero(self.ctx.helper.sub(p[up_field], d[up_field]));
|
|
});
|
|
});
|
|
if (!im) {
|
|
if (!im) {
|
|
const peg = this._getPegNode(node);
|
|
const peg = this._getPegNode(node);
|
|
im = {
|
|
im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
- lid: node.id, pid: '', code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price,
|
|
|
|
|
|
+ lid: node.id, pid: '', code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, org_unit_price: p.org_unit_price,
|
|
quantity: 0, total_price: 0,
|
|
quantity: 0, total_price: 0,
|
|
jl: 0, contract_jl: 0, qc_jl: 0,
|
|
jl: 0, contract_jl: 0, qc_jl: 0,
|
|
pre_jl: 0, pre_contract_jl: 0, pre_qc_jl: 0,
|
|
pre_jl: 0, pre_contract_jl: 0, pre_qc_jl: 0,
|
|
@@ -919,7 +920,7 @@ class StageIm {
|
|
if (this.ctx.helper.checkZero(pp.contract_qty) && this.ctx.helper.checkZero(pp.qc_qty)) { continue; }
|
|
if (this.ctx.helper.checkZero(pp.contract_qty) && this.ctx.helper.checkZero(pp.qc_qty)) { continue; }
|
|
const im = {
|
|
const im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
- lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: pp.id,
|
|
|
|
|
|
+ lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, org_unit_price: p.org_unit_price, pid: pp.id,
|
|
quantity: pp.quantity,
|
|
quantity: pp.quantity,
|
|
jl: pp.gather_qty, contract_jl: pp.contract_qty, qc_jl: pp.qc_qty,
|
|
jl: pp.gather_qty, contract_jl: pp.contract_qty, qc_jl: pp.qc_qty,
|
|
pre_jl: pp.pre_gather_qty, pre_contract_jl: pp.pre_contract_qty, pre_qc_jl: pp.pre_qc_qty,
|
|
pre_jl: pp.pre_gather_qty, pre_contract_jl: pp.pre_contract_qty, pre_qc_jl: pp.pre_qc_qty,
|
|
@@ -958,7 +959,7 @@ class StageIm {
|
|
|
|
|
|
const im = {
|
|
const im = {
|
|
id: this.ImData.length + 1,
|
|
id: this.ImData.length + 1,
|
|
- lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, pid: '',
|
|
|
|
|
|
+ lid: node.id, code: p.b_code, name: p.name, unit: p.unit, unit_price: p.unit_price, org_unit_price: p.org_unit_price, pid: '',
|
|
quantity: p.quantity, total_price: p.total_price,
|
|
quantity: p.quantity, total_price: p.total_price,
|
|
jl: p.gather_qty, contract_jl: p.contract_qty, qc_jl: p.qc_qty,
|
|
jl: p.gather_qty, contract_jl: p.contract_qty, qc_jl: p.qc_qty,
|
|
pre_jl: p.pre_gather_qty, pre_contract_jl: p.pre_contract_qty, pre_qc_jl: p.pre_qc_qty,
|
|
pre_jl: p.pre_gather_qty, pre_contract_jl: p.pre_contract_qty, pre_qc_jl: p.pre_qc_qty,
|
|
@@ -1015,6 +1016,7 @@ class StageIm {
|
|
|
|
|
|
// 生成中间计量数据
|
|
// 生成中间计量数据
|
|
async buildImData() {
|
|
async buildImData() {
|
|
|
|
+ this.up_field = 'unit_price';
|
|
const self = this;
|
|
const self = this;
|
|
this.stage = this.ctx.stage;
|
|
this.stage = this.ctx.stage;
|
|
// 初始化
|
|
// 初始化
|
|
@@ -1053,6 +1055,7 @@ class StageIm {
|
|
}
|
|
}
|
|
|
|
|
|
buildRelaStageIm(stage, billsTree, pos, details, changes) {
|
|
buildRelaStageIm(stage, billsTree, pos, details, changes) {
|
|
|
|
+ this.up_field = 'org_unit_price';
|
|
this.billsTree = billsTree;
|
|
this.billsTree = billsTree;
|
|
this.pos = pos;
|
|
this.pos = pos;
|
|
this.stage = stage;
|
|
this.stage = stage;
|