From bdddfc87073b409313d62cb0f5459b841ac33cd9 Mon Sep 17 00:00:00 2001 From: guoxin Date: Thu, 19 Oct 2023 15:56:24 +0800 Subject: [PATCH] =?UTF-8?q?fix():=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/base.scss | 19 +++ src/assets/css/mixin.scss | 4 +- .../InRoadMgm/BusinessMgm/ChargeRules/index.scss | 50 ++++++ .../InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx | 177 ++++++++++++++++++++- .../CallbackSuggestion/index.scss | 4 +- .../CallbackSuggestion/loadable.jsx | 17 +- .../OperationCenter/CustomerServieMgm/index.js | 11 +- src/services/search.js | 12 +- 8 files changed, 282 insertions(+), 12 deletions(-) diff --git a/src/assets/css/base.scss b/src/assets/css/base.scss index f889376..57b4ce3 100644 --- a/src/assets/css/base.scss +++ b/src/assets/css/base.scss @@ -53,6 +53,25 @@ a { .right-list .cc-result-flow .table-wrap .yisa-table .ant-table-tbody tr:nth-child(even) td { background-color: #3e4557 !important; } +.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content { + max-height: 715px; + overflow: auto; +} +.ant-table-content::-webkit-scrollbar { + width: 5px; +} +.ant-table-content::-webkit-scrollbar-thumb { + background-color: #9da2ab; + border-radius: 10px; +} +.ant-table-thead{ + position: sticky; + top: 0; + z-index: 1; +} +.ant-table.ant-table-bordered>.ant-table-container{ + border-left: none !important; +} .colorBtn { width: 90px; height: 36px; diff --git a/src/assets/css/mixin.scss b/src/assets/css/mixin.scss index 0c5cbb5..924eb57 100644 --- a/src/assets/css/mixin.scss +++ b/src/assets/css/mixin.scss @@ -11,14 +11,14 @@ &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-corner, &::-webkit-scrollbar-track { - background: #3B97FF; + background: #9da2ab; } &::-webkit-scrollbar { width: 4px; height: 4px; } &::-webkit-scrollbar-thumb { - background: #{$item}; + background: #9da2ab; border-radius: 2px; } } diff --git a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss index d40a7c4..4fe3d51 100644 --- a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss +++ b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss @@ -104,6 +104,7 @@ $color-primary : var(--color-primary); border-top: none !important; border-left: none !important; } + .ant-table-tbody .ant-table-row .ant-table-cell{ background-color: #3e4557 !important; color: #ffffff !important; @@ -399,4 +400,53 @@ $color-primary : var(--color-primary); margin-left: 20px; } } +} +.bindModal{ + width: 1000px !important; + .selectChange{ + text-align: center; + } + .patkPay{ + display: flex; + margin-top: 20px; + margin: 20px 0 0 20px; + .bind{ + margin-left: 20px; + .colorBtn{ + height: 36px; + } + } + } + .bindTable{ + margin-top: 30px; + } + .ant-table-thead .ant-table-cell{ + background-color: #616b83 !important; + color: #ffffff !important; + font-size: 14px; + font-family: Microsoft YaHei, Microsoft YaHei-Bold; + font-weight: 700; + text-align: center; + border-right: none !important; + border-top-color: #888f9d !important; + border-color: #888f9d !important; + } + .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, .ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{ + border-top: none !important; + border-left: none !important; + } + .ant-table-tbody>tr.ant-table-placeholder:hover>td{ + background: none !important; + } + .ant-table-tbody .ant-table-row .ant-table-cell{ + background-color: #3e4557 !important; + color: #ffffff !important; + text-align: center; + font-size: 14px; + font-family: Microsoft YaHei, Microsoft YaHei-Regular; + font-weight: 400; + border-right: none !important; + border-left: none !important; + border-bottom-color: #626b7e !important; + } } \ No newline at end of file diff --git a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx index 0d7c6d2..a7610a2 100644 --- a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx +++ b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx @@ -38,6 +38,7 @@ function ChargeRules(props) { const [countAddIntervalNum, setCountAddIntervalNum] = useState([0]) const [effectNum, setEffectNum] = useState([0]) const [countNum, setCountNum] = useState([0]) + const [bindVisible, setBindVisible] = useState(false) const addTime = () => { setCount([...count, count.length + 1]) } @@ -228,6 +229,34 @@ function ChargeRules(props) { } return result; } + + //绑定车场列表 + const columns = () => { + let result = [...handleBindColumns] + return result; + } + let handleBindColumns = [ + { + title: '车场名称', + dataIndex: 'road_name', + key: 'road_name', + }, + { + title: '计费类型', + dataIndex: 'charge_type_name', + key: 'charge_type_name', + }, + { + title: '计费规则', + dataIndex: 'rule_name', + key: 'rule_name', + }, + { + title: '区域', + dataIndex: 'area_name', + key: 'area_name', + }, + ] const onChangeMin = (e) => { if (e.target.checked == true) { setGetAddData({ ...getAddData, freeTimeAble: 0 }) @@ -291,6 +320,7 @@ function ChargeRules(props) {
{ deleteApplyBtn(record) }}>编辑
{ applyBtn(record) }}>删除
+
{ bindPark(record) }}>绑定车场
}> @@ -309,6 +339,12 @@ function ChargeRules(props) { setGetDeleteData(record) setDeleteVisible(true) } + //绑定车场 + const [getBindId, setGetBindId] = useState({}) + const bindPark = (record) => { + setBindVisible(true) + setGetBindId(record) + } const deleteModal = () => { setDeleteVisible(false) } @@ -337,7 +373,7 @@ function ChargeRules(props) { setResultData({ ...resultData, data: resDataArr, - total_records: res.data.total_records + total_records: res.data.total }) } else { setResultData({ @@ -380,6 +416,75 @@ function ChargeRules(props) { const editModal = () => { setGetEditVisible(false) } + //绑定车场 + const [bindCarPark, setBindCarPark] = useState({}) + const [bindData, setBindData] = useState({}) + const bindModal = () => { + setBindVisible(false) + } + //车辆类型 + const handleCarType = (v) => { + setBindCarPark(v) + setBindData({ + ...bindData, + vehicle_type: v + }) + } + //停车场计费类型 + const handleParkPay = (v) => { + setBindData({ + ...bindData, + charge_type: v + }) + } + //父车场名称 + const handleName = (v) => { + setBindData({ + ...bindData, + road_parent_id: v.target.value + }) + } + //绑定车场查询 + const [getColumnList, setGetColumnList] = useState([]) + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [getStatus, setGetStatus] = useState(false) + const getBindData = () => { + let data = { + ...bindData, + id: getBindId.id + } + ajax.getRoadList(data).then(res => { + if (res.status === 20000) { + let resDataArr = res.data.list.map((item) => { + item.key = item.id + return item + }) + setGetColumnList({ + ...getColumnList, + data: resDataArr, + total_records: res.data.total + }) + setGetStatus(true) + } else { + message.error(res.message) + } + }) + } + const onSelectChange = (newSelectedRowKeys) => { + setSelectedRowKeys(newSelectedRowKeys); + }; + const rowSelection = { + selectedRowKeys, + onChange: onSelectChange, + }; + const hasSelected = selectedRowKeys.length > 0; + const start = () => { + setLoading(true); + // ajax request after empty completing + setTimeout(() => { + setSelectedRowKeys([]); + }, 1000); + }; const [getOperationName, setGetOperationName] = useState([]) const operationName = () => { ajax.getOperator().then(res => { @@ -438,7 +543,7 @@ function ChargeRules(props) {
- 共检索到{resultData.total_records}条结果 + 共检索到{resultData.total}条结果 - + { cancel() }}>取消 + +
+ + +
+
+ + +
+
+ +
+ + { + getStatus == true ? +
+
+ + : '' + } + + + + : '' + } + } diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss index 6056ea6..19b9879 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss +++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss @@ -48,7 +48,9 @@ $color-primary: var(--color-primary); margin-top: 20px; .yisa-btn { margin-left: 20px; - width: 130px; + height: 36px; + border: none; + width: 150px; } .root_gfkk { margin-left: 20px; diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx index 45dfb08..00a40e2 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx +++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx @@ -406,6 +406,14 @@ function CallbackSuggestion(props) { } }) } + const exportData = () => { + let data = { + ...formData + } + ajax.exportDataList(data).then(res => { + window.open(res.data.export_url) + }) + } const checkPic = () => { setEvidenceVisible(true) } @@ -485,7 +493,7 @@ function CallbackSuggestion(props) {
- - +
diff --git a/src/services/OperationCenter/CustomerServieMgm/index.js b/src/services/OperationCenter/CustomerServieMgm/index.js index 245dd44..9602d04 100644 --- a/src/services/OperationCenter/CustomerServieMgm/index.js +++ b/src/services/OperationCenter/CustomerServieMgm/index.js @@ -64,6 +64,14 @@ const getconfigurationAdd = (params) => { data: params, }); }; +//反馈建议-导出 +const exportDataList = (params) => { + return ajax({ + url: "/api/ope/service/export", + type: "post", + data: params, + }); +}; export default{ getSignallList, getConfData, @@ -72,5 +80,6 @@ export default{ getCheckSignlList, getconfigurationList, getconfigurationDelete, - getconfigurationAdd + getconfigurationAdd, + exportDataList } \ No newline at end of file diff --git a/src/services/search.js b/src/services/search.js index e1bbd5b..dad56ab 100644 --- a/src/services/search.js +++ b/src/services/search.js @@ -660,7 +660,14 @@ const specialExport = (params) => { data: params, }); }; - +//业务管理-计费规则-绑定车场 +const getRoadList=(params)=>{ + return ajax({ + url: "/api/bpm/bill/get_road_list", + type: "post", + data: params, + }); +} //业务管理-黑名单列表 const blackListData = (params) => { return ajax({ @@ -1145,5 +1152,6 @@ export default { addChangeRules, changeEditRule, deleteChangeRules, - getDetailData + getDetailData, + getRoadList }