Commit b26bcd3bf29357a886c786df3aa74573dba66037
Merge remote-tracking branch 'origin/master' into bug_fix
Showing
27 changed files
with
202 additions
and
91 deletions
src/pages/performance/CompensateGroupConfig/components/DraftList.tsx
... | ... | @@ -89,7 +89,7 @@ export default ({ type }: Props) => { |
89 | 89 | 新增 |
90 | 90 | </Button> |
91 | 91 | </Row> |
92 | - <Table loading={loading} rowKey={(row) => `id${row.id}`} dataSource={list} pagination={paginationConfig}> | |
92 | + <Table loading={loading} rowKey={(row) => `id${row.draftId}`} dataSource={list} pagination={paginationConfig}> | |
93 | 93 | <Column title="薪酬组名称" dataIndex="name" align="center" render={(name) => name || ""} /> |
94 | 94 | <Column title="岗位" dataIndex="postName" align="center" /> |
95 | 95 | <Column | ... | ... |
src/pages/performance/EvaDataImport/components/FileDatailsModal.tsx
0 → 100644
1 | +import React, { useState, useEffect } from "react"; | |
2 | +import { | |
3 | + Table, | |
4 | + Input, | |
5 | + InputNumber, | |
6 | + Popconfirm, | |
7 | + Form, | |
8 | + Typography, | |
9 | + Button, | |
10 | + message, | |
11 | + Space, | |
12 | + Divider, | |
13 | + Modal, | |
14 | + Card, | |
15 | +} from "antd"; | |
16 | +import { cloneDeep } from "lodash"; | |
17 | +import { KpiGroupSetteing } from "@/pages/performance/KpiGroupSetting/interface"; | |
18 | +import { TargetType, TargetTypeEnum } from "@/pages/performance/entity"; | |
19 | +import { render } from "react-dom"; | |
20 | +import moment from "moment"; | |
21 | +import { ReasonsEnum } from "../entity"; | |
22 | +import { history } from "umi"; | |
23 | +import st from "./style.less"; | |
24 | + | |
25 | +const Column = Table.Column; | |
26 | + | |
27 | +interface Props { | |
28 | + visible: boolean; | |
29 | + fileData: any; | |
30 | + tarOnCancel: Function; | |
31 | +} | |
32 | +const columns = [ | |
33 | + { | |
34 | + title: "目标名称", | |
35 | + dataIndex: "indicatorName", | |
36 | + key: "indicatorName", | |
37 | + }, | |
38 | + | |
39 | + { | |
40 | + title: "目标值", | |
41 | + dataIndex: "targetValue", | |
42 | + key: "targetValue", | |
43 | + render: (value: Number, record: any) => { | |
44 | + return record.targetType === 2 ? `${value}%` : record.targetType === 3 ? `${value}元` : `${value}台`; | |
45 | + }, | |
46 | + }, | |
47 | +]; | |
48 | +const TargetModal = ({ visible, fileData, tarOnCancel }: Props) => { | |
49 | + return ( | |
50 | + <> | |
51 | + <Modal title="导入数据详情" visible={visible} onCancel={() => tarOnCancel()} maskClosable={false} width={1500}> | |
52 | + <Table bordered dataSource={fileData.details}> | |
53 | + <Column title="归属人员" dataIndex="userName" align="center" render={(name) => <span>{name || "--"}</span>} /> | |
54 | + <Column title="归属门店" dataIndex="shopName" align="center" render={(name) => <span>{name || "--"}</span>} /> | |
55 | + <Column | |
56 | + title="指标名称" | |
57 | + dataIndex="indicatorName" | |
58 | + align="center" | |
59 | + render={(name) => <span>{name || "--"}</span>} | |
60 | + /> | |
61 | + <Column | |
62 | + title="指标值" | |
63 | + dataIndex="indicatorValue" | |
64 | + align="center" | |
65 | + render={(num, record: any) => ( | |
66 | + <span> | |
67 | + {num !== undefined | |
68 | + ? `${num}${ | |
69 | + record.dataType == 1 ? "台" : record.dataType == 2 ? "%" : record.dataType == 3 ? "元" : "" | |
70 | + }` | |
71 | + : "--"} | |
72 | + </span> | |
73 | + )} | |
74 | + /> | |
75 | + <Column | |
76 | + title="考核周期" | |
77 | + dataIndex="dataDate" | |
78 | + align="center" | |
79 | + render={(time: number) => (time ? moment(time).format("YYYY-MM-DD") : "--")} | |
80 | + /> | |
81 | + <Column | |
82 | + title="是否导入" | |
83 | + dataIndex="errorType" | |
84 | + align="center" | |
85 | + render={(_: any, record: any) => | |
86 | + record.errorType ? <div className={st.no}>未导入</div> : <div className={st.yes}>已导入</div> | |
87 | + } | |
88 | + /> | |
89 | + <Column | |
90 | + title="未导入原因" | |
91 | + dataIndex="errorType" | |
92 | + align="center" | |
93 | + render={(_: any, record: any) => (record.errorType ? ReasonsEnum[record.errorType] : "--")} | |
94 | + /> | |
95 | + </Table> | |
96 | + </Modal> | |
97 | + </> | |
98 | + ); | |
99 | +}; | |
100 | + | |
101 | +export default TargetModal; | ... | ... |
src/pages/performance/EvaDataImport/components/style.less
0 → 100644
1 | +.no { | |
2 | + width: 47px; | |
3 | + height: 18px; | |
4 | + margin: 0 auto; | |
5 | + color: #f4333c; | |
6 | + font-weight: 500; | |
7 | + font-size: 12px; | |
8 | + line-height: 18px; | |
9 | + border: 1px solid #f8797f; | |
10 | + border-radius: 2px; | |
11 | +} | |
12 | +.yes { | |
13 | + width: 47px; | |
14 | + height: 18px; | |
15 | + margin: 0 auto; | |
16 | + color: #20c688; | |
17 | + font-weight: 500; | |
18 | + font-size: 12px; | |
19 | + line-height: 18px; | |
20 | + border: 1px solid #6ddab2; | |
21 | + border-radius: 2px; | |
22 | +} | ... | ... |
src/pages/performance/EvaDataImport/index.tsx
... | ... | @@ -8,6 +8,7 @@ import type { UploadProps } from "antd"; |
8 | 8 | import { history } from "umi"; |
9 | 9 | import moment from "moment"; |
10 | 10 | import Filter from './components/Filter'; |
11 | +import FileDatailsModal from './components/FileDatailsModal'; | |
11 | 12 | |
12 | 13 | const Column = Table.Column; |
13 | 14 | |
... | ... | @@ -15,6 +16,8 @@ export default () => { |
15 | 16 | const { loading, list, paginationConfig, setParams, innerParams } = usePagination(evaDataListApi, { |
16 | 17 | pageSize: 10, |
17 | 18 | }); |
19 | + const [fileData, setFileData] = useState({}); | |
20 | + const [visible, setVisible] = useState<boolean>(false); | |
18 | 21 | const uploadPerson: UploadProps = { |
19 | 22 | name: "file", |
20 | 23 | action: "/api/morax/erp/eval-indicator/staff-indicator", |
... | ... | @@ -25,10 +28,12 @@ export default () => { |
25 | 28 | console.log(info.file, info.fileList); |
26 | 29 | } |
27 | 30 | if (info.file.status === "done") { |
28 | - message.success(`${info.file.name} 导入成功`); | |
31 | + message.success(`${info.file.name} 上传成功`); | |
29 | 32 | setParams({ ...innerParams }, true); |
33 | + // setFileData(info.file.response.data); | |
34 | + // setVisible(true); | |
30 | 35 | } else if (info.file.status === "error") { |
31 | - message.error(`${info.file.name} 导入失败`); | |
36 | + message.error(`${info.file.name} 上传失败`); | |
32 | 37 | } |
33 | 38 | }, |
34 | 39 | }; |
... | ... | @@ -42,10 +47,10 @@ export default () => { |
42 | 47 | console.log(info.file, info.fileList); |
43 | 48 | } |
44 | 49 | if (info.file.status === "done") { |
45 | - message.success(`${info.file.name} 导入成功`); | |
50 | + message.success(`${info.file.name} 上传成功`); | |
46 | 51 | setParams({ ...innerParams }, true); |
47 | 52 | } else if (info.file.status === "error") { |
48 | - message.error(`${info.file.name} 导入失败`); | |
53 | + message.error(`${info.file.name} 上传失败`); | |
49 | 54 | } |
50 | 55 | }, |
51 | 56 | }; |
... | ... | @@ -57,12 +62,20 @@ export default () => { |
57 | 62 | <Filter setParams={setParams} /> |
58 | 63 | <div> |
59 | 64 | <Button type="default" style={{ marginRight: 10 }}> |
60 | - <a href="https://gate.feewee.cn/file/download?fid=74d1d724f9be48baa5921f3782037c3b" target="_blank" rel="noreferrer"> | |
65 | + <a | |
66 | + href="https://gate.feewee.cn/file/download?fid=74d1d724f9be48baa5921f3782037c3b" | |
67 | + target="_blank" | |
68 | + rel="noreferrer" | |
69 | + > | |
61 | 70 | 下载人员模板 |
62 | 71 | </a> |
63 | 72 | </Button> |
64 | 73 | <Button type="default" style={{ marginRight: 10 }}> |
65 | - <a href="https://gate.feewee.cn/file/download?fid=e4eb136962164264a78753bd1d6061f3" target="_blank" rel="noreferrer"> | |
74 | + <a | |
75 | + href="https://gate.feewee.cn/file/download?fid=e4eb136962164264a78753bd1d6061f3" | |
76 | + target="_blank" | |
77 | + rel="noreferrer" | |
78 | + > | |
66 | 79 | 下载门店模板 |
67 | 80 | </a> |
68 | 81 | </Button> |
... | ... | @@ -76,7 +89,6 @@ export default () => { |
76 | 89 | </Upload> |
77 | 90 | </div> |
78 | 91 | </Row> |
79 | - | |
80 | 92 | <Table |
81 | 93 | loading={loading} |
82 | 94 | rowKey={(row) => `id${row.indicatorCode}`} |
... | ... | @@ -137,6 +149,7 @@ export default () => { |
137 | 149 | )} |
138 | 150 | /> |
139 | 151 | </Table> |
152 | + {/* <FileDatailsModal visible={visible} tarOnCancel={() => setVisible(false)} fileData={fileData} /> */} | |
140 | 153 | </Card> |
141 | 154 | </PageHeaderWrapper> |
142 | 155 | ); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/RankModal.tsx
src/pages/performance/EvaGroupSetting/EditComfirm/components/TotalAmountSal.tsx
... | ... | @@ -58,7 +58,7 @@ const TotalAmount = ({ |
58 | 58 | if (dataIndex == "upper" && isPercent == 2) { |
59 | 59 | precision = 2; |
60 | 60 | } |
61 | - const inputNode = inputType === "number" ? <InputNumber precision={precision} min={0} /> : <Input />; | |
61 | + const inputNode = inputType === "number" ? <InputNumber precision={precision} /> : <Input />; | |
62 | 62 | |
63 | 63 | return ( |
64 | 64 | <td {...restProps}> |
... | ... | @@ -360,24 +360,28 @@ const TotalAmount = ({ |
360 | 360 | }} |
361 | 361 | /> |
362 | 362 | </Form> |
363 | + <div>金额可为负数,负数为负激励</div> | |
363 | 364 | </Modal> |
364 | 365 | ) : ( |
365 | - <Form form={form} component={false}> | |
366 | - <Table | |
367 | - components={{ | |
368 | - body: { | |
369 | - cell: EditableCell, | |
370 | - }, | |
371 | - }} | |
372 | - bordered | |
373 | - dataSource={value} | |
374 | - columns={mergedColumns} | |
375 | - rowClassName="editable-row" | |
376 | - pagination={{ | |
377 | - onChange: cancel, | |
378 | - }} | |
379 | - /> | |
380 | - </Form> | |
366 | + <> | |
367 | + <Form form={form} component={false}> | |
368 | + <Table | |
369 | + components={{ | |
370 | + body: { | |
371 | + cell: EditableCell, | |
372 | + }, | |
373 | + }} | |
374 | + bordered | |
375 | + dataSource={value} | |
376 | + columns={mergedColumns} | |
377 | + rowClassName="editable-row" | |
378 | + pagination={{ | |
379 | + onChange: cancel, | |
380 | + }} | |
381 | + /> | |
382 | + </Form> | |
383 | + <div>金额可为负数,负数为负激励</div> | |
384 | + </> | |
381 | 385 | )} |
382 | 386 | </> |
383 | 387 | ); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/index.tsx
... | ... | @@ -118,7 +118,7 @@ function Index(props: Props) { |
118 | 118 | } |
119 | 119 | |
120 | 120 | return ( |
121 | - <PageHeaderWrapper title="考评组配置"> | |
121 | + <PageHeaderWrapper title="考评组配置" loading={id ? loading : false}> | |
122 | 122 | <Card> |
123 | 123 | {detailError ? ( |
124 | 124 | <Result status="warning" title={detailError} /> | ... | ... |
src/pages/performance/EvaGroupSetting/components/DraftList.tsx
1 | -import React, { useState } from "react"; | |
1 | +import React, { useEffect, useState } from "react"; | |
2 | 2 | import { PageHeaderWrapper } from "@ant-design/pro-layout"; |
3 | 3 | import { Button, Card, Table, Row, Space, Typography, Divider, Popconfirm, message } from "antd"; |
4 | 4 | import usePagination from "@/hooks/usePagination"; |
... | ... | @@ -22,6 +22,9 @@ export default ({ type }: Props) => { |
22 | 22 | status: 2, |
23 | 23 | type: 1, |
24 | 24 | }); |
25 | + useEffect(() => { | |
26 | + console.log("list", list); | |
27 | + }, [list]); | |
25 | 28 | const [visibleDetail, setVisibleDetail] = useState(false); |
26 | 29 | const [item, setItem] = useState<any>({}); |
27 | 30 | //删除 |
... | ... | @@ -69,7 +72,7 @@ export default ({ type }: Props) => { |
69 | 72 | </Row> |
70 | 73 | <Table |
71 | 74 | loading={loading} |
72 | - rowKey={(row) => `id${row.id}`} | |
75 | + rowKey={(row) => `id${row.draftId}`} | |
73 | 76 | dataSource={list} |
74 | 77 | pagination={paginationConfig} |
75 | 78 | scroll={{ x: 500 }} | ... | ... |
src/pages/performance/KpiGroupSetting/EditComfirm/index.tsx
... | ... | @@ -157,7 +157,7 @@ function Index(props: Props) { |
157 | 157 | }; |
158 | 158 | |
159 | 159 | return ( |
160 | - <PageHeaderWrapper title="绩效组配置"> | |
160 | + <PageHeaderWrapper title="绩效组配置" loading={id ? loading : false}> | |
161 | 161 | <Card> |
162 | 162 | {detailError ? ( |
163 | 163 | <Result status="warning" title={detailError} /> | ... | ... |
src/pages/performance/KpiGroupSetting/components/DraftList.tsx
src/pages/pms/entity.ts
... | ... | @@ -174,6 +174,11 @@ export const partTypeData = [ |
174 | 174 | { value: 1, label: "配件" }, |
175 | 175 | { value: 2, label: "装潢" }, |
176 | 176 | { value: 4, label: "养护" }, |
177 | + { value: 5, label: "机修辅料" }, | |
178 | + { value: 6, label: "钣金辅料" }, | |
179 | + { value: 7, label: "喷漆辅料" }, | |
180 | + { value: 8, label: "装潢辅料" }, | |
181 | + { value: 9, label: "打磨辅料" }, | |
177 | 182 | ]; |
178 | 183 | |
179 | 184 | /**配件类型*/ | ... | ... |
src/pages/pms/part/PartOil/components/SelectPartModal.tsx
... | ... | @@ -23,6 +23,7 @@ export default function SaveModal(props: Props) { |
23 | 23 | <Input |
24 | 24 | value={part?.partName} |
25 | 25 | style={{ width: '100%' }} |
26 | + readOnly | |
26 | 27 | onChange={(v) => onChange && onChange({ ...value, partName: v.target.value })} |
27 | 28 | placeholder="油料选择" |
28 | 29 | addonAfter={ | ... | ... |
src/pages/pms/part/PartPriceCoefficient/components/FixedPriceModal.tsx
... | ... | @@ -15,10 +15,9 @@ interface Props { |
15 | 15 | } |
16 | 16 | |
17 | 17 | export default function FixedPriceModal({ visible, setVisible, currentFixedPrice, setParams }: Props) { |
18 | - const { brands, shops } = useStore(); | |
18 | + const { shops } = useStore(); | |
19 | 19 | const [brandId, setBrandId] = useState<number>(); |
20 | 20 | const [form] = Form.useForm(); |
21 | - // console.log(currentFixedPrice, 'currentFixedPrice'); | |
22 | 21 | |
23 | 22 | useEffect(() => { |
24 | 23 | if (visible) { |
... | ... | @@ -49,7 +48,6 @@ export default function FixedPriceModal({ visible, setVisible, currentFixedPrice |
49 | 48 | brandId: currentFixedPrice.brandId, |
50 | 49 | partId: fields.part.partId |
51 | 50 | }; |
52 | - // console.log(params); | |
53 | 51 | saveFixedApi(params).then(res => { |
54 | 52 | if (res.success) { |
55 | 53 | message.success(res.result); | ... | ... |
src/pages/pms/part/PartPriceCoefficient/components/FixedPriceTab.tsx
... | ... | @@ -5,7 +5,6 @@ import FixedPriceModal from './FixedPriceModal'; |
5 | 5 | import { useStore } from '..'; |
6 | 6 | import usePagination from '@/hooks/usePagination'; |
7 | 7 | import { getFixedPageListApi, exportFixedPageListApi } from '../api'; |
8 | -import { debounce } from 'lodash'; | |
9 | 8 | import UploadModal from './UploadModal'; |
10 | 9 | import ShopModal from './ShopModal'; |
11 | 10 | |
... | ... | @@ -15,26 +14,17 @@ const { Search } = Input; |
15 | 14 | |
16 | 15 | export default function InsuranceTab() { |
17 | 16 | const { list, loading, setParams, paginationConfig } = usePagination(getFixedPageListApi); |
18 | - const { brands, shops } = useStore(); | |
17 | + const { shops } = useStore(); | |
19 | 18 | const [visible, setVisible] = useState(false); |
20 | 19 | const [currentFixedPrice, setCurrentFixedPrice] = useState<PartPriceCoefficientSpace.FixedItem>({}); |
21 | 20 | const [uploadVisible, sertUploadVisible] = useState(false); |
22 | 21 | const [shopVisible, setShopVisible] = useState(false); |
23 | 22 | const [item, setItem] = useState(); |
24 | 23 | |
25 | - const handleChangeKeywords = debounce(value => { | |
26 | - setParams({ current: 1, keywords: value }, true); | |
27 | - }, 500); | |
28 | - | |
29 | 24 | return ( |
30 | 25 | <> |
31 | 26 | <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', marginBottom: 20 }}> |
32 | 27 | <div style={{ display: 'flex' }}> |
33 | - {/* <Select onChange={value => setParams({ current: 1, brandId: value }, true)} style={{ width: 250, marginRight: 10 }} placeholder="请选择品牌" allowClear> | |
34 | - {brands.map(brand => ( | |
35 | - <Option value={brand.id || ''} key={brand.id}>{brand.name}</Option> | |
36 | - ))} | |
37 | - </Select> */} | |
38 | 28 | <Select onChange={value => setParams({ current: 1, shopId: value }, true)} style={{ width: 250 }} placeholder="请选择服务站" allowClear showSearch optionFilterProp="children"> |
39 | 29 | {shops.map(shop => ( |
40 | 30 | <Option value={shop.id || ''} key={shop.id}>{shop.name}</Option> | ... | ... |
src/pages/pms/part/PartPriceCoefficient/components/InsuranceModal.tsx
... | ... | @@ -20,7 +20,7 @@ export default function TabModal({ visible, setVisible, currentInsurance = {}, s |
20 | 20 | |
21 | 21 | useEffect(() => { |
22 | 22 | if (visible) { |
23 | - form.setFieldsValue(currentInsurance); | |
23 | + form.setFieldsValue({...currentInsurance}); | |
24 | 24 | } else { |
25 | 25 | form.resetFields(); |
26 | 26 | } |
... | ... | @@ -35,7 +35,6 @@ export default function TabModal({ visible, setVisible, currentInsurance = {}, s |
35 | 35 | coefficient: fields.coefficient |
36 | 36 | }; |
37 | 37 | saveInsuranceApi(params).then(res => { |
38 | - console.log(res); | |
39 | 38 | if (res.success) { |
40 | 39 | message.success(res.result); |
41 | 40 | setCurrentInsurance({}); | ... | ... |
src/pages/pms/part/PartPriceCoefficient/components/InsuranceTab.tsx
... | ... | @@ -14,11 +14,6 @@ export default function InsuranceTab() { |
14 | 14 | return ( |
15 | 15 | <> |
16 | 16 | <div style={{ display: 'flex', flexDirection: 'row-reverse', justifyContent: 'space-between', marginBottom: 20 }}> |
17 | - {/* <Select style={{ width: 250 }} placeholder="请选择保险公司" allowClear> | |
18 | - { | |
19 | - insurances.map(insurance => <Option value={insurance.id || -1} key={insurance.id}>{insurance.insurerName}</Option>) | |
20 | - } | |
21 | - </Select> */} | |
22 | 17 | <Button type="primary" icon={<PlusOutlined />} onClick={() => { setVisible(true); setCurrentInsurance({}); }}>新增</Button> |
23 | 18 | </div> |
24 | 19 | <Table | ... | ... |
src/pages/pms/part/PartPriceCoefficient/components/RetailModal.tsx
... | ... | @@ -34,9 +34,7 @@ export default function TabModal({ setParams, currentRetail= {}, setCurrentRetai |
34 | 34 | form.validateFields().then(fields => { |
35 | 35 | const params = { |
36 | 36 | id: currentRetail.id, |
37 | - // brandId: fields.brandId, | |
38 | - // brandName: brands.filter(brand => brand.id === fields.brandId)[0].name, | |
39 | - shopIds: fields.shopId, | |
37 | + shopIds: fields.shopIds, | |
40 | 38 | workTypeId: fields.workTypeId, |
41 | 39 | scopes: fields.scopes |
42 | 40 | }; |
... | ... | @@ -74,7 +72,7 @@ export default function TabModal({ setParams, currentRetail= {}, setCurrentRetai |
74 | 72 | scopes: currentRetail.scopes && currentRetail.scopes.length > 1 ? currentRetail.scopes : undefined |
75 | 73 | }} |
76 | 74 | > |
77 | - <Item label="服务站" name="shopId" required rules={[{ required: true, message: '请选择服务站' }]}> | |
75 | + <Item label="服务站" name="shopIds" required rules={[{ required: true, message: '请选择服务站' }]}> | |
78 | 76 | <Select style={{ width: "60%" }} disabled={!!currentRetail.id} placeholder="请选择服务站" mode="multiple" showSearch optionFilterProp="children"> |
79 | 77 | {shops.map(shop => ( |
80 | 78 | <Option value={shop.id || ''} key={shop.id}>{shop.name}</Option> | ... | ... |
src/pages/pms/part/PartSplit/components/RetailModal.tsx
... | ... | @@ -35,9 +35,7 @@ export default function TabModal({ setParams, currentRetail= {}, setCurrentRetai |
35 | 35 | form.validateFields().then(fields => { |
36 | 36 | const params = { |
37 | 37 | id: currentRetail.id, |
38 | - // brandId: fields.brandId, | |
39 | - // brandName: brands.filter(brand => brand.id === fields.brandId)[0].name, | |
40 | - shopIds: fields.shopId, | |
38 | + shopIds: fields.shopIds, | |
41 | 39 | workTypeId: fields.workTypeId, |
42 | 40 | scopes: fields.scopes |
43 | 41 | }; |
... | ... | @@ -75,7 +73,7 @@ export default function TabModal({ setParams, currentRetail= {}, setCurrentRetai |
75 | 73 | scopes: currentRetail.scopes && currentRetail.scopes.length > 1 ? currentRetail.scopes : undefined |
76 | 74 | }} |
77 | 75 | > |
78 | - <Item label="服务站" name="shopId" required rules={[{ required: true, message: '请选择服务站' }]}> | |
76 | + <Item label="服务站" name="shopIds"> | |
79 | 77 | <Select style={{ width: "60%" }} disabled={!!currentRetail.id} placeholder="请选择服务站" mode="multiple" showSearch optionFilterProp="children"> |
80 | 78 | {shops.map(shop => ( |
81 | 79 | <Option value={shop.id || ''} key={shop.id}>{shop.name}</Option> | ... | ... |
src/pages/pms/part/PartSplit/index.tsx
... | ... | @@ -16,15 +16,6 @@ export default function PartPriceCoefficient() { |
16 | 16 | const [pPVisible, setPPVisible] = useState(false); |
17 | 17 | const [itemId, setItemId] = useState<number>(); |
18 | 18 | |
19 | - // function _delete(it: Item = {}) { | |
20 | - // deleteApi(it.splitId).then(() => { | |
21 | - // message.success("操作成功"); | |
22 | - // setParams({...innerParams, current: 1}, true); | |
23 | - // }).catch(e => { | |
24 | - // message.error(e.message); | |
25 | - // }); | |
26 | - // } | |
27 | - | |
28 | 19 | return ( |
29 | 20 | <PageHeaderWrapper title="配件拆分设置"> |
30 | 21 | <ConfigProvider locale={zhCN}> |
... | ... | @@ -56,15 +47,6 @@ export default function PartPriceCoefficient() { |
56 | 47 | render={(text, _item: Item) => ( |
57 | 48 | <span> |
58 | 49 | <a onClick={() => { setVisible(true); setItem(_item); }}>编辑</a> |
59 | - {/*<Divider type="vertical" />*/} | |
60 | - {/*<Popconfirm*/} | |
61 | - {/* title="是否删除?"*/} | |
62 | - {/* onConfirm={() => _delete(_item)}*/} | |
63 | - {/* okText="确定"*/} | |
64 | - {/* cancelText="取消"*/} | |
65 | - {/*>*/} | |
66 | - {/* <a onClick={(e) => { e.preventDefault(); }} style={{ color: 'red' }}>删除</a>*/} | |
67 | - {/*</Popconfirm>*/} | |
68 | 50 | </span> |
69 | 51 | )} |
70 | 52 | /> | ... | ... |
src/pages/pms/part/Repertory/components/SavePartModal.tsx
... | ... | @@ -6,7 +6,7 @@ import { useStore } from '@/pages/pms/part/Repertory'; |
6 | 6 | interface Props { |
7 | 7 | visible: boolean, |
8 | 8 | onCancel: Function, |
9 | - item: PmsPartOilSpace.Item, | |
9 | + item: PartRepertorySpace.Item, | |
10 | 10 | fetchList: () => any |
11 | 11 | } |
12 | 12 | |
... | ... | @@ -31,7 +31,7 @@ export default function SaveModal(props: Props) { |
31 | 31 | useEffect(() => { |
32 | 32 | if (visible) { |
33 | 33 | form.setFieldsValue({ |
34 | - ...item | |
34 | + ...item, | |
35 | 35 | }); |
36 | 36 | } else { form.resetFields(); } |
37 | 37 | }, [visible]); |
... | ... | @@ -93,6 +93,7 @@ export default function SaveModal(props: Props) { |
93 | 93 | <Select |
94 | 94 | placeholder="请选择配件类型" |
95 | 95 | showSearch |
96 | + mode="multiple" | |
96 | 97 | filterOption={(input: any, option: any) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
97 | 98 | > |
98 | 99 | {partTypeData.map((item: any) => ( | ... | ... |
src/pages/pms/part/Repertory/interface.d.ts
src/pages/pms/partPlan/MinRatioPlan/index.tsx
... | ... | @@ -158,7 +158,7 @@ export default function Index() { |
158 | 158 | > |
159 | 159 | <Column title="配件编码" dataIndex="partCode" fixed="left" /> |
160 | 160 | <Column title="配件名称" dataIndex="partName" fixed="left" /> |
161 | - <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
161 | + <Column title="配件类型" dataIndex="partTypeName" /> | |
162 | 162 | <Column title="库房名称" dataIndex="storageName" /> |
163 | 163 | <Column title="门店名称" dataIndex="shopName" /> |
164 | 164 | <Column title="客户订件数量(个)" dataIndex="buyCnt" /> | ... | ... |
src/pages/pms/partPlan/PlanManage/subpages/Apply/components/PartModal.tsx
... | ... | @@ -61,7 +61,7 @@ export default function Index({ onCancel, visible, parts=[], onOk, setParams }: |
61 | 61 | || (it.supplierName || '').includes(dfParam.keywords); |
62 | 62 | }) |
63 | 63 | .filter(it => { |
64 | - return (dfParam.partType && it.partType == dfParam.partType) || !dfParam.partType; | |
64 | + return (dfParam.partTypeName && it.partTypeName.includes(dfParam.partTypeName)) || !dfParam.partTypeName; | |
65 | 65 | }) |
66 | 66 | .filter(it => { |
67 | 67 | return (dfParam.storageName && it.storageName == dfParam.storageName) || !dfParam.storageName; |
... | ... | @@ -105,8 +105,8 @@ export default function Index({ onCancel, visible, parts=[], onOk, setParams }: |
105 | 105 | <Select |
106 | 106 | allowClear |
107 | 107 | style={{ width: 150, marginRight: 10}} |
108 | - onChange={(partType) => { | |
109 | - setDfParam({...dfParam, partType}); | |
108 | + onChange={(v) => { | |
109 | + setDfParam({...dfParam, partTypeName: partTypeData.find(i => i.value == v)?.label}); | |
110 | 110 | }} |
111 | 111 | placeholder="请选择配件类型" |
112 | 112 | showSearch |
... | ... | @@ -216,7 +216,7 @@ export default function Index({ onCancel, visible, parts=[], onOk, setParams }: |
216 | 216 | <Column title="库房名称" dataIndex="storageName" /> |
217 | 217 | <Column title="门店名称" dataIndex="shopName" /> |
218 | 218 | <Column title="配件数量" dataIndex="count" /> |
219 | - <Column title="配件类型" dataIndex="partType" render={(t, r, i) => partTypeData.find(it => it.value == t)?.label} /> | |
219 | + <Column title="配件类型" dataIndex="partTypeName" /> | |
220 | 220 | <Column title="配件来源类型" dataIndex="typeName" /> |
221 | 221 | <Column title="上次采购供应商" dataIndex="supplierName" /> |
222 | 222 | </Table> | ... | ... |
src/pages/pms/partPlan/PlanPool/components/PartTable.tsx
... | ... | @@ -16,7 +16,7 @@ interface Props { |
16 | 16 | id?: number, // 上一个列表ID |
17 | 17 | } |
18 | 18 | export default function Index(props: Props = {}) { |
19 | - const { dfParams, key, partTypeData } = useStore(); | |
19 | + const { dfParams, key } = useStore(); | |
20 | 20 | const {showAnalyse=true} = props; |
21 | 21 | const { data: parts, setParams, loading } = useInitial(getList, [], {...dfParams, ...props}); |
22 | 22 | const [visible, setVisible] = useState(false); |
... | ... | @@ -37,7 +37,7 @@ export default function Index(props: Props = {}) { |
37 | 37 | <Column title="配件名称" dataIndex="name" fixed="left" /> |
38 | 38 | <Column title="本次计划数量(个)" dataIndex="cnt" fixed="left" /> |
39 | 39 | <Column title="来源类型" dataIndex="typeName" /> |
40 | - <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
40 | + <Column title="配件类型" dataIndex="partTypeName" /> | |
41 | 41 | |
42 | 42 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
43 | 43 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> | ... | ... |
src/pages/pms/partPlan/PlanPool/components/StoragePartTable.tsx
... | ... | @@ -12,7 +12,7 @@ interface Props { |
12 | 12 | type?: number, // 类型1区域库2库房3车系4车型5配件 |
13 | 13 | } |
14 | 14 | export default function Index(props: Props = {}) { |
15 | - const { dfParams, key, partTypeData } = useStore(); | |
15 | + const { dfParams, key } = useStore(); | |
16 | 16 | const [form] = Form.useForm(); |
17 | 17 | const { data: parts, setParams, loading } = useInitial(getList, [], dfParams); |
18 | 18 | const [visible, setVisible] = useState(false); |
... | ... | @@ -62,7 +62,7 @@ export default function Index(props: Props = {}) { |
62 | 62 | <Column title="库房名称" dataIndex="storageName" /> |
63 | 63 | <Column title="门店名称" dataIndex="shopName" /> |
64 | 64 | <Column title="来源类型" dataIndex="typeName" /> |
65 | - <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
65 | + <Column title="配件类型" dataIndex="partTypeName" /> | |
66 | 66 | |
67 | 67 | <Column title="计划前库销比" dataIndex="ratio" render={t => (t || 0).toFixed(2)} /> |
68 | 68 | <Column title="计划后库销比" dataIndex="planeRatio" render={t => (t || 0).toFixed(2)} /> | ... | ... |
src/pages/pms/purchase/PurchaseRecord/comonents/AddPurchaseModal.tsx
... | ... | @@ -308,7 +308,7 @@ export default function PartStorageModal({ onCancel, visible, itemData, setItemD |
308 | 308 | <Column title="配件名称" dataIndex="partName" /> |
309 | 309 | <Column title="配件编码" dataIndex="partCode" /> |
310 | 310 | <Column title="数据来源" dataIndex="typeName" /> |
311 | - <Column title="配件类型" dataIndex="partType" render={t => partTypeData.find(i => i.value == t)?.label} /> | |
311 | + <Column title="配件类型" dataIndex="partTypeName" /> | |
312 | 312 | <Column title="采购单价(元)" dataIndex="price" /> |
313 | 313 | <Column title="采购数量" dataIndex="cnt" /> |
314 | 314 | <Column title="库房" dataIndex="storageName" /> | ... | ... |
src/pages/pms/storage/partShop/components/LockDetailModal.tsx
... | ... | @@ -46,7 +46,7 @@ export default function Index({ item = {}, visible, onCancel }: Props) { |
46 | 46 | ]} |
47 | 47 | > |
48 | 48 | <Table loading={loading} rowKey={(v: PmsStoragePartShop.LockDetailVO) => `${v.orderNo}`} scroll={{ y: 500 }} dataSource={data || []} pagination={false}> |
49 | - <Column title="锁库类型" render={r => (r.orderNo.slice(0, 1) == "D" ? "装潢订单锁定" : r.type)} /> | |
49 | + <Column title="锁库类型" render={r => ((!!r.orderNo && r.orderNo.slice(0, 1) == "D") ? "装潢订单锁定" : r.type)} /> | |
50 | 50 | <Column title="单号" dataIndex="orderNo" /> |
51 | 51 | <Column |
52 | 52 | title="详情" | ... | ... |