Commit 9c4c170d33847d111fe07ff13eede6203a2383c7
1 parent
5779df4d
fix
Showing
7 changed files
with
9 additions
and
18 deletions
src/pages/pms/partPlan/PlanManage/api.ts
@@ -20,7 +20,7 @@ export interface Params { | @@ -20,7 +20,7 @@ export interface Params { | ||
20 | * 列表项 | 20 | * 列表项 |
21 | */ | 21 | */ |
22 | export interface ListVO { | 22 | export interface ListVO { |
23 | - planId?: string; // 计划Id | 23 | + planId?: number; // 计划Id |
24 | planNo?: string; // 计划单号 | 24 | planNo?: string; // 计划单号 |
25 | brandId?: string; // 品牌ID | 25 | brandId?: string; // 品牌ID |
26 | planDate?: string; // 计划日期 | 26 | planDate?: string; // 计划日期 |
src/pages/pms/partPlan/PlanManage/components/DetailModal.tsx
@@ -6,7 +6,7 @@ import ProgressView from "./ProgressView"; | @@ -6,7 +6,7 @@ import ProgressView from "./ProgressView"; | ||
6 | import ShippingDetailModal from './ShippingDetailModal'; | 6 | import ShippingDetailModal from './ShippingDetailModal'; |
7 | import PartDetailModal from './PartDetailModal'; | 7 | import PartDetailModal from './PartDetailModal'; |
8 | import {flattenDeep} from "@/pages/pms/entity"; | 8 | import {flattenDeep} from "@/pages/pms/entity"; |
9 | -import {getDetail, DetailVO} from "@/pages/pms/partPlan/PlanManage/subpages/Detail/api"; | 9 | +import {getDetail, DetailVO, Item} from "@/pages/pms/partPlan/PlanManage/subpages/Detail/api"; |
10 | 10 | ||
11 | interface Props { | 11 | interface Props { |
12 | visible: boolean, | 12 | visible: boolean, |
@@ -22,12 +22,12 @@ export default function DetailModal(props: Props) { | @@ -22,12 +22,12 @@ export default function DetailModal(props: Props) { | ||
22 | // @ts-ignore | 22 | // @ts-ignore |
23 | const { data: progresss, setParams: setProgresssParams } = useInitial<ProgressVO[], Params>(getProgressDetail, [], params, delay); | 23 | const { data: progresss, setParams: setProgresssParams } = useInitial<ProgressVO[], Params>(getProgressDetail, [], params, delay); |
24 | // @ts-ignore | 24 | // @ts-ignore |
25 | - const { data, setParams, loading } = useInitial<DetailVO[], Params>(getDetail, [], params, delay); | 25 | + const { data, setParams, loading } = useInitial<Item, Params>(getDetail, {}, params, delay); |
26 | const [visibleDetail, setVisibleDetail] = useState(false); | 26 | const [visibleDetail, setVisibleDetail] = useState(false); |
27 | const [_item, setItem] = useState<SubmitListVO>({}); | 27 | const [_item, setItem] = useState<SubmitListVO>({}); |
28 | const [visiblePartDetail, setVisiblePartDetail] = useState(false); | 28 | const [visiblePartDetail, setVisiblePartDetail] = useState(false); |
29 | const suppliers = useMemo(() => { | 29 | const suppliers = useMemo(() => { |
30 | - return flattenDeep(data.map((it: DetailVO) => (it.suppliers || []).map(su => ({...it, ...su})))); | 30 | + return flattenDeep(data.list?.map((it: DetailVO) => (it.suppliers || []).map(su => ({...it, ...su})))); |
31 | }, [data]); | 31 | }, [data]); |
32 | 32 | ||
33 | useEffect(() => { | 33 | useEffect(() => { |
src/pages/pms/partPlan/PlanManage/subpages/Apply/index.tsx
@@ -60,7 +60,7 @@ export default function Index() { | @@ -60,7 +60,7 @@ export default function Index() { | ||
60 | setInfo({ remark: data.remark, fids: data.fids?.split(',').map(i => `/api/file/show?fid=${i}`) }); | 60 | setInfo({ remark: data.remark, fids: data.fids?.split(',').map(i => `/api/file/show?fid=${i}`) }); |
61 | } | 61 | } |
62 | }, [data.list?.length]); | 62 | }, [data.list?.length]); |
63 | - console.log(info, 'info'); | 63 | + |
64 | function onOk(parts: ListVO[] = []) { | 64 | function onOk(parts: ListVO[] = []) { |
65 | setDealerList(dealerList.map(it => { | 65 | setDealerList(dealerList.map(it => { |
66 | if (it.settleDealerId == dealer.settleDealerId) { | 66 | if (it.settleDealerId == dealer.settleDealerId) { |
@@ -187,13 +187,6 @@ export default function Index() { | @@ -187,13 +187,6 @@ export default function Index() { | ||
187 | return i; | 187 | return i; |
188 | } | 188 | } |
189 | }).join() | 189 | }).join() |
190 | - // suppliers: suppliers.map(i => ({ | ||
191 | - // settleDealerId: i.settleDealerId, | ||
192 | - // settleDealerName: i.settleDealerName, | ||
193 | - // supplierId: i.supplierId, | ||
194 | - // supplierName: i.supplierName, | ||
195 | - // storages: i.storages | ||
196 | - // })) | ||
197 | }).then(() => { | 190 | }).then(() => { |
198 | setLoading(false); | 191 | setLoading(false); |
199 | history.goBack(); | 192 | history.goBack(); |
@@ -358,7 +351,6 @@ export default function Index() { | @@ -358,7 +351,6 @@ export default function Index() { | ||
358 | onChange={v => { | 351 | onChange={v => { |
359 | const ids = v.fileList.map(it => it?.response?.data || it); | 352 | const ids = v.fileList.map(it => it?.response?.data || it); |
360 | setInfo({ ...info, fids: ids }); | 353 | setInfo({ ...info, fids: ids }); |
361 | - console.log(ids); | ||
362 | }} | 354 | }} |
363 | /> | 355 | /> |
364 | </div> | 356 | </div> |
@@ -389,7 +381,6 @@ export default function Index() { | @@ -389,7 +381,6 @@ export default function Index() { | ||
389 | 确认并提交 | 381 | 确认并提交 |
390 | </Button> | 382 | </Button> |
391 | </div> | 383 | </div> |
392 | - | ||
393 | </Card> | 384 | </Card> |
394 | </ConfigProvider> | 385 | </ConfigProvider> |
395 | </PageHeaderWrapper> | 386 | </PageHeaderWrapper> |
src/pages/pms/partPlan/PlanPool/components/OutFlowDetailModal.tsx
@@ -14,7 +14,7 @@ export default function Index(props:Props) { | @@ -14,7 +14,7 @@ export default function Index(props:Props) { | ||
14 | const { visible, setVisible, item } = props; | 14 | const { visible, setVisible, item } = props; |
15 | const [delay, setDelay] = useState(true); | 15 | const [delay, setDelay] = useState(true); |
16 | const { data, setParams, loading } = useInitial(outFlowDetailApi, [], {}, delay); | 16 | const { data, setParams, loading } = useInitial(outFlowDetailApi, [], {}, delay); |
17 | - console.log(item); | 17 | + |
18 | useEffect(() => { | 18 | useEffect(() => { |
19 | if (visible && item?.poolIds) { | 19 | if (visible && item?.poolIds) { |
20 | setParams({ min: undefined, max: undefined, date: undefined, outCnt: undefined, ...item }, true); | 20 | setParams({ min: undefined, max: undefined, date: undefined, outCnt: undefined, ...item }, true); |
src/pages/pms/transfer/transferPool/comonents/PartTable.tsx
@@ -22,7 +22,7 @@ export default function Index() { | @@ -22,7 +22,7 @@ export default function Index() { | ||
22 | > | 22 | > |
23 | <Column title="配件名称" dataIndex="name" /> | 23 | <Column title="配件名称" dataIndex="name" /> |
24 | <Column title="配件编码" dataIndex="code" /> | 24 | <Column title="配件编码" dataIndex="code" /> |
25 | - <Column title="动态库销比" dataIndex="ratio" /> | 25 | + <Column title="动态库销比" dataIndex="ratio" render={t => (t ? t.toFixed(2) : '--')} /> |
26 | <Column title="调出池配件数量" dataIndex="transferCnt" /> | 26 | <Column title="调出池配件数量" dataIndex="transferCnt" /> |
27 | <Column title="调出库房分析" render={(r:PoolItem) => <a onClick={() => analysis(r, 6)}>查看</a>} /> | 27 | <Column title="调出库房分析" render={(r:PoolItem) => <a onClick={() => analysis(r, 6)}>查看</a>} /> |
28 | <Column title="调入库房分析" render={(r:PoolItem) => <a onClick={() => analysis(r, 7)}>查看</a>} /> | 28 | <Column title="调入库房分析" render={(r:PoolItem) => <a onClick={() => analysis(r, 7)}>查看</a>} /> |
src/pages/pms/transfer/transferPool/comonents/StorageTable.tsx
@@ -23,7 +23,7 @@ export default function Index(props: {out?:boolean}) { | @@ -23,7 +23,7 @@ export default function Index(props: {out?:boolean}) { | ||
23 | scroll={{y: 500}} | 23 | scroll={{y: 500}} |
24 | > | 24 | > |
25 | <Column title={out ? "调出库房" : "调入库房"} dataIndex="name" /> | 25 | <Column title={out ? "调出库房" : "调入库房"} dataIndex="name" /> |
26 | - <Column title="动态库销比" dataIndex="ratio" /> | 26 | + <Column title="动态库销比" dataIndex="ratio" render={t => (t ? t.toFixed(2) : '--')} /> |
27 | <Column title="调出池配件品种" dataIndex="transferKind" /> | 27 | <Column title="调出池配件品种" dataIndex="transferKind" /> |
28 | <Column title="调出池配件数量" dataIndex="transferCnt" /> | 28 | <Column title="调出池配件数量" dataIndex="transferCnt" /> |
29 | {out ? | 29 | {out ? |
src/pages/pms/transfer/transferPool/comonents/VehicleTable.tsx
@@ -22,7 +22,7 @@ export default function Index() { | @@ -22,7 +22,7 @@ export default function Index() { | ||
22 | scroll={{y: 500}} | 22 | scroll={{y: 500}} |
23 | > | 23 | > |
24 | <Column title="车系" dataIndex="name" /> | 24 | <Column title="车系" dataIndex="name" /> |
25 | - <Column title="动态库销比" dataIndex="ratio" /> | 25 | + <Column title="动态库销比" dataIndex="ratio" render={t => (t ? t.toFixed(2) : '--')} /> |
26 | <Column title="调出池配件品种" dataIndex="transferKind" /> | 26 | <Column title="调出池配件品种" dataIndex="transferKind" /> |
27 | <Column title="调出池配件数量" dataIndex="transferCnt" /> | 27 | <Column title="调出池配件数量" dataIndex="transferCnt" /> |
28 | <Column title="调出库房分析" render={(r) => <a onClick={() => analysis(r, 6)}>查看</a>} /> | 28 | <Column title="调出库房分析" render={(r) => <a onClick={() => analysis(r, 6)}>查看</a>} /> |