Commit 99e8e1ac authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch '0518' into 'jinfa-0518'

fix: [25603] 新增请购单中的查看库存,有返回数据但是页面未展示 See merge request project/jinfa-platform!166 (cherry picked from commit ad5035416c3a41b42a4a3ee51c4bcc4b182c751e) bb40c953 : [25603] 新增请购单中的查看库存,有返回数据但是页面未展示
parent f5d1b74f
...@@ -6,6 +6,7 @@ import TableLayout from './table'; ...@@ -6,6 +6,7 @@ import TableLayout from './table';
import { fetchOrderApi } from '../../apis'; import { fetchOrderApi } from '../../apis';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import moment from 'moment'; import moment from 'moment';
import { getProductStockGetStock } from '@/services/ProductV2Api';
export interface MemberModalTableProps { export interface MemberModalTableProps {
schemaAction?: ISchemaFormActions | ISchemaFormAsyncActions, schemaAction?: ISchemaFormActions | ISchemaFormAsyncActions,
...@@ -151,6 +152,17 @@ const ViewInventory: React.FC<MemberModalTableProps> = (props: MemberModalTableP ...@@ -151,6 +152,17 @@ const ViewInventory: React.FC<MemberModalTableProps> = (props: MemberModalTableP
}, },
] ]
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
getProductStockGetStock({ ...params, matnr: record?.code || record?.productNo, werks: record?.factory, productGlobalId: record?.globalMQID }).then(res => {
if (res.code !== 1000) {
return
}
resolve(res.data)
})
})
}
return ( return (
<Drawer <Drawer
destroyOnClose destroyOnClose
...@@ -169,7 +181,7 @@ const ViewInventory: React.FC<MemberModalTableProps> = (props: MemberModalTableP ...@@ -169,7 +181,7 @@ const ViewInventory: React.FC<MemberModalTableProps> = (props: MemberModalTableP
scroll={{ scroll={{
x: '100vw' x: '100vw'
}} }}
fetchdata={(params) => fetchOrderApi.getProductStock({ ...params, matnr: record?.code || record?.productNo, werks: record?.factory, productGlobalId: record?.globalMQID })} fetchdata={(params) => fetchData(params)}
/> />
</Drawer> </Drawer>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment