Commit 9816b49038db696aa675e0d8210d9a39b83d3730
Committed by
曾柯
1 parent
574f74be
指定配件计划供应商去重
Showing
1 changed file
with
4 additions
and
1 deletions
src/pages/pms/partPlan/AppointPart/comonents/PartStorageModal.tsx
... | ... | @@ -90,7 +90,10 @@ export default function PartStorageModal({ onCancel, visible, onOk, itemData, se |
90 | 90 | placeholder="请选择供应商" |
91 | 91 | onChange={v => setPartParams({stId: storageid, spId: v})} |
92 | 92 | > |
93 | - {suppliers.map((item) => ( | |
93 | + {suppliers.filter((item, index, self) => { | |
94 | + return self.findIndex(el => el.supplierId==item.supplierId)===index; | |
95 | + }) | |
96 | + .map((item) => ( | |
94 | 97 | <Option value={item.supplierId} key={item.supplierId}>{item.supplierName}</Option> |
95 | 98 | ))} |
96 | 99 | </Select> | ... | ... |