diff --git a/src/components/TableModule/index.jsx b/src/components/TableModule/index.jsx index c330558..172703b 100644 --- a/src/components/TableModule/index.jsx +++ b/src/components/TableModule/index.jsx @@ -456,6 +456,16 @@ const TableModule = forwardRef((props, ref) => { //setPlateValue(e); setFormData({ ...formData, plateValue: e?.label || '', plate2: newValue }) }; + const handleNumInput = (key, val) => { + // console.log(key, val); + const obj = {[key]: val.replace(/[^\d]/g,'').replace(/0*(\d+)/,'$1') }; + // console.log(obj); + searchForm.setFieldsValue(obj); + setFormData({ ...formData, ...obj }); + if (valueChange) { + valueChange(v); + } + }; // useEffect(() => { // console.log(deftime.startDateTime); // if (deftime.startDateTime) { @@ -839,14 +849,14 @@ const TableModule = forwardRef((props, ref) => { case "stopTime": children = ( - + handleNumInput(item.name, e.target.value)} /> ); break; case "stopMoney": children = ( - + handleNumInput(item.name, e.target.value)} /> ); break; diff --git a/src/config/utils.js b/src/config/utils.js index bae3108..0237b8c 100644 --- a/src/config/utils.js +++ b/src/config/utils.js @@ -488,7 +488,7 @@ const utils = { } else { scroll = document.querySelector(".yisa-table-scroll .ant-table-container .ant-table-body "); } - console.log(scroll); + // console.log(scroll); if(!scroll) return scroll.scrollTop = 0; } diff --git a/src/router/index.jsx b/src/router/index.jsx index 579c6a4..4f34175 100644 --- a/src/router/index.jsx +++ b/src/router/index.jsx @@ -23,7 +23,7 @@ function RouterMap(props) { {!storeRoutes.includes(route.name) ? ( ) : ( - + route.component?:
 页面开发中...
)} )