修复商品bug
This commit is contained in:
parent
2dc0c664f1
commit
e8d9b6312e
|
@ -131,6 +131,18 @@ export default class acclist extends React.Component {
|
|||
this.setState({
|
||||
direct_reseller_id: req.direct_reseller_id
|
||||
})
|
||||
|
||||
/* 请求商品数据 */
|
||||
getProductInfoSelect({
|
||||
reseller_id: req.direct_reseller_id
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
sessionStorage.setItem(
|
||||
'productsList',
|
||||
JSON.stringify(res.data.data)
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -332,29 +344,19 @@ export default class acclist extends React.Component {
|
|||
} else {
|
||||
this.setState({ product_title: '新增立减金', newGoldLoading: true })
|
||||
}
|
||||
let param = {
|
||||
reseller_id: direct_reseller_ids
|
||||
}
|
||||
|
||||
try {
|
||||
getProductInfoSelect(param).then((res) => {
|
||||
console.log('res ==>1', res)
|
||||
console.log('this.state.tempdata ==>', this.state.tempdata)
|
||||
if (res.code === 200) {
|
||||
sessionStorage.setItem('productsList', JSON.stringify(res.data.data))
|
||||
console.log('res ==>2', res.data.data)
|
||||
this.setState({ productData: null })
|
||||
this.setState({ drawerVisible2: true })
|
||||
}
|
||||
if (type === 'addProduct') {
|
||||
this.setState({
|
||||
newGoodsBtnLoading: false
|
||||
})
|
||||
} else {
|
||||
this.setState({
|
||||
newGoldLoading: false
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setState({ productData: null })
|
||||
this.setState({ drawerVisible2: true })
|
||||
if (type === 'addProduct') {
|
||||
this.setState({
|
||||
newGoodsBtnLoading: false
|
||||
})
|
||||
} else {
|
||||
this.setState({
|
||||
newGoldLoading: false
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
if (type === 'addProduct') {
|
||||
this.setState({
|
||||
|
@ -832,7 +834,6 @@ export default class acclist extends React.Component {
|
|||
}
|
||||
|
||||
keyProductClick(row, index) {
|
||||
console.log('keyProductClick 13==>', row)
|
||||
if (this.state.direct_reseller_id > 0) {
|
||||
/* 区分立减金 */
|
||||
if (row.type === 2) {
|
||||
|
|
Loading…
Reference in New Issue