|
|
@@ -374,7 +374,9 @@
|
|
|
prop: 'supplierIds',
|
|
|
label: '供应商选择',
|
|
|
slot: 'supplierIds',
|
|
|
- align: 'center'
|
|
|
+ align: 'center',
|
|
|
+ filters: this.supplierList,
|
|
|
+ filterMethod: this.filterMethod
|
|
|
},
|
|
|
{
|
|
|
minWidth: 100,
|
|
|
@@ -538,7 +540,7 @@
|
|
|
return comitDatasource;
|
|
|
},
|
|
|
setIsInquiry(list) {
|
|
|
- return;
|
|
|
+ // return;
|
|
|
this.form.datasource.forEach((productItem, index) => {
|
|
|
//产品清单
|
|
|
let isInquiry = 0,
|
|
|
@@ -568,9 +570,17 @@
|
|
|
console.log(totalCountS, 'codeS');
|
|
|
});
|
|
|
},
|
|
|
+ filterMethod(value, row, column) {
|
|
|
+ let ids = row.supplierList.map((item) => item.id);
|
|
|
+ if (ids.length > 0 && ids.includes(value)) {
|
|
|
+ return row;
|
|
|
+ }
|
|
|
+ },
|
|
|
//修改回显
|
|
|
async putTableValue(data) {
|
|
|
if (data && data?.length) {
|
|
|
+ let supplierList = [],
|
|
|
+ supplierIds = [];
|
|
|
this.form.datasource = data;
|
|
|
let codeList = this.form.datasource.map((item) => item.productCode);
|
|
|
//获取仓库库存
|
|
|
@@ -585,6 +595,18 @@
|
|
|
'availableCountBase',
|
|
|
find.availableCountBase
|
|
|
);
|
|
|
+ supplierList.push(...item.supplierList);
|
|
|
+
|
|
|
+ });
|
|
|
+ supplierIds = Array.from(
|
|
|
+ new Set(supplierList.map((item) => item.id))
|
|
|
+ );
|
|
|
+ this.supplierList = supplierIds.map((id) => {
|
|
|
+ let data = supplierList.find((item) => item.id == id);
|
|
|
+ return {
|
|
|
+ text: data.name,
|
|
|
+ value: data.id
|
|
|
+ };
|
|
|
});
|
|
|
this.$refs.table.reload();
|
|
|
}
|