|
@@ -40,8 +40,14 @@ class ChangeAccount extends Component {
|
|
|
const rowItems = []
|
|
const rowItems = []
|
|
|
if (!isObjEmpty(accountList)) {
|
|
if (!isObjEmpty(accountList)) {
|
|
|
accountList.forEach((item, index) => {
|
|
accountList.forEach((item, index) => {
|
|
|
- rowItems.push(<Item extra={index == 0 ? '当前账套' : ''} key={index} arrow="horizontal"
|
|
|
|
|
- onClick={this.changeAccount.bind(this, item)}>{item.ma_function}</Item>)
|
|
|
|
|
|
|
+ rowItems.push(<Item
|
|
|
|
|
+ thumb={index == 0 ? <div className="active-block"></div> : <div className="block"></div>}
|
|
|
|
|
+ extra={index == 0 ? '当前账套' : ''}
|
|
|
|
|
+ key={index}
|
|
|
|
|
+ arrow="horizontal"
|
|
|
|
|
+ onClick={this.changeAccount.bind(this, item)}>
|
|
|
|
|
+ {item.ma_function}
|
|
|
|
|
+ </Item>)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -63,7 +69,6 @@ class ChangeAccount extends Component {
|
|
|
}).then(response => {
|
|
}).then(response => {
|
|
|
Toast.hide()
|
|
Toast.hide()
|
|
|
this.disposeData(response.masters)
|
|
this.disposeData(response.masters)
|
|
|
- message.success('请求成功')
|
|
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
Toast.hide()
|
|
Toast.hide()
|
|
|
if (typeof error === 'string') {
|
|
if (typeof error === 'string') {
|
|
@@ -90,7 +95,7 @@ class ChangeAccount extends Component {
|
|
|
this.props.history.goBack()
|
|
this.props.history.goBack()
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
if (typeof error === 'string') {
|
|
if (typeof error === 'string') {
|
|
|
- message.error(error)
|
|
|
|
|
|
|
+ message.error('切换失败,请检查您在(' + item.ma_name + ')的账号和密码.')
|
|
|
} else {
|
|
} else {
|
|
|
message.error('账套切换失败')
|
|
message.error('账套切换失败')
|
|
|
}
|
|
}
|