Browse Source

fix():bug修改

tags/PMS_Frontend_v1.0.5-develop
xingjx 1 year ago
parent
commit
0eb2f7beef
  1. 15
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx
  2. 17
      src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx
  3. 166
      src/pages/OperationCenter/OperationSales/CreditScoreMgm/index.scss
  4. 462
      src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx
  5. 2
      src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx
  6. 8
      src/pages/OutRoadMgm/OutRoadOverview/index.scss
  7. 2
      src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx
  8. 67
      src/services/OperationCenter/OperationSales/index.js

15
src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx

@ -238,8 +238,19 @@ function ParkingAlyPeriod() {
};
});
setParkData(lineChartOption(areaNames, xAxisData, "饱和度", seriesData, areaNames));
let tooltip = {
formatter: (params) => {
let str = ''
params.map((item) => {
str = str + ("<div style='display:inline-block;width:12px;height:12px;border-radius:10px;background:" + item.color + "'></div>" + item.seriesName + ":" + item.data + "%<br/>")
})
return `<div class="tooltip-box">
${params[0].axisValue}<br/>
${str}
</div>`
}
}
setParkData({...lineChartOption(areaNames, xAxisData, "饱和度", seriesData, areaNames),...tooltip});
};
const randerColor = () => {
let arr = [];

17
src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx

@ -139,20 +139,7 @@ function ProductOrderInquiry() {
type: "Select",
label: "购买渠道",
placeholder: "请选择购买渠道",
options: [
{
label: "全部",
value: 0,
},
{
label: "线上渠道",
value: 1,
},
{
label: "后台录入",
value: 2,
},
],
options: sysConfig.saleChannel || [],
},
{//9
name: "order_status",
@ -392,7 +379,7 @@ function ProductOrderInquiry() {
plate_number: '',
phone: '',
goods_name: '',
buy_channel: '',
buy_channel: 0,
pay_channel: 0,
order_status: '',
pay_device: '',

166
src/pages/OperationCenter/OperationSales/CreditScoreMgm/index.scss

@ -295,4 +295,170 @@
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
background-color: #3b97ff;
}
.ltc-box {
width: 100%;
.ltc-box-title {
font-size: 18px;
font-weight: bolder;
width: 100%;
white-space: nowrap;
overflow: hidden;
.text {
display: inline-block;
}
.line {
display: inline-block;
border: 1px dotted #607092;
width: inherit;
margin-bottom: 6px;
}
.ltc-icon {
width: 5px;
background: #0080db;
height: 19px;
display: inline-block;
margin-right: 10px;
}
.ltc-btn {
display: inline-block;
border: 1px solid;
border-radius: 5px;
margin: 0 10px;
width: 60px;
height: 35px;
line-height: 35px;
text-align: center;
background: #409eff;
color: #fff;
font-weight: 100;
cursor: pointer;
}
.ltc-cancel {
background: #fff;
color: #000;
}
}
.ltc-box-line {
border: 1px solid #e7e7e7;
margin: 8px 0;
}
.ltc-box-in {
margin-left: 20px;
.ant-descriptions {
margin-left: 20px;
}
}
.ltc-title {
margin: auto;
width: 50%;
text-align: center;
font-size: 18px;
font-weight: 600;
}
.ltc-content {
margin: auto;
padding: 20px;
.ltc-item {
font-size: 14px;
margin: 6px 0;
display: inline-flex;
width: 470px;
.new-item {
display: inline-block;
width: 120px;
height: 32px;
line-height: 32px;
background: rgba(150, 161, 192, 0.24);
text-align: center;
}
.golit {
background: #454d61;
width: auto;
}
.new-value {
display: inline-block;
width: 320px;
height: 32px;
line-height: 32px;
text-align: center;
background: #3E4557;
box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12);
.ant-select {
width: 100%;
.ant-select-selector {
width: 100%;
}
}
.credit-inputnum {
width: 100%;
.ant-input-number-handler-wrap {
position: absolute;
top: 0;
right: 0;
width: 22px;
height: 100%;
border-radius: 0 2px 2px 0;
opacity: 0;
transition: opacity .24s linear .1s;
}
.ant-input-number-input-wrap {
width: 100%;
}
}
}
.ltc-item-input {
display: inline-block;
width: 200px;
}
div {
width: 150px;
}
}
}
}
.form-search {
.form-item {
width: 300px;
display: inline-block;
margin: 10px 20px 10px 10px;
span {
display: inline-block;
}
.ant-select {
width: 76%;
}
input {
background: #3e4557;
}
}
.search-btn {
display: inline-block;
text-align: center;
width: 68px;
height: 34px;
line-height: 34px;
background: linear-gradient(180deg, #3aa9ff, #59b7ff);
border-radius: 4px;
margin-right: 15px;
margin-top: 10px;
cursor: pointer;
}
}
}

462
src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx

@ -10,7 +10,8 @@ import {
Select,
Tabs,
Descriptions,
Popover
Popover,
InputNumber
} from "antd";
import moment from "moment";
import ajax from '@/services'
@ -19,11 +20,30 @@ import { dictionary } from "@/config/common.js";
import "./index.scss";
//
function CreditScoreMgm() {
const [resultData, setResultData] = useState([])
const [detailData, setDetailData] = useState([])
const [resultData, setResultData] = useState([])//
const [detailData, setDetailData] = useState([])//使
const [saveData, setSaveData] = useState({})//
const [redeemData, setRedeemData] = useState([])//
const [addData, setAddData] = useState({})//
const [award, setAward] = useState({})
const [loading, setLoading] = useState(false)
const [total, setTotal] = useState(0);
const [redeemTotal, setRedeemTotal] = useState(0);
const [userId, setUserId] = useState();
const [awardId, setAwardId] = useState();
const [pageInfo, setPageInfo] = useState({
pn: 1,
page_size: 15
});
const [redeemPageInfo, setRedeemPageInfo] = useState({
pn: 1,
page_size: 15
});
const [visible, setVisible] = useState(false);
const [tipVisible, setTipVisible] = useState(false);
const [ruleVisible, setRuleVisible] = useState(false);
const [redeemVisible, setRedeemVisible] = useState(false);
const [editVisible, setEditVisible] = useState({ visible: false, type: 0 });
const [searchSelectList, setSearchSelectList] = useState([]); //
const columns = [
{
@ -35,43 +55,43 @@ function CreditScoreMgm() {
},
{
title: "用户ID",
dataIndex: "1",
key: "2",
dataIndex: "id",
key: "id",
align: "center",
fixed: "right",
},
{
title: "手机号",
dataIndex: "re",
key: "re",
dataIndex: "phone",
key: "phone",
align: "center",
fixed: "right",
},
{
title: "用户昵称",
dataIndex: "re",
key: "rec",
dataIndex: "name",
key: "name",
align: "center",
fixed: "right",
},
{
title: "信用积分",
dataIndex: "av",
key: "ave",
dataIndex: "points",
key: "points",
align: "center",
fixed: "right",
},
{
title: "绑定车牌",
dataIndex: "av",
key: "ave",
dataIndex: "plate",
key: "plate",
align: "center",
fixed: "right",
},
{
title: "更新时间",
dataIndex: "average_park_time",
key: "average_park_time",
dataIndex: "update_time",
key: "update_time",
align: "center",
fixed: "right",
},
@ -83,27 +103,12 @@ function CreditScoreMgm() {
fixed: "right",
render: (_, record) => {
return (
// <Popover
// content={
// <div className="popover-content">
// <div>
// <a
// onClick={() => {
// }}
// >
//
// </a>
// </div>
// </div>
// }
// >
// <Button type="primary"></Button>
// </Popover>
<div className="popover-content">
<div>
<a
onClick={() => {
setUserId(record.id)
searchDetail({ id: record.id })
setVisible(true);
}}
>
@ -118,37 +123,108 @@ function CreditScoreMgm() {
const detailColumns = [
{
title: "使用时间",
dataIndex: "ave",
key: "avera",
dataIndex: "time",
key: "time",
align: "center",
fixed: "right",
},
{
title: "内容",
dataIndex: "re",
key: "rec",
dataIndex: "content",
key: "content",
align: "center",
fixed: "right",
},
{
title: "消耗",
dataIndex: "av",
key: "ave",
dataIndex: "consume",
key: "consume",
align: "center",
fixed: "right",
},
];
//
const redeemColumns = [
{
title: "序号",
dataIndex: "index",
key: "index",
align: "center",
fixed: "right",
},
{
title: "奖品名称",
dataIndex: "award",
key: "award",
align: "center",
fixed: "right",
},
{
title: "兑换所需积分",
dataIndex: "redeem_points",
key: "redeem_points",
align: "center",
fixed: "right",
},
{
title: "奖品总量",
dataIndex: "total_num",
key: "total_num",
align: "center",
fixed: "right",
},
{
title: "奖品剩余",
dataIndex: "surplus_num",
key: "surplus_num",
align: "center",
fixed: "right",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
align: "center",
fixed: "right",
render: (_, record) => {
return (
<div className="popover-content">
<div>
<a
style={{ marginRight: 10 }}
onClick={() => {
setAwardId(record.id)
setRedeemEdit({ id: record.id })
setEditVisible({ visible: true, type: 0 })
}}
>
编辑
</a>
<a
onClick={() => {
setAwardId(record.id)
setTipVisible(true)
}}
>
删除
</a>
</div>
</div>
);
},
},
];
//
const formSearch = [
{
name: "r",
name: "phone",
type: "Input",
label: "手机号",
placeholder: "请输入手机号",
},
{
name: "r3",
name: "plate",
type: "Input",
label: "车牌号",
placeholder: "请输入车牌号",
@ -160,26 +236,121 @@ function CreditScoreMgm() {
defaultValue: [moment().startOf("day"), moment()],
}
]
//
const paginationProps = {
className: "pagination-common",
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
}
//
function search(e) {
ajax.getParkingAlyReportList(e).then((res) => {
ajax.getCreditScoreList(e).then((res) => {
let { status, data, total } = res
if (status == 20000) {
if (data.list) {
setResultData(data.list)
setTotal(data.total_records)
} else {
setResultData(data)
setTotal(total)
}
} else {
setResultData([])
message.error(res.message)
}
}).catch(e => {
console.log(e)
//setResultData([{index:1}])
})
}
//使
function searchDetail(e) {
ajax.getCreditScoreDetailList({ ...pageInfo, ...e }).then((res) => {
let { status, data, total } = res
if (status == 20000) {
if (data.list) {
setDetailData(data.list)
setTotal(data.total_records)
} else {
setDetailData(data)
setTotal(total)
}
} else {
setDetailData([])
message.error(res.message)
}
}).catch(e => {
console.log(e)
setDetailData([{}])
})
}
//
function setRule(e) {
ajax.getCreditScoreRule(e).then((res) => {
let { status, data, total } = res
if (status == 20000) {
setAddData(data)
setRuleVisible(false)
} else {
setAddData({})
message.error(res.message)
}
})
}
//
function getRedeemList(e) {
ajax.getCreditScoreRedeem({ ...redeemPageInfo, ...e }).then((res) => {
let { status, data, total } = res
if (status == 20000) {
if (data.list) {
setRedeemData(data.list)
setRedeemTotal(data.total_records)
} else {
setRedeemData(data)
setRedeemTotal(total)
}
} else {
setRedeemData([])
message.error(res.message)
}
}).catch(e => {
console.log(e)
setRedeemData([{}])
})
}
//
function setRedeemEdit(e) {
ajax.getCreditScoreRedeemAdd(e).then((res) => {
let { status, data, total } = res
if (status == 20000) {
if (data.list) {
setAddData(data.list)
} else {
setAddData(data)
}
getRedeemList()
setEditVisible(false)
} else {
setAddData({})
message.error(res.message)
}
})
}
//
function setRedeemDel(e) {
ajax.getCreditScoreRedeemDel(e).then((res) => {
let { status, data, total } = res
if (status == 20000) {
getRedeemList()
setTipVisible(false)
} else {
message.error(res.message)
}
})
}
//
const getSelectList = () => {
ajax.getOperator().then((e) => {
@ -203,7 +374,7 @@ function CreditScoreMgm() {
search={search}
total={total}
isExport={false}
rowKey={"road_name"}
rowKey={"id"}
initFormData={{}}
diyButton={
<>
@ -211,6 +382,7 @@ function CreditScoreMgm() {
type="primary"
style={{ width: '116px' }}
onClick={() => {
setRule()
setRuleVisible(true)
}}
>
@ -220,6 +392,8 @@ function CreditScoreMgm() {
type="primary"
style={{ width: '116px' }}
onClick={() => {
getRedeemList();
setRedeemVisible(true)
}}
>
积分兑换配置
@ -244,15 +418,144 @@ function CreditScoreMgm() {
columns={detailColumns}
dataSource={detailData}
scroll={{ y: 670 }}
//loading={loading}
loading={loading}
pagination={false}
/>
<Pagination
{...paginationProps}
className="pagination-common"
current={pageInfo.pn}
pageSize={pageInfo.page_size}
total={total}
onChange={(current, size) => {
setPageInfo({
...pageInfo,
...{ pn: current, page_size: size }
});
searchDetail({ id: userId, pn: current, page_size: size })
}}
/>
</div>
</Modal>
<Modal
open={redeemVisible}
width={1600}
title={'积分兑换配置'}
className="credit-modal"
onCancel={() => {
setRedeemVisible(false);
}}
onOk={() => { getRedeemList({ award: award }) }}
>
<div>
<div className="form-search">
{/* <div className="form-item">
<Input
addonBefore={"奖品名称"}
placeholder="请输入奖品名称"
value={redeemData.road_name}
onChange={(e) => { setFormData({ ...redeemData, road_name: e.target.value }) }}
></Input>
</div> */}
<div className="form-item">
<span>奖品名称</span>
<Select
value={''}
placeholder="请选择"
options={[]}
onChange={(e) => { setAward(e) }}
></Select>
</div>
<div className="search-btn" onClick={() => { }}>查询</div>
</div>
<Table
rowKey={(row) => row?.order_id || row?.id || row?.deal_record_id || Math.random() * 10000}
columns={redeemColumns}
dataSource={redeemData || [{}]}
scroll={{ y: 670 }}
loading={loading}
pagination={false}
/>
<Pagination
{...paginationProps}
className="pagination-common"
current={redeemPageInfo.pn}
pageSize={redeemPageInfo.page_size}
total={redeemTotal}
onChange={(current, size) => {
setRedeemPageInfo({
...redeemPageInfo,
...{ pn: current, page_size: size }
});
searchDetail({ award: award, pn: current, page_size: size })
}}
/>
</div>
</Modal>
<Modal
open={editVisible.visible}
width={550}
title={editVisible.type ? '编辑' : '添加'}
className="credit-modal"
onCancel={() => {
setEditVisible({ visible: false, type: 0 })
}}
onOk={() => { }}
>
<div className="ltc-box">
<div className="ltc-content">
<div className="ltc-item">
<div className="new-item">奖品名称</div>
<div className="new-value">
<Select
value={addData?.award}
placeholder="请选择"
options={[]}
onChange={(e) => { setAddData({ ...addData, award: e }) }}
></Select>
</div>
</div>
<div className="ltc-item">
<div className="new-item">兑换所需积分</div>
<div className="new-value">
<InputNumber
className="credit-inputnum"
value={addData?.redeem_points}
onChange={(e) => { setAddData({ ...addData, redeem_points: e }) }}
/>
</div>
</div>
<div className="ltc-item">
<div className="new-item">奖品总量</div>
<div className="new-value">
<InputNumber
className="credit-inputnum"
value={addData?.total_num}
onChange={(e) => { setAddData({ ...addData, total_num: e }) }}
/>
</div>
</div>
</div>
</div>
</Modal>
<Modal
open={tipVisible}
width={300}
title={'提示'}
className="credit-modal"
onCancel={() => {
setTipVisible(false);
}}
onOk={() => { setRedeemDel({ id: awardId }) }}
>
<div>
确定要删除该条数据
</div>
</Modal>
<Modal
open={ruleVisible}
width={800}
title={'积分规则配置'}
width={550}
title={'积分配置'}
className="credit-modal"
onCancel={() => {
setRuleVisible(false);
@ -261,21 +564,68 @@ function CreditScoreMgm() {
>
<div className="ltc-box">
<div className="ltc-box-title">
<div className="text">停车订单</div>
<div className="line"></div>
</div>
<div className="ltc-box-title">
<div className="text">车厂详情</div>
<div className="line" style={{ width: "40%" }}></div><div className="text">注册和支付积分</div><div className="line" style={{ width: "40%" }}></div>
</div>
<div className="ltc-content">
<div className="ltc-item">
<div className="new-item">用户ID</div><div className="new-value"></div>
<div className="new-item">注册可得积分</div>
<div className="new-value">
<InputNumber
className="credit-inputnum"
min={0}
value={saveData?.enroll_points}
onChange={(e) => { setSaveData({ ...saveData, enroll_points: e }) }}
/>
</div>
</div>
<div className="ltc-item">
<div className="new-item">支付一元可得积分</div>
<div className="new-value">
<InputNumber
className="credit-inputnum"
min={0}
value={saveData?.cover_value}
onChange={(e) => { setSaveData({ ...saveData, cover_value: e }) }}
/>
</div>
</div>
</div>
<div className="ltc-box-title">
<div className="line" style={{ width: "40%" }}></div><div className="text">积分倒扣机制</div><div className="line" style={{ width: "40%" }}></div>
</div>
<div className="ltc-content">
<div className="ltc-item">
<div className="new-item">手机号</div><div className="new-value"></div>
<div className="new-item golit">欠费金额每高于</div>
<div className="new-value" style={{ width: "100px" }}>
<InputNumber
className="credit-inputnum"
min={0}
value={saveData?.amount_owed}
onChange={(e) => { setSaveData({ ...saveData, amount_owed: e }) }}
/>
</div>
<div className="new-item golit">元扣除</div>
<div className="new-value" style={{ width: "100px" }}>
<InputNumber
className="credit-inputnum"
min={0}
value={saveData?.deducting_points}
onChange={(e) => { setSaveData({ ...saveData, deducting_points: e }) }}
/>
</div>
<div className="new-item golit">积分</div>
</div>
<div className="ltc-item">
<div className="new-item">昵称</div><div className="new-value"></div>
<div className="new-item golit">欠费每超过一月倒扣</div>
<div className="new-value" style={{ width: "100px" }}>
<InputNumber
className="credit-inputnum"
min={0}
value={saveData?.month_deducting_points}
onChange={(e) => { setSaveData({ ...saveData, month_deducting_points: e }) }}
/>
</div>
<div className="new-item golit">积分</div>
</div>
</div>
</div>

2
src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx

@ -675,7 +675,7 @@ function UserInfo() {
}).then((res) => {
let { status, data, total } = res
if (status == 20000) {
message.success(res.message)
message.success("解绑成功")
searchDetail(baseDetailData)
} else {
message.error(res.message)

8
src/pages/OutRoadMgm/OutRoadOverview/index.scss

@ -98,6 +98,10 @@ $color-primary: var(--color-primary);
color: #fff;
background-color: #f8921c;
}
.text {
display: inline-flex;
width: 142px;
}
}
}
}
@ -124,6 +128,10 @@ $color-primary: var(--color-primary);
color: #fff;
background-color: #f8921c;
}
.text {
display: inline-flex;
width: 142px;
}
}
}
}

2
src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx

@ -463,7 +463,7 @@ const OutRoadOverview = () => {
<li>
<div>
<span className="number">{index + 1}</span>
<span>{item.road_name}</span>
<span className="text">{item.road_name}</span>
</div>
<span>{item.num}</span>
</li>

67
src/services/OperationCenter/OperationSales/index.js

@ -24,7 +24,7 @@ const handleCouponInsert = (p) => {
type: 'post',
data: p
})
}
}
// 优惠券管理-优惠券规则-下架
const handleCouponDown = (p) => {
@ -33,7 +33,7 @@ const handleCouponDown = (p) => {
type: 'post',
data: p
})
}
}
// // 优惠券管理-优惠券规则-删除
// const handleCouponDelete = (p) => {
// return ajax({
@ -44,7 +44,7 @@ const handleCouponDown = (p) => {
// }
// 优惠券管理-优惠券规则编辑
const handleCouponEdit = (p)=>{
const handleCouponEdit = (p) => {
return ajax({
url: "/api/ope/coupon/edit",
type: 'post',
@ -236,15 +236,61 @@ const getCountList = (p) => {
});
};
// 优惠券管理-核销统计 导出
const handleCountExport = (p) => {
const handleCountExport = (p) => {
return ajax({
url: "/api/ope/coupon/count_export",
type: "post",
data: p,
});
};
// 信用积分管理-列表
const getCreditScoreList = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
// 信用积分管理-使用记录
const getCreditScoreDetailList = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
// 信用积分管理-积分规则配置
const getCreditScoreRule = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
// 信用积分管理-积分兑换配置
const getCreditScoreRedeem = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
// 信用积分管理-积分兑换配置添加和编辑
const getCreditScoreRedeemAdd = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
// 信用积分管理-积分兑换配置删除
const getCreditScoreRedeemDel = (p) => {
return ajax({
url: "/api",
type: "post",
data: p,
});
};
export default {
getCouponList,
getCouponOptions,
@ -273,5 +319,12 @@ export default {
yardDiscountDelete,
handleCouponDown,
handleAuditTemplate,
handleCouponEdit
handleCouponEdit,
getCreditScoreList,
getCreditScoreDetailList,
getCreditScoreRule,
getCreditScoreRedeem,
getCreditScoreRedeemAdd,
getCreditScoreRedeemDel,
};
Loading…
Cancel
Save