Browse Source

fix():处理时间组件对接错峰车页面

tags/PMS_Frontend_v1.0.6-develop
guoxin 1 year ago
parent
commit
4110a9e9eb
  1. 14
      src/components/TableModule/index.jsx

14
src/components/TableModule/index.jsx

@ -182,10 +182,10 @@ const TableModule = forwardRef((props, ref) => {
if (mandatory) { if (mandatory) {
let cna = Object.values(searchForm.getFieldsValue([mandatory])) let cna = Object.values(searchForm.getFieldsValue([mandatory]))
//console.log(mandatory,cna[0],searchForm.getFieldsValue([mandatory])) //console.log(mandatory,cna[0],searchForm.getFieldsValue([mandatory]))
if (!cna[0]) {
message.error(`查询时间范围大于半年,需填写${mandatory_name}`)
return
}
// if (!cna[0]) {
// message.error(`${mandatory_name}`)
// return
// }
} }
} }
if (limitCon && limitCon(form)) return if (limitCon && limitCon(form)) return
@ -468,7 +468,7 @@ const TableModule = forwardRef((props, ref) => {
moment().startOf("day") moment().startOf("day")
} }
> >
<DatePicker showTime format={"YYYY-MM-DD HH:mm:ss"} placement={"topLeft"} />
<DatePicker showTime format={"YYYY-MM-DD HH:mm:ss"} allowClear={false} placement={"topLeft"} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={item.defaultName ? item.defaultName[1] : "end_time"} name={item.defaultName ? item.defaultName[1] : "end_time"}
@ -481,7 +481,7 @@ const TableModule = forwardRef((props, ref) => {
(item.defaultValue && item.defaultValue[1]) || moment() (item.defaultValue && item.defaultValue[1]) || moment()
} }
> >
<DatePicker showTime format={"YYYY-MM-DD HH:mm:ss"} />
<DatePicker showTime format={"YYYY-MM-DD HH:mm:ss"} allowClear={false}/>
</Form.Item> </Form.Item>
<div style={{ margin: "-20px 0 10px 0" }}> <div style={{ margin: "-20px 0 10px 0" }}>
<QuickMenu <QuickMenu
@ -777,6 +777,7 @@ function InputSelectGroup(params) {
<Col span={16}> <Col span={16}>
<DatePicker <DatePicker
placeholder="请选择开始日期" placeholder="请选择开始日期"
allowClear={false}
onChange={(val, string) => { onChange={(val, string) => {
setTimeGroup({ ...timeGroup, start_time: string }); setTimeGroup({ ...timeGroup, start_time: string });
}} }}
@ -792,6 +793,7 @@ function InputSelectGroup(params) {
<DatePicker <DatePicker
placeholder="请选择结束日期" placeholder="请选择结束日期"
defaultValue={moment()} defaultValue={moment()}
allowClear={false}
onChange={(val, string) => { onChange={(val, string) => {
setTimeGroup({ ...timeGroup, end_time: string }); setTimeGroup({ ...timeGroup, end_time: string });
}} }}

Loading…
Cancel
Save