Commit 2eb42250 authored by cellee's avatar cellee

Signed-off-by: cellee <893264950@qq.com>

parent d9d0e084
......@@ -173,7 +173,6 @@ class SelectOptions extends React.PureComponent {
};
// 多选框改变的回调
onChangeValue = (checkedList) => {
// console.log(checkedList);
if (this.props.single != null) {
var tmp;
if (checkedList.length > 1) {
......
......@@ -27,6 +27,8 @@ const TitleSearch = (props: any) => {
push,
} = props;
// console.log(props);
const key = props.listkey;
const name = props.list;
......@@ -48,9 +50,6 @@ const TitleSearch = (props: any) => {
// console.log("小区数量初始化") OK
tosCommunityget(null);
}
if (defaultValue != null) {
form.setFieldsValue(defaultValue);
}
}, []);
useEffect(() => {
......@@ -81,7 +80,6 @@ const TitleSearch = (props: any) => {
// 监听 time
useEffect(() => {
if (time) {
// console.log(time);
form.setFieldsValue({
subscribeDate: time[2],
});
......@@ -89,21 +87,25 @@ const TitleSearch = (props: any) => {
}, [time]);
const onFinish = (values: any) => {
// console.log(values);
if (datePicker) {
values[time[0]] = datePicker;
}
if (community) {
values[community] = communitys;
}
if (time) {
values.subscribeDate = time[2];
}
// console.log(values);
props.onSubmit(values);
};
const onFinishFailed = () => {};
// 选择时间
const onChange = (date: any, dateString: string) => {
console.log(dateString);
const onChanges = (date: any, dateString: string) => {
// console.log(dateString);
time[2] = dateString;
setDate(dateString);
};
......@@ -201,11 +203,10 @@ const TitleSearch = (props: any) => {
{/* 时间 */}
{time != null ? (
<Col key="datePicker_">
{' '}
<DatePicker
placeholder={time[1]}
defaultValue={time[2] ? moment(time[2], 'YYYY/MM/DD') : null}
onChange={onChange}
value={time[2] ? moment(time[2], 'YYYY/MM/DD') : null}
onChange={onChanges}
/>
</Col>
) : null}
......
......@@ -216,6 +216,7 @@ const FacilityBookings = (props: any) => {
pageNum: search.pageNum ? search.pageNum : 1, // 实际搜索页码
globalMark: search.globalMark ? search.globalMark : 'no', // 搜索全部内容
};
// console.log(obj);
requse(obj, tab);
} else {
let obj = {
......@@ -229,20 +230,16 @@ const FacilityBookings = (props: any) => {
// 发起搜索
const CallBackTitleSearch = (comment: any) => {
// console.log(comment);
if (tab == 1) {
if (
comment.communityName &&
comment.communityName.length == 0 &&
comment.status == null &&
comment.key == null
comment.communityName != null ||
comment.subscribeDate != null ||
comment.status != null
) {
message.warning('Please fill in at least one condition');
return false;
}
if (comment.communityName != null || comment.key != null || comment.status != null) {
let obj = {
communityNameList: comment.communityName ? comment.communityName : null, // 所选小区
subscribeDate: comment.key ? comment.key : null, // 时间
subscribeDate: comment.subscribeDate ? comment.subscribeDate : null, // 时间
status: comment.status !== null ? comment.status : null, // 状态
pageNum: 1, // 实际搜索页码
globalMark: 'no', // 搜索全部内容
......@@ -250,14 +247,6 @@ const FacilityBookings = (props: any) => {
requse(obj, tab);
}
} else {
if (
comment.communityName2 &&
comment.communityName2.length == 0 &&
comment.facilityName == ''
) {
message.warning('Please fill in at least one condition');
return false;
}
if (comment.communityName2 != null || comment.facilityName != null) {
let obj = {
communityNameList: comment.communityName2 ? comment.communityName2 : null,
......@@ -327,6 +316,7 @@ const FacilityBookings = (props: any) => {
status: v.status !== null ? v.status : null,
globalMark: v.globalMark ? v.globalMark : 'yes',
};
// console.log(obj);
QA({ ...obj });
RA(9, { ...obj });
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment