|
|
@ -19,8 +19,6 @@ import { dictionary } from "@/config/common.js"; |
|
|
|
import "./index.scss"; |
|
|
|
|
|
|
|
function SystemLog() { |
|
|
|
const [carId, setCarId] = useState() |
|
|
|
|
|
|
|
//构建表头 |
|
|
|
const createCol = (label, name, type) => { |
|
|
|
label.length == name.length ? null : console.log('参数缺失', label.length, name.length) |
|
|
@ -36,389 +34,48 @@ function SystemLog() { |
|
|
|
case "序号": |
|
|
|
cm.render = (text, record, index) => index + 1 |
|
|
|
break |
|
|
|
case "退款订单ID": |
|
|
|
case "业务订单ID": |
|
|
|
case "支付订单ID": |
|
|
|
cm.render = (text) => ( |
|
|
|
<> |
|
|
|
<a onClick={() => { |
|
|
|
navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); |
|
|
|
}}>{text}</a> |
|
|
|
</> |
|
|
|
) |
|
|
|
break |
|
|
|
default: break |
|
|
|
} |
|
|
|
arr.push(cm) |
|
|
|
}) |
|
|
|
var obj = { |
|
|
|
title: "操作", |
|
|
|
dataIndex: "operation", |
|
|
|
key: "operation", |
|
|
|
fixed: "right", |
|
|
|
align: "center", |
|
|
|
} |
|
|
|
switch (type) { |
|
|
|
case 2: |
|
|
|
obj.render = (text, record) => (<> |
|
|
|
<span type="primary" style={{ display: 'block', textAlign: 'center' }} onClick={() => { |
|
|
|
setYcddData(record) |
|
|
|
setDetailVisible(true) |
|
|
|
}}> |
|
|
|
<a>详情</a> |
|
|
|
</span> |
|
|
|
</>) |
|
|
|
arr.push(obj) |
|
|
|
break |
|
|
|
default: break |
|
|
|
} |
|
|
|
return arr |
|
|
|
} |
|
|
|
//基本信息检索条件 |
|
|
|
const formSearch = [ |
|
|
|
{ |
|
|
|
name: "carId", |
|
|
|
type: "Input", |
|
|
|
label: "车牌号", |
|
|
|
placeholder: "请输入车牌号", |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "mobile", |
|
|
|
type: "Input", |
|
|
|
label: "会员手机号", |
|
|
|
placeholder: "请输入会员手机号", |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "authState", |
|
|
|
type: "Select", |
|
|
|
label: "认证状态", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "已认证", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "未认证", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "bingState", |
|
|
|
type: "Select", |
|
|
|
label: "绑定状态", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "已绑定", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "未绑定", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultValue: [moment().subtract(1, "month"), moment()], |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
//所有检索条件 |
|
|
|
const ash = [ |
|
|
|
{//1 |
|
|
|
name: "region", |
|
|
|
type: "TreeSelect", |
|
|
|
label: "区域", |
|
|
|
}, |
|
|
|
{//2 |
|
|
|
name: "operator", |
|
|
|
type: "Select", |
|
|
|
label: "商户名称", |
|
|
|
options: dictionary.MerchantName, |
|
|
|
}, |
|
|
|
{//3 |
|
|
|
name: "road", |
|
|
|
type: "Input", |
|
|
|
label: "停车场名称", |
|
|
|
placeholder: "请输入停车场名称", |
|
|
|
}, |
|
|
|
{//4 |
|
|
|
name: "road_type", |
|
|
|
type: "Select", |
|
|
|
label: "车场类型", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "全部", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "路侧平行", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "路侧垂停", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "封闭车场", |
|
|
|
value: 3, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "半封闭车场", |
|
|
|
value: 4, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{//5 |
|
|
|
name: "phone", |
|
|
|
type: "Input", |
|
|
|
label: "手机号", |
|
|
|
placeholder: "请输入手机号", |
|
|
|
}, |
|
|
|
{//6 |
|
|
|
name: "type", |
|
|
|
type: "Select", |
|
|
|
label: "出入场类型", |
|
|
|
placeholder: "请选择出入场类型", |
|
|
|
defaultValue: 1, |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "入场", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "出场", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
|
|
|
|
{//7 |
|
|
|
name: "b", |
|
|
|
type: "Input", |
|
|
|
label: "商品名称", |
|
|
|
placeholder: "请输入商品名称", |
|
|
|
}, |
|
|
|
{//8 |
|
|
|
name: "b", |
|
|
|
type: "Select", |
|
|
|
label: "购买渠道", |
|
|
|
placeholder: "请选择购买渠道", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "全部", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "线上渠道", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "后台录入", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{//9 |
|
|
|
name: "b", |
|
|
|
type: "Select", |
|
|
|
label: "订单状态", |
|
|
|
label: "子系统", |
|
|
|
placeholder: "请选择订单状态", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "全部", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "未生效", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "生效中", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "已失效", |
|
|
|
value: 3, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
{//10 |
|
|
|
name: "payment_channels", |
|
|
|
type: "Select", |
|
|
|
label: "支付渠道", |
|
|
|
placeholder: "请选择支付渠道", |
|
|
|
options: dictionary.PayChannel, |
|
|
|
}, |
|
|
|
{//11 |
|
|
|
name: "payment_equipment", |
|
|
|
type: "Select", |
|
|
|
label: "支付设备", |
|
|
|
placeholder: "请选择支付设备", |
|
|
|
options: dictionary.PayDevice |
|
|
|
}, |
|
|
|
{//12 |
|
|
|
name: "pay_type", |
|
|
|
type: "Select", |
|
|
|
label: "支付方式", |
|
|
|
placeholder: "请选择支付方式", |
|
|
|
options: dictionary.PaydMethod, |
|
|
|
}, |
|
|
|
{//13 |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
{//14 |
|
|
|
name: "b", |
|
|
|
type: "Select", |
|
|
|
label: "退款方式", |
|
|
|
placeholder: "请选择退款方式", |
|
|
|
options: dictionary.PaydMethod, |
|
|
|
}, |
|
|
|
{//15 |
|
|
|
name: "b", |
|
|
|
type: "Input", |
|
|
|
label: "渠道流水号", |
|
|
|
placeholder: "请输入渠道流水号", |
|
|
|
}, |
|
|
|
{//16 |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultTitle: ['支付时间', '至'] |
|
|
|
// defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
{//17 |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultTitle: ['订购时间', '至'] |
|
|
|
// defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
{//18 |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultTitle: ['预约到场时间', '至'] |
|
|
|
// defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
{//19 |
|
|
|
name: "plate", |
|
|
|
type: "Input", |
|
|
|
label: "车牌号", |
|
|
|
placeholder: "请输入车牌号", |
|
|
|
}, |
|
|
|
{//20 |
|
|
|
name: "order_id", |
|
|
|
type: "Input", |
|
|
|
label: "支付订单ID", |
|
|
|
placeholder: "请输入支付订单ID", |
|
|
|
}, |
|
|
|
{//21 |
|
|
|
name: "berth_id", |
|
|
|
type: "Input", |
|
|
|
label: "泊位号", |
|
|
|
placeholder: "请输入泊位号", |
|
|
|
}, |
|
|
|
{//22 |
|
|
|
name: "t", |
|
|
|
type: "Select", |
|
|
|
label: "所属商户", |
|
|
|
placeholder: "请选择所属商户", |
|
|
|
options: dictionary.MerchantName, |
|
|
|
}, |
|
|
|
{//23 |
|
|
|
name: "t", |
|
|
|
type: "Input", |
|
|
|
label: "预付订单ID", |
|
|
|
placeholder: "请输入订单ID", |
|
|
|
}, |
|
|
|
{//24 |
|
|
|
name: "t", |
|
|
|
type: "Input", |
|
|
|
label: "停车记录ID", |
|
|
|
placeholder: "停车记录ID", |
|
|
|
}, |
|
|
|
{//25 |
|
|
|
name: "dealer", |
|
|
|
type: "Input", |
|
|
|
label: "操作人", |
|
|
|
placeholder: "请输入操作人", |
|
|
|
}, |
|
|
|
{//26 |
|
|
|
name: "t", |
|
|
|
type: "Input", |
|
|
|
label: "停车订单ID", |
|
|
|
placeholder: "停车订单ID", |
|
|
|
}, |
|
|
|
{//27 |
|
|
|
name: "t", |
|
|
|
type: "Input", |
|
|
|
label: "欠费区间", |
|
|
|
placeholder: "", |
|
|
|
}, |
|
|
|
{//28 |
|
|
|
name: "timePeriod", |
|
|
|
type: "RangePicker", |
|
|
|
label: "时间段", |
|
|
|
defaultTitle: ['订单修改时间', '至'] |
|
|
|
// defaultValue: [moment().startOf("day"), moment()], |
|
|
|
}, |
|
|
|
{//29 |
|
|
|
name: "b", |
|
|
|
type: "Select", |
|
|
|
label: "修改原因", |
|
|
|
placeholder: "请选择修改原因", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
label: "全部", |
|
|
|
value: 0, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "订单自动找平", |
|
|
|
value: 1, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "异常订单处理", |
|
|
|
value: 2, |
|
|
|
}, |
|
|
|
], |
|
|
|
options: menuData, |
|
|
|
}, |
|
|
|
]; |
|
|
|
const [resultData, setResultData] = useState([]) |
|
|
|
const [menuData, setMenuData] = useState([]) |
|
|
|
const [menuDetailData, setMenuDetailData] = useState([]) |
|
|
|
const [indexData, setIndexData] = useState(1) |
|
|
|
const [ycddData, setYcddData] = useState([])//异常订单数据 |
|
|
|
const [detailVisible, setDetailVisible] = useState(false); |
|
|
|
const [timesVisible, setTimesVisible] = useState(false); //退款尝试次数展开 |
|
|
|
const [tkddVisible, setTkddVisible] = useState(false); |
|
|
|
const [eaeVisible, setEaeVisible] = useState(false);//出入场图片 |
|
|
|
const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 |
|
|
|
const [bigPic, setBigPic] = useState(); |
|
|
|
const [total, setTotal] = useState(0); |
|
|
|
const [tabKey, setTabKey] = useState("1"); |
|
|
|
function changeKey(key) { |
|
|
|
setTabKey(key); |
|
|
|
} |
|
|
|
|
|
|
|
//基本信息查询 |
|
|
|
function search(e) { |
|
|
|
// if (!e.type) { |
|
|
|
// e.type = 1 |
|
|
|
// } |
|
|
|
function getMenu() { |
|
|
|
ajax({ |
|
|
|
url: "/api/ope/car/list", |
|
|
|
type: "post", |
|
|
|
data: { ...e }, |
|
|
|
url: "/api/manage/system/get_system_menu", |
|
|
|
type: "get", |
|
|
|
data: {}, |
|
|
|
}).then((res) => { |
|
|
|
let { status, data, total } = res |
|
|
|
if (status == 20000) { |
|
|
|
setResultData(data) |
|
|
|
// data.map((item) => { |
|
|
|
// item.value = item.id; |
|
|
|
// item.label = item.name; |
|
|
|
// }) |
|
|
|
console.log(data) |
|
|
|
setMenuData(data) |
|
|
|
setTotal(total) |
|
|
|
} else { |
|
|
|
message.error(res.message) |
|
|
@ -444,7 +101,7 @@ function SystemLog() { |
|
|
|
ajax({ |
|
|
|
url: url, |
|
|
|
type: "post", |
|
|
|
data: { ...e, carId: carId }, |
|
|
|
data: { ...e }, |
|
|
|
}).then((res) => { |
|
|
|
let { status, data, total } = res |
|
|
|
if (status == 20000) { |
|
|
@ -461,108 +118,69 @@ function SystemLog() { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
//停车记录信息渲染 |
|
|
|
function renderParkRecord(params) { |
|
|
|
return ( |
|
|
|
<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">{params?.road || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">泊位号</div><div className="new-value">{params.berth_id || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">区域</div><div className="new-value">{params.region || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">商户</div><div className="new-value">{params.operator || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">车场类型</div><div className="new-value">{params.road_type || "--"}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<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">{params.plate || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">会员手机号</div><div className="new-value">{params.phone || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">入场时间</div><div className="new-value">{params.in_time || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">出场时间</div><div className="new-value">{params.out_time || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">停车时长</div><div className="new-value">{params.admission_time || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">订单金额</div><div className="new-value">{params.order_amount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">停车卡折扣</div><div className="new-value">{params.parking_card_discount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">车场折扣</div><div className="new-value">{params.road_discount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">应收金额</div><div className="new-value">{params.receivable_amount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">优惠券</div><div className="new-value">{params.preferential_amount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">优惠总计</div><div className="new-value">{params.preferential_total || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">实付金额</div><div className="new-value">{params.actual_amount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">优惠退款</div><div className="new-value">{params.refund_discount || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">实付退款</div><div className="new-value">{params.actual_refund || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">退款总计</div><div className="new-value">{params.refund_total || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">入场收费员</div><div className="new-value">{params.in_person || "--"}</div> |
|
|
|
</div> |
|
|
|
<div className="ltc-item"> |
|
|
|
<div className="new-item">出场收费员</div><div className="new-value">{params.out_person || "--"}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
//其他页面渲染 |
|
|
|
function renderTable(columns, arr, dataSource) { |
|
|
|
return ( |
|
|
|
<TableModule |
|
|
|
columns={columns} |
|
|
|
tableData={dataSource} |
|
|
|
formSearch={arr} |
|
|
|
valueChange={(v) => { |
|
|
|
console.log(v); |
|
|
|
if (v.zixt) { |
|
|
|
menuData.map((item, index) => { |
|
|
|
if (item.id == v.zixt) { |
|
|
|
setIndexData(index) |
|
|
|
//setMenuDetailData(menuData[index].children) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if(v.b) { |
|
|
|
menuData[indexData].map((item,index)=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
}} |
|
|
|
formSearch={[ |
|
|
|
{ |
|
|
|
name: "zixt", |
|
|
|
type: "Select", |
|
|
|
label: "子系统", |
|
|
|
placeholder: "请选择子系统", |
|
|
|
options: menuData, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "b", |
|
|
|
type: "Select", |
|
|
|
label: "一级菜单", |
|
|
|
placeholder: "请选择一级菜单", |
|
|
|
options: menuData.length ? menuData[indexData]?.children : [], |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "bcc", |
|
|
|
type: "Select", |
|
|
|
label: "二级菜单", |
|
|
|
placeholder: "请选择二级菜单", |
|
|
|
options: menuDetailData.length ? menuDetailData : [], |
|
|
|
}, |
|
|
|
]} |
|
|
|
total={total} |
|
|
|
rowKey={'id'} |
|
|
|
search={searchOther} |
|
|
|
/> |
|
|
|
); |
|
|
|
} |
|
|
|
useEffect(() => { |
|
|
|
searchOther() |
|
|
|
getMenu() |
|
|
|
}, [tabKey]) |
|
|
|
|
|
|
|
console.log(menuData) |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
{renderTable( |
|
|
|
createCol(['车牌号', '车牌颜色', '手机号', '商品名称', '实付金额', '支付渠道', '支付设备', '购买渠道', '支付时间', '订单状态', '渠道流水号'], |
|
|
|
['merchantName', '', 'area', '', 'sectionName', '', 'licensePlateNumber', 'entryTime', 'exitTime', '', 'arrearsAmount'], 1), |
|
|
|
[ash[12]], |
|
|
|
ash, |
|
|
|
resultData |
|
|
|
)} |
|
|
|
<Modal |
|
|
|