|
@ -1,5 +1,5 @@ |
|
|
import React, { useState, useRef, useEffect } from "react"; |
|
|
import React, { useState, useRef, useEffect } from "react"; |
|
|
import { message, Pagination, Table, Space, Modal, Button } from "antd"; |
|
|
|
|
|
|
|
|
import { message, Pagination, Table, Space, Modal, Button, InputNumber } from "antd"; |
|
|
// import { dictionary, utils } from "@/config/common"; |
|
|
// import { dictionary, utils } from "@/config/common"; |
|
|
// import moment from 'moment' |
|
|
// import moment from 'moment' |
|
|
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|
|
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|
@ -64,7 +64,7 @@ function BreakInfo() { |
|
|
查看 |
|
|
查看 |
|
|
</Link> |
|
|
</Link> |
|
|
  |
|
|
  |
|
|
<span onClick={()=>{setCurrentRecord(record); setVisible(true)}}>修改</span> |
|
|
|
|
|
|
|
|
<span onClick={()=>{setCurrentRecord(record); setVisible(true); setCount(record.total_remain)}}>修改</span> |
|
|
</div> |
|
|
</div> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
@ -99,6 +99,8 @@ function BreakInfo() { |
|
|
|
|
|
|
|
|
const [visible, setVisible] = useState(false) |
|
|
const [visible, setVisible] = useState(false) |
|
|
const [currentRecord,setCurrentRecord] = useState({}) |
|
|
const [currentRecord,setCurrentRecord] = useState({}) |
|
|
|
|
|
const [count ,setCount] = useState() |
|
|
|
|
|
const tableRef = useRef() |
|
|
//搜索的总结果数 |
|
|
//搜索的总结果数 |
|
|
const [total, setTotal] = useState(0); |
|
|
const [total, setTotal] = useState(0); |
|
|
function search(params) { |
|
|
function search(params) { |
|
@ -114,6 +116,27 @@ function BreakInfo() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const countSetting=()=>{ |
|
|
|
|
|
setVisible(true) |
|
|
|
|
|
setCurrentRecord({}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const save = ()=>{ |
|
|
|
|
|
// alert(count) |
|
|
|
|
|
ajax.updateBreakCount({id: currentRecord.id, count: count}).then( |
|
|
|
|
|
res=>{ |
|
|
|
|
|
if(res.status == 20000){ |
|
|
|
|
|
message.success(res.message) |
|
|
|
|
|
setVisible(false) |
|
|
|
|
|
setCount("") |
|
|
|
|
|
tableRef.current.fetch() |
|
|
|
|
|
}else{ |
|
|
|
|
|
message.error(res.message) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|
<TableModule |
|
|
<TableModule |
|
@ -122,21 +145,31 @@ function BreakInfo() { |
|
|
formSearch={formSearch} |
|
|
formSearch={formSearch} |
|
|
search={search} |
|
|
search={search} |
|
|
total={total} |
|
|
total={total} |
|
|
|
|
|
ref={tableRef} |
|
|
// mandatory={'parking_num'} |
|
|
// mandatory={'parking_num'} |
|
|
// mandatory_name={'泊位号'} |
|
|
// mandatory_name={'泊位号'} |
|
|
// pagename="PDA操作记录" |
|
|
// pagename="PDA操作记录" |
|
|
// pageName={'entryExitOptPDA'} |
|
|
// pageName={'entryExitOptPDA'} |
|
|
diyButton={<Button type="primary" style={{width: '130px'}} onClick={()=>setVisible(true)}>违约次数配置</Button>} |
|
|
|
|
|
|
|
|
diyButton={<Button type="primary" style={{width: '130px'}} onClick={countSetting}>违约次数配置</Button>} |
|
|
isExport={false} |
|
|
isExport={false} |
|
|
initFormData={initFormData} |
|
|
initFormData={initFormData} |
|
|
// exportUrl="/api/bpm/record/get_pda_export" |
|
|
// exportUrl="/api/bpm/record/get_pda_export" |
|
|
/> |
|
|
/> |
|
|
<Modal |
|
|
<Modal |
|
|
open={visible} |
|
|
open={visible} |
|
|
|
|
|
wrapClassName="break-info-modal" |
|
|
title="违约次数配置" |
|
|
title="违约次数配置" |
|
|
onCancel={()=>{setVisible(false);setCurrentRecord({})}} |
|
|
|
|
|
|
|
|
okText="保存" |
|
|
|
|
|
onOk={save} |
|
|
|
|
|
onCancel={()=>{setVisible(false);setCurrentRecord({});setCount('')}} |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<div className="count-setting"> |
|
|
|
|
|
<span>剩余可违约次数 </span> |
|
|
|
|
|
<InputNumber value={count} max={99} min={0} precision={0} onChange={(e)=>setCount(e)}></InputNumber> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div className="tip"> |
|
|
|
|
|
提示: 剩余违约次数为0的用户将不能进行错时预约 |
|
|
|
|
|
</div> |
|
|
</Modal> |
|
|
</Modal> |
|
|
</> |
|
|
</> |
|
|
|
|
|
|
|
|