|
@@ -605,13 +605,18 @@ export default {
|
|
|
const selectedIds = (row.customerBlacklist || []).map((/** @type {CustomerBlacklistOption} */ item) => item.id);
|
|
|
return selectedIds.includes(customer.id);
|
|
|
});
|
|
|
+ const uniqFilterCustomerBlacklist = filteredCustomerBlacklist.filter((item, index, self) =>
|
|
|
+ index === self.findIndex((t) => (
|
|
|
+ t.id === item.id
|
|
|
+ ))
|
|
|
+ );
|
|
|
|
|
|
// 构建更新数据
|
|
|
/** @type {import('@/api/announcement').NoticeFormData} */
|
|
|
const formData = {
|
|
|
...row,
|
|
|
brandScope: row.brandScope || undefined,
|
|
|
- customerBlacklist: JSON.stringify(filteredCustomerBlacklist.map(customer => ({
|
|
|
+ customerBlacklist: JSON.stringify(uniqFilterCustomerBlacklist.map(customer => ({
|
|
|
ID: customer.id,
|
|
|
CODE: customer.Customer_CODE,
|
|
|
NAME: customer.Customer_NAME
|