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="请输入名称" placeholder="请输入名称"
// value={recortd?.[0]?.value} // value={recortd?.[0]?.value}
disabled disabled
rules={[{ required: true, message: "必填" }]}
/> />
<ProFormText <ProFormText
name='count' name='count'
width="md" width="md"
label='数量' label='数量'
tooltip="最长为 24 位" 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>
: <ProForm.Group> : <ProForm.Group>
<ProFormText {/* <ProFormText
name={newlys?.[0]?.type} name={newlys?.[0]?.type}
width="md" width="md"
label={newlys?.[0]?.name} label={newlys?.[0]?.name}
tooltip="最长为 24 位" tooltip="最长为 24 位"
placeholder="请输入名称" placeholder="请输入名称"
/> /> */}
</ProForm.Group>} </ProForm.Group>}
</ModalForm> </ModalForm>

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

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

Loading…
Cancel
Save