From 28d31e28ecf4ec9a7cc26446a4e3efc721bfaca7 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 09:48:45 +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 | 1 - src/pages/exchangecode/product/add.js | 4 +--- src/pages/plan/add/step2.js | 15 --------------- src/pages/plan/key/edit.js | 3 --- src/pages/plan/key/product/add.js | 2 -- src/pages/plan/product/add.js | 6 +----- 6 files changed, 2 insertions(+), 29 deletions(-) diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 598da271..ec8e3b0c 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -647,7 +647,6 @@ export default class acclist extends React.Component{ onQuantityChange(e,row,rowIndex){ this.state.tempdata[rowIndex].quantity =e.target.value == "" ? 0 : e.target.value; - this.state.tempdata[rowIndex].stock = e.target.value == "" ? 0 : e.target.value; this.setState({tempdata:this.state.tempdata}) } onPriceChange(e,row,rowIndex){ diff --git a/src/pages/exchangecode/product/add.js b/src/pages/exchangecode/product/add.js index 65328d64..bddc3407 100644 --- a/src/pages/exchangecode/product/add.js +++ b/src/pages/exchangecode/product/add.js @@ -132,8 +132,6 @@ export default class adduserinfo extends React.Component{ official_price:cur_product.official_price, cost_price:cur_product.cost_price, quantity:quantity, - stock:quantity, - usage:0, product_name:this.state.model.product_name, show_url:picItem ? picItem.pic : "", describe_url:picItem ? picItem.pic : "", @@ -314,7 +312,7 @@ export default class adduserinfo extends React.Component{ { let model2 = this.state.model; model2.quantity = e; - model2.stock = e; + this.setState({model:model2}) }} diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index bcf92bb6..890cb052 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -489,7 +489,6 @@ export default class acclist extends React.Component{ } onQuantityChange(e,row,rowIndex){ this.state.tempdata[rowIndex].quantity =e.target.value == "" ? 0 : e.target.value; - this.state.tempdata[rowIndex].stock = e.target.value == "" ? 0 : e.target.value; this.setState({tempdata:this.state.tempdata}) } onPriceChange(e,row,rowIndex){ @@ -654,20 +653,6 @@ export default class acclist extends React.Component{ type: "slot", width:'auto', }, - { - title: '剩余数量', - prop: 'stock', - name: 'stock', - type: "normal", - width:'auto', - }, - { - title: '已使用数量', - prop: 'usage', - name: 'usage', - type: "normal", - width:'auto', - }, { title: '商品展示', prop: 'show_url', diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 20747e03..abdf3cd3 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -526,10 +526,7 @@ export default class acclist extends React.Component{ } onQuantityChange(e,row,rowIndex){ let value = e.target.value == "" ? 0 : e.target.value; - - - this.state.tempdata[rowIndex].stock = value - this.state.tempdata[rowIndex].usage; this.state.tempdata[rowIndex].quantity =value; this.setState({tempdata:this.state.tempdata}) } diff --git a/src/pages/plan/key/product/add.js b/src/pages/plan/key/product/add.js index d805f99d..41346d95 100644 --- a/src/pages/plan/key/product/add.js +++ b/src/pages/plan/key/product/add.js @@ -123,8 +123,6 @@ export default class adduserinfo extends React.Component{ official_price:cur_product.official_price, cost_price:cur_product.cost_price, quantity:this.state.model.quantity, - stock:this.state.model.quantity, - usage:0, product_name:this.state.model.product_name, show_url:this.state.show_url ? this.state.show_url : "", describe_url:this.state.describe_url ? this.state.describe_url : "", diff --git a/src/pages/plan/product/add.js b/src/pages/plan/product/add.js index 1f2800c6..ccf8ba37 100644 --- a/src/pages/plan/product/add.js +++ b/src/pages/plan/product/add.js @@ -23,8 +23,6 @@ export default class adduserinfo extends React.Component{ quantity:"", product_name:"", show_url:"", - stock:"", - usage:"", describe_url:"", }, cur_product:null, @@ -133,8 +131,6 @@ export default class adduserinfo extends React.Component{ model2.official_price=cur_product.official_price; model2.cost_price=cur_product.cost_price; model2.quantity=this.state.model.quantity; - model2.stock=this.state.model.quantity; - model2.usage=0; model2.product_name=this.state.model.product_name; model2.account_type=cur_product.account_type; model2.show_url=picItem ? picItem.pic : ""; @@ -299,7 +295,7 @@ export default class adduserinfo extends React.Component{ { let model2 = this.state.model; model2.quantity = e; - model2.stock = e; + this.setState({model:model2}) }}