diff --git a/src/components/UseGoodsScopePop/index.jsx b/src/components/UseGoodsScopePop/index.jsx index 9398dc55..a0f99b36 100644 --- a/src/components/UseGoodsScopePop/index.jsx +++ b/src/components/UseGoodsScopePop/index.jsx @@ -55,9 +55,7 @@ const UseGoodsScopePop = forwardRef((props, ref) => { const format_knockGold_model = () => { let new_tableData = tableData; let form_model = knockGold_el.current.state.form_data; - let table_obj = knockGoldFun(form_model); - if (product_title === "编辑立减金") { if (table_index !== -1) { table_obj.checked = false; @@ -67,7 +65,6 @@ const UseGoodsScopePop = forwardRef((props, ref) => { } else { new_tableData.push(table_obj); } - return new_tableData; }; diff --git a/src/components/UseProductPop/index.jsx b/src/components/UseProductPop/index.jsx index 3c81a112..c26b263f 100644 --- a/src/components/UseProductPop/index.jsx +++ b/src/components/UseProductPop/index.jsx @@ -7,7 +7,6 @@ import React, { } from "react"; import { Select, ImageUpload, RadioButton, RadioGroup, Notify } from "zent"; import { useSetState } from "ahooks"; -import { FixedSizeList } from "react-window"; import _ from "lodash"; import Ipt from "@/components/input/main"; @@ -70,6 +69,7 @@ const UseProductPop = forwardRef((props, ref) => { productDataAll: [], // 商品所有数据 productPic: [], isUpdatePic: false, + isProductSelect: false, }); const [model, setModel] = useSetState({ cur_product: {}, @@ -122,17 +122,26 @@ const UseProductPop = forwardRef((props, ref) => { reseller_id: directResellerId, type: productType, }; + setState({ + isProductSelect: true, + }); getProductInfoSelect(param).then((res) => { handelResponse( res, (req, msg) => { console.log("商品数据 =>", req); + setState({ + isProductSelect: false, + }); setState({ productDataAll: req.data, }); productListEl(req.data); }, (err) => { + setState({ + isProductSelect: false, + }); console.log("err =>", err); } ); @@ -404,7 +413,9 @@ const UseProductPop = forwardRef((props, ref) => { options={state.productOption} placeholder="请选择商品" value={model.cur_product} - disabled={model.code_batch_id ? true : false} + disabled={ + model.code_batch_id || state.isProductSelect ? true : false + } onChange={(e) => { onProductChange(e); }}