Browse Source

fix():计费规则bug修改

master
xingjx 1 year ago
parent
commit
15a3cfcbeb
  1. 12
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx
  2. 12
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx
  3. 8
      src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx
  4. 2
      src/pages/FinancialMgm/PayRecordTotal/loadable.jsx
  5. 25
      src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx
  6. 2
      src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx
  7. 17
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx
  8. 2
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/Detail.jsx
  9. 29
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx
  10. 142
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx
  11. 11
      src/services/OperationCenter/OperationSales/index.js

12
src/pages/DataAnalysisPrediction/ParkingBusinessAly/CarTypeAly/loadable.jsx

@ -433,19 +433,21 @@ function CarTypeAly() {
<div className="yisa-search">
<label>区域</label>
<Cascader
className="form-con"
popupClassName="start-exception-deal-cascader"
options={areaList}
placeholder="请选择区域"
expandTrigger="hover"
value={formData.area_id}
style={{
width: "100%",
}}
changeOnSelect
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
onChange={(e, option) => handchange(e, option)}
value={formData.area_id}
onChange={(v, option) => {
setFormData({ ...formData, area_id: v ? v : null });
}}
/>
</div>
<div className="yisa-search">

12
src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkTurnoverAly/loadable.jsx

@ -397,19 +397,21 @@ function ParkTurnoverAly() {
<div className="yisa-search">
<label>区域</label>
<Cascader
className="form-con"
popupClassName="start-exception-deal-cascader"
options={areaList}
placeholder="请选择区域"
expandTrigger="hover"
value={formData.area_id}
style={{
width: "100%",
}}
changeOnSelect
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
onChange={(e, option) => handchange(e, option)}
value={formData.area_id}
onChange={(v, option) => {
setFormData({ ...formData, area_id: v ? v : null });
}}
/>
</div>
<div className="yisa-search">

8
src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx

@ -215,9 +215,9 @@ function ProductOrderInquiry() {
{
name: "pay_channel",
type: "Select",
label: "支付设备",
placeholder: "请选择支付设备",
options: sysConfig.Equipment,
label: "支付方式",
placeholder: "请选择支付方式",
options: sysConfig.StaggeredPay,
},
{
name: "timePeriod",
@ -583,7 +583,7 @@ function ProductOrderInquiry() {
} else if (addOrderData.plate == '') {
message.error('请输入车牌号')
return
} else if (addOrderData.plate_type == '') {
} else if (addOrderData.plate_type <0) {
message.error('请选择车牌颜色')
return
} else if (addOrderData.phone && !phoneReg.test(addOrderData.phone)) {

2
src/pages/FinancialMgm/PayRecordTotal/loadable.jsx

@ -246,7 +246,7 @@ function PayRecordTotal(props) {
return
}
if (!row.flow_type_name) {
message.error('无支付类型,无法跳转')
message.error('无流水类型,无法跳转')
return
}
if (row.flow_type_name == "支付" && row.third_party_flow_id) {

25
src/pages/OperationCenter/OperationSales/CreditScoreMgm/loadable.jsx

@ -342,14 +342,9 @@ function CreditScoreMgm() {
}
//
function getRedeemEdit(e, type) {
ajax.getCreditScoreRedeemAdd({ ...e }).then((res) => {
ajax.getCreditScoreRedeemEdit({ ...e }).then((res) => {
let { status, data, total } = res
if (status == 20000) {
// if (data.list) {
// setAddData(data.list)
// } else {
// setAddData(data)
// }
getRedeemList({ awardId: awardId, pn: 1, page_size: 15 })
if (type == 12) {
return
@ -360,6 +355,21 @@ function CreditScoreMgm() {
setEditVisible({ visible: false, type: 0 })
return
}
} else {
//setAddData({})
message.error(res.message)
}
})
}
//
function getRedeemAdd(e, type) {
ajax.getCreditScoreRedeemAdd({ ...e }).then((res) => {
let { status, data, total } = res
if (status == 20000) {
getRedeemList({ awardId: awardId, pn: 1, page_size: 15 })
if (type == 12) {
return
}
if (editVisible.type == 0) {
message.success("添加成功")
setAddData({})
@ -556,8 +566,9 @@ function CreditScoreMgm() {
className="credit-modal"
onCancel={() => {
setEditVisible({ visible: false, type: 0 })
setAddData({})
}}
onOk={() => { getRedeemEdit(addData, editVisible.type) }}
onOk={() => { editVisible.type == 1 ? getRedeemEdit(addData, editVisible.type) : getRedeemAdd(addData, editVisible.type) }}
>
<div className="ltc-box">
<div className="ltc-content">

2
src/pages/OutRoadMgm/OutRoadOverview/loadable.jsx

@ -421,7 +421,7 @@ const OutRoadOverview = () => {
borderRadius: '10px'
}}>?</i>
</Tooltip>
<p className="count">{headerNums.total_park_time}</p>
<p className="count">{headerNums.total_park_time}</p>
<p>日均泊位周转次数:{headerNums.today_turn_num}</p>
</div>
</div>

17
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx

@ -11,6 +11,7 @@ import {
Checkbox,
Radio,
message,
InputNumber
} from "antd";
import ajax from "@/services";
import EffectiveDate from "./EffectiveDate";
@ -99,13 +100,14 @@ function AddModal(props) {
//
function submit() {
console.log(effectiveDateList)
return
//return
form
.validateFields()
.then((res) => {
const params = {
...res,
property: effectiveDateList,// property: {rules:effectiveDateList},
//property: effectiveDateList,
property: { rules: effectiveDateList },
};
fetch(params);
})
@ -173,7 +175,8 @@ function AddModal(props) {
</Col>
<Col span={12}>
<Form.Item label="24小时最大收费金额" name="limit24hour">
<Input addonAfter={"元"} style={{ width: "57%" }} />
{/* <Input addonAfter={"元"} style={{ width: "57%" }} /> */}
<InputNumber min={0} addonAfter={"元"} style={{ width: "57%" }} />
</Form.Item>
</Col>
<Col span={13}>
@ -182,7 +185,8 @@ function AddModal(props) {
name="freeTime"
rules={[{ required: true }]}
>
<Input addonAfter={"分"} style={{ width: "50%" }} />
{/* <Input addonAfter={"分"} style={{ width: "50%" }} /> */}
<InputNumber min={0} addonAfter={"分"} style={{ width: "50%" }} />
</Form.Item>
</Col>
<Col span={11}>
@ -235,11 +239,12 @@ function AddModal(props) {
name="evFreeTime"
initialValue={type === 0 || ""}
>
<Input
{/* <Input
disabled={type === 0}
addonAfter={"分"}
style={{ width: "50%" }}
/>
/> */}
<InputNumber disabled={type === 0} min={0} addonAfter={"分"} style={{ width: "50%" }} />
</Form.Item>
</Col>
<Col span={11}>

2
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/Detail.jsx

@ -16,6 +16,7 @@ import EffectiveDate from "./EffectiveDate";
import ajax from "@/services";
function Detail(props) {
const { record, visible = false, close = () => { } } = props;
const [show ,setShow] = useState(visible)
const [form] = Form.useForm();
const [effectiveDateList, setEffectiveDateList] = useState(record.property);
console.log(effectiveDateList)
@ -30,6 +31,7 @@ function Detail(props) {
onCancel={close}
width={1200}
title="详情"
footer={null}
>
<div>
<Descriptions column={2}>

29
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx

@ -9,6 +9,7 @@ import {
Row,
Col,
Divider,
InputNumber
} from "antd";
import moment from "moment";
function TimePart(props) {
@ -37,7 +38,6 @@ function TimePart(props) {
"status": "disable",
"key": "821170365"
}
console.log(disable);
const valueChange = (value, all) => {
all.key = itemKey;
if (all.time_part) {
@ -194,18 +194,20 @@ function TimePart(props) {
<>
<Input.Group compact>
<Form.Item name="time_before" label="前:">
<Input addonAfter={"分钟"} />
<InputNumber min={0} addonAfter={"分钟"} />
</Form.Item>
<div className="wenzi">,</div>
<Form.Item name="time_before_money" noStyle>
<Input
<InputNumber
min={0}
addonAfter={"元"}
style={{ width: "20%" }}
/>
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="time_before_minute" noStyle>
<Input
<InputNumber
min={0}
addonAfter={"分钟"}
style={{ width: "20%" }}
/>
@ -213,18 +215,20 @@ function TimePart(props) {
</Input.Group>
<Input.Group compact>
<Form.Item name="time_before" label="满:">
<Input addonAfter={"分钟"} disabled />
<InputNumber min={0} addonAfter={"分钟"} disabled />
</Form.Item>
<div className="wenzi">,</div>
<Form.Item name="time_after_money" noStyle>
<Input
<InputNumber
min={0}
addonAfter={"元"}
style={{ width: "20%" }}
/>
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="time_after_minute" noStyle>
<Input
<InputNumber
min={0}
addonAfter={"分钟"}
style={{ width: "20%" }}
/>
@ -236,18 +240,18 @@ function TimePart(props) {
return (
<Input.Group compact>
<Form.Item name="unit" noStyle>
<Input addonAfter={"元"} style={{ width: "20%" }} />
<InputNumber min={0} addonAfter={"元"} style={{ width: "20%" }} />
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="period" noStyle>
<Input addonAfter={"分钟"} style={{ width: "20%" }} />
<InputNumber min={0} addonAfter={"分钟"} style={{ width: "20%" }} />
</Form.Item>
</Input.Group>
);
case 1:
return (
<Form.Item name="unit">
<Input addonAfter={"元/次"} style={{ width: "20%" }} />
<InputNumber min={0} addonAfter={"元/次"} style={{ width: "20%" }} />
</Form.Item>
);
}
@ -261,14 +265,15 @@ function TimePart(props) {
return (
(getFieldValue("type") === 0 ||
getFieldValue("type") === 2) && (
<Col span={24}>
<Col span={24} style={{ display: "flex" }}>
<Form.Item
label="时段最高收费金额"
name="limit"
rules={[{ required: true }]}
>
<Input />
<InputNumber min={0} addonAfter={"元"} />
</Form.Item>
<div style={{ lineHeight: '32px', marginLeft: '10px' }}>0表示没有最高限额</div>
</Col>
)
);

142
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx

@ -71,77 +71,77 @@ function ChargeRulesMgm() {
<a
onClick={() => {
ajax.getChargeRuleInfo({ id: record.id }).then((res) => {
res = {
"status": 20000,
"message": "success",
"data": {
"feeName": "凤凰山公园停车场旺季中型车",
"creatorName": "耿亮",
"createdTime": "2022-12-13 11:51:23",
"feeCode": "202212131150",
"operationId": "1777347430730653926",
"operationName": "公用事业集团",
"description": "免费15分钟4月20日-10月10日, \n小型车5元/小时,中型车8元/小时,大型车10元/小时\n",
"limit24hour": 0,
"freeTime": 15,
"freeTimeAbleF": [
1
],
"freeTimeAbleFName": "是",
"typeF": 0,
"typeFName": "否",
"evFreeTime": 0,
"evFreeTimeAble": 0,
"evFreeTimeAbleName": "否",
"property": {
"id": 120,
"freeTime": 15,
"freeTimeAble": 1,
"evFreeTime": 0,
"evFreeTimeAble": 0,
"limit24hour": "",
"rules": [
{
"unitDelay": 1,
"unitUp": 1,
"date": "2022-12-13",
"details": [
{
"start": "07:00:00",
"end": "13:00:00",
"limit": 0,
// "items": [
// {
// "type": 1,
// "threshold": 0,
// "period": 60,
// "unit": 8,
// "segment": 1440
// },
// {
// "type": 1,
// "threshold": 0,
// "period": 60,
// "unit": 8,
// "segment": 1440
// }
// ]
"items": [
{
"type": 1,
"threshold": 0,
"period": 60,
"unit": 2,
"segment": 120
},
]
}
]
}
]
}
}
}
// res = {
// "status": 20000,
// "message": "success",
// "data": {
// "feeName": "",
// "creatorName": "",
// "createdTime": "2022-12-13 11:51:23",
// "feeCode": "202212131150",
// "operationId": "1777347430730653926",
// "operationName": "",
// "description": "15420-1010 \n5/8/10/\n",
// "limit24hour": 20,
// "freeTime": 15,
// "freeTimeAbleF": [
// 1
// ],
// "freeTimeAbleFName": "",
// "typeF": 0,
// "typeFName": "",
// "evFreeTime": 0,
// "evFreeTimeAble": 0,
// "evFreeTimeAbleName": "",
// "property": {
// "id": 120,
// "freeTime": 15,
// "freeTimeAble": 1,
// "evFreeTime": 0,
// "evFreeTimeAble": 0,
// "limit24hour": "23",
// "rules": [
// {
// "unitDelay": 1,
// "unitUp": 1,
// "date": "2022-12-13",
// "details": [
// {
// "start": "07:00:00",
// "end": "13:00:00",
// "limit": 10,
// "items": [
// {
// "type": 0,
// "threshold": 0,
// "period": 60,
// "unit": 8,
// "segment": 1440
// },
// {
// "type": 2,
// "threshold": 0,
// "period": 60,
// "unit": 8,
// "segment": 1440
// }
// ]
// // "items": [
// // {
// // "type": 1,
// // "threshold": 0,
// // "period": 60,
// // "unit": 2,
// // "segment": 120
// // },
// // ]
// }
// ]
// }
// ]
// }
// }
// }
if (res.status === 20000) {
console.log(res.data);
setAddModal({

11
src/services/OperationCenter/OperationSales/index.js

@ -283,9 +283,17 @@ const getCreditScoreRedeem = (p) => {
data: p,
});
};
// 信用积分管理-积分兑换配置添加和编辑
// 信用积分管理-积分兑换配置添加
const getCreditScoreRedeemAdd = (p) => {
return ajax({
url: "/api/ope/credit_system/score_redeem_add",
type: "post",
data: p,
});
};
// 信用积分管理-积分兑换配置编辑
const getCreditScoreRedeemEdit = (p) => {
return ajax({
url: "/api/ope/credit_system/score_redeem_edit",
type: "post",
data: p,
@ -344,6 +352,7 @@ export default {
getCreditScoreRuleEdit,
getCreditScoreRedeem,
getCreditScoreRedeemAdd,
getCreditScoreRedeemEdit,
getCreditScoreRedeemDel,
getCreditScoreAward
};
Loading…
Cancel
Save