7 changed files with 714 additions and 27 deletions
-
2src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx
-
2src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx
-
1src/pages/FinancialMgm/OrderInquiry/ParkingOrderInquiry/index.jsx
-
117src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx
-
10src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.scss
-
244src/pages/OperationCenter/UserMgm/UserAuth/index.scss
-
365src/pages/OperationCenter/UserMgm/UserAuth/loadable.jsx
@ -1,15 +1,360 @@ |
|||
import React, { useState, useRef, useEffect } from "react"; |
|||
// import { message, Pagination, Table, Space, Modal, } from "antd"; |
|||
// import { dictionary, utils } from "@/config/common"; |
|||
// import moment from 'moment' |
|||
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|||
// import ajax from "@/services" |
|||
// import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" |
|||
// import "./index.scss"; |
|||
// import errorImg from "@/assets/images/layout/error.png" |
|||
// import { useLocation } from "react-router-dom"; |
|||
import { |
|||
message, |
|||
Pagination, |
|||
Table, |
|||
Form, |
|||
Space, |
|||
Modal, |
|||
DatePicker, |
|||
Input, |
|||
Button, |
|||
Select, |
|||
} from "antd"; |
|||
const { TextArea } = Input; |
|||
import ajax from '@/config/ajax.js' |
|||
import { TableModule, ResultFlow, QuickMenu } from "@/components"; |
|||
import { dictionary, utils } from "@/config/common"; |
|||
import "./index.scss"; |
|||
function UserAuth() { |
|||
return <div>UserAuth</div> |
|||
const columns = [ |
|||
{ |
|||
title: "序号", |
|||
dataIndex: "index", |
|||
key: "index", |
|||
align: "center", |
|||
fixed: "left", |
|||
render: (text, record, index) => index + 1, |
|||
width: 100, |
|||
}, |
|||
{ |
|||
title: "提交人", |
|||
dataIndex: "operator", |
|||
key: "operator", |
|||
align: "center", |
|||
}, |
|||
{ |
|||
title: "审核状态", |
|||
dataIndex: "auditState", |
|||
key: "auditState", |
|||
align: "center", |
|||
render: (text, record, index) => { |
|||
var color = '' |
|||
switch (text) { |
|||
case "待审核": |
|||
case "残疾车待审核": |
|||
color = 'rgb(16, 141, 233)'; |
|||
break; |
|||
case "已审核": |
|||
case "残疾车已审核": |
|||
color = 'red'; |
|||
break; |
|||
case "已作废": |
|||
case "残疾车已作废": |
|||
color = 'rgb(152, 152, 152)'; |
|||
default: |
|||
break; |
|||
} |
|||
return (<> |
|||
<span type="primary" style={{ width: ' 5px', height: ' 5px', borderRadius: '50%', background: color, display: ' inline-block' }}> |
|||
</span> |
|||
{text} |
|||
</>) |
|||
}, |
|||
}, |
|||
{ |
|||
title: "操作人", |
|||
dataIndex: "operator", |
|||
key: "operator", |
|||
align: "center", |
|||
}, |
|||
{ |
|||
title: "提交日期", |
|||
dataIndex: "create_time", |
|||
key: "create_time", |
|||
align: "center", |
|||
}, |
|||
{ |
|||
title: "更新时间", |
|||
dataIndex: "operate_time", |
|||
key: "operate_time", |
|||
align: "center", |
|||
}, |
|||
{ |
|||
title: "操作", |
|||
dataIndex: "operation", |
|||
key: "operation", |
|||
fixed: "right", |
|||
align: "center", |
|||
render: (text, record, index) => ( |
|||
<> |
|||
<span type="primary" style={{ display: 'block', textAlign: 'center' }} onClick={() => { |
|||
setTag('2'); |
|||
setCarId(record.carId) |
|||
setMyId(record.id) |
|||
setIndexby(index) |
|||
}}> |
|||
<a>通过</a> |
|||
<a>查看</a> |
|||
<a>驳回</a> |
|||
</span> |
|||
</> |
|||
), |
|||
}, |
|||
]; |
|||
const [carId, setCarId] = useState(); |
|||
const [myId, setMyId] = useState(); |
|||
const [loading, setLoading] = useState(false); |
|||
const [tag, setTag] = useState('1'); |
|||
const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 |
|||
const [passVisible, setPassVisible] = useState(false); |
|||
const [refuseVisible, setRefuseVisible] = useState(false); |
|||
const [toText, setToText] = useState(); |
|||
const [bigPic, setBigPic] = useState(); |
|||
const [resultData, setResultData] = useState([]); |
|||
const [total, setTotal] = useState(0); |
|||
const [indexby, setIndexby] = useState(0); |
|||
const [formData, setFormData] = useState({}) |
|||
const [pageData, setPageData] = useState({ |
|||
// 分页参数 |
|||
pn: 1, |
|||
page_size: 15, |
|||
}); |
|||
function onShowSizeChange(pn, page_size) { |
|||
setPageData({ |
|||
pn, |
|||
page_size, |
|||
}); |
|||
} |
|||
|
|||
const handleChange = (value) => { |
|||
console.log(value); |
|||
setFormData({ ...formData, type: value }) |
|||
setPageData({ ...pageData, pn: 1 }) |
|||
//setSendData({ ...sendData, receiver_type: value }) |
|||
}; |
|||
|
|||
function search() { |
|||
ajax({ |
|||
url: "/api/ope/car/certification_list", |
|||
type: "post", |
|||
data: { ...formData, ...pageData }, |
|||
}).then((res) => { |
|||
let { status, data, total } = res |
|||
if (status == 20000) { |
|||
setResultData(data) |
|||
setTotal(total) |
|||
} else { |
|||
message.error(res.message) |
|||
} |
|||
}) |
|||
} |
|||
function toAudits(e) { |
|||
ajax({ |
|||
url: "/api/ope/car/audit", |
|||
type: "post", |
|||
data: { id: myId, audit: e ? "pass" : "refuse", text: e ? null : toText }, |
|||
}).then((res) => { |
|||
if (res.status == 20000) { |
|||
message.success(res.message) |
|||
setPassVisible(false) |
|||
setRefuseVisible(false) |
|||
setToText('') |
|||
setTimeout(() => { |
|||
window.location.reload() |
|||
}, 1000) |
|||
} else { |
|||
message.error(res.message) |
|||
} |
|||
}) |
|||
} |
|||
const handleOpinion = (v) => { |
|||
setToText(v.target.value) |
|||
} |
|||
useEffect(() => { |
|||
search() |
|||
}, [formData, pageData]); |
|||
return ( |
|||
<> |
|||
{ |
|||
tag == 2 ? |
|||
<div className="push-box"> |
|||
<div className="push-back" onClick={() => { setTag('1') }}>返回</div> |
|||
<div className="ltc-box"> |
|||
<div className="ltc-box-title"><div className="ltc-icon"></div>身份认证</div> |
|||
<div className="ltc-content"> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">姓名</div> |
|||
<div className="new-value">{resultData[indexby]?.mo || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">性别</div> |
|||
<div className="new-value">{resultData[indexby].p || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">年龄</div> |
|||
<div className="new-value">{resultData[indexby].c || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">会员手机号</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">身份证号</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">出生日期</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">认证状态</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">提交日期</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
<div className="ltc-item"> |
|||
<div className="new-item">更新日期</div> |
|||
<div className="new-value">{resultData[indexby].a || "--"}</div> |
|||
</div> |
|||
</div> |
|||
<div className="ltc-content"> |
|||
<div className="ltc-item ltc-item-img"> |
|||
<img src={resultData[indexby].vehicle_travel_license_img1 || require("../../../../../src/assets/images/error-img.png")} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img1); setBigpicVisible(true) }} /> |
|||
</div> |
|||
<div className="ltc-item ltc-item-img"> |
|||
<img src={resultData[indexby].vehicle_travel_license_img2 || require("../../../../../src/assets/images/error-img.png")} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img2); setBigpicVisible(true) }} /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{resultData[indexby].auditState == '待审核' || resultData[indexby].auditState == '残疾车待审核' ? |
|||
<div className="push-btn-box"> |
|||
<div className="push-btn" onClick={() => { setPassVisible(true) }}>通过</div> |
|||
<div className="push-btn push-cancel" onClick={() => { setRefuseVisible(true) }}>驳回</div> |
|||
<div className="push-btn push-cancel" onClick={() => { setTag('1') }}>取消</div> |
|||
</div> : null} |
|||
</div > : |
|||
<div> |
|||
<div className="search-box"> |
|||
<div className="time">审核状态: |
|||
<div style={{ width: "400px", display: "inline-block" }}> |
|||
<Select |
|||
style={{ |
|||
width: 180, |
|||
}} |
|||
onChange={handleChange} |
|||
placeholder={"请选择审核状态"} |
|||
options={[ |
|||
{ |
|||
value: 0, |
|||
label: '全部', |
|||
}, |
|||
{ |
|||
value: 1, |
|||
label: '待审核', |
|||
}, |
|||
{ |
|||
value: 2, |
|||
label: '已审核', |
|||
}, |
|||
{ |
|||
value: 3, |
|||
label: '已作废', |
|||
}, |
|||
]} |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div className="result-box right-list"> |
|||
<ResultFlow |
|||
hasLoad={true} |
|||
loading={loading} |
|||
resultData={resultData} |
|||
message={"暂无数据"} |
|||
> |
|||
<div className="table-wrap"> |
|||
<Table |
|||
columns={columns} |
|||
dataSource={resultData} |
|||
pagination={false} |
|||
// scroll={{ x: 1500 }} |
|||
/> |
|||
</div> |
|||
<div> |
|||
<Pagination |
|||
className="pagination-common" |
|||
showSizeChanger={true} |
|||
showQuickJumper={true} |
|||
//showTotal={() => `共 ${total} 条`} |
|||
total={total} |
|||
current={pageData.pn} |
|||
pageSize={pageData.page_size} |
|||
pageSizeOptions={dictionary?.pageSizeOptions} |
|||
onChange={onShowSizeChange} |
|||
onShowSizeChange={onShowSizeChange} |
|||
/> |
|||
</div> |
|||
</ResultFlow> |
|||
</div> |
|||
</div> |
|||
} |
|||
<Modal |
|||
open={bigpicVisible} |
|||
width={1500} |
|||
title={''} |
|||
className="eae-modal" |
|||
onCancel={() => { |
|||
setBigpicVisible(false); |
|||
}} |
|||
footer={false} |
|||
> |
|||
<div> |
|||
<div className="eae-modal-item"> |
|||
<img src={bigPic} width={1420} /> |
|||
</div> |
|||
</div> |
|||
</Modal> |
|||
<Modal |
|||
open={passVisible} |
|||
width={500} |
|||
title={'提示'} |
|||
className="eae-modal" |
|||
onCancel={() => { |
|||
setPassVisible(false); |
|||
}} |
|||
onOk={() => { toAudits(1) }} |
|||
> |
|||
<div> |
|||
<div className="pass-icon">!</div>请您确认审核资料是否无误! |
|||
</div> |
|||
</Modal> |
|||
<Modal |
|||
open={refuseVisible} |
|||
width={800} |
|||
title={'拒绝详情'} |
|||
className="eae-modal" |
|||
onCancel={() => { |
|||
setRefuseVisible(false); |
|||
}} |
|||
onOk={() => { toAudits(0) }} |
|||
> |
|||
<div> |
|||
<div className="eae-modal-item"> |
|||
<div className="eae-text">请输入拒审理由:</div> |
|||
<TextArea |
|||
placeholder="请输入" |
|||
value={formData.text} |
|||
style={{ width: 500 }} |
|||
onChange={handleOpinion} |
|||
/> |
|||
</div> |
|||
</div> |
|||
</Modal> |
|||
</> |
|||
); |
|||
} |
|||
|
|||
export default UserAuth; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue