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} >