From 7faba54187da50949ba3c64f209c608a10dead47 Mon Sep 17 00:00:00 2001 From: guoxin Date: Thu, 21 Dec 2023 16:54:17 +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 --- .../ArrearsRecover/ArrearsTask/loadable.jsx | 2 +- .../Staggered/StaggeredMgm/loadable.jsx | 10 +- .../BusinessConfig/BusinessConf/loadable.jsx | 367 ++++----------------- 3 files changed, 65 insertions(+), 314 deletions(-) diff --git a/src/pages/OperationCenter/ArrearsRecover/ArrearsTask/loadable.jsx b/src/pages/OperationCenter/ArrearsRecover/ArrearsTask/loadable.jsx index 9a46ce1..81a9bf6 100644 --- a/src/pages/OperationCenter/ArrearsRecover/ArrearsTask/loadable.jsx +++ b/src/pages/OperationCenter/ArrearsRecover/ArrearsTask/loadable.jsx @@ -338,7 +338,7 @@ function arrearsTask(props) { remark: getReject.remark } if (getReject.remark === '') { - message.error('请输入拒绝原来') + message.error('请输入拒绝原因') } else { ajax.getDeployTask(data).then(res => { if (res.status === 20000) { diff --git a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx index 399e3e4..eed6099 100644 --- a/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/Staggered/StaggeredMgm/loadable.jsx @@ -122,7 +122,7 @@ function StaggeredMgm(props) { } const checkModal = () => { setCheckVisible(false) - setGetSaleMsg([infoData]) + // setGetSaleMsg([infoData]) setGetCarMsg({ operator_id: '', road: '' @@ -234,8 +234,8 @@ function StaggeredMgm(props) { let infoData = { start_date: moment().subtract(30, 'days').startOf('day').format('YYYY-MM-DD'), end_date: moment().format('YYYY-MM-DD'), - start_time: moment('00:00:00', 'HH:mm:ss'), - end_time: moment('23:59:59', 'HH:mm:ss'), + start_time: moment().format('HH:mm:ss 00:00:00'), + end_time: moment().format('HH:mm:ss 23:59:59'), week: '', num: '', price: '', @@ -590,6 +590,7 @@ function StaggeredMgm(props) { disabled={true} value={[moment(item.start_time), moment(item.end_time)]} style={{ width: 250, marginLeft: 20 }} + format="HH:mm:ss" onChange={(time, timeString) => handleChangeTime( time, timeString, index )} @@ -751,6 +752,7 @@ function StaggeredMgm(props) { handleChangeTime( time, timeString, index )} @@ -895,6 +897,7 @@ function StaggeredMgm(props) { {getSaleMsg.length ? getSaleMsg?.map((item, index) => { + // console.log(item); return ( <>
@@ -921,6 +924,7 @@ function StaggeredMgm(props) { disabled={item.disabled} defaultValue={[moment(item.start_time), moment(item.end_time)]} style={{ width: 250, marginLeft: 20 }} + format="HH:mm:ss" onChange={(time, timeString) => handleChangeTime( time, timeString, index )} diff --git a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx index fba1b4c..d3983b0 100644 --- a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx +++ b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx @@ -67,7 +67,6 @@ function BusinessConf(props) { const [getMessage, setGetMessage] = useState({}) const handleConfiguration = (v, option) => { setGetMessage(option); - setGetConfiguration(v) setAddManage({ ...addManage, item_name: v, area_name: '0', @@ -104,7 +103,6 @@ function BusinessConf(props) { //添加移动管理角色 const [getGovernment, setGetGovernment] = useState([]) - console.log(getGovernment); const handleDeptName = (e) => { let arr = e let lastElement = arr[arr.length - 1]; @@ -145,9 +143,7 @@ function BusinessConf(props) { } else if (addManage.item_name === '') { message.error('请选择配置项') // 判断radio,有radio不用走下边的 - } else if (getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 - || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 || getConfiguration === 17) { + } else if (getMessage.is_text === 1) { if (addManage.parameter) { if (!pattern1.test(addManage.parameter) || pattern.test(addManage.parameter)) { message.error('禁止输入特殊符号,中文,英文,负数且只能保留两位小数点,最多输入30位') @@ -161,7 +157,7 @@ function BusinessConf(props) { item_name: '' }) getData(formData) - setGetConfiguration(0) + setGetMessage({}) } else { message.error(res.message) } @@ -180,7 +176,7 @@ function BusinessConf(props) { item_name: '' }) getData(formData) - setGetConfiguration(0) + setGetMessage({}) } else { message.error(res.message) } @@ -266,7 +262,6 @@ function BusinessConf(props) { if (res.status === 20000) { setCheckVisible(true) setGetMessage(res.data.parameter_dsc); - setGetConfiguration(res.data.item_id) setGetCheckData(res.data) } }) @@ -283,8 +278,8 @@ function BusinessConf(props) { item_name: '', parameterValue: 1 }) - setGetConfiguration(0) setGetMessage({}) + // setGetMessage({}) } //编辑 const [geteditData, setGetEditData] = useState({ @@ -336,7 +331,7 @@ function BusinessConf(props) { setPasswordVisible(false) getData(formData) message.success(res.message) - setGetConfiguration(0) + setGetMessage({}) } }) } @@ -353,7 +348,6 @@ function BusinessConf(props) { item_name: '' }) setGetMessage({}) - setGetConfiguration(0) } const cancelImg = () => { @@ -427,9 +421,7 @@ function BusinessConf(props) { message.error('请选择商户名称') } else if (geteditData.item_name === '') { message.error('请选择配置项') - } else if (getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 - || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 || getConfiguration === 17) { + } else if (getMessage.is_text === 1) { if (geteditData.parameter) { if (!pattern1.test(geteditData.parameter) || pattern.test(geteditData.parameter)) { message.error('禁止输入特殊符号,中文,英文,负数且只能保留两位小数点,最多输入30位') @@ -438,7 +430,7 @@ function BusinessConf(props) { if (res.status === 20000) { setEditVisible(false) getData(formData) - setGetConfiguration(0) + setGetMessage(0) } else { message.error(res.message) } @@ -452,7 +444,7 @@ function BusinessConf(props) { if (res.status === 20000) { setEditVisible(false) getData(formData) - setGetConfiguration(0) + setGetMessage({}) } else { message.error(res.message) } @@ -475,19 +467,24 @@ function BusinessConf(props) { setGetMerchantDataName(res.data) }) } + //redio可选与不可选 + const [getDisable, setGetDisable] = useState(false) useEffect(() => { - if (getConfiguration === 1 || getConfiguration === 6 || getConfiguration === 7 || getConfiguration === 12 || getConfiguration === 16) { + if (getMessage.is_global === 1) { setGetVIsible(false) } else { setGetVIsible(true) } - }, [getConfiguration]) + }, [getMessage]) useEffect(() => { getData() plateColor() merchantDataName() roleData() }, []) + useEffect(() => { + console.log(getMessage, 1111); + }, [getMessage]) return <>
@@ -597,10 +594,7 @@ function BusinessConf(props) { />
{ - getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 - || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 || getConfiguration === 17 - + getMessage.is_text === 1 ? <>
@@ -613,86 +607,24 @@ function BusinessConf(props) { style={{ width: 260, marginLeft: 50 }} onChange={handleParameter} /> - { - getConfiguration === 2 ? - : '' - } - { - getConfiguration === 3 ? - : '' - } - { - getConfiguration === 4 || getConfiguration === 5 ? - : '' - } +
- : '' - } - { - getConfiguration === 1 ? -
- - 取信地磁 - PDA审核 - -
: '' - } - { - getConfiguration === 12 ? -
+ :
- 第三方封闭车场本地计费 - 爱泊车服务端计费 - -
: '' - } - { - getConfiguration === 6 ? -
- - - - -
: '' - } - { - getConfiguration === 7 ? -
- - 取信地磁 - PDA审核 { - getType == 1 ? - < div> - - 自动出场 - PDA确认出场 - -
- : '' + getMessage.values?.map(item => { + return ( + <> + {item.label} + + ) + }) } -
: '' - } - { - getConfiguration === 8 ? -
- - 自动补单 - 人工补单 - -
: '' - } - { - getConfiguration === 11 ? -
- - 自动退款 - 人工退款 - -
: '' +
} +
{/* {getMessage.message} */}
@@ -753,7 +685,6 @@ function BusinessConf(props) { options={getNewPlateColor} onChange={(v, option) => { setGetMessage(option); - setGetConfiguration(v) setGetCheckData( Object.assign({}, getCheckData, { item_id: v }) ); @@ -765,10 +696,7 @@ function BusinessConf(props) { />
{ - getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 - || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 - + getMessage.is_text === 1 ? <>
@@ -784,86 +712,10 @@ function BusinessConf(props) { ); }} /> - { - getConfiguration === 2 ? - : '' - } - { - getConfiguration === 3 ? - : '' - } - { - getConfiguration === 4 || getConfiguration === 5 ? - : '' - } +
- : '' - } - { - getConfiguration === 1 ? -
- { - setGetCheckData( - Object.assign({}, getCheckData, { parameterValue: v.target.value }) - ); - }} - value={getCheckData.parameterValue}> - 取信地磁 - PDA审核 - -
: '' - } - { - getConfiguration === 12 ? -
- { - setGetCheckData( - Object.assign({}, getCheckData, { parameterValue: v.target.value }) - ); - }} - value={getCheckData.parameterValue}> - 第三方封闭车场本地计费 - 爱泊车服务端计费 - -
: '' - } - { - getConfiguration === 6 ? -
- { - setGetCheckData( - Object.assign({}, getCheckData, { parameterValue: v.target.value }) - ); - }} - value={getCheckData.parameterValue}> - - - -
: '' - } - { - getConfiguration === 7 ? -
- { - setGetCheckData( - Object.assign({}, getCheckData, { parameterValue: v.target.value }) - ); - }} - value={getCheckData.parameterValue}> - 取信地磁 - PDA审核 - 自动出场 - PDA确认出场 - -
: '' - } - { - getConfiguration === 8 ? -
+ :
{ setGetCheckData( @@ -871,27 +723,19 @@ function BusinessConf(props) { ); }} value={getCheckData.parameterValue}> - 自动补单 - 人工补单 - -
: '' - } - { - getConfiguration === 11 ? -
- { - setGetCheckData( - Object.assign({}, getCheckData, { parameterValue: v.target.value }) - ); - }} - - value={getCheckData.parameterValue}> - 自动退款 - 人工退款 + { + getMessage.values?.map(item => { + return ( + <> + {item.label} + + ) + }) + } -
: '' +
} +
{/* {getMessage.message} */}
@@ -952,7 +796,6 @@ function BusinessConf(props) { options={getNewPlateColor} onChange={(v, option) => { setGetMessage(option); - setGetConfiguration(v) setGetEditData( Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter: '', parameterValue: 1 }) ); @@ -964,9 +807,7 @@ function BusinessConf(props) { /> { - getConfiguration === 0 || getConfiguration === 2 || getConfiguration === 3 || getConfiguration === 4 || getConfiguration === 5 - || getConfiguration === 9 || getConfiguration === 10 || getConfiguration === 13 - || getConfiguration === 14 || getConfiguration === 15 || getConfiguration === 16 + getMessage.is_text === 1 ? <> @@ -983,122 +824,28 @@ function BusinessConf(props) { ); }} /> - { - getConfiguration === 2 ? - : '' - } - { - getConfiguration === 3 ? - : '' - } - { - getConfiguration === 4 || getConfiguration === 5 ? - : '' - } + - : '' - } - { - getConfiguration === 1 ? -
- { - setGetEditData( - Object.assign({}, geteditData, { parameterValue: v.target.value }) - ); - }} - value={geteditData.parameterValue}> - 取信地磁 - PDA审核 - -
: '' - } - { - getConfiguration === 12 ? -
- { - setGetEditData( - Object.assign({}, geteditData, { parameterValue: v.target.value }) - ); - }} - - value={geteditData.parameterValue}> - 第三方封闭车场本地计费 - 爱泊车服务端计费 - -
: '' - } - { - getConfiguration === 6 ? -
- { + :
+ { setGetEditData( Object.assign({}, geteditData, { parameterValue: v.target.value }) ); }} - value={geteditData.parameterValue}> - - - -
: '' - } - { - getConfiguration === 7 ? -
- { - setGetType(v.target.value) - setGetEditData( - Object.assign({}, geteditData, { parameterValue: v.target.value }) - ); - }} - value={geteditData.parameterValue}> - 取信地磁 - PDA审核 - { - getType == 1 ? - < div> - - 自动出场 - PDA确认出场 - -
- : '' + value={geteditData.parameterValue}> + { + getMessage.values?.map(item => { + return ( + <> + {item.label} + + ) + }) } -
-
: '' - } - { - getConfiguration === 8 ? -
- { - setGetEditData( - Object.assign({}, geteditData, { parameterValue: v.target.value }) - ); - }} - value={geteditData.parameterValue}> - 自动补单 - 人工补单 - -
: '' - } - { - getConfiguration === 11 ? -
- { - setGetEditData( - Object.assign({}, geteditData, { parameterValue: v.target.value }) - ); - }} - value={geteditData.parameterValue}> - 自动退款 - 人工退款 - -
: '' + + }
{/* {getMessage.message} */}