This commit is contained in:
北海一刀 2021-11-19 11:04:16 +08:00
parent 7d0ccea130
commit fd011adcef
4 changed files with 38 additions and 8 deletions

View File

@ -25,6 +25,10 @@ import Menu from "../menu/main.js"
<div className="form-compontent"> <div className="form-compontent">
{this.props.children} {this.props.children}
</div> </div>
<div className="form-expand">
{this.props.expand}
</div>
</div> </div>
) )

View File

@ -63,7 +63,7 @@ export default class form extends React.Component {
let doms = dom.getElementsByClassName("form-Item"); let doms = dom.getElementsByClassName("form-Item");
for (let i = 0; i < doms.length; i++) { for (let i = 0; i < doms.length; i++) {
var com = doms[i].children; var com = doms[i].children;
let item = com[com.length - 1] let item = com[1]
let formItem = this.props.children[i]; let formItem = this.props.children[i];
let formItem_com = _.get(formItem, "props.children.props"); let formItem_com = _.get(formItem, "props.children.props");
let self = this; let self = this;
@ -203,7 +203,7 @@ export default class form extends React.Component {
let self = this; let self = this;
for (let i = 0; i < doms.length; i++) { for (let i = 0; i < doms.length; i++) {
var com = doms[i].children; var com = doms[i].children;
let item = com[com.length - 1] let item = com[1]
let formItem = this.props.children[i]; let formItem = this.props.children[i];
let o = com[1].children[0]; let o = com[1].children[0];
//formItem对象 //formItem对象
@ -227,7 +227,7 @@ export default class form extends React.Component {
let validate = true; let validate = true;
for (let i = 0; i < doms.length; i++) { for (let i = 0; i < doms.length; i++) {
var com = doms[i].children; var com = doms[i].children;
let item = com[com.length - 1] let item = com[1]
let formItem = this.props.children[i]; let formItem = this.props.children[i];
if(formItem == null){ if(formItem == null){
return; return;

View File

@ -307,7 +307,7 @@ export default class adduserinfo extends React.Component{
{ {
this.state.fieldArr.map((item,i)=>{ this.state.fieldArr.map((item,i)=>{
return( return(
<FormItem labelname="分销商全称" prop={item.id} id={item.id}> <FormItem labelname="6666" prop={item.id} id={item.id}>
<Ipt onChange={(e)=>{ <Ipt onChange={(e)=>{
let model2 = this.state.model; let model2 = this.state.model;
model2.name = e; model2.name = e;

View File

@ -38,6 +38,7 @@ export default class acclist extends React.Component{
issued:'',//发放总量 issued:'',//发放总量
describe:'', describe:'',
date_time:"", date_time:"",
range:""
}, },
rank:null, rank:null,
rankoptions:[], rankoptions:[],
@ -348,10 +349,35 @@ export default class acclist extends React.Component{
//基本信息 //基本信息
const rulesInfo = { const codeInfo = {
code_name: [
{ type: "required", message: "请输入兑换码名称"},
],
issued: [
{ type: "required", message: "请输入发放总量"},
],
describe:[
{ type: "required", message: "请输入使用说明"},
]
} }
//基本规则
const rulesInfo = {
code_name: [
{ type: "required", message: "请输入兑换码名称"},
],
issued: [
{ type: "required", message: "请输入发放总量"},
],
describe:[
{ type: "required", message: "请输入使用说明"},
]
}
return( return(
<div id="step2"> <div id="step2">
<Form model={this.state.model} rules={rules} ref="form1"> <Form model={this.state.model} rules={rules} ref="form1">
@ -453,7 +479,7 @@ export default class acclist extends React.Component{
<div className="draw"> <div className="draw">
<Card style={{ width:'90%',"margin":"10px auto"}} title={'基本信息'}> <Card style={{ width:'90%',"margin":"10px auto"}} title={'基本信息'}>
<p className="addcode"> <p className="addcode">
<Form model={this.state.codeInfo} rules={rulesInfo} ref="code_info" className="addform"> <Form model={this.state.codeInfo} rules={codeInfo} ref="code_info" className="addform">
<FormItem labelname="兑换码名称" prop="code_name" id="code_name"> <FormItem labelname="兑换码名称" prop="code_name" id="code_name">
<Ipt onChange={(e)=>{ <Ipt onChange={(e)=>{
let model = this.state.codeInfo; let model = this.state.codeInfo;