fix: 修复优惠券复制删除 id的过程

This commit is contained in:
zhangds 2022-10-28 16:43:20 +08:00
parent eb7328938c
commit 07ce002932
1 changed files with 10 additions and 1 deletions

View File

@ -702,8 +702,17 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
// id
if (state.KeyPcType === "2") {
param.copy_code_batch_id = editData.id;
}
param.product.legal = param.product.legal.map((item) => {
delete item.code_batch_id;
delete item.goods_id;
return item;
});
param.product.reduce = param.product.reduce.map((item) => {
delete item.goods_id;
return item;
});
}
addCoupon(param).then((res) => {
handelResponse(
res,