Browse Source

fix():修改路内BUG

tags/PMS_Frontend_v1.0.6-develop
guoxin 1 year ago
parent
commit
1fd32c4206
  1. 15
      src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx
  2. 2
      src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/index.scss
  3. 1
      src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx
  4. 26
      src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/index.scss
  5. 38
      src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx
  6. 3
      src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/index.scss
  7. 1
      src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx
  8. 9
      src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx
  9. 62
      src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx

15
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([])

2
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;
}

1
src/pages/InRoadMgm/PersonMgm/Attendance/WorkerSchedule/loadable.jsx

@ -226,6 +226,7 @@ function WorkerSchedule(props) {
setGetAllChange({
scheduleId: ''
})
getData(formData)
}
})
}

26
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;
}
}
}

38
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) {
</div>
</div>
</Modal>
<Modal
visible={exportVisible}
onCancel={exportModal}
footer={null}
className="exportModal"
>
<div className="submitBtn">
<button type="primary" className="submit colorBtn" onClick={() => { exportAll() }}>
导出所有
</button>
<button type="primary" className="cancel colorBtn" onClick={() => { exportNow() }}>
导出当前
</button>
</div>
</Modal>
</>
}

3
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;
}

1
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)

9
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) {
</div>
<div className="right-part">
{
resultNewData.img_url?.map(res=>{
resultNewData&&
resultNewData?.map(res=>{
return(
<Image src={res} style={{width:100}}alt="车辆照片" />
<Image src={res} style={{width:100,marginLeft:20}}alt="车辆照片" />
)
})
}

62
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) {
<Input
placeholder="请输入"
value={addManage.parameter}
min={0}
style={{ width: 260, marginLeft: 50 }}
onChange={handleParameter}
/>
@ -611,11 +617,11 @@ function BusinessConf(props) {
{
getType == 1 ?
<>
<Radio.Group onChange={onChangehoose} value={addManage.parameter_exit}>
<Radio.Group onChange={onChangehoose} value={addManage.parameter_exit}>
<Radio value={3}>自动出场</Radio>
</Radio.Group>
<Radio.Group onChange={onChangeAddTypeValue} value={addManage.parameter_exit_pda}>
<Radio value={4}>PDA确认出场</Radio>
<Radio.Group onChange={onChangeAddTypeValue} value={addManage.parameter_exit_pda}>
<Radio value={4}>PDA确认出场</Radio>
</Radio.Group>
</>
: ''
@ -848,7 +854,7 @@ function BusinessConf(props) {
>
<div className="addAdmin">
<div className="yisa-search">
<div className="redLogo">*</div>
<div className="redLogo">*</div>
<label>城市</label>
<Select
style={{ width: 260, marginLeft: 50 }}
@ -864,7 +870,7 @@ function BusinessConf(props) {
/>
</div>
<div className="yisa-search">
<div className="redLogo">*</div>
<div className="redLogo">*</div>
<label>商户名称</label>
<Select
style={{ width: 260, marginLeft: 22 }}
@ -880,7 +886,7 @@ function BusinessConf(props) {
/>
</div>
<div className="yisa-search">
<div className="redLogo">*</div>
<div className="redLogo">*</div>
<label>配置项</label>
<Select
style={{ width: 260, marginLeft: 35 }}
@ -891,7 +897,7 @@ function BusinessConf(props) {
setGetMessage(option);
setGetConfiguration(v)
setGetEditData(
Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter:'', parameterValue:1})
Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter: '', parameterValue: 1 })
);
console.log(geteditData);
}}
@ -908,7 +914,7 @@ function BusinessConf(props) {
?
<>
<div className="yisa-search" >
<div className="redLogo">*</div>
<div className="redLogo">*</div>
<label>参数</label>
<Input
placeholder="请输入"

Loading…
Cancel
Save