This commit is contained in:
parent
a64351e4b6
commit
98c71ab171
|
@ -122,21 +122,25 @@ export default class adduserinfo extends React.Component{
|
||||||
this.setState({cur_product:e})
|
this.setState({cur_product:e})
|
||||||
let cur_product = this.state.products.find((item)=>{return item.id == e.key})
|
let cur_product = this.state.products.find((item)=>{return item.id == e.key})
|
||||||
let picItem = window.goods.find((item)=>{return item.id == cur_product.product_category_id})
|
let picItem = window.goods.find((item)=>{return item.id == cur_product.product_category_id})
|
||||||
|
let quantity = this.state.model.quantity;
|
||||||
|
console.log(cur_product)
|
||||||
|
console.log(quantity)
|
||||||
let model2 = {
|
let model2 = {
|
||||||
product_id:cur_product.id,
|
product_id:cur_product.id,
|
||||||
product_type:cur_product.type,
|
product_type:cur_product.type,
|
||||||
contract_price:this.state.model.contract_price,
|
contract_price:this.state.model.contract_price,
|
||||||
official_price:cur_product.official_price,
|
official_price:cur_product.official_price,
|
||||||
cost_price:cur_product.cost_price,
|
cost_price:cur_product.cost_price,
|
||||||
quantity:this.state.model.quantity,
|
quantity:quantity,
|
||||||
stock:this.state.model.quantity,
|
stock:quantity,
|
||||||
usage:0,
|
usage:0,
|
||||||
product_name:this.state.model.product_name,
|
product_name:this.state.model.product_name,
|
||||||
show_url:picItem ? picItem.pic : "",
|
show_url:picItem ? picItem.pic : "",
|
||||||
describe_url:picItem ? picItem.pic : "",
|
describe_url:picItem ? picItem.pic : "",
|
||||||
account_type:cur_product.account_type
|
account_type:cur_product.account_type
|
||||||
}
|
}
|
||||||
|
console.log("摩西")
|
||||||
|
console.log(model2)
|
||||||
this.setState({model:model2})
|
this.setState({model:model2})
|
||||||
}
|
}
|
||||||
onTypeChange(e){
|
onTypeChange(e){
|
||||||
|
@ -310,6 +314,7 @@ export default class adduserinfo extends React.Component{
|
||||||
<Ipt onChange={(e)=>{
|
<Ipt onChange={(e)=>{
|
||||||
let model2 = this.state.model;
|
let model2 = this.state.model;
|
||||||
model2.quantity = e;
|
model2.quantity = e;
|
||||||
|
model2.stock = e;
|
||||||
this.setState({model:model2})
|
this.setState({model:model2})
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -299,6 +299,7 @@ export default class adduserinfo extends React.Component{
|
||||||
<Ipt onChange={(e)=>{
|
<Ipt onChange={(e)=>{
|
||||||
let model2 = this.state.model;
|
let model2 = this.state.model;
|
||||||
model2.quantity = e;
|
model2.quantity = e;
|
||||||
|
model2.stock = e;
|
||||||
this.setState({model:model2})
|
this.setState({model:model2})
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue