Commit 9c4c170d33847d111fe07ff13eede6203a2383c7

Authored by jiangwei
1 parent 5779df4d

fix

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