fix:禅道452综合查询界面棒数据未显示发货数
This commit is contained in:
parent
6be1b10736
commit
fe730915f2
|
|
@ -266,6 +266,7 @@ export default {
|
|||
//棒数据
|
||||
getDataB(data,saleData) {
|
||||
let that = this;
|
||||
that.tableData11 = [];
|
||||
let models = [],dataArr = [];
|
||||
//按版型(型号)分组
|
||||
data.forEach((item) => {
|
||||
|
|
@ -348,15 +349,33 @@ export default {
|
|||
that.tableData11[index] = obj;
|
||||
});
|
||||
saleData.forEach((item) => {
|
||||
let index = 0;
|
||||
let model = "";
|
||||
if (item.型号.indexOf("+") > -1) {
|
||||
let model = item.型号.split("+")[0];
|
||||
index = models.indexOf(model);
|
||||
model = item.型号.split("+")[0];
|
||||
} else {
|
||||
index = models.indexOf(item.型号);
|
||||
model = item.型号;
|
||||
}
|
||||
let index = models.indexOf(model);
|
||||
if (index > -1) {
|
||||
that.tableData22[index].检验合格数=item.数量;
|
||||
that.tableData11[index].检验合格数 += item.数量;
|
||||
} else {
|
||||
models.push(model);
|
||||
that.tableData11.push({
|
||||
版型: model,
|
||||
合格数: 0,
|
||||
仓库库存: 0,
|
||||
库存: 0,
|
||||
平头: 0,
|
||||
粘头: 0,
|
||||
粗中细: 0,
|
||||
抛光: 0,
|
||||
开槽: 0,
|
||||
配管: 0,
|
||||
成品库: 0,
|
||||
合计: 0,
|
||||
中检合格数: 0,
|
||||
检验合格数: item.数量,
|
||||
});
|
||||
}
|
||||
})
|
||||
that.models_b = models;
|
||||
|
|
@ -365,8 +384,10 @@ export default {
|
|||
//管数据
|
||||
getDataG(data,saleData) {
|
||||
let that = this;
|
||||
that.tableData22 = [];
|
||||
let models = [],
|
||||
modelArr = [];
|
||||
let modelsspec = [];
|
||||
//modelArr按型号分组
|
||||
data.forEach((item) => {
|
||||
let index = 0;
|
||||
|
|
@ -414,7 +435,6 @@ export default {
|
|||
});
|
||||
//specArr已将同型号的数组中按规格分组
|
||||
specArr.forEach((item3, index3) => {
|
||||
let modelsspec = [];
|
||||
item3.forEach((item4) => {
|
||||
let obj = {
|
||||
版型: "",
|
||||
|
|
@ -479,19 +499,42 @@ export default {
|
|||
});
|
||||
});
|
||||
saleData.forEach((item) => {
|
||||
let index = 0;
|
||||
if (item.型号.indexOf("+") > -1) {
|
||||
let model = item.型号.split("+")[1];
|
||||
index = models.indexOf(model);
|
||||
let model = "", spec = "";
|
||||
if (item.型号 && item.型号.indexOf("+") > -1) {
|
||||
model = item.型号.split("+")[1];
|
||||
} else {
|
||||
index = models.indexOf(item.型号);
|
||||
model = item.型号 || "";
|
||||
}
|
||||
if (item.规格 && item.规格.indexOf("+") > -1) {
|
||||
spec = item.规格.split("+")[1];
|
||||
} else {
|
||||
spec = item.规格 || "";
|
||||
}
|
||||
let msitem = model + spec;
|
||||
let index = modelsspec.indexOf(msitem);
|
||||
if (index > -1) {
|
||||
that.tableData22[index].检验合格数=item.数量;
|
||||
that.tableData22[index].检验合格数 += item.数量;
|
||||
} else {
|
||||
modelsspec.push(msitem);
|
||||
that.tableData22.push({
|
||||
版型: model,
|
||||
规格: spec,
|
||||
合格数: 0,
|
||||
仓库库存: 0,
|
||||
退火: 0,
|
||||
库存: 0,
|
||||
开槽: 0,
|
||||
倒角: 0,
|
||||
配棒: 0,
|
||||
成品库: 0,
|
||||
合计: 0,
|
||||
中检合格数: 0,
|
||||
检验合格数: item.数量,
|
||||
});
|
||||
}
|
||||
})
|
||||
that.models_g = models;
|
||||
that.getCountOk('g',models);
|
||||
that.models_g = modelsspec;
|
||||
that.getCountOk('g',modelsspec);
|
||||
},
|
||||
getSaleOutData(data_b, data_g){
|
||||
let that = this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue