Browse Source

fix():修改路内bug

tags/PMS_V1.0.0_Alpha5
guoxin 1 year ago
parent
commit
7fe7cb1eb4
  1. 6
      src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss
  2. 38
      src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx
  3. 83
      src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx
  4. 2
      src/pages/SystemMgm/RoleMgm/loadable.jsx

6
src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/index.scss

@ -385,6 +385,12 @@ $color-primary: var(--color-primary);
} }
} }
.deal-reason { .deal-reason {
.logpTip{
display: flex;
.redLogo{
line-height: 44px;
}
}
.title { .title {
font-family: font-family:
PingFangSC-Medium, PingFangSC-Medium,

38
src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx

@ -424,7 +424,7 @@ function CallbackSuggestion(props) {
item.key = item.id item.key = item.id
return item return item
}) })
setOrderVisible(true)
setOrderVisible(true)
setGetDealData({ setGetDealData({
...getDealData, ...getDealData,
data: resDataArr data: resDataArr
@ -448,19 +448,19 @@ function CallbackSuggestion(props) {
const handleChoose = (value) => { const handleChoose = (value) => {
setGetValueList(value) setGetValueList(value)
// setSubmitDeploy({ ...submitDeploy, change_content: value }) // setSubmitDeploy({ ...submitDeploy, change_content: value })
if(value){
if (value) {
setSubmitDeploy({ setSubmitDeploy({
...submitDeploy, ...submitDeploy,
update_value: '', update_value: '',
plate_type: '', plate_type: '',
change_content: value change_content: value
})
})
} }
} }
const [getAdjustTimeValue, setGetAdjustTimeValue] = useState(1) const [getAdjustTimeValue, setGetAdjustTimeValue] = useState(1)
const handleAdjust = (value) => { const handleAdjust = (value) => {
setGetAdjustTimeValue(value) setGetAdjustTimeValue(value)
submitDeploy.update_value=''
submitDeploy.update_value = ''
} }
const handleAdjustTime = (v, dateString) => { const handleAdjustTime = (v, dateString) => {
setSubmitDeploy({ ...submitDeploy, update_value: dateString }) setSubmitDeploy({ ...submitDeploy, update_value: dateString })
@ -497,8 +497,9 @@ function CallbackSuggestion(props) {
message.error('请输入处理理由') message.error('请输入处理理由')
} else if (submitDeploy.change_content === '') { } else if (submitDeploy.change_content === '') {
message.error('请选择对应的更改项') message.error('请选择对应的更改项')
}
else {
}else if (submitDeploy.update_value === '') {
message.error('请输入对应的更改项')
}else {
ajax.submitData(data).then(res => { ajax.submitData(data).then(res => {
if (res.status === 20000) { if (res.status === 20000) {
setOrderVisible(false) setOrderVisible(false)
@ -627,10 +628,10 @@ function CallbackSuggestion(props) {
</div> </div>
<div className="timePicker "> <div className="timePicker ">
<div className="btnBox"> <div className="btnBox">
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { getSearchData() }}>
查询
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { getSearchData() }}>
查询
</Button> </Button>
<Button type="primary" className="yisa-btn colorReset" onClick={() => { getResetData() }}>
<Button type="primary" className="yisa-btn colorReset" onClick={() => { getResetData() }}>
重置 重置
</Button> </Button>
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { exportData() }}> <Button type="primary" className="yisa-btn colorBtn" onClick={() => { exportData() }}>
@ -922,7 +923,10 @@ function CallbackSuggestion(props) {
<span className="font">异常停车处理信息</span> <span className="font">异常停车处理信息</span>
</div> </div>
<div className="deal-reason"> <div className="deal-reason">
<div className="title">处理理由</div>
<div className="logpTip">
<div className="redLogo">*</div>
<div className="title">处理理由</div>
</div>
<TextArea showCount maxLength={30} value={submitDeploy.deal_reason} className="text" onChange={onChangeReason} /> <TextArea showCount maxLength={30} value={submitDeploy.deal_reason} className="text" onChange={onChangeReason} />
</div> </div>
<div className="deal-style"> <div className="deal-style">
@ -979,13 +983,14 @@ function CallbackSuggestion(props) {
]} ]}
onChange={handleAdjust} onChange={handleAdjust}
/> />
<label style={{ marginLeft: 30 }}>调整为</label>
<div className="redLogo" style={{ marginLeft: 30 }}>*</div>
<label >调整为</label>
{ {
getAdjustTimeValue === 1 ? getAdjustTimeValue === 1 ?
<DatePicker <DatePicker
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
placement='topRight' placement='topRight'
value={parseDate(submitDeploy?.update_value,'YYYY-MM-DD HH:mm:ss')}
value={parseDate(submitDeploy?.update_value, 'YYYY-MM-DD HH:mm:ss')}
style={{ width: 300 }} style={{ width: 300 }}
showTime showTime
onChange={handleAdjustTime} onChange={handleAdjustTime}
@ -1009,7 +1014,8 @@ function CallbackSuggestion(props) {
{ {
getValueList === 2 ? getValueList === 2 ?
<> <>
<label style={{ marginLeft: 30 }}>车牌号:</label>
<div className="redLogo" style={{ marginLeft: 30 }}>*</div>
<label >车牌号:</label>
<Select <Select
style={{ width: 100 }} style={{ width: 100 }}
placeholder="请选择" placeholder="请选择"
@ -1028,7 +1034,8 @@ function CallbackSuggestion(props) {
} }
{ {
getValueList === 3 ? <> getValueList === 3 ? <>
<label style={{ marginLeft: 30 }}>/:</label>
<div className="redLogo" style={{ marginLeft: 30 }}>*</div>
<label >/:</label>
<Select <Select
style={{ width: 100 }} style={{ width: 100 }}
placeholder="请选择" placeholder="请选择"
@ -1046,7 +1053,8 @@ function CallbackSuggestion(props) {
]} ]}
onChange={handleAdd} onChange={handleAdd}
/> />
<label style={{ marginLeft: 30 }}>金额-</label>
<div className="redLogo" style={{ marginLeft: 30 }}>*</div>
<label>金额-</label>
<Input <Input
placeholder="请输入内容" placeholder="请输入内容"
value={submitDeploy.update_value} value={submitDeploy.update_value}

83
src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx

@ -99,7 +99,7 @@ function StaggeredMgm(props) {
} }
// //
const handleDeployType = (value) => { const handleDeployType = (value) => {
setFormData({ ...formData, operator_id: value, road:''})
setFormData({ ...formData, operator_id: value, road: '' })
setGetOperatorId(value) setGetOperatorId(value)
setGetRoadName([]) setGetRoadName([])
} }
@ -297,7 +297,8 @@ function StaggeredMgm(props) {
const handleAddDeployType = (value) => { const handleAddDeployType = (value) => {
setGetCarMsg({ setGetCarMsg({
...getCarMsg, ...getCarMsg,
operator_id: value
operator_id: value,
road: ''
}) })
setGetOperatorId(value) setGetOperatorId(value)
setData([]) setData([])
@ -400,45 +401,57 @@ function StaggeredMgm(props) {
} }
const placeSaveBtn = () => { const placeSaveBtn = () => {
let infoArr = [...getSaleMsg] let infoArr = [...getSaleMsg]
infoArr.map((item, index) => {
let data = {
...getCarMsg,
info: infoArr
}
if (getCarMsg.operator_id === '') {
message.error('请选择所属商户')
} else if (getCarMsg.road === '') {
message.error('请输入车场名称')
} else if (item?.start_date === '' || item?.end_date === '') {
if (!getCarMsg.operator_id) {
message.error('请选择所属商户')
return
}
if (!getCarMsg.road) {
message.error('请输入车场名称')
return
}
for (var result = 0; result < infoArr.length; result++) {
console.log(infoArr[result]);
if (!infoArr[result]?.start_date || !infoArr[result]?.end_date) {
message.error('请选择错峰日期') message.error('请选择错峰日期')
} else if (item?.start_time === '' || item?.end_time === '') {
return
}
if (!infoArr[result]?.start_time || !infoArr[result]?.end_time) {
message.error('请选择错峰时间') message.error('请选择错峰时间')
} else if (item?.num === '') {
return
}
if (!infoArr[result]?.num) {
message.error('请输入错峰卡数量') message.error('请输入错峰卡数量')
} else if (item?.price === '') {
return
}
if (!infoArr[result]?.price) {
message.error('请输入销售价格') message.error('请输入销售价格')
} else {
if (item.week.length != []) {
item.week = item.week.join(',')
}
ajax.getAddStaggered(data).then(res => {
if (res.status === 20000) {
message.success(res.message)
setAddVisible(false)
setGetCarMsg({
operator_id: ''
})
setValue({})
getData(formData)
setGetOperatorId('')
setGetSaleMsg([infoData])
} else {
message.error(res.message)
}
return
}
if (!infoArr[result].week.length) {
message.error('请选择星期配置')
return
}
infoArr[result].week = infoArr[result].week.join(',')
}
let data = {
...getCarMsg,
info: infoArr
}
ajax.getAddStaggered(data).then(res => {
if (res.status === 20000) {
message.success(res.message)
setAddVisible(false)
setGetCarMsg({
operator_id: ''
}) })
setValue({})
getData(formData)
setGetOperatorId('')
setGetSaleMsg([infoData])
} else {
message.error(res.message)
} }
}) })
} }
const checkStaggeredBtn = () => { const checkStaggeredBtn = () => {
setCheckVisible(false) setCheckVisible(false)
@ -615,7 +628,7 @@ function StaggeredMgm(props) {
</div> </div>
<Modal <Modal
visible={checkVisible} visible={checkVisible}
onCancel={checkModal}
onCancel={checkStaggeredBtn}
footer={null} footer={null}
className="roadModal" className="roadModal"
> >

2
src/pages/SystemMgm/RoleMgm/loadable.jsx

@ -754,7 +754,7 @@ function RoleMgm(props) {
<Cascader <Cascader
style={{ width: 260, marginLeft: 50 }} style={{ width: 260, marginLeft: 50 }}
placeholder="请选择" placeholder="请选择"
value={getAdminId.depart_id}
value={getAdminId.depart_arr}
options={getPlateColor} options={getPlateColor}
changeOnSelect changeOnSelect
onChange={(v) => { onChange={(v) => {

Loading…
Cancel
Save