修复商品bug

This commit is contained in:
wangsongsole 2022-08-17 17:45:50 +08:00
parent 2dc0c664f1
commit e8d9b6312e
1 changed files with 24 additions and 23 deletions

View File

@ -131,6 +131,18 @@ export default class acclist extends React.Component {
this.setState({ this.setState({
direct_reseller_id: req.direct_reseller_id 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,19 +344,10 @@ export default class acclist extends React.Component {
} else { } else {
this.setState({ product_title: '新增立减金', newGoldLoading: true }) this.setState({ product_title: '新增立减金', newGoldLoading: true })
} }
let param = {
reseller_id: direct_reseller_ids
}
try { 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({ productData: null })
this.setState({ drawerVisible2: true }) this.setState({ drawerVisible2: true })
}
if (type === 'addProduct') { if (type === 'addProduct') {
this.setState({ this.setState({
newGoodsBtnLoading: false newGoodsBtnLoading: false
@ -354,7 +357,6 @@ export default class acclist extends React.Component {
newGoldLoading: false newGoldLoading: false
}) })
} }
})
} catch (err) { } catch (err) {
if (type === 'addProduct') { if (type === 'addProduct') {
this.setState({ this.setState({
@ -832,7 +834,6 @@ export default class acclist extends React.Component {
} }
keyProductClick(row, index) { keyProductClick(row, index) {
console.log('keyProductClick 13==>', row)
if (this.state.direct_reseller_id > 0) { if (this.state.direct_reseller_id > 0) {
/* 区分立减金 */ /* 区分立减金 */
if (row.type === 2) { if (row.type === 2) {