Browse Source

整数输入效验

release_0.0.4
xingyongchun 2 years ago
parent
commit
9af4c18b7d
  1. 19
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  2. 5
      web/client/src/sections/fillion/components/inforTable.js

19
web/client/src/sections/fillion/components/highways/highwaysdata.js

@ -59,25 +59,36 @@ const HightModal = (props) => {
placeholder="请输入名称"
// value={recortd?.[0]?.value}
disabled
rules={[{ required: true, message: "必填" }]}
/>
<ProFormText
name='count'
width="md"
label='数量'
tooltip="最长为 24 位"
placeholder="请输入名称"
placeholder="请输入数量"
rules={[
{required: true,
message:'请输入整数',
pattern:RegExp(/^[0-9]\d*$/,'g'),
},
// getValueFromEvent=(event)=>{
// return event.target.value.replace(/\D/g,'')
// }
]}
/>
</ProForm.Group>
: <ProForm.Group>
<ProFormText
{/* <ProFormText
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
/>
/> */}
</ProForm.Group>}
</ModalForm>

5
web/client/src/sections/fillion/components/inforTable.js

@ -437,6 +437,8 @@ const InForTable = (props) => {
}}
request={async (params) => {
const query = {
limit:params.pageSize,
page:params.current-1,
nameOfInspectionPoint: nameOfInspectionPoint,
licensePlate: licensePlate,
numberOfAxles: numberOfAxles,
@ -446,10 +448,11 @@ const InForTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getPurchase(query));
console.log(res)
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
total: res.payload.data ? res.payload.data : 0
}
}}
search={{

Loading…
Cancel
Save