Commit b5613060261c4626694c02016faf02b42c01c8ea
Merge remote-tracking branch 'origin/bug_fix'
Showing
19 changed files
with
30 additions
and
62 deletions
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/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/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="详情" | ... | ... |