From 8e1d39e9e9ce562b4c688f4caa29311b92e1213c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com>
Date: Sun, 28 Nov 2021 17:00:30 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/exchangecode/add/add.js | 37 +++++++++++++++++++++----------
src/pages/plan/add/step2.js | 28 +++++++++++++++++++++--
2 files changed, 51 insertions(+), 14 deletions(-)
diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js
index 20c279d6..97c17207 100644
--- a/src/pages/exchangecode/add/add.js
+++ b/src/pages/exchangecode/add/add.js
@@ -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{
{this.state.model.title}
+
+ {
+ 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'}/>
+
+
{ this.onStyleChange(e)} } value={this.state.model.style} disabled={this.state.isEdit} >
串码
diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js
index ace8a769..66240105 100644
--- a/src/pages/plan/add/step2.js
+++ b/src/pages/plan/add/step2.js
@@ -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批次名称"},
+ ]
@@ -617,6 +621,26 @@ export default class acclist extends React.Component{
二维码
+
+
+
+ {
+ 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'}/>
+
+
+
{