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

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

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

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

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

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

@ -246,7 +246,7 @@ function PayRecordTotal(props) {
return return
} }
if (!row.flow_type_name) { if (!row.flow_type_name) {
message.error('无支付类型,无法跳转')
message.error('无流水类型,无法跳转')
return return
} }
if (row.flow_type_name == "支付" && row.third_party_flow_id) { 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) { function getRedeemEdit(e, type) {
ajax.getCreditScoreRedeemAdd({ ...e }).then((res) => {
ajax.getCreditScoreRedeemEdit({ ...e }).then((res) => {
let { status, data, total } = res let { status, data, total } = res
if (status == 20000) { if (status == 20000) {
// if (data.list) {
// setAddData(data.list)
// } else {
// setAddData(data)
// }
getRedeemList({ awardId: awardId, pn: 1, page_size: 15 }) getRedeemList({ awardId: awardId, pn: 1, page_size: 15 })
if (type == 12) { if (type == 12) {
return return
@ -360,6 +355,21 @@ function CreditScoreMgm() {
setEditVisible({ visible: false, type: 0 }) setEditVisible({ visible: false, type: 0 })
return 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) { if (editVisible.type == 0) {
message.success("添加成功") message.success("添加成功")
setAddData({}) setAddData({})
@ -556,8 +566,9 @@ function CreditScoreMgm() {
className="credit-modal" className="credit-modal"
onCancel={() => { onCancel={() => {
setEditVisible({ visible: false, type: 0 }) 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-box">
<div className="ltc-content"> <div className="ltc-content">

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

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

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

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

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

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

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

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

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

@ -71,77 +71,77 @@ function ChargeRulesMgm() {
<a <a
onClick={() => { onClick={() => {
ajax.getChargeRuleInfo({ id: record.id }).then((res) => { 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) { if (res.status === 20000) {
console.log(res.data); console.log(res.data);
setAddModal({ setAddModal({

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

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