fix: 编辑优惠券不提交

This commit is contained in:
zhangds 2022-10-26 11:04:51 +08:00
parent 3e72ae9484
commit c8c580c4bb
2 changed files with 5 additions and 18 deletions

View File

@ -616,10 +616,12 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
let lj_arr = state.tableData.filter(
(item) => item.checked && item.type === 2
);
//
param.new_product.legal = goods_arr.filter(
(item) => item.checked && !item.goods_id
); //
param.update_product.legal = goods_arr.filter(
(item) => item.checked && item.goods_id
); //
@ -893,6 +895,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
//
const productEditShow = (rowData, index) => {
console.log("编辑数据 1 => ", rowData);
try {
// id
const direct_reseller_ids = state.direct_reseller_id;
@ -1054,24 +1057,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
}
};
//
const deleteGoodsScope = (index) => {
let new_table = state.tableData;
new_table.splice(index, 1);
let select_opt = [];
new_table.map((item) => {
let obj = {};
obj.key = item.product_id;
obj.text = item.product_name;
select_opt.push(obj);
});
selectionFun(new_table);
setState({
tableData: new_table,
rankOptions: select_opt,
});
};
//
const examinePop = () => {
return (

View File

@ -196,6 +196,7 @@ const UseProductPop = forwardRef((props, ref) => {
//
if (productData) {
setModel({
goods_id: productData.goods_id,
cost_price: productData.cost_price,
weight: productData.weight,
quantity: productData.quantity,
@ -280,6 +281,7 @@ const UseProductPop = forwardRef((props, ref) => {
detail_url: model.detail_url[0] ? model.detail_url[0].src : "",
account_type: model.account_type,
map_product_name: model.product_name,
goods_id: model.goods_id,
};
};