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"} + /> +