diff --git a/src/components/UseCouponAddEdit/index.jsx b/src/components/UseCouponAddEdit/index.jsx index c7ac5ed4..49b6afe7 100644 --- a/src/components/UseCouponAddEdit/index.jsx +++ b/src/components/UseCouponAddEdit/index.jsx @@ -203,7 +203,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => { plan_OPTIONS: [], key_OPTIONS: [], addProductBtnLoading: false, - addGoldBtnLoading: false, product_title: "", showScopePop: false, scopePopType: "", @@ -380,8 +379,21 @@ const UseCouponAddEdit = forwardRef((props, ref) => { }); let scope_data = goods_arr.concat(lj_arr); + console.log("scope_data =>", scope_data); scope_data = _.map(scope_data, (o) => { - o.checked = true; + if (o.type === 2) { + if (o.only.is_delete) { + o.checked = true; + } else { + o.checked = false; + } + } else { + if (o.is_delete) { + o.checked = true; + } else { + o.checked = false; + } + } return o; }); @@ -867,10 +879,9 @@ const UseCouponAddEdit = forwardRef((props, ref) => { // 第四步:获取商品数据 let param = { reseller_id: direct_reseller_ids, - type: 1, }; getProductInfoSelect(param).then((res) => { - setState({ addProductBtnLoading: false, addGoldBtnLoading: false }); + setState({ addProductBtnLoading: false }); handelResponse( res, (req, msg) => { @@ -898,7 +909,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => { ); setState({ product_title: "新增立减金", - addGoldBtnLoading: true, scopePopType: "addKnockGold", productData: null, }); @@ -907,7 +917,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => { }); } } catch (err) { - setState({ addProductBtnLoading: false, addGoldBtnLoading: false }); + setState({ addProductBtnLoading: false }); } }; @@ -1381,7 +1391,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {