|
@@ -12,12 +12,13 @@ const Index = props => {
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
loading: false,
|
|
loading: false,
|
|
|
customer: {},
|
|
customer: {},
|
|
|
- log: []
|
|
|
|
|
|
|
+ log: [],
|
|
|
|
|
+ software: {}
|
|
|
})
|
|
})
|
|
|
const initData = async () => {
|
|
const initData = async () => {
|
|
|
setState({ ...state, loading: true })
|
|
setState({ ...state, loading: true })
|
|
|
const {
|
|
const {
|
|
|
- data: { customer = {}, log = [] },
|
|
|
|
|
|
|
+ data: { customer = {}, log = [], software = {} },
|
|
|
code = -1
|
|
code = -1
|
|
|
} = await apiCompanyDetail(id)
|
|
} = await apiCompanyDetail(id)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
@@ -27,7 +28,7 @@ const Index = props => {
|
|
|
payload: 'company'
|
|
payload: 'company'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- setState({ ...state, customer, log, loading: false })
|
|
|
|
|
|
|
+ setState({ ...state, customer, log, software, loading: false })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -50,7 +51,7 @@ const Index = props => {
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={12} flex={{ flexDirection: 'column' }}>
|
|
<Col span={12} flex={{ flexDirection: 'column' }}>
|
|
|
- <CompanyTabList initData={initData} customerId={id} />
|
|
|
|
|
|
|
+ <CompanyTabList initData={initData} customerId={id} software={state.software} />
|
|
|
<CompanyLowerList log={state.log} />
|
|
<CompanyLowerList log={state.log} />
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|