From 416b344c00baa175fa3b6cc67c28056477db64fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Fri, 10 Dec 2021 11:48:41 +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/order/list/list.js | 9 ++++++++- src/pages/plan/add/add.js | 19 ++++++++++++------- src/pages/plan/add/step1.js | 2 +- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index a5f0d0eb..a860aaa5 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -31,7 +31,14 @@ const Column = [ prop:'order_number', type: "normal", width:'100px' - }, { + }, { + title: '兑换码-批次ID', + name: 'key_batch_id', + prop:'key_batch_id', + type: "normal", + width:'100px' + }, + { title: '商品名称', prop:'product_name', name: 'product_name', diff --git a/src/pages/plan/add/add.js b/src/pages/plan/add/add.js index 388c156a..2fca7fa8 100644 --- a/src/pages/plan/add/add.js +++ b/src/pages/plan/add/add.js @@ -166,6 +166,8 @@ export default class add extends React.Component{ addNewkey(){ let step = "step2-" + this.state.keys.length this.state.keys.push(step) + this.setState({keys:this.state.keys}) + console.log(this.state.keys) } onPhoneChange(e){ @@ -181,12 +183,15 @@ export default class add extends React.Component{ closeStep(index){ - _.remove(this.state.keys, (n)=>{ - return n == this.state.keys[index]; - }); + // _.remove(this.state.keys, (n)=>{ + // return n == this.state.keys[index]; + // }); + + this.state.keys[index] = "" this.setState({keys:this.state.keys}) - + console.log("当前的key") + console.log(this.state.keys) } @@ -289,7 +294,7 @@ export default class add extends React.Component{
key
{ this.state.keys.map((item,index) => { - return( + return item ? ( 0 ? ( { this.closeStep(index)} }> @@ -299,9 +304,9 @@ export default class add extends React.Component{ }> - {this.addNewkey()}} /> + {this.addNewkey()}} /> - ) + ) : null }) } diff --git a/src/pages/plan/add/step1.js b/src/pages/plan/add/step1.js index 1978d649..d3dc2fd7 100644 --- a/src/pages/plan/add/step1.js +++ b/src/pages/plan/add/step1.js @@ -252,7 +252,7 @@ export default class acclist extends React.Component{ }} - value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/> + value={this.state.model.title} countShow={false} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/>