Commit c66c9165aee8bae06737b674aef094764b945940
1 parent
1348ce7a
配件类型
Showing
8 changed files
with
19 additions
and
12 deletions
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/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" /> | ... | ... |