diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx index 3c83b90..84a60c5 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx @@ -100,8 +100,10 @@ function AddModal(props) { } if (timevalidate == 0) { message.error("时段之和必须为24小时,且时段不能重叠"); + return } else if (timevalidate == 2) { message.error('时段范围不能重叠!') + return } //return if (status === "add") { @@ -114,7 +116,7 @@ function AddModal(props) { } }); } else { - ajax.editChargeRule(params).then((res) => { + ajax.editChargeRule({ ...params, rule_id: record.id }).then((res) => { if (res.status === 20000) { message.success("编辑成功"); submitSuccess(); @@ -148,7 +150,7 @@ function AddModal(props) { open={visible} width={1200} onCancel={close} - title="添加" + title={status === "add" ? "添加" : "编辑"} onOk={submit} >
diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx index 646d01f..47387bd 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx @@ -66,7 +66,15 @@ function TimePart(props) { // .then(values => { console.log(values) }) // .catch(e => console.log(e)) // } - if (value.type && !all.unit) { + if (value.type == 0 && !all.time_before_minute) { + timePart(false) + effTimePart(false) + } + if (value.type == 1 && !all.time_before) { + timePart(false) + effTimePart(false) + } + if (value.type == 2 && !all.time_before_minute) { timePart(false) effTimePart(false) }