fix: 修复优惠券勾选无法提交

This commit is contained in:
zhangds 2022-10-11 15:10:46 +08:00
parent 78553e8748
commit 31783fe647
1 changed files with 7 additions and 6 deletions

View File

@ -637,16 +637,17 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
// console.log(" =>", param); // console.log(" =>", param);
// return; // return;
console.log("旧数据 =>", state.oldProduct);
console.log("编辑 大提交 =>", param);
// return;
// - // -
param.delete_product = state.tableData param.delete_product = state.tableData
.filter( .filter((item) => !item.checked && (item.goods_id || item.only))
(item) => !item.checked && (item.goods_id || item.only.goods_id)
)
.map((item) => { .map((item) => {
if (item.type === 1) { if (item.only) {
return item.goods_id;
} else {
return item.only.goods_id; return item.only.goods_id;
} else {
return item.goods_id;
} }
}); });