From 7645f67916c0867270a0f98ed9ef1af2c3ffc9d0 Mon Sep 17 00:00:00 2001 From: txb Date: Mon, 20 Jun 2022 09:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E4=BF=AE=E6=94=B9bug):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改bug --- src/pages/device/deviceInfo/index.jsx | 2 +- .../deviceStock/components/CreateForm.jsx | 8 +-- .../components/createRelevanceForm.jsx | 4 +- .../components/createtypeRelevanceForm.jsx | 4 +- src/pages/goods/goodsPractice/index.jsx | 65 +++++++++++++------ src/pages/goods/goodsPractice/service.js | 10 ++- .../sys/company/components/CreateForm.jsx | 2 +- src/pages/sys/company/components/MenuForm.jsx | 8 +-- src/pages/sys/company/index.jsx | 21 +++++- src/pages/sys/org/components/CreateForm.jsx | 12 ++-- src/pages/sys/org/index.jsx | 2 +- 11 files changed, 95 insertions(+), 43 deletions(-) diff --git a/src/pages/device/deviceInfo/index.jsx b/src/pages/device/deviceInfo/index.jsx index 006bbd2..63c0440 100644 --- a/src/pages/device/deviceInfo/index.jsx +++ b/src/pages/device/deviceInfo/index.jsx @@ -239,7 +239,7 @@ const GoodsTypeManage = () => { }} > {' '} - {record.store_Status == 0 ? '停用' : '正常'} + {record.store_Status == 0 ? '正常' :'停用'} , ], diff --git a/src/pages/device/deviceStock/components/CreateForm.jsx b/src/pages/device/deviceStock/components/CreateForm.jsx index a46e6e8..6155b66 100644 --- a/src/pages/device/deviceStock/components/CreateForm.jsx +++ b/src/pages/device/deviceStock/components/CreateForm.jsx @@ -9,18 +9,18 @@ const CreateForm = (props) => { //初始化数据 useEffect(() => { const initBatching = () => { - + if(props.isbom){ GetProductListByBom({ DeviceId: props.DeviceId,BomIds:props.bomIds }).then((data) => { setBatchingList(data.data); }); - + }else { GetBatchingAsync({ DeviceId: props.DeviceId }).then((data) => { setBatchingList(data.data); }); } - + }; initBatching(); }, []); @@ -55,7 +55,7 @@ const CreateForm = (props) => { filterOption={(input, option) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 }> - {batchingList.map((item, index) => { + {batchingList?.map((item, index) => { return ( {item.name} diff --git a/src/pages/goods/goodsPractice/components/createRelevanceForm.jsx b/src/pages/goods/goodsPractice/components/createRelevanceForm.jsx index 2914bc6..bdc78cb 100644 --- a/src/pages/goods/goodsPractice/components/createRelevanceForm.jsx +++ b/src/pages/goods/goodsPractice/components/createRelevanceForm.jsx @@ -24,7 +24,7 @@ const createRelevanceForm = (props) => { - + - + - + - + diff --git a/src/pages/sys/company/components/MenuForm.jsx b/src/pages/sys/company/components/MenuForm.jsx index 09f1925..37ae649 100644 --- a/src/pages/sys/company/components/MenuForm.jsx +++ b/src/pages/sys/company/components/MenuForm.jsx @@ -13,7 +13,7 @@ const MenuForm = (props) => { if(!t.isParentMenu){ arr.push(t.id); } - + }); setCheckedKeys(arr) var ret = await api.GetMenu('ALL'); @@ -24,7 +24,7 @@ const MenuForm = (props) => { const lbl = () => { var arr = []; Enumerable.from(props.values).forEach(t => { - arr.push({t.name}); + arr.push({t.name}); }); return arr; } @@ -38,14 +38,14 @@ const MenuForm = (props) => { onCancel={() => props.onCancel()} maskClosable={false}> - + { setCheckedKeys(keys) }} defaultExpandAll={true} checkedKeys={checkedKeys} checkable /> - +
已选菜单
{props.values == undefined ? '' : ( lbl() diff --git a/src/pages/sys/company/index.jsx b/src/pages/sys/company/index.jsx index 79bbdbb..710f0c7 100644 --- a/src/pages/sys/company/index.jsx +++ b/src/pages/sys/company/index.jsx @@ -69,7 +69,7 @@ const handleRemove = async (selectedRows) => { if (!selectedRows) return true; try { await api.removeCompany(selectedRows.map((row) => row.id)).then((r) => { - if (r.data) { + if (r) { message.success('删除成功,即将刷新'); return true; } else { @@ -330,7 +330,7 @@ const companyManage = () => { } > - + */} + { + handleRemove(selectedRowsState); + setSelectedRows([]); + actionRef.current?.reloadAndRest?.(); + }} + onCancel={() => { }} + > + 批量删除 + )} { onCancel={() => { props.onCancel(); }} + keyboard={false} destroyOnClose >
{ - {/* ,pattern: /^(1[1-2][0-9]\.\d{6,12},((3[0-6])|(2[8-9]))\.\d{6,12};){2,}1[1-2][0-9]\.\d{6,12},((3[0-6])|(2[8-9]))\.\d{6,12}$/, + {/* ,pattern: /^[-\+]?\d+(\.\d+)\,[-\+]?\d+(\.\d+)$/, message: '经纬度格式不对'} */} - + - - , + +