Commit 5f69c1aa6899063afc0bf08f69f1b08f3f352b04
1 parent
e83cdeb0
样式交互优化
Showing
6 changed files
with
48 additions
and
38 deletions
src/pages/pms/partPlan/PlanManage/subpages/Detail/index.tsx
1 | -import {Card, ConfigProvider} from 'antd'; | |
1 | +import {Card, ConfigProvider, Spin} from 'antd'; | |
2 | 2 | import { PageHeaderWrapper } from '@ant-design/pro-layout'; |
3 | 3 | import React, {useState} from "react"; |
4 | 4 | import useInitial from "@/hooks/useInitail"; |
... | ... | @@ -14,18 +14,19 @@ import PartDetailModal from './components/PartDetailModal'; |
14 | 14 | |
15 | 15 | export default function Index({ match }: common.ConnectProps) { |
16 | 16 | const { planId } = match.params; |
17 | - const { data } = useInitial<DetailVO[], Params>(getDetail, [], {planId}); | |
17 | + const { data, loading } = useInitial<DetailVO[], Params>(getDetail, [], {planId}); | |
18 | 18 | const [visiblePart, setVisiblePart] = useState(false); |
19 | 19 | const [parts, setParts] = useState<PartVO[]>([]); |
20 | 20 | |
21 | 21 | return ( |
22 | 22 | <PageHeaderWrapper title="配件计划详情"> |
23 | - <ConfigProvider locale={zhCN}> | |
24 | - <Card className={st.page}> | |
25 | - {data.map((dealer: DetailVO = {}) => ( | |
26 | - <div key={`dealer${dealer.settleDealerName}`} style={{ marginTop: 10 }}> | |
27 | - <div style={{ fontWeight: "bold" }}>{`商家: ${dealer.settleDealerName || ''}`}</div> | |
28 | - {(dealer.suppliers || []).map((supplier: SupplierVO = {}) => { | |
23 | + <Spin spinning={loading}> | |
24 | + <ConfigProvider locale={zhCN}> | |
25 | + <Card className={st.page}> | |
26 | + {data.map((dealer: DetailVO = {}) => ( | |
27 | + <div key={`dealer${dealer.settleDealerName}`} style={{ marginTop: 10 }}> | |
28 | + <div style={{ fontWeight: "bold" }}>{`商家: ${dealer.settleDealerName || ''}`}</div> | |
29 | + {(dealer.suppliers || []).map((supplier: SupplierVO = {}) => { | |
29 | 30 | const paList: any[] = flattenDeep((supplier.storages || []).map((st: any) => (st.parts || []))); |
30 | 31 | return ( |
31 | 32 | <div key={`supplier${supplier.supplierName}`} style={{ marginTop: 10, marginLeft: 40 }}> |
... | ... | @@ -54,16 +55,17 @@ export default function Index({ match }: common.ConnectProps) { |
54 | 55 | </div> |
55 | 56 | ); |
56 | 57 | })} |
57 | - </div> | |
58 | + </div> | |
58 | 59 | ))} |
59 | - <PartDetailModal visible={visiblePart} onCancel={() => setVisiblePart(false)} parts={parts} /> | |
60 | - <StepBnt | |
61 | - disable={false} | |
62 | - bntLoading={false} | |
63 | - close={() => history.back()} | |
64 | - /> | |
65 | - </Card> | |
66 | - </ConfigProvider> | |
60 | + <PartDetailModal visible={visiblePart} onCancel={() => setVisiblePart(false)} parts={parts} /> | |
61 | + <StepBnt | |
62 | + disable={false} | |
63 | + bntLoading={false} | |
64 | + close={() => history.back()} | |
65 | + /> | |
66 | + </Card> | |
67 | + </ConfigProvider> | |
68 | + </Spin> | |
67 | 69 | </PageHeaderWrapper> |
68 | 70 | ); |
69 | 71 | } | ... | ... |
src/pages/pms/partPlan/PlanPool/components/AreaTable.tsx
... | ... | @@ -33,9 +33,9 @@ export default function Index(props: Props = {}) { |
33 | 33 | <div> |
34 | 34 | <Table rowKey={(v: ListVO) => `${v.id}`} scroll={{y: 500, x: 2500}} dataSource={parts || []} pagination={false} loading={loading}> |
35 | 35 | <Column title="区域库" dataIndex="name" fixed="left" /> |
36 | + <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> | |
36 | 37 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
37 | 38 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> |
38 | - <Column title="本次计划数量(个)" dataIndex="cnt" /> | |
39 | 39 | <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> |
40 | 40 | <Column title="客户订件数量(个)" dataIndex="buyCnt" /> |
41 | 41 | <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | ... | ... |
src/pages/pms/partPlan/PlanPool/components/PartTable.tsx
... | ... | @@ -34,12 +34,14 @@ export default function Index(props: Props = {}) { |
34 | 34 | <div> |
35 | 35 | <Table rowKey={(v: ListVO) => `${v.id}`} scroll={{y: 500, x: 3000}} dataSource={parts || []} pagination={false} loading={loading}> |
36 | 36 | <Column title="配件编码" dataIndex="code" fixed="left" /> |
37 | - <Column title="配件名称" dataIndex="name" /> | |
37 | + <Column title="配件名称" dataIndex="name" fixed="left" /> | |
38 | + <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> | |
38 | 39 | <Column title="来源类型" dataIndex="typeName" /> |
39 | 40 | <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> |
41 | + | |
40 | 42 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
41 | 43 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> |
42 | - <Column title="本次计划数量(个)" dataIndex="cnt" /> | |
44 | + | |
43 | 45 | <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> |
44 | 46 | <Column title="客户订件数量(个)" dataIndex="buyCnt" /> |
45 | 47 | <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | ... | ... |
src/pages/pms/partPlan/PlanPool/components/SeriesTable.tsx
... | ... | @@ -33,9 +33,10 @@ export default function Index(props: Props = {}) { |
33 | 33 | <div> |
34 | 34 | <Table rowKey={(v: ListVO) => `${v.id}`} scroll={{y: 500, x: 2500}} dataSource={parts || []} pagination={false} loading={loading}> |
35 | 35 | <Column title="车系" dataIndex="name" fixed="left" /> |
36 | + <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> | |
36 | 37 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
37 | 38 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> |
38 | - <Column title="本次计划数量(个)" dataIndex="cnt" /> | |
39 | + | |
39 | 40 | <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> |
40 | 41 | <Column title="客户订件数量(个)" dataIndex="buyCnt" /> |
41 | 42 | <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | ... | ... |
src/pages/pms/partPlan/PlanPool/components/StoragePartTable.tsx
... | ... | @@ -36,23 +36,11 @@ export default function Index(props: Props = {}) { |
36 | 36 | <div> |
37 | 37 | <Table rowKey={(v: ListVO) => `${v.poolId}`} scroll={{y: 500, x: 3000}} dataSource={parts || []} pagination={false} loading={loading}> |
38 | 38 | <Column title="配件编码" dataIndex="code" fixed="left" /> |
39 | - <Column title="配件名称" dataIndex="name" /> | |
40 | - <Column title="库房名称" dataIndex="storageName" /> | |
41 | - <Column title="门店名称" dataIndex="shopName" /> | |
42 | - <Column title="来源类型" dataIndex="typeName" /> | |
43 | - <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
44 | - <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> | |
45 | - <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> | |
46 | - <Column title="本次计划数量(个)" dataIndex="cnt" /> | |
47 | - <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> | |
48 | - <Column title="客户订件数量(个)" dataIndex="buyCnt" /> | |
49 | - <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | |
50 | - <Column title="在途未锁(个)" dataIndex="onTheWayUnlockCnt" /> | |
51 | - <Column title="在库未锁(个)" dataIndex="storageUnlockCnt" /> | |
52 | - <Column title="在库已锁(个)" dataIndex="storageLockedCnt" /> | |
53 | - <Column title="滚动90天出库(个)" dataIndex="outStockCnt" /> | |
39 | + <Column title="配件名称" dataIndex="name" fixed="left" /> | |
40 | + <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> | |
54 | 41 | <Column |
55 | 42 | title="操作" |
43 | + fixed="left" | |
56 | 44 | render={r => ( |
57 | 45 | <> |
58 | 46 | <a onClick={() => { setVisible(true); setItem(r); }}>编辑</a> |
... | ... | @@ -60,7 +48,7 @@ export default function Index(props: Props = {}) { |
60 | 48 | <Popconfirm |
61 | 49 | title="确认删除?" |
62 | 50 | onConfirm={() => { |
63 | - deleteApi({poolId: r.poolId}).then(res => { | |
51 | + deleteApi({ poolId: r.poolId }).then(res => { | |
64 | 52 | message.success("操作成功"); |
65 | 53 | setParams({}, true); |
66 | 54 | }).catch(e => message.error(e.message)); |
... | ... | @@ -71,6 +59,22 @@ export default function Index(props: Props = {}) { |
71 | 59 | </> |
72 | 60 | )} |
73 | 61 | /> |
62 | + <Column title="库房名称" dataIndex="storageName" /> | |
63 | + <Column title="门店名称" dataIndex="shopName" /> | |
64 | + <Column title="来源类型" dataIndex="typeName" /> | |
65 | + <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
66 | + | |
67 | + <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> | |
68 | + <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> | |
69 | + | |
70 | + <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> | |
71 | + <Column title="客户订件数量(个)" dataIndex="buyCnt" /> | |
72 | + <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | |
73 | + <Column title="在途未锁(个)" dataIndex="onTheWayUnlockCnt" /> | |
74 | + <Column title="在库未锁(个)" dataIndex="storageUnlockCnt" /> | |
75 | + <Column title="在库已锁(个)" dataIndex="storageLockedCnt" /> | |
76 | + <Column title="滚动90天出库(个)" dataIndex="outStockCnt" /> | |
77 | + | |
74 | 78 | </Table> |
75 | 79 | <Modal |
76 | 80 | title="编辑采购数量" | ... | ... |
src/pages/pms/partPlan/PlanPool/components/StorageTable.tsx
... | ... | @@ -32,9 +32,10 @@ export default function Index(props: Props = {}) { |
32 | 32 | <div> |
33 | 33 | <Table rowKey={(v: ListVO) => `${v.id}`} scroll={{y: 500, x: 2500}} dataSource={parts || []} pagination={false} loading={loading}> |
34 | 34 | <Column title="库房" dataIndex="name" fixed="left" /> |
35 | + <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> | |
35 | 36 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
36 | 37 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> |
37 | - <Column title="本次计划数量(个)" dataIndex="cnt" /> | |
38 | + | |
38 | 39 | <Column title="本次计划金额(元)" dataIndex="thisTimeAmount" /> |
39 | 40 | <Column title="客户订件数量(个)" dataIndex="buyCnt" /> |
40 | 41 | <Column title="客户订件金额(元)" dataIndex="buyAmount" /> | ... | ... |