From 3d35591a570d1612061e49017c2dc9bee0a07a3b Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Thu, 7 Mar 2024 14:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=96=B0=E5=A2=9E=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=AE=A1=E5=88=92=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/add/step1.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/pages/plan/add/step1.js b/src/pages/plan/add/step1.js index f0b3dd07..0157bc04 100644 --- a/src/pages/plan/add/step1.js +++ b/src/pages/plan/add/step1.js @@ -19,6 +19,7 @@ export default class accList extends React.Component { type: 2, reseller: null, return_id: "1", + plan_id: "", date_time: ["", ""] }, reseller_option: [], @@ -74,7 +75,11 @@ export default class accList extends React.Component { if (this.refs.form1.validator()) { if (this.state.model.date_time[1] == "") { Notify.error("结束日期不能为空") - return + return false + } + if (this.state.model.plan_id && !/^\d+$/.test(this.state.model.plan_id)) { + Notify.error("请输入有纯数字组成的计划编号") + return false } let data = {} data.title = this.state.model.title @@ -243,6 +248,29 @@ export default class accList extends React.Component { alignment={"left"} /> + + { + let model2 = this.state.model + model2.plan_id = e + this.setState({ model: model2 }) + }} + onClearItem={(e) => { + let model2 = this.state.model + model2.plan_id = "" + this.setState({ model: model2 }) + }} + value={this.state.model.plan_id} + countShow={false} + placeholder={"请输入"} + labelWidth={"0px"} + maxLength={12} + height={"36px"} + width={"520px"} + alignment={"left"} + /> +