Browse Source

Merge branch 'develop' of http://120.27.195.166:3000/chenglb/PMS_Frontend_v1.0.0 into develop

tags/PMS_Frontend_v1.0.6-develop
wanghx 1 year ago
parent
commit
e7c168dcbf
  1. 25
      src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx

25
src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx

@ -247,7 +247,7 @@ function ParkingCardMgm(props) {
if(record.scope){ if(record.scope){
setGetScope(record.scope != "1" ? "2" : "1") setGetScope(record.scope != "1" ? "2" : "1")
}else{ }else{
setGetScope("")
setGetScope("1")
} }
setGetvalueNum(record.card_num == 0 ? 1 : 2) setGetvalueNum(record.card_num == 0 ? 1 : 2)
setActionType(2) setActionType(2)
@ -255,7 +255,7 @@ function ParkingCardMgm(props) {
setCheckData({ setCheckData({
...checkData, ...checkData,
...record, ...record,
scope:record.scope || "1"
scope:record.scope || ""
}) })
scopeRef.current = record.scope; scopeRef.current = record.scope;
} }
@ -305,7 +305,6 @@ function ParkingCardMgm(props) {
] ]
// //
const getData = (data = formData) => { const getData = (data = formData) => {
console.log(data);
setAjaxLoading(true) setAjaxLoading(true)
ajax.getParkcardrList(data).then(res => { ajax.getParkcardrList(data).then(res => {
setAjaxLoading(false) setAjaxLoading(false)
@ -468,12 +467,18 @@ function ParkingCardMgm(props) {
// //
const handleOperator = (v) => { const handleOperator = (v) => {
setCheckData({ ...checkData, operator_id: v }) setCheckData({ ...checkData, operator_id: v })
getEtcStatus(v)
// getEtcStatus(v)
} }
// //
const [getScope, setGetScope] = useState("") const [getScope, setGetScope] = useState("")
const handleCcope = (v) => { const handleCcope = (v) => {
setGetScope(v) setGetScope(v)
if(v == "1"){
setCheckData({
...checkData,
scope:''
})
}
// setCheckData({ // setCheckData({
// ...checkData, // ...checkData,
// scope:v == "1" ? "" : v // scope:v == "1" ? "" : v
@ -527,8 +532,10 @@ function ParkingCardMgm(props) {
); );
} }
const transferEtcChange = (nextTargetKeys) => { 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() let str = nextTargetKeys.toString()
setEtcTargetKeys(nextTargetKeys); setEtcTargetKeys(nextTargetKeys);
setCheckData({ ...checkData, scope: str || "" }) setCheckData({ ...checkData, scope: str || "" })
@ -572,7 +579,6 @@ function ParkingCardMgm(props) {
setCheckData({ ...checkData, card_num: '' }) setCheckData({ ...checkData, card_num: '' })
} }
}; };
console.log(checkData);
// //
const handlePrice = (v) => { const handlePrice = (v) => {
if(v - checkData.discount_amount < 0 && v) { if(v - checkData.discount_amount < 0 && v) {
@ -701,6 +707,11 @@ function ParkingCardMgm(props) {
// getEtcStatus() // getEtcStatus()
}, []) }, [])
useEffect(() => {
if(checkData.operator_id){
getEtcStatus(checkData.operator_id)
}
}, [checkData.operator_id])
return <> return <>
<div className="paid-ParkingCardMgm"> <div className="paid-ParkingCardMgm">
<div className="paid-search"> <div className="paid-search">

Loading…
Cancel
Save