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 | 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
src/pages/pms/partPlan/CustBuyPlanProcess/index.tsx
... | ... | @@ -35,14 +35,31 @@ export default function Index() { |
35 | 35 | <div style={{ display: 'flex', alignItems: 'center', marginBottom: 20 }}> |
36 | 36 | <Search |
37 | 37 | allowClear |
38 | - enterButton | |
39 | 38 | placeholder="配件名称/编码搜索" |
40 | 39 | style={{ width: 220, marginRight: 10 }} |
41 | 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 | 60 | <Select |
44 | 61 | allowClear |
45 | - placeholder="选择品牌" | |
62 | + placeholder="品牌筛选" | |
46 | 63 | style={{ width: 200, marginRight: 10 }} |
47 | 64 | onChange={v => setParams({ brandId: v }, true)} |
48 | 65 | showSearch |
... | ... | @@ -52,7 +69,7 @@ export default function Index() { |
52 | 69 | </Select> |
53 | 70 | <Select |
54 | 71 | allowClear |
55 | - placeholder="选择门店" | |
72 | + placeholder="门店筛选" | |
56 | 73 | style={{ width: 200, marginRight: 10 }} |
57 | 74 | onChange={v => setParams({shopId: v }, true)} |
58 | 75 | showSearch |
... | ... | @@ -91,6 +108,7 @@ export default function Index() { |
91 | 108 | <Column title="工单号" dataIndex="remark" /> |
92 | 109 | <Column title="品牌" dataIndex="brandName" /> |
93 | 110 | <Column title="门店名称" dataIndex="shopName" /> |
111 | + <Column title="服务顾问" dataIndex="userName" /> | |
94 | 112 | <Column title="状态" dataIndex="status" /> |
95 | 113 | |
96 | 114 | {/* <Column title="接车服务顾问" dataIndex="userName" /> */} | ... | ... |
src/pages/pms/partPlan/PlanPool/components/DetailModal.tsx
... | ... | @@ -5,6 +5,7 @@ import StorageTable from './StorageTable'; |
5 | 5 | import SeriesTable from './SeriesTable'; |
6 | 6 | import SpecTable from './SpecTable'; |
7 | 7 | import PartTable from './PartTable'; |
8 | +import OutFlowModal from './OutFlowModal'; | |
8 | 9 | |
9 | 10 | interface Props { |
10 | 11 | visible: boolean, |
... | ... | @@ -33,6 +34,7 @@ export default function Index(props: Props) { |
33 | 34 | {detailType == 3 && <SeriesTable type={type} detailType={detailType} id={id} showAnalyse={false} />} |
34 | 35 | {detailType == 4 && <SpecTable type={type} detailType={detailType} id={id} />} |
35 | 36 | {detailType == 5 && <PartTable type={type} detailType={detailType} id={id} showAnalyse={false} />} |
37 | + <OutFlowModal /> | |
36 | 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 | 2 | import { Input } from 'antd'; |
3 | 3 | import { useStore } from '../index'; |
4 | 4 | import debounce from 'lodash/debounce'; |
5 | -import {planPoolTypeData} from '@/pages/pms/entity'; | |
5 | +import { planPoolTypeData, getUrl } from '@/pages/pms/entity'; | |
6 | 6 | import usePagination from "@/hooks/usePagination"; |
7 | 7 | import {getStoragePage} from "@/pages/pms/storage/StorageManage/api"; |
8 | 8 | import useInitail from "@/hooks/useInitail"; |
... | ... | @@ -15,13 +15,18 @@ export default function Filter() { |
15 | 15 | const { list: storages } = usePagination<PartStorageSpace.PageVO>(getStoragePage, {pageSize: 1000}); |
16 | 16 | const { data: shops } = useInitail<PmsStoragePartShop.Option[], {}>(api.getShopApi, [], {}); |
17 | 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 | 24 | const handleChangeKeywords = debounce((value: string) => { |
20 | 25 | setDfParams({ ...dfParams, current: 1, keywords: value }); |
21 | 26 | }, 500); |
22 | 27 | |
23 | 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 | 30 | <PmsSelect |
26 | 31 | style={{ width: 200, marginRight: 10}} |
27 | 32 | allowClear |
... | ... | @@ -71,6 +76,11 @@ export default function Filter() { |
71 | 76 | placeholder="配件编码|名称" |
72 | 77 | onSearch={v => handleChangeKeywords(v)} |
73 | 78 | /> |
79 | + <a | |
80 | + href={url} | |
81 | + > | |
82 | + 导出计划池表格 | |
83 | + </a> | |
74 | 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 | 11 | import Filter from './components/Filter'; |
12 | 12 | import {createStore} from "@/hooks/moz"; |
13 | 13 | import store from "./useStore"; |
14 | -import OutFlowModal from './components/OutFlowModal'; | |
15 | 14 | import CustBuyModal from './components/CustBuyModal'; |
16 | 15 | |
17 | 16 | export const { Provider, useStore } = createStore(store); |
... | ... | @@ -40,7 +39,7 @@ function Index() { |
40 | 39 | <StoragePartTable type={6} /> |
41 | 40 | </Tabs.TabPane> |
42 | 41 | </Tabs> |
43 | - <OutFlowModal /> | |
42 | + {/* <OutFlowModal /> */} | |
44 | 43 | <CustBuyModal /> |
45 | 44 | </Card> |
46 | 45 | </ConfigProvider> | ... | ... |
src/pages/pms/partPlan/PlanShipping/components/UploadExcel.tsx
... | ... | @@ -31,9 +31,17 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, |
31 | 31 | useEffect(() => { |
32 | 32 | if (!importVisible) { |
33 | 33 | setUploadResult(null); |
34 | + setParam({ brandId: null, storageId: null, supplierId: null, settleShopId: null }); | |
35 | + setFileList([]); | |
34 | 36 | } |
35 | 37 | }, [importVisible]); |
36 | 38 | |
39 | + useEffect(() => { | |
40 | + if (!visibleDetail) { | |
41 | + setImportVisible(false); | |
42 | + } | |
43 | + }, [visibleDetail]); | |
44 | + | |
37 | 45 | function beforeUpload(file: any) { |
38 | 46 | const isLt2M = file.size / 1024 / 1024 < 20; |
39 | 47 | if (!isLt2M) { |
... | ... | @@ -145,7 +153,7 @@ export default function UploadExcel({ getList, importVisible, setImportVisible, |
145 | 153 | visible={visibleDetail} |
146 | 154 | item={uploadResult?.data || {}} |
147 | 155 | confirm |
148 | - onCancel={() => { setVisibleDetail(false); setImportVisible(false); }} | |
156 | + onCancel={() => setVisibleDetail(false)} | |
149 | 157 | fetchList={() => { setUploadResult(null); getList(); }} |
150 | 158 | /> |
151 | 159 | </Modal> | ... | ... |