|
|
@ -13,111 +13,137 @@ import { |
|
|
|
Timeline |
|
|
|
} from "antd"; |
|
|
|
import moment from "moment"; |
|
|
|
import ajax from '@/services' |
|
|
|
import ajax from "@/services"; |
|
|
|
import { TableModule } from "@/components"; |
|
|
|
import { dictionary } from "@/config/common.js"; |
|
|
|
import "./index.scss"; |
|
|
|
//plateChangeMgm |
|
|
|
function PlateChangeMgm() { |
|
|
|
const [resultData, setResultData] = useState([]) |
|
|
|
const [detailData, setDetailData] = useState({}) |
|
|
|
const [visible, setVisible] = useState(false) |
|
|
|
const [total, setTotal] = useState(0); |
|
|
|
const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
title: "停车场名称", |
|
|
|
title: "序号", |
|
|
|
dataIndex: "index", |
|
|
|
key: "index", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
render: (text, record, index) => index + 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "车场名称", |
|
|
|
dataIndex: "road_name", |
|
|
|
key: "road_name", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "泊位总数", |
|
|
|
dataIndex: "total_berths", |
|
|
|
key: "total_berths", |
|
|
|
title: "修正前车牌", |
|
|
|
dataIndex: "plate_old", |
|
|
|
key: "plate_old", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "停车记录数(次)", |
|
|
|
dataIndex: "record_count", |
|
|
|
key: "record_count", |
|
|
|
title: "修正后车牌", |
|
|
|
dataIndex: "plate_new", |
|
|
|
key: "plate_new", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "订单应收金额(元)", |
|
|
|
dataIndex: "receivable_amount", |
|
|
|
key: "receivable_amount", |
|
|
|
title: "修正时间", |
|
|
|
dataIndex: "create_time", |
|
|
|
key: "create_time", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "日均泊位周转次数(次)", |
|
|
|
dataIndex: "average_turn_times", |
|
|
|
key: "average_turn_times", |
|
|
|
title: "修正类型", |
|
|
|
dataIndex: "correct_type_name", |
|
|
|
key: "correct_type_name", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "平均泊位利用率", |
|
|
|
dataIndex: "average_use_rate", |
|
|
|
key: "average_use_rate", |
|
|
|
title: "操作人", |
|
|
|
dataIndex: "operatename", |
|
|
|
key: "operatename", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "平均停车时长", |
|
|
|
dataIndex: "average_park_time", |
|
|
|
key: "average_park_time", |
|
|
|
title: "操作", |
|
|
|
dataIndex: "operation", |
|
|
|
key: "operation", |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
render: (_, record) => { |
|
|
|
return ( |
|
|
|
<Button |
|
|
|
type="primary" |
|
|
|
onClick={() => { |
|
|
|
getDetailData(record.id) |
|
|
|
}} |
|
|
|
> |
|
|
|
详情 |
|
|
|
</Button> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
//检索条件 |
|
|
|
const formSearch = [ |
|
|
|
{ |
|
|
|
name: "operator_id", |
|
|
|
type: "Select", |
|
|
|
label: "修正类型", |
|
|
|
options: [], |
|
|
|
name: "road_name", |
|
|
|
type: "Input", |
|
|
|
label: "车场名称", |
|
|
|
placeholder: "请输入车场名称", |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "car_parking_type", |
|
|
|
name: "plate", |
|
|
|
type: "Input", |
|
|
|
label: "车牌号", |
|
|
|
placeholder: "请输入车牌号", |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "correct_type", |
|
|
|
type: "Select", |
|
|
|
label: "车场类型", |
|
|
|
label: "修正类型", |
|
|
|
defaultValue: "0", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: '全部', |
|
|
|
value: '3', |
|
|
|
value: '0', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '路内车场', |
|
|
|
label: '入场修正', |
|
|
|
value: '1', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '路外车场', |
|
|
|
label: '场中修正', |
|
|
|
value: '2', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '出场修改', |
|
|
|
value: '3', |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "road_name", |
|
|
|
type: "Input", |
|
|
|
label: "停车场", |
|
|
|
placeholder: "请输入停车场名称", |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultTitle: ["修正时间", "至"], |
|
|
|
defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
//列表数据 |
|
|
|
function search(e) { |
|
|
|
ajax.getParkingAlyReportList(e).then((res) => { |
|
|
|
ajax.getPlateChangeList(e).then((res) => { |
|
|
|
let { status, data, total } = res |
|
|
|
if (status == 20000) { |
|
|
|
if (data.list) { |
|
|
@ -134,22 +160,51 @@ function PlateChangeMgm() { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 获取下拉数据 |
|
|
|
const getSelectList = () => { |
|
|
|
ajax.getOperator().then((e) => { |
|
|
|
setSearchSelectList([ |
|
|
|
...searchSelectList, |
|
|
|
...e.data |
|
|
|
]) |
|
|
|
//详情数据 |
|
|
|
function getDetailData(e) { |
|
|
|
ajax.getPlateChangeDetail(e).then((res) => { |
|
|
|
let { status, data, total } = res |
|
|
|
if (status == 20000) { |
|
|
|
if (data.list) { |
|
|
|
setVisible(true) |
|
|
|
setDetailData(data.list[0]) |
|
|
|
} else { |
|
|
|
setDetailData(data) |
|
|
|
} |
|
|
|
} else { |
|
|
|
setResultData([]) |
|
|
|
message.error(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
getSelectList(); |
|
|
|
}, []); |
|
|
|
//停车卡订单详情 |
|
|
|
const tkddModal = <div className="ltc-box"> |
|
|
|
<div className="ltc-box-title"><div className="text"></div><div className="line"></div></div> |
|
|
|
<div className="ltc-content"> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">车场名称</div><div className="new-value">{detailData?.road_name || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">修正前车牌</div><div className="new-value">{detailData.plate_old || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">修正后车牌</div><div className="new-value">{detailData.plate_new || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">操作人</div><div className="new-value">{detailData.operatename || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">操作类型</div><div className="new-value">{detailData.correct_type_name || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">修正时间</div><div className="new-value">{detailData.create_time || "--"}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
<div className="plate-change-mgm"> |
|
|
|
<TableModule |
|
|
|
columns={columns} |
|
|
|
tableData={resultData} |
|
|
@ -157,11 +212,27 @@ function PlateChangeMgm() { |
|
|
|
search={search} |
|
|
|
total={total} |
|
|
|
rowKey={"road_name"} |
|
|
|
exportUrl={'/api/ana/dataanalysis/parking_total_analysis_export'} |
|
|
|
exportUrl={'/api/bpm/correct/export_lift'} |
|
|
|
initFormData={{}} |
|
|
|
pageName={'parkingAlyReport'} |
|
|
|
pagename={'plateChangeMgm'} |
|
|
|
/> |
|
|
|
</> |
|
|
|
<Modal |
|
|
|
open={visible} |
|
|
|
width={1500} |
|
|
|
title={'订单详情'} |
|
|
|
onCancel={() => { |
|
|
|
setVisible(false); |
|
|
|
}} |
|
|
|
footer={[<> |
|
|
|
<Button key="back" onClick={() => { |
|
|
|
setVisible(false); |
|
|
|
}}> |
|
|
|
关闭窗口 |
|
|
|
</Button></>]} |
|
|
|
> |
|
|
|
{tkddModal} |
|
|
|
</Modal> |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
|