Browse Source

12.27

master
lichong 3 months ago
parent
commit
1d68017a68
  1. 2
      package.json
  2. 22
      src/renderer/src/views/shujuguanli.vue

2
package.json

@ -1,6 +1,6 @@
{
"name": "electron",
"version": "1.0.9",
"version": "1.0.10",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "lichong",

22
src/renderer/src/views/shujuguanli.vue

@ -762,21 +762,13 @@ export default {
"Barcode", "Quantity per container", "Total", "Cluster",
"", "", "", ""
];
let lilstLocal = []
for (let i = 0; i < listCopy.length; i++) {
let item = listCopy[i];
lilstLocal.push({
...item,
'Quantity to deliver': item["Quantity to deliver"] ? item["Quantity to deliver"].toFixed(3) : ""
})
}
let lilstLocalTemp = []
for (let index = 0; index < this.fileData2Local.length; index++) {
let element = this.fileData2Local[index];
let findIndex = []
let findAllIndex = []
for (let j = 0; j < lilstLocal.length; j++) {
let item = lilstLocal[j];
for (let j = 0; j < listCopy.length; j++) {
let item = listCopy[j];
if (!item["isFind"]) {
if (item["Store"] === element["Store"] && item["Sku"] === element["Sku"] && item["Description"] === element["Description"] && item["Quantity to deliver"] === element["Quantity to deliver"]) {
findIndex.push(j)
@ -790,17 +782,17 @@ export default {
findAllIndex = _.uniq(findAllIndex)
let exList = _.difference(findAllIndex, findIndex)
for (let j = 0; j < findIndex.length; j++) {
let item = lilstLocal[findIndex[j]];
let item = listCopy[findIndex[j]];
lilstLocalTemp.push({ ...item })
item["isFind"] = true
}
for (let j = 0; j < exList.length; j++) {
let item = lilstLocal[exList[j]];
let item = listCopy[exList[j]];
lilstLocalTemp.push({ ...item })
item["isFind"] = true
}
}
let extraList = _.filter(lilstLocal, o => !o["isFind"])
let extraList = _.filter(listCopy, o => !o["isFind"])
for (let i = 0; i < extraList.length; i++) {
let element = extraList[i];
lilstLocalTemp.push({ ...element })
@ -828,6 +820,10 @@ export default {
cell.value = value;
cell.font = { name: 'Arial', size: 10, color: { argb: '000000' } };
cell.alignment = { horizontal: 'center', vertical: 'center' };
// Quantity to deliver
if (key === "Quantity to deliver") {
cell.numFmt = '#,##0.000';
}
}
if (Number(row["Quantity to deliver"]) < Number(row["Quantity per container"])) {
let qpcCol = _.findIndex(rowKeys, o => o === "Quantity per container")

Loading…
Cancel
Save