diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx index 5693ce2..09ec139 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkingAlyPeriod/loadable.jsx +++ b/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 + ("
" + item.seriesName + ":" + item.data + "%
") + }) + return `
+ ${params[0].axisValue}
+ ${str} +
` + } + } + setParkData({...lineChartOption(areaNames, xAxisData, "饱和度", seriesData, areaNames),...tooltip}); }; const randerColor = () => { let arr = []; diff --git a/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx b/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx index a465568..0a646c4 100644 --- a/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx +++ b/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: '', diff --git a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/index.scss b/src/pages/OperationCenter/OperationSales/CreditScoreMgm/index.scss index dc86cbd..d85c98c 100644 --- a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/index.scss +++ b/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; + } + } } \ No newline at end of file diff --git a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx b/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx index 87aea96..783d925 100644 --- a/src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx +++ b/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 ( - // - //
- // { - - // }} - // > - // 查看 - // - //
- // - // } - // > - // - //
{ + 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 ( +
+
+ { + setAwardId(record.id) + setRedeemEdit({ id: record.id }) + setEditVisible({ visible: true, type: 0 }) + }} + > + 编辑 + + { + setAwardId(record.id) + setTipVisible(true) + }} + > + 删除 + +
+
+ ); + }, + }, + ]; //检索条件 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} /> + { + setPageInfo({ + ...pageInfo, + ...{ pn: current, page_size: size } + }); + searchDetail({ id: userId, pn: current, page_size: size }) + }} + /> +
+ + { + setRedeemVisible(false); + }} + onOk={() => { getRedeemList({ award: award }) }} + > +
+
+ {/*
+ { setFormData({ ...redeemData, road_name: e.target.value }) }} + > +
*/} +
+ 奖品名称 + +
+
{ }}>查询
+
+ row?.order_id || row?.id || row?.deal_record_id || Math.random() * 10000} + columns={redeemColumns} + dataSource={redeemData || [{}]} + scroll={{ y: 670 }} + loading={loading} + pagination={false} + /> + { + setRedeemPageInfo({ + ...redeemPageInfo, + ...{ pn: current, page_size: size } + }); + searchDetail({ award: award, pn: current, page_size: size }) + }} + /> + + + { + setEditVisible({ visible: false, type: 0 }) + }} + onOk={() => { }} + > +
+
+
+
奖品名称
+
+ +
+
+
+
兑换所需积分
+
+ { setAddData({ ...addData, redeem_points: e }) }} + /> +
+
+
+
奖品总量
+
+ { setAddData({ ...addData, total_num: e }) }} + /> +
+
+
+
+
+ { + setTipVisible(false); + }} + onOk={() => { setRedeemDel({ id: awardId }) }} + > +
+ 确定要删除该条数据?
{ setRuleVisible(false); @@ -261,21 +564,68 @@ function CreditScoreMgm() { >
-
停车订单
-
-
-
-
车厂详情
+
注册和支付积分
-
用户ID
+
注册可得积分
+
+ { setSaveData({ ...saveData, enroll_points: e }) }} + /> +
+
+
+
支付一元可得积分
+
+ { setSaveData({ ...saveData, cover_value: e }) }} + /> +
+
+
+
积分倒扣机制
+
+
-
手机号
+
欠费金额每高于
+
+ { setSaveData({ ...saveData, amount_owed: e }) }} + /> +
+
元扣除
+
+ { setSaveData({ ...saveData, deducting_points: e }) }} + /> +
+
积分
-
昵称
+
欠费每超过一月,倒扣
+
+ { setSaveData({ ...saveData, month_deducting_points: e }) }} + /> +
+
积分
diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx index 7d05cb6..f3954c2 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx +++ b/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) diff --git a/src/pages/OutRoadMgm/OutRoadOverview/index.scss b/src/pages/OutRoadMgm/OutRoadOverview/index.scss index 25d89a8..795f918 100644 --- a/src/pages/OutRoadMgm/OutRoadOverview/index.scss +++ b/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; + } } } } diff --git a/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx b/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx index 5cae8ec..fc722ff 100644 --- a/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx +++ b/src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx @@ -463,7 +463,7 @@ const OutRoadOverview = () => {
  • {index + 1} - {item.road_name} + {item.road_name}
    {item.num}
  • diff --git a/src/services/OperationCenter/OperationSales/index.js b/src/services/OperationCenter/OperationSales/index.js index c969ef4..d9d0c27 100644 --- a/src/services/OperationCenter/OperationSales/index.js +++ b/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, };