fix: 编辑优惠券不提交
This commit is contained in:
parent
3e72ae9484
commit
c8c580c4bb
|
@ -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 (
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue