|
@@ -8,15 +8,7 @@ import {
|
|
import { GoodsTableSearch } from "@/types";
|
|
import { GoodsTableSearch } from "@/types";
|
|
import { typeChangeObj } from "@/utils/changeData";
|
|
import { typeChangeObj } from "@/utils/changeData";
|
|
import { MessageFu } from "@/utils/message";
|
|
import { MessageFu } from "@/utils/message";
|
|
-import {
|
|
|
|
- Input,
|
|
|
|
- Select,
|
|
|
|
- DatePicker,
|
|
|
|
- Button,
|
|
|
|
- Table,
|
|
|
|
- Switch,
|
|
|
|
- Popconfirm,
|
|
|
|
-} from "antd";
|
|
|
|
|
|
+import { Input, Select, Button, Table, Switch, Popconfirm } from "antd";
|
|
import React, {
|
|
import React, {
|
|
useCallback,
|
|
useCallback,
|
|
useEffect,
|
|
useEffect,
|
|
@@ -28,8 +20,6 @@ import { useDispatch, useSelector } from "react-redux";
|
|
import GoodsAdd from "../GoodsAdd";
|
|
import GoodsAdd from "../GoodsAdd";
|
|
import styles from "./index.module.scss";
|
|
import styles from "./index.module.scss";
|
|
|
|
|
|
-const { RangePicker } = DatePicker;
|
|
|
|
-
|
|
|
|
function Goods() {
|
|
function Goods() {
|
|
const dispatch = useDispatch();
|
|
const dispatch = useDispatch();
|
|
|
|
|
|
@@ -131,17 +121,6 @@ function Goods() {
|
|
[tableSelect]
|
|
[tableSelect]
|
|
);
|
|
);
|
|
|
|
|
|
- // 时间选择器改变
|
|
|
|
- const timeChange = (date: any, dateString: any) => {
|
|
|
|
- let startTime = "";
|
|
|
|
- let endTime = "";
|
|
|
|
- if (dateString[0] && dateString[1]) {
|
|
|
|
- startTime = dateString[0] + " 00:00:00";
|
|
|
|
- endTime = dateString[1] + " 23:59:59";
|
|
|
|
- }
|
|
|
|
- setTableSelect({ ...tableSelect, startTime, endTime, pageNum: 1 });
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
// 点击重置
|
|
// 点击重置
|
|
const [inputKey, setInputKey] = useState(1);
|
|
const [inputKey, setInputKey] = useState(1);
|
|
const resetSelectFu = useCallback(() => {
|
|
const resetSelectFu = useCallback(() => {
|
|
@@ -257,10 +236,6 @@ function Goods() {
|
|
render: (item: GoodsTableSearch) => typeChangeObj[item.type!],
|
|
render: (item: GoodsTableSearch) => typeChangeObj[item.type!],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: "最近编辑时间",
|
|
|
|
- dataIndex: "updateTime",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
title: "展示状态",
|
|
title: "展示状态",
|
|
render: (item: GoodsTableSearch) => (
|
|
render: (item: GoodsTableSearch) => (
|
|
<Switch
|
|
<Switch
|
|
@@ -384,15 +359,11 @@ function Goods() {
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div className="row rowDom">
|
|
|
|
- <span>最近编辑日期:</span>
|
|
|
|
- <RangePicker key={inputKey} onChange={timeChange} />
|
|
|
|
- </div>
|
|
|
|
<div className="row">
|
|
<div className="row">
|
|
<span>万物墙:</span>
|
|
<span>万物墙:</span>
|
|
<Select
|
|
<Select
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- style={{ width: 100 }}
|
|
|
|
|
|
+ style={{ width: 136 }}
|
|
value={tableSelect.topic}
|
|
value={tableSelect.topic}
|
|
onChange={(e) =>
|
|
onChange={(e) =>
|
|
setTableSelect({ ...tableSelect, topic: e, pageNum: 1 })
|
|
setTableSelect({ ...tableSelect, topic: e, pageNum: 1 })
|
|
@@ -408,7 +379,7 @@ function Goods() {
|
|
<span>展示状态:</span>
|
|
<span>展示状态:</span>
|
|
<Select
|
|
<Select
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- style={{ width: 100 }}
|
|
|
|
|
|
+ style={{ width: 150 }}
|
|
value={tableSelect.display}
|
|
value={tableSelect.display}
|
|
onChange={(e) =>
|
|
onChange={(e) =>
|
|
setTableSelect({ ...tableSelect, display: e, pageNum: 1 })
|
|
setTableSelect({ ...tableSelect, display: e, pageNum: 1 })
|
|
@@ -422,7 +393,7 @@ function Goods() {
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div className="row">
|
|
<div className="row">
|
|
- <Button onClick={resetSelectFu}>重置</Button>{" "}
|
|
|
|
|
|
+   <Button onClick={resetSelectFu}>重置</Button>
|
|
    
|
|
    
|
|
<Button type="primary" onClick={() => openEditPageFu(0)}>
|
|
<Button type="primary" onClick={() => openEditPageFu(0)}>
|
|
新增
|
|
新增
|