This commit is contained in:
parent
40c21370e1
commit
8e1d39e9e9
|
@ -38,7 +38,7 @@ export default class acclist extends React.Component{
|
|||
merge_stock:1,
|
||||
code_batch:"",
|
||||
draw_title:"",
|
||||
|
||||
batch_name:""
|
||||
},
|
||||
drawerVisible:false,
|
||||
drawerVisible2:false,
|
||||
|
@ -76,6 +76,7 @@ export default class acclist extends React.Component{
|
|||
console.log("和编辑",req)
|
||||
this.setState({pagetitle:"编辑key"})
|
||||
let model = {
|
||||
batch_name:req.batch_name,
|
||||
style: req.style,
|
||||
quantity:req.quantity,
|
||||
allow_repetition:req.allow_repetition,
|
||||
|
@ -113,16 +114,6 @@ export default class acclist extends React.Component{
|
|||
plan_item = JSON.parse(plan_item)
|
||||
console.log("计划认为")
|
||||
console.log(plan_item)
|
||||
// let model = {
|
||||
// title:plan_item.title,
|
||||
// style: req.style,
|
||||
// quantity:req.quantity,
|
||||
// allow_repetition:req.allow_repetition,
|
||||
// allow_loss:req.allow_loss,
|
||||
// merge_stock:req.merge_stock,
|
||||
// code_batch:req.code_batch,
|
||||
// }
|
||||
|
||||
let model = this.state.model;
|
||||
model.title = plan_item.title;
|
||||
|
||||
|
@ -144,6 +135,7 @@ export default class acclist extends React.Component{
|
|||
if(this.refs.form1.validator())
|
||||
{
|
||||
let data = {};
|
||||
data.batch_name = this.state.model.batch_name;
|
||||
data.style = this.state.model.style;
|
||||
data.quantity = this.state.model.quantity;
|
||||
data.bind_object = this.state.model.bind_object;
|
||||
|
@ -371,6 +363,7 @@ export default class acclist extends React.Component{
|
|||
merge_stock:"1",
|
||||
code_batch:"",
|
||||
draw_title:"",
|
||||
batch_name:""
|
||||
}
|
||||
let keys = this.state.keys;
|
||||
keys.push(obj)
|
||||
|
@ -412,6 +405,7 @@ export default class acclist extends React.Component{
|
|||
if(this.refs.form1.validator())
|
||||
{
|
||||
let data = {};
|
||||
data.batch_name = this.state.model.batch_name;
|
||||
data.style = this.state.model.style;
|
||||
data.quantity = this.state.model.quantity;
|
||||
data.bind_object = this.state.checkedList;
|
||||
|
@ -513,7 +507,9 @@ export default class acclist extends React.Component{
|
|||
bind_object: [
|
||||
{ type: "required", message: "请选择绑定类型"},
|
||||
],
|
||||
|
||||
batch_name:[
|
||||
{ type: "required", message: "请输入key批次名称"},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
@ -603,6 +599,23 @@ export default class acclist extends React.Component{
|
|||
<FormItem labelname=" key归属" prop="title" id="title">
|
||||
<div className="line-value">{this.state.model.title}</div>
|
||||
</FormItem>
|
||||
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name" >
|
||||
<Ipt onChange={(e)=>{
|
||||
let model2 = this.state.model;
|
||||
model2.batch_name = e;
|
||||
this.setState({model:model2})
|
||||
|
||||
}}
|
||||
|
||||
onClearItem={(e)=>{
|
||||
let model2 = this.state.model;
|
||||
model2.batch_name = "";
|
||||
this.setState({model:model2})
|
||||
}}
|
||||
|
||||
value={this.state.model.batch_name} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'400px'} alignment={'left'}/>
|
||||
|
||||
</FormItem>
|
||||
<FormItem labelname=" key样式" prop="style" id="style">
|
||||
<RadioGroup onChange={(e)=>{ this.onStyleChange(e)} } value={this.state.model.style} disabled={this.state.isEdit} >
|
||||
<RadioButton value={1}>串码</RadioButton>
|
||||
|
|
|
@ -32,7 +32,7 @@ export default class acclist extends React.Component{
|
|||
merge_stock:1,
|
||||
code_batch:"",
|
||||
draw_title:"",
|
||||
|
||||
batch_name:""
|
||||
},
|
||||
drawerVisible:false,
|
||||
drawerVisible2:false,
|
||||
|
@ -74,6 +74,7 @@ export default class acclist extends React.Component{
|
|||
console.log("验证成功")
|
||||
|
||||
let data = {};
|
||||
data.batch_name = this.state.model.batch_name;
|
||||
data.style = this.state.model.style;
|
||||
data.quantity = this.state.model.quantity;
|
||||
data.bind_object = this.state.checkedList;
|
||||
|
@ -302,6 +303,7 @@ export default class acclist extends React.Component{
|
|||
console.log(data)
|
||||
|
||||
let model={ //数据模型不可少
|
||||
batch_name:data.batch_name,
|
||||
style: parseInt(data.style),
|
||||
quantity:data.quantity,
|
||||
allow_repetition: parseInt(data.allow_repetition),
|
||||
|
@ -495,7 +497,9 @@ export default class acclist extends React.Component{
|
|||
{ type: "required", message: "请选择绑定类型"},
|
||||
],
|
||||
|
||||
|
||||
batch_name:[
|
||||
{ type: "required", message: "请输入key批次名称"},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
@ -618,6 +622,26 @@ export default class acclist extends React.Component{
|
|||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
|
||||
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name" >
|
||||
<Ipt onChange={(e)=>{
|
||||
let model2 = this.state.model;
|
||||
model2.batch_name = e;
|
||||
this.setState({model:model2})
|
||||
|
||||
}}
|
||||
|
||||
onClearItem={(e)=>{
|
||||
let model2 = this.state.model;
|
||||
model2.batch_name = "";
|
||||
this.setState({model:model2})
|
||||
}}
|
||||
|
||||
value={this.state.model.batch_name} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'400px'} alignment={'left'}/>
|
||||
|
||||
</FormItem>
|
||||
|
||||
|
||||
<FormItem labelname="key数量" prop="quantity" id="quantity" >
|
||||
<Ipt onChange={(e)=>{
|
||||
let model2 = this.state.model;
|
||||
|
|
Loading…
Reference in New Issue