Browse Source

fix(): 修复穿梭框传参错误的问题

tags/PMS_Frontend_v1.0.6-develop
lisf 1 year ago
parent
commit
5a637bbe15
  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){
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">

Loading…
Cancel
Save