From c1ea4195479932fa033527689b6950e46542649d Mon Sep 17 00:00:00 2001 From: txb Date: Wed, 29 Jun 2022 15:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E6=8F=90=E4=BA=A4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81):=20=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提交代码 --- .../basic/product/components/CreateForm.jsx | 30 ++++++++ src/pages/goods/goodsInfo/index.jsx | 68 +++++++++++++------ src/pages/goods/newgoods/index.jsx | 57 +++++++++++++++- src/pages/store/storeGoodsInfo/index.jsx | 44 ++++++++++-- src/pages/store/storeGoodsInfo/services.js | 8 ++- 5 files changed, 176 insertions(+), 31 deletions(-) diff --git a/src/pages/erp/basic/product/components/CreateForm.jsx b/src/pages/erp/basic/product/components/CreateForm.jsx index d7d5567..7f93f93 100644 --- a/src/pages/erp/basic/product/components/CreateForm.jsx +++ b/src/pages/erp/basic/product/components/CreateForm.jsx @@ -14,6 +14,8 @@ const fieldLabels = { status: '物料状态', price: '成本价', netrecovery: '净料率(%)', + OutstockUint: '出库单位', + proportion: '换算比例(%)', }; const defaultData = []; @@ -206,6 +208,7 @@ const CreateForm = (props) => { label={fieldLabels.netrecovery} name="netrecovery" min={1} + max={100} placeholder="请输入净料率" /> @@ -239,6 +242,33 @@ const CreateForm = (props) => { placeholder="请选择单位" /> + + props.uintListData} + placeholder="请选择出库单位" + /> + + + + { const [setGoodsBomModalVisible, handleGoodsBomModalVisible] = useState(); const [selectedRowsState, setSelectedRows] = useState([]); const actionRef = useRef(); - const [url, setUrl] = useState(props.location.query.values?props.location.query.values.imgUrl:null); + const [currTabKey, SetCurrTabKey] = useState("basis") + const [url, setUrl] = useState(props.location.query.values ? props.location.query.values.imgUrl : null); + const [currentGoodsProp, setCurrentGoodsProp] = useState(0); //事件 const onFinish = async (values) => { const hide = message.loading('正在添加'); @@ -101,12 +103,18 @@ const Advanced = (props) => { }; //设置 const [tabStatus, seTabStatus] = useState({ - operationKey: 'basis', - tabActiveKey: 'basis', + operationKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', + tabActiveKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', }); - + useEffect(() => { + SetCurrTabKey(tabStatus.tabActiveKey); + }, [tabStatus]) const onTabChange = (key) => { - seTabStatus({ ...tabStatus, operationKey: key }); + if (currentGoodsProp === 1) { + message.info('套餐不能设置配方'); + return; + } + seTabStatus({ operationKey: key, tabActiveKey: key }); }; const operationTabList = [ @@ -211,22 +219,9 @@ const Advanced = (props) => { - + - - - - - {url ? avatar : } - - - + + + { + + + + + {url ? avatar : } + + +