From 1fd32c4206fdb8eff94b60e4c0c2d0881481a929 Mon Sep 17 00:00:00 2001 From: guoxin Date: Sat, 16 Dec 2023 13:07:14 +0800 Subject: [PATCH] =?UTF-8?q?fix():=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=86=85BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonMgm/Attendance/Fence/loadable.jsx | 15 ++++-- .../PersonMgm/Attendance/WorkerSchedule/index.scss | 2 +- .../Attendance/WorkerSchedule/loadable.jsx | 1 + .../PersonMgm/Performance/SalesStat/index.scss | 26 +++++++++ .../PersonMgm/Performance/SalesStat/loadable.jsx | 38 ++++++++++++- .../RecordInquiry/ParkRecordTotal/index.scss | 3 ++ .../RecordInquiry/ParkRecordTotal/loadable.jsx | 1 + .../InRoadMgm/RoadMgm/RoadDetail/loadable.jsx | 9 ++-- .../BusinessConfig/BusinessConf/loadable.jsx | 62 ++++++++++++---------- 9 files changed, 119 insertions(+), 38 deletions(-) diff --git a/src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx index 23e1636..fdbcdc7 100644 --- a/src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx @@ -14,7 +14,8 @@ function Fence(props) { const [ajaxLoading, setAjaxLoading] = useState(false) const [getModalData, setGetModalData] = useState({ attendDistance: '1', - effective: '1' + effective: '1', + attendmin: '' }) const [getEditModal, setGetEditModal] = useState({ attendDistance: '1', @@ -282,7 +283,13 @@ function Fence(props) { const [valuePark, setValuePark] = useState([]); //批量设置保存 const saveBtn = () => { - if (getScopeValue === '2' && targetKeys.length === 0) { + let reg = /^(1?[1-9]00|[12]000)$/; + console.log(reg.test(getModalData.attendmin)); + if (getModalData.attendmin === '' && getStatus == '2') { + message.error('请输入有效范围') + }else if(!reg.test(getModalData.attendmin)){ + message.error('有效范围输入区间为[100,2000]') + }else if (getScopeValue === '2' && targetKeys.length === 0) { message.error('请选择停车场') } else { let getValue = valuePark @@ -298,6 +305,7 @@ function Fence(props) { setGetModalData({ attendDistance: '1', effective: '1', + attendmin: '' }) setGetScopeValue(1) setTargetKeys([]) @@ -315,7 +323,8 @@ function Fence(props) { getData(formData) setGetModalData({ attendDistance: '1', - effective: '1' + effective: '1', + attendmin: '' }) setGetScopeValue(1) setTargetKeys([]) diff --git a/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/index.scss b/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/index.scss index 4b5fe05..6e5a9ce 100644 --- a/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/index.scss +++ b/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/index.scss @@ -150,7 +150,7 @@ $color-primary : var(--color-primary); } .WorkSchedule{ width: 1700px !important; - top: 40px !important; + top: 6px !important; .ant-picker-calendar-header .ant-radio-group{ display: none; } diff --git a/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx index 61a7e76..7e0301e 100644 --- a/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx @@ -226,6 +226,7 @@ function WorkerSchedule(props) { setGetAllChange({ scheduleId: '' }) + getData(formData) } }) } diff --git a/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/index.scss b/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/index.scss index 857c534..e5f2630 100644 --- a/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/index.scss +++ b/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/index.scss @@ -180,3 +180,29 @@ $color-primary : var(--color-primary); } } } +.exportModal{ + .submitBtn{ + text-align: center; + margin-top: 20px; + .submit{ + width: 80px; + height: 35px; + background: #409eff; + border: none; + border-radius: 4px; + cursor: pointer; + color: #fff; + } + .cancel{ + width: 80px; + height: 35px; + background: #3e4557; + border: none; + border-radius: 4px; + color: #fff; + cursor: pointer; + margin-left: 20px; + } + } +} + diff --git a/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx index f8afa6f..577dc78 100644 --- a/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx @@ -35,6 +35,7 @@ function SalesStat(props) { const lastFormDataRef = useRef(formData) const lastTabDataRef = useRef() const [revenueVisible, setRevenueVisible] = useState(false) + const [exportVisible, setExportVisible] = useState(false) const [lastTotalData, setLastTotalData] = useState(tabData) const [getTabData, setGetTabData] = useState([]) const [getTabTitle, setGetTabTitle] = useState([]) @@ -254,13 +255,33 @@ function SalesStat(props) { const getSearchData = (data = formData) => { getData(data) } + + const exportModal = () => { + setExportVisible(false) + } //导出 const salesData = () => { + setExportVisible(true) + } + const exportNow = () => { + let data = { + ...formData, + export_type:"" + } + ajax.salesExport(data).then(res => { + window.open(res.data.url) + setExportVisible(false) + }) + } + const exportAll = () => { + let data = { - ...formData + ...formData, + export_type:"all" } ajax.salesExport(data).then(res => { window.open(res.data.url) + setExportVisible(false) }) } //查看详情 @@ -429,6 +450,21 @@ function SalesStat(props) { + +
+ + +
+
} diff --git a/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/index.scss b/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/index.scss index 27cc942..888ea27 100644 --- a/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/index.scss +++ b/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/index.scss @@ -215,4 +215,7 @@ $color-primary: var(--color-primary); width: 387px; // object-fit: contain; } +} +.zindex{ + z-index: 999; } \ No newline at end of file diff --git a/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx b/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx index ed078d9..8e7e71e 100644 --- a/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx +++ b/src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx @@ -246,6 +246,7 @@ function ParkRecordTotal() { key: "operation", align: "center", fixed: "right", + className:'zindex', width: 100, render: (text, record, index) => { setDataDetail(record) diff --git a/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx index d865f5b..25effdc 100644 --- a/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx @@ -9,7 +9,7 @@ function RoadDetail(props) { const navigate = useNavigate(); const id = location.search.split("=")[1]; const [resultData, setResultData] = useState({}); - const [resultNewData, setResultNewData] = useState({}); + const [resultNewData, setResultNewData] = useState([]); function getRoadInfo() { ajax.getRoadInfo({ id }).then((res) => { if (res.status === 20000) { @@ -118,11 +118,10 @@ function RoadDetail(props) {
{ - - resultNewData.img_url?.map(res=>{ + resultNewData&& + resultNewData?.map(res=>{ return( - - + ) }) } diff --git a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx index 197b715..18f96d8 100644 --- a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx +++ b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx @@ -48,8 +48,8 @@ function BusinessConf(props) { operator_name: "0", item_name: '', parameterValue: 1, - parameter_exit:'', - parameter_exit_pda:'' + parameter_exit: '', + parameter_exit_pda: '' }) const addAdmin = () => { setImgVisible(true) @@ -73,20 +73,20 @@ function BusinessConf(props) { ...addManage, item_name: v, area_name: '0', operator_name: "0", - parameter:'', - parameterValue:1 + parameter: '', + parameterValue: 1 }) } //添加 const onChangeAdd = (e) => { - setAddManage({ ...addManage, parameterValue: e.target.value , parameter_exit:'', parameter_exit_pda:''}) + setAddManage({ ...addManage, parameterValue: e.target.value, parameter_exit: '', parameter_exit_pda: '' }) } - //添加 - const onChangehoose = (e) => { + //添加 + const onChangehoose = (e) => { setAddManage({ ...addManage, parameter_exit: e.target.value }) } - //添加 - const onChangeAddTypeValue = (e) => { + //添加 + const onChangeAddTypeValue = (e) => { setAddManage({ ...addManage, parameter_exit_pda: e.target.value }) } const [getType, setGetType] = useState(1) @@ -137,14 +137,19 @@ function BusinessConf(props) { let data = { ...addManage } + console.log(addManage.parameterValue ); + var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\]<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); + var pattern1 = /^[1-9]\d{0,19}(\.\d{1,2})?$/; if (addManage.area_name === '') { message.error('请选择城市') } else if (addManage.operator_name === '') { message.error('请选择商户名称') } else if (addManage.item_name === '') { message.error('请选择配置项') - } else if (addManage.parameter === '' ) { + } else if (addManage.parameterValue ===1||addManage.parameterValue ===6||addManage.parameterValue ===7||addManage.parameterValue ===16) { message.error('请输入参数项') + } else if(!pattern1.test(addManage.parameter)||pattern.test(addManage.parameter)){ + message.error('禁止输入特殊符号,负数且只能保留两位小数点') } else { ajax.addBusiness(data).then(res => { if (res.status === 20000) { @@ -266,10 +271,10 @@ function BusinessConf(props) { area_id: "0", operator_id: "0", item_id: '', - parameter:'', - parameterValue:1, - parameter_exit:'', - parameter_exit_pda:'' + parameter: '', + parameterValue: 1, + parameter_exit: '', + parameter_exit_pda: '' }) const CheckApplyBtn = (record) => { setGetAdminId(record) @@ -394,27 +399,27 @@ function BusinessConf(props) { id: getAdminId.id, ...geteditData } - console.log(geteditData); + console.log(geteditData); if (geteditData.area_name === '') { message.error('请选择城市') } else if (geteditData.operator_name === '') { message.error('请选择商户名称') } else if (geteditData.item_name === '') { message.error('请选择配置项') - } else if (geteditData.parameter === '' && (geteditData.item_id != 1 &&geteditData.item_id != 11 && geteditData.item_id!=8)) { + } else if (geteditData.parameter === '' && (geteditData.item_id != 1 && geteditData.item_id != 11 && geteditData.item_id != 8)) { message.error('请输入参数项') - }else{ + } else { ajax.editBusiness(data).then(res => { if (res.status === 20000) { setEditVisible(false) getData(formData) setGetConfiguration(0) - }else { + } else { message.error(res.message) } }) } - + } //角色 @@ -555,7 +560,7 @@ function BusinessConf(props) { { getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 12 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16|| getConfiguration === 17 + || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 || getConfiguration === 17 ? <> @@ -565,6 +570,7 @@ function BusinessConf(props) { @@ -611,11 +617,11 @@ function BusinessConf(props) { { getType == 1 ? <> - + 自动出场 - - PDA确认出场 + + PDA确认出场 : '' @@ -848,7 +854,7 @@ function BusinessConf(props) { >
-
*
+
*
-
*
+
*