|
|
@ -247,7 +247,7 @@ function ParkingCardMgm(props) { |
|
|
|
if(record.scope){ |
|
|
|
setGetScope(record.scope != "1" ? "2" : "1") |
|
|
|
}else{ |
|
|
|
setGetScope("") |
|
|
|
setGetScope("1") |
|
|
|
} |
|
|
|
setGetvalueNum(record.card_num == 0 ? 1 : 2) |
|
|
|
setActionType(2) |
|
|
@ -255,7 +255,7 @@ function ParkingCardMgm(props) { |
|
|
|
setCheckData({ |
|
|
|
...checkData, |
|
|
|
...record, |
|
|
|
scope:record.scope || "1" |
|
|
|
scope:record.scope || "" |
|
|
|
}) |
|
|
|
scopeRef.current = record.scope; |
|
|
|
} |
|
|
@ -305,7 +305,6 @@ function ParkingCardMgm(props) { |
|
|
|
] |
|
|
|
// 获取列表数据 |
|
|
|
const getData = (data = formData) => { |
|
|
|
console.log(data); |
|
|
|
setAjaxLoading(true) |
|
|
|
ajax.getParkcardrList(data).then(res => { |
|
|
|
setAjaxLoading(false) |
|
|
@ -468,12 +467,18 @@ function ParkingCardMgm(props) { |
|
|
|
//商户名称 |
|
|
|
const handleOperator = (v) => { |
|
|
|
setCheckData({ ...checkData, operator_id: v }) |
|
|
|
getEtcStatus(v) |
|
|
|
// getEtcStatus(v) |
|
|
|
} |
|
|
|
//适用范围 |
|
|
|
const [getScope, setGetScope] = useState("") |
|
|
|
const handleCcope = (v) => { |
|
|
|
setGetScope(v) |
|
|
|
if(v == "1"){ |
|
|
|
setCheckData({ |
|
|
|
...checkData, |
|
|
|
scope:'' |
|
|
|
}) |
|
|
|
} |
|
|
|
// setCheckData({ |
|
|
|
// ...checkData, |
|
|
|
// scope:v == "1" ? "" : v |
|
|
@ -527,8 +532,10 @@ function ParkingCardMgm(props) { |
|
|
|
); |
|
|
|
} |
|
|
|
const transferEtcChange = (nextTargetKeys) => { |
|
|
|
console.log(nextTargetKeys); |
|
|
|
nextTargetKeys.splice(nextTargetKeys.length - 1,1) |
|
|
|
let index = nextTargetKeys.indexOf(''); |
|
|
|
if(index > -1){ |
|
|
|
nextTargetKeys.splice(index,1) |
|
|
|
} |
|
|
|
let str = nextTargetKeys.toString() |
|
|
|
setEtcTargetKeys(nextTargetKeys); |
|
|
|
setCheckData({ ...checkData, scope: str || "" }) |
|
|
@ -572,7 +579,6 @@ function ParkingCardMgm(props) { |
|
|
|
setCheckData({ ...checkData, card_num: '' }) |
|
|
|
} |
|
|
|
}; |
|
|
|
console.log(checkData); |
|
|
|
// 处理原价 |
|
|
|
const handlePrice = (v) => { |
|
|
|
if(v - checkData.discount_amount < 0 && v) { |
|
|
@ -701,6 +707,11 @@ function ParkingCardMgm(props) { |
|
|
|
// getEtcStatus() |
|
|
|
}, []) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if(checkData.operator_id){ |
|
|
|
getEtcStatus(checkData.operator_id) |
|
|
|
} |
|
|
|
}, [checkData.operator_id]) |
|
|
|
return <> |
|
|
|
<div className="paid-ParkingCardMgm"> |
|
|
|
<div className="paid-search"> |
|
|
|