Commit e9e2de363851ce941d57733f508f2340e88363d4
Merge remote-tracking branch 'origin/pms'
Showing
7 changed files
with
66 additions
and
9 deletions
src/pages/pms/entity.ts
@@ -201,3 +201,20 @@ export const typeSenderObj: {[key: string]: string} = { | @@ -201,3 +201,20 @@ export const typeSenderObj: {[key: string]: string} = { | ||
201 | '调出锁定': '', | 201 | '调出锁定': '', |
202 | '': '', | 202 | '': '', |
203 | }; | 203 | }; |
204 | + | ||
205 | +export function getUrl(url: string, obj: object): string { | ||
206 | + if (!Object.keys(obj).length) { | ||
207 | + return url; | ||
208 | + } | ||
209 | + const pa: string[] = []; | ||
210 | + for (let k in obj) { | ||
211 | + if (obj[k]) { | ||
212 | + pa.push(`${k}=${obj[k]}`); | ||
213 | + } | ||
214 | + } | ||
215 | + const st = pa.join("&"); | ||
216 | + if (st) { | ||
217 | + return `${url}?${st}`; | ||
218 | + } | ||
219 | + return ''; | ||
220 | +} |
src/pages/pms/partPlan/CustBuyPlanProcess/api.ts
@@ -32,6 +32,9 @@ export interface Params{ | @@ -32,6 +32,9 @@ export interface Params{ | ||
32 | status?:number | 32 | status?:number |
33 | shopId?:number | 33 | shopId?:number |
34 | keywords?:string | 34 | keywords?:string |
35 | + serviceName?:string | ||
36 | + plateNo?:string | ||
37 | + vin?:string | ||
35 | } | 38 | } |
36 | 39 | ||
37 | export interface ProgressVO { | 40 | export interface ProgressVO { |
src/pages/pms/partPlan/CustBuyPlanProcess/index.tsx
@@ -35,14 +35,31 @@ export default function Index() { | @@ -35,14 +35,31 @@ export default function Index() { | ||
35 | <div style={{ display: 'flex', alignItems: 'center', marginBottom: 20 }}> | 35 | <div style={{ display: 'flex', alignItems: 'center', marginBottom: 20 }}> |
36 | <Search | 36 | <Search |
37 | allowClear | 37 | allowClear |
38 | - enterButton | ||
39 | placeholder="配件名称/编码搜索" | 38 | placeholder="配件名称/编码搜索" |
40 | style={{ width: 220, marginRight: 10 }} | 39 | style={{ width: 220, marginRight: 10 }} |
41 | onSearch={e => setParams({keywords: e}, true)} | 40 | onSearch={e => setParams({keywords: e}, true)} |
42 | /> | 41 | /> |
42 | + <Search | ||
43 | + allowClear | ||
44 | + placeholder="顾问名称搜索" | ||
45 | + style={{ width: 200, marginRight: 10 }} | ||
46 | + onSearch={e => setParams({ serviceName: e}, true)} | ||
47 | + /> | ||
48 | + <Search | ||
49 | + allowClear | ||
50 | + placeholder="车牌号搜索" | ||
51 | + style={{ width: 200, marginRight: 10 }} | ||
52 | + onSearch={e => setParams({ plateNo: e}, true)} | ||
53 | + /> | ||
54 | + <Search | ||
55 | + allowClear | ||
56 | + placeholder="VIN搜索" | ||
57 | + style={{ width: 200, marginRight: 10 }} | ||
58 | + onSearch={e => setParams({ vin: e}, true)} | ||
59 | + /> | ||
43 | <Select | 60 | <Select |
44 | allowClear | 61 | allowClear |
45 | - placeholder="选择品牌" | 62 | + placeholder="品牌筛选" |
46 | style={{ width: 200, marginRight: 10 }} | 63 | style={{ width: 200, marginRight: 10 }} |
47 | onChange={v => setParams({ brandId: v }, true)} | 64 | onChange={v => setParams({ brandId: v }, true)} |
48 | showSearch | 65 | showSearch |
@@ -52,7 +69,7 @@ export default function Index() { | @@ -52,7 +69,7 @@ export default function Index() { | ||
52 | </Select> | 69 | </Select> |
53 | <Select | 70 | <Select |
54 | allowClear | 71 | allowClear |
55 | - placeholder="选择门店" | 72 | + placeholder="门店筛选" |
56 | style={{ width: 200, marginRight: 10 }} | 73 | style={{ width: 200, marginRight: 10 }} |
57 | onChange={v => setParams({shopId: v }, true)} | 74 | onChange={v => setParams({shopId: v }, true)} |
58 | showSearch | 75 | showSearch |
@@ -91,6 +108,7 @@ export default function Index() { | @@ -91,6 +108,7 @@ export default function Index() { | ||
91 | <Column title="工单号" dataIndex="remark" /> | 108 | <Column title="工单号" dataIndex="remark" /> |
92 | <Column title="品牌" dataIndex="brandName" /> | 109 | <Column title="品牌" dataIndex="brandName" /> |
93 | <Column title="门店名称" dataIndex="shopName" /> | 110 | <Column title="门店名称" dataIndex="shopName" /> |
111 | + <Column title="服务顾问" dataIndex="userName" /> | ||
94 | <Column title="状态" dataIndex="status" /> | 112 | <Column title="状态" dataIndex="status" /> |
95 | 113 | ||
96 | {/* <Column title="接车服务顾问" dataIndex="userName" /> */} | 114 | {/* <Column title="接车服务顾问" dataIndex="userName" /> */} |
src/pages/pms/partPlan/PlanPool/components/DetailModal.tsx
@@ -5,6 +5,7 @@ import StorageTable from './StorageTable'; | @@ -5,6 +5,7 @@ import StorageTable from './StorageTable'; | ||
5 | import SeriesTable from './SeriesTable'; | 5 | import SeriesTable from './SeriesTable'; |
6 | import SpecTable from './SpecTable'; | 6 | import SpecTable from './SpecTable'; |
7 | import PartTable from './PartTable'; | 7 | import PartTable from './PartTable'; |
8 | +import OutFlowModal from './OutFlowModal'; | ||
8 | 9 | ||
9 | interface Props { | 10 | interface Props { |
10 | visible: boolean, | 11 | visible: boolean, |
@@ -33,6 +34,7 @@ export default function Index(props: Props) { | @@ -33,6 +34,7 @@ export default function Index(props: Props) { | ||
33 | {detailType == 3 && <SeriesTable type={type} detailType={detailType} id={id} showAnalyse={false} />} | 34 | {detailType == 3 && <SeriesTable type={type} detailType={detailType} id={id} showAnalyse={false} />} |
34 | {detailType == 4 && <SpecTable type={type} detailType={detailType} id={id} />} | 35 | {detailType == 4 && <SpecTable type={type} detailType={detailType} id={id} />} |
35 | {detailType == 5 && <PartTable type={type} detailType={detailType} id={id} showAnalyse={false} />} | 36 | {detailType == 5 && <PartTable type={type} detailType={detailType} id={id} showAnalyse={false} />} |
37 | + <OutFlowModal /> | ||
36 | </Modal> | 38 | </Modal> |
37 | ); | 39 | ); |
38 | } | 40 | } |
src/pages/pms/partPlan/PlanPool/components/Filter.tsx
1 | -import React from 'react'; | 1 | +import React, { useEffect, useState } from 'react'; |
2 | import { Input } from 'antd'; | 2 | import { Input } from 'antd'; |
3 | import { useStore } from '../index'; | 3 | import { useStore } from '../index'; |
4 | import debounce from 'lodash/debounce'; | 4 | import debounce from 'lodash/debounce'; |
5 | -import {planPoolTypeData} from '@/pages/pms/entity'; | 5 | +import { planPoolTypeData, getUrl } from '@/pages/pms/entity'; |
6 | import usePagination from "@/hooks/usePagination"; | 6 | import usePagination from "@/hooks/usePagination"; |
7 | import {getStoragePage} from "@/pages/pms/storage/StorageManage/api"; | 7 | import {getStoragePage} from "@/pages/pms/storage/StorageManage/api"; |
8 | import useInitail from "@/hooks/useInitail"; | 8 | import useInitail from "@/hooks/useInitail"; |
@@ -15,13 +15,18 @@ export default function Filter() { | @@ -15,13 +15,18 @@ export default function Filter() { | ||
15 | const { list: storages } = usePagination<PartStorageSpace.PageVO>(getStoragePage, {pageSize: 1000}); | 15 | const { list: storages } = usePagination<PartStorageSpace.PageVO>(getStoragePage, {pageSize: 1000}); |
16 | const { data: shops } = useInitail<PmsStoragePartShop.Option[], {}>(api.getShopApi, [], {}); | 16 | const { data: shops } = useInitail<PmsStoragePartShop.Option[], {}>(api.getShopApi, [], {}); |
17 | const { dfParams, setDfParams, partTypeData } = useStore(); | 17 | const { dfParams, setDfParams, partTypeData } = useStore(); |
18 | + const [url, setUrl] = useState('/api/pms/erp/plan/pool/export'); | ||
19 | + | ||
20 | + useEffect(() => { | ||
21 | + setUrl(getUrl('/api/pms/erp/plan/pool/export', dfParams)); | ||
22 | + }, [dfParams]); | ||
18 | 23 | ||
19 | const handleChangeKeywords = debounce((value: string) => { | 24 | const handleChangeKeywords = debounce((value: string) => { |
20 | setDfParams({ ...dfParams, current: 1, keywords: value }); | 25 | setDfParams({ ...dfParams, current: 1, keywords: value }); |
21 | }, 500); | 26 | }, 500); |
22 | 27 | ||
23 | return ( | 28 | return ( |
24 | - <div style={{display: 'flex', flexWrap: 'wrap', justifyContent: 'flex-start', marginBottom: 10}}> | 29 | + <div style={{display: 'flex', flexWrap: 'wrap', justifyContent: 'flex-start', marginBottom: 10, alignItems: 'center'}}> |
25 | <PmsSelect | 30 | <PmsSelect |
26 | style={{ width: 200, marginRight: 10}} | 31 | style={{ width: 200, marginRight: 10}} |
27 | allowClear | 32 | allowClear |
@@ -71,6 +76,11 @@ export default function Filter() { | @@ -71,6 +76,11 @@ export default function Filter() { | ||
71 | placeholder="配件编码|名称" | 76 | placeholder="配件编码|名称" |
72 | onSearch={v => handleChangeKeywords(v)} | 77 | onSearch={v => handleChangeKeywords(v)} |
73 | /> | 78 | /> |
79 | + <a | ||
80 | + href={url} | ||
81 | + > | ||
82 | + 导出计划池表格 | ||
83 | + </a> | ||
74 | </div> | 84 | </div> |
75 | ); | 85 | ); |
76 | } | 86 | } |
src/pages/pms/partPlan/PlanPool/index.tsx
@@ -11,7 +11,6 @@ import st from "@/pages/pms/partPlan/PlanShipping/style.less"; | @@ -11,7 +11,6 @@ import st from "@/pages/pms/partPlan/PlanShipping/style.less"; | ||
11 | import Filter from './components/Filter'; | 11 | import Filter from './components/Filter'; |
12 | import {createStore} from "@/hooks/moz"; | 12 | import {createStore} from "@/hooks/moz"; |
13 | import store from "./useStore"; | 13 | import store from "./useStore"; |
14 | -import OutFlowModal from './components/OutFlowModal'; | ||
15 | import CustBuyModal from './components/CustBuyModal'; | 14 | import CustBuyModal from './components/CustBuyModal'; |
16 | 15 | ||
17 | export const { Provider, useStore } = createStore(store); | 16 | export const { Provider, useStore } = createStore(store); |
@@ -40,7 +39,7 @@ function Index() { | @@ -40,7 +39,7 @@ function Index() { | ||
40 | <StoragePartTable type={6} /> | 39 | <StoragePartTable type={6} /> |
41 | </Tabs.TabPane> | 40 | </Tabs.TabPane> |
42 | </Tabs> | 41 | </Tabs> |
43 | - <OutFlowModal /> | 42 | + {/* <OutFlowModal /> */} |
44 | <CustBuyModal /> | 43 | <CustBuyModal /> |
45 | </Card> | 44 | </Card> |
46 | </ConfigProvider> | 45 | </ConfigProvider> |
src/pages/pms/partPlan/PlanShipping/components/UploadExcel.tsx
@@ -31,9 +31,17 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, | @@ -31,9 +31,17 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, | ||
31 | useEffect(() => { | 31 | useEffect(() => { |
32 | if (!importVisible) { | 32 | if (!importVisible) { |
33 | setUploadResult(null); | 33 | setUploadResult(null); |
34 | + setParam({ brandId: null, storageId: null, supplierId: null, settleShopId: null }); | ||
35 | + setFileList([]); | ||
34 | } | 36 | } |
35 | }, [importVisible]); | 37 | }, [importVisible]); |
36 | 38 | ||
39 | + useEffect(() => { | ||
40 | + if (!visibleDetail) { | ||
41 | + setImportVisible(false); | ||
42 | + } | ||
43 | + }, [visibleDetail]); | ||
44 | + | ||
37 | function beforeUpload(file: any) { | 45 | function beforeUpload(file: any) { |
38 | const isLt2M = file.size / 1024 / 1024 < 20; | 46 | const isLt2M = file.size / 1024 / 1024 < 20; |
39 | if (!isLt2M) { | 47 | if (!isLt2M) { |
@@ -145,7 +153,7 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, | @@ -145,7 +153,7 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, | ||
145 | visible={visibleDetail} | 153 | visible={visibleDetail} |
146 | item={uploadResult?.data || {}} | 154 | item={uploadResult?.data || {}} |
147 | confirm | 155 | confirm |
148 | - onCancel={() => { setVisibleDetail(false); setImportVisible(false); }} | 156 | + onCancel={() => setVisibleDetail(false)} |
149 | fetchList={() => { setUploadResult(null); getList(); }} | 157 | fetchList={() => { setUploadResult(null); getList(); }} |
150 | /> | 158 | /> |
151 | </Modal> | 159 | </Modal> |