From dc40ac8587703de81f5b64ba416ab0b248937a61 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 21 Oct 2022 17:09:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=BB=BA=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UseGoodsScopePop/index.jsx | 3 --- src/components/UseProductPop/index.jsx | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) 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); }}