|
@@ -1004,27 +1004,17 @@ export default {
|
|
console.log(value);
|
|
console.log(value);
|
|
// row.productNo = value;
|
|
// row.productNo = value;
|
|
if (value) {
|
|
if (value) {
|
|
- let target = this.productionOptions.find((item) =>
|
|
|
|
|
|
+ let target = [];
|
|
|
|
+ // 在全部列表中查找
|
|
|
|
+ target = this.allProductionOptions.filter((item) =>
|
|
item.productName.includes(value)
|
|
item.productName.includes(value)
|
|
);
|
|
);
|
|
console.log(target);
|
|
console.log(target);
|
|
- if (target) {
|
|
|
|
- this.productionOptions = [target];
|
|
|
|
- //找到
|
|
|
|
|
|
+ if (target.length) {
|
|
|
|
+ this.productionOptions = target;
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
- //前100个没找到
|
|
|
|
- // 在全部列表中查找
|
|
|
|
- target = this.allProductionOptions.find((item) =>
|
|
|
|
- item.productName.includes(value)
|
|
|
|
- );
|
|
|
|
- console.log(target);
|
|
|
|
- if (target) {
|
|
|
|
- this.productionOptions = [target];
|
|
|
|
- return true;
|
|
|
|
- } else {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.productionOptions = this.allProductionOptions.slice(0, 500);
|
|
this.productionOptions = this.allProductionOptions.slice(0, 500);
|
|
@@ -1539,7 +1529,7 @@ export default {
|
|
|
|
|
|
await this.getDropDownData();
|
|
await this.getDropDownData();
|
|
this.productionTableData = sale_products.map((item) => {
|
|
this.productionTableData = sale_products.map((item) => {
|
|
- item.productType = this.productionOptions.find(
|
|
|
|
|
|
+ item.productType = this.allProductionOptions.find(
|
|
(i) => item.productNo == i.productNo
|
|
(i) => item.productNo == i.productNo
|
|
)?.productType;
|
|
)?.productType;
|
|
return item;
|
|
return item;
|
|
@@ -2035,7 +2025,7 @@ export default {
|
|
amountTotal += Number(item.productNumber);
|
|
amountTotal += Number(item.productNumber);
|
|
singlTotal += Number(item.productUnitPrice);
|
|
singlTotal += Number(item.productUnitPrice);
|
|
moneyTotal += Number(item.productAmounts);
|
|
moneyTotal += Number(item.productAmounts);
|
|
- let productData = this.productionOptions.find(
|
|
|
|
|
|
+ let productData = this.allProductionOptions.find(
|
|
(pro) => pro.productNo == item.productNo
|
|
(pro) => pro.productNo == item.productNo
|
|
);
|
|
);
|
|
item.sliceTypeLabel =
|
|
item.sliceTypeLabel =
|