Commit 23115b98959c44585ef2d42d363771757bfdf177
1 parent
20d041c0
feat: update
Showing
9 changed files
with
318 additions
and
34 deletions
src/pages/Invoice/components/BankChooseModal.tsx
| ... | ... | @@ -175,7 +175,6 @@ export default ({ invoiceId, setVisible, onClose }) => { |
| 175 | 175 | let i = 0; |
| 176 | 176 | |
| 177 | 177 | let tags = selectedStatement.map((item) => { |
| 178 | - console.log(item); | |
| 179 | 178 | let tagText = item.id; |
| 180 | 179 | |
| 181 | 180 | if (item.payeePayerName) { |
| ... | ... | @@ -206,8 +205,6 @@ export default ({ invoiceId, setVisible, onClose }) => { |
| 206 | 205 | ); |
| 207 | 206 | }); |
| 208 | 207 | |
| 209 | - console.log(tags); | |
| 210 | - | |
| 211 | 208 | return tags; |
| 212 | 209 | }; |
| 213 | 210 | ... | ... |
src/pages/Invoice/components/BankImportModal.tsx
| ... | ... | @@ -36,7 +36,6 @@ export default ({ setVisible, onClose }) => { |
| 36 | 36 | headers: { Authorization: localStorage.getItem('token') }, |
| 37 | 37 | }) |
| 38 | 38 | .then((response) => { |
| 39 | - console.log(response); | |
| 40 | 39 | // 创建一个新的 Blob 对象,它包含了服务器响应的数据(即你的 Excel 文件) |
| 41 | 40 | const blob = new Blob([response.data]); // Excel 的 MIME 类型 |
| 42 | 41 | const downloadUrl = window.URL.createObjectURL(blob); | ... | ... |
src/pages/Order/components/KingdeeCustomerModal.tsx
src/pages/Order/components/OrderDrawer.tsx
| ... | ... | @@ -42,6 +42,7 @@ import { |
| 42 | 42 | PAYMENT_CHANNEL_OPTIONS, |
| 43 | 43 | PAYMENT_METHOD_OPTIONS, |
| 44 | 44 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, |
| 45 | + SHIPPING_WAREHOUSE_OPTIONS, | |
| 45 | 46 | } from '../constant'; |
| 46 | 47 | import KingdeeCustomerModal from './KingdeeCustomerModal'; |
| 47 | 48 | |
| ... | ... | @@ -130,7 +131,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 130 | 131 | includeFlag = true; |
| 131 | 132 | } |
| 132 | 133 | } |
| 133 | - console.log(includeFlag); | |
| 134 | + | |
| 134 | 135 | if (!includeFlag) { |
| 135 | 136 | form.resetFields(['salesCode']); |
| 136 | 137 | message.warning('检测到销售代码为旧的,已清空,请重新选择'); |
| ... | ... | @@ -205,7 +206,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 205 | 206 | * 回显金蝶信息 |
| 206 | 207 | */ |
| 207 | 208 | async function showKindeeInfo() { |
| 208 | - console.log(copyData); | |
| 209 | 209 | //客户信息 |
| 210 | 210 | if (copyData.customerId) { |
| 211 | 211 | //客户回显 |
| ... | ... | @@ -242,15 +242,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | - //订单修改和新增的子订单列表命名是list | |
| 246 | - copyData.list = copyData.subOrderInformationLists; | |
| 247 | 245 | //主订单事业部默认显示子订单第一条的事业部 |
| 248 | - copyData.productBelongBusiness = copyData.list[0].productBelongBusiness; | |
| 249 | - copyData.paymentMethod = copyData.list[0].paymentMethod; | |
| 250 | - copyData.paymentChannel = copyData.list[0].paymentChannel; | |
| 251 | - copyData.invoicingStatus = copyData.list[0].invoicingStatus; | |
| 252 | - | |
| 253 | - copyData.list = copyData.list?.map((item) => { | |
| 246 | + copyData.productBelongBusiness = | |
| 247 | + copyData.subOrderInformationLists[0].productBelongBusiness; | |
| 248 | + copyData.paymentMethod = | |
| 249 | + copyData.subOrderInformationLists[0].paymentMethod; | |
| 250 | + copyData.paymentChannel = | |
| 251 | + copyData.subOrderInformationLists[0].paymentChannel; | |
| 252 | + copyData.invoicingStatus = | |
| 253 | + copyData.subOrderInformationLists[0].invoicingStatus; | |
| 254 | + | |
| 255 | + //子订单数据处理:子订单在表单中的命名为list | |
| 256 | + let newList = copyData.subOrderInformationLists?.map((item) => { | |
| 254 | 257 | item.filePaths = item.listAnnex?.map((path) => { |
| 255 | 258 | let i = 0; |
| 256 | 259 | return { |
| ... | ... | @@ -263,23 +266,32 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 263 | 266 | }); |
| 264 | 267 | return item; |
| 265 | 268 | }); |
| 266 | - } | |
| 267 | 269 | |
| 268 | - if (subOrders !== undefined && subOrders.length > 0) { | |
| 269 | - copyData.list = subOrders; | |
| 270 | - } | |
| 270 | + copyData.list = newList; | |
| 271 | 271 | |
| 272 | - setInvoicingStatus(copyData.invoicingStatus); | |
| 272 | + if (subOrders !== undefined && subOrders.length > 0) { | |
| 273 | + copyData.list = subOrders; | |
| 274 | + } | |
| 273 | 275 | |
| 274 | - form.setFieldsValue({ ...copyData }); | |
| 275 | - //如果是新建,需要清空list | |
| 276 | - if (optType('add')) { | |
| 277 | - form.resetFields(['list']); | |
| 278 | - } | |
| 276 | + //发货仓库处理 | |
| 277 | + for (let listItem of copyData.list) { | |
| 278 | + if (listItem.shippingWarehouse === null) { | |
| 279 | + listItem.shippingWarehouse = 'DALANG_WAREHOUSE'; | |
| 280 | + } | |
| 281 | + } | |
| 279 | 282 | |
| 280 | - getSalesCodeOptions(); | |
| 281 | - if (!optType('after-sales-check')) { | |
| 282 | - showKindeeInfo(); | |
| 283 | + setInvoicingStatus(copyData.invoicingStatus); | |
| 284 | + | |
| 285 | + form.setFieldsValue({ ...copyData }); | |
| 286 | + | |
| 287 | + //如果是新建,需要清空list | |
| 288 | + if (optType('add')) { | |
| 289 | + form.resetFields(['list']); | |
| 290 | + } | |
| 291 | + | |
| 292 | + if (!optType('after-sales-check')) { | |
| 293 | + showKindeeInfo(); | |
| 294 | + } | |
| 283 | 295 | } |
| 284 | 296 | } |
| 285 | 297 | |
| ... | ... | @@ -357,6 +369,23 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 357 | 369 | }, [data]); |
| 358 | 370 | |
| 359 | 371 | /** |
| 372 | + * 所属部门修改事件 | |
| 373 | + * 如果选择实验耗材事业部,那么发货仓库默认是大朗仓库 | |
| 374 | + * @param val | |
| 375 | + */ | |
| 376 | + function productBelongBusinessChange(val: any, index: any) { | |
| 377 | + if (val === 'EXPERIMENTAL_CONSUMABLES') { | |
| 378 | + let list = form.getFieldValue('list'); | |
| 379 | + let currentData = list[index]; | |
| 380 | + if (currentData) { | |
| 381 | + currentData.shippingWarehouse = 'DALANG_WAREHOUSE'; | |
| 382 | + form.setFieldValue('list', list); | |
| 383 | + message.info('已默认选择大朗仓库'); | |
| 384 | + } | |
| 385 | + } | |
| 386 | + } | |
| 387 | + | |
| 388 | + /** | |
| 360 | 389 | * |
| 361 | 390 | * @param option 商品名称所对应的商品数据 |
| 362 | 391 | * @param currentRowData list中当前行的数据 |
| ... | ... | @@ -471,7 +500,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 471 | 500 | * @param option |
| 472 | 501 | */ |
| 473 | 502 | function autoFillSalesInfo(option: any) { |
| 474 | - console.log(option); | |
| 475 | 503 | //销售代表对应职员编码填充 |
| 476 | 504 | form.setFieldValue('empNumber', option.number); |
| 477 | 505 | } |
| ... | ... | @@ -540,6 +568,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 540 | 568 | }; |
| 541 | 569 | |
| 542 | 570 | useEffect(() => { |
| 571 | + getSalesCodeOptions(); | |
| 543 | 572 | if (optType('after-sales-check')) { |
| 544 | 573 | getOldOrderData(data.id); |
| 545 | 574 | } else { |
| ... | ... | @@ -605,7 +634,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 605 | 634 | // console.log(list); |
| 606 | 635 | list = list.map((item) => { |
| 607 | 636 | item.filePaths = item.filePaths?.map((file) => { |
| 608 | - console.log(file); | |
| 609 | 637 | return { url: file.response.data[0] }; |
| 610 | 638 | }); |
| 611 | 639 | return item; |
| ... | ... | @@ -856,7 +884,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 856 | 884 | }); |
| 857 | 885 | } |
| 858 | 886 | |
| 859 | - console.log(options); | |
| 860 | 887 | return options; |
| 861 | 888 | }} |
| 862 | 889 | /> |
| ... | ... | @@ -1304,10 +1331,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
| 1304 | 1331 | width="lg" |
| 1305 | 1332 | label="所属事业部" |
| 1306 | 1333 | options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)} |
| 1334 | + onChange={(val: any) => { | |
| 1335 | + productBelongBusinessChange(val, listMeta.index); | |
| 1336 | + }} | |
| 1307 | 1337 | initialValue={'EXPERIMENTAL_CONSUMABLES'} |
| 1308 | 1338 | rules={[{ required: true, message: '所属事业部必填' }]} |
| 1309 | 1339 | disabled={optType('after-sales-check')} |
| 1310 | 1340 | />, |
| 1341 | + <ProFormSelect | |
| 1342 | + key={'shippingWarehouse' + listMeta.index} | |
| 1343 | + placeholder="请选择发货仓库" | |
| 1344 | + name="shippingWarehouse" | |
| 1345 | + width="lg" | |
| 1346 | + label="发货仓库" | |
| 1347 | + options={enumToSelect(SHIPPING_WAREHOUSE_OPTIONS)} | |
| 1348 | + disabled={optType('after-sales-check')} | |
| 1349 | + />, | |
| 1311 | 1350 | <ProFormTextArea |
| 1312 | 1351 | key={'notes' + listMeta.index} |
| 1313 | 1352 | width="lg" | ... | ... |
src/pages/Order/components/ShippingWarehouseChangeModal.tsx
0 → 100644
| 1 | +import { RESPONSE_CODE } from '@/constants/enum'; | |
| 2 | +import { postServiceOrderShippingWarehouseChange } from '@/services'; | |
| 3 | +import { enumToSelect } from '@/utils'; | |
| 4 | +import { ModalForm, ProFormSelect } from '@ant-design/pro-components'; | |
| 5 | +import { Form, message } from 'antd'; | |
| 6 | +import { SHIPPING_WAREHOUSE_OPTIONS } from '../constant'; | |
| 7 | + | |
| 8 | +export default ({ | |
| 9 | + setVisible, | |
| 10 | + subOrderIds, | |
| 11 | + originShippingWarehouse, | |
| 12 | + onClose, | |
| 13 | +}) => { | |
| 14 | + const [form] = Form.useForm<{ shippingWarehouse: string }>(); | |
| 15 | + | |
| 16 | + let newOriginShippingWarehouse = originShippingWarehouse; | |
| 17 | + if ( | |
| 18 | + originShippingWarehouse === null || | |
| 19 | + originShippingWarehouse === undefined | |
| 20 | + ) { | |
| 21 | + newOriginShippingWarehouse = 'DALANG_WAREHOUSE'; | |
| 22 | + } | |
| 23 | + return ( | |
| 24 | + <> | |
| 25 | + <ModalForm<{ | |
| 26 | + shippingWarehouse: string; | |
| 27 | + }> | |
| 28 | + width={500} | |
| 29 | + open | |
| 30 | + title="修改发货仓库" | |
| 31 | + form={form} | |
| 32 | + autoFocusFirstInput | |
| 33 | + modalProps={{ | |
| 34 | + okText: '保存', | |
| 35 | + cancelText: '取消', | |
| 36 | + destroyOnClose: true, | |
| 37 | + onCancel: () => { | |
| 38 | + setVisible(false); | |
| 39 | + }, | |
| 40 | + }} | |
| 41 | + onFinish={async (values) => { | |
| 42 | + let res = await postServiceOrderShippingWarehouseChange({ | |
| 43 | + data: { | |
| 44 | + ...values, | |
| 45 | + ids: subOrderIds, | |
| 46 | + }, | |
| 47 | + }); | |
| 48 | + | |
| 49 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | |
| 50 | + message.success(res.message); | |
| 51 | + } | |
| 52 | + onClose(); | |
| 53 | + }} | |
| 54 | + onOpenChange={setVisible} | |
| 55 | + > | |
| 56 | + <ProFormSelect | |
| 57 | + key={'shippingWarehouse'} | |
| 58 | + placeholder="请选择发货仓库" | |
| 59 | + name="shippingWarehouse" | |
| 60 | + width="lg" | |
| 61 | + label="发货仓库" | |
| 62 | + rules={[{ required: true, message: '发货仓库必填' }]} | |
| 63 | + initialValue={newOriginShippingWarehouse} | |
| 64 | + options={enumToSelect(SHIPPING_WAREHOUSE_OPTIONS)} | |
| 65 | + /> | |
| 66 | + , | |
| 67 | + </ModalForm> | |
| 68 | + </> | |
| 69 | + ); | |
| 70 | +}; | ... | ... |
src/pages/Order/constant.ts
| ... | ... | @@ -37,6 +37,11 @@ export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = { |
| 37 | 37 | CLAMPING_APPARATUS: '工夹具事业部', |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | +export const SHIPPING_WAREHOUSE_OPTIONS = { | |
| 41 | + DALANG_WAREHOUSE: '大朗仓库', | |
| 42 | + HOUJIE_WAREHOUSE: '厚街仓库', | |
| 43 | +}; | |
| 44 | + | |
| 40 | 45 | export const INVOCING_STATUS_OPTIONS_OLD = { |
| 41 | 46 | UN_INVOICE: '不需开票', |
| 42 | 47 | SPECIALLY_INVOICED: '专票', |
| ... | ... | @@ -522,6 +527,12 @@ export const MAIN_ORDER_COLUMNS = [ |
| 522 | 527 | valueEnum: enumToProTableEnumValue(AFTER_INVOICING_STATUS), |
| 523 | 528 | }, |
| 524 | 529 | { |
| 530 | + title: '发票号码', | |
| 531 | + dataIndex: 'invoiceNumberLike', | |
| 532 | + valueType: 'text', | |
| 533 | + hideInTable: true, | |
| 534 | + }, | |
| 535 | + { | |
| 525 | 536 | title: '付款公司', |
| 526 | 537 | dataIndex: 'receivingCompany', |
| 527 | 538 | valueType: 'select', | ... | ... |
src/pages/Order/index.tsx
| ... | ... | @@ -7,6 +7,7 @@ import { |
| 7 | 7 | postServiceOrderOrderCancel, |
| 8 | 8 | postServiceOrderProcureOrder, |
| 9 | 9 | postServiceOrderProcurePrint, |
| 10 | + postServiceOrderProvideProcurementRoles, | |
| 10 | 11 | postServiceOrderQueryServiceOrder, |
| 11 | 12 | postServiceOrderSaleCancelInvoicing, |
| 12 | 13 | } from '@/services'; |
| ... | ... | @@ -73,6 +74,7 @@ import OrderDrawer from './components/OrderDrawer'; |
| 73 | 74 | import OrderNotesEditModal from './components/OrderNotesEditModal'; |
| 74 | 75 | import ProcureCheckModal from './components/ProcureCheckModal'; |
| 75 | 76 | import ProcureConvertModal from './components/ProcureConvertModal'; |
| 77 | +import ShippingWarehouseChangeModal from './components/ShippingWarehouseChangeModal'; | |
| 76 | 78 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; |
| 77 | 79 | import { |
| 78 | 80 | AFTER_INVOICING_STATUS, |
| ... | ... | @@ -86,6 +88,7 @@ import { |
| 86 | 88 | PROCURE_ORDER_STATUS, |
| 87 | 89 | PROCURE_PRIMARY_ORDER_STATUS_OPTIONS, |
| 88 | 90 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, |
| 91 | + SHIPPING_WAREHOUSE_OPTIONS, | |
| 89 | 92 | TAGS_COLOR, |
| 90 | 93 | getInvoicingType, |
| 91 | 94 | getNeedInvoicing, |
| ... | ... | @@ -150,12 +153,18 @@ const OrderPage = () => { |
| 150 | 153 | const [currentPage, setCurrentPage] = useState(1); |
| 151 | 154 | const [orderCheckType, setOrderCheckType] = useState(''); |
| 152 | 155 | const [filterCondifion, setFilterCondition] = useState(0); |
| 153 | - const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map | |
| 156 | + const [mainOrderSelectedMap] = useState(new Map()); //选中的主订单Map key:主订单id value:主订单数据 | |
| 157 | + const [subOrderSelectedMap] = useState(new Map()); //选中的子订单Map key:主订单id value:选中的子订单数据集合 | |
| 154 | 158 | const [mainOrderSelectedRows, setMainOrderSelectedRows] = useState([]); //选中的主订单集合 |
| 155 | 159 | const mainTableRef = useRef<ActionType>(); |
| 156 | 160 | const mainTableFormRef = useRef<ProFormInstance>(); |
| 157 | 161 | let [searchParams, setSearchParam] = useState(Object); //表格的查询条件存储 |
| 158 | 162 | const [messageApi, contextHolder] = message.useMessage(); |
| 163 | + const [ | |
| 164 | + shippingWarehouseChangeModalVisible, | |
| 165 | + setShippingWarehouseChangeModalVisible, | |
| 166 | + ] = useState(false); | |
| 167 | + const [ids, setIds] = useState([]); | |
| 159 | 168 | const roleCode = userInfo?.roleSmallVO?.code; |
| 160 | 169 | |
| 161 | 170 | // const openCheckNotes = (checkNotes: string) => { |
| ... | ... | @@ -308,11 +317,11 @@ const OrderPage = () => { |
| 308 | 317 | } |
| 309 | 318 | |
| 310 | 319 | const onCheckboxChange = (record: never) => { |
| 320 | + console.log(subOrderSelectedMap); | |
| 311 | 321 | let newSelectedItems = []; |
| 312 | 322 | if (selectedItems.includes(record.id)) { |
| 313 | 323 | newSelectedItems = selectedItems.filter((key) => key !== record.id); |
| 314 | 324 | setSelectedRowKeys([]); |
| 315 | - console.log(selectedRowObj); | |
| 316 | 325 | setSelectedRowObj({ |
| 317 | 326 | ...setSelectedRowObj, |
| 318 | 327 | [record.id]: [], |
| ... | ... | @@ -743,6 +752,26 @@ const OrderPage = () => { |
| 743 | 752 | ) : ( |
| 744 | 753 | '' |
| 745 | 754 | )} |
| 755 | + | |
| 756 | + {(roleCode === 'warehouseKeeper' || roleCode === 'admin') && | |
| 757 | + optRecord.shippingWarehouse !== null ? ( | |
| 758 | + <div | |
| 759 | + className="overflow-hidden whitespace-no-wrap overflow-ellipsis" | |
| 760 | + title={enumValueToLabel( | |
| 761 | + optRecord.shippingWarehouse, | |
| 762 | + SHIPPING_WAREHOUSE_OPTIONS, | |
| 763 | + )} | |
| 764 | + > | |
| 765 | + <span className="text-slate-700"> | |
| 766 | + {enumValueToLabel( | |
| 767 | + optRecord.shippingWarehouse, | |
| 768 | + SHIPPING_WAREHOUSE_OPTIONS, | |
| 769 | + )} | |
| 770 | + </span> | |
| 771 | + </div> | |
| 772 | + ) : ( | |
| 773 | + '' | |
| 774 | + )} | |
| 746 | 775 | </Flex> |
| 747 | 776 | |
| 748 | 777 | <Flex className="w-[10%]" vertical gap="small"> |
| ... | ... | @@ -827,6 +856,22 @@ const OrderPage = () => { |
| 827 | 856 | '' |
| 828 | 857 | )} |
| 829 | 858 | |
| 859 | + {optRecord.subPath?.includes('shippingWarehouseChangeRequest') ? ( | |
| 860 | + <Button | |
| 861 | + className="p-0" | |
| 862 | + type="link" | |
| 863 | + onClick={() => { | |
| 864 | + setIds([optRecord.id]); | |
| 865 | + setOrderRow(optRecord); | |
| 866 | + setShippingWarehouseChangeModalVisible(true); | |
| 867 | + }} | |
| 868 | + > | |
| 869 | + 修改仓库 | |
| 870 | + </Button> | |
| 871 | + ) : ( | |
| 872 | + '' | |
| 873 | + )} | |
| 874 | + | |
| 830 | 875 | {optRecord.subPath?.includes('saleCancelInvoicing') ? ( |
| 831 | 876 | <ButtonConfirm |
| 832 | 877 | className="p-0" |
| ... | ... | @@ -2458,6 +2503,40 @@ const OrderPage = () => { |
| 2458 | 2503 | }); |
| 2459 | 2504 | } |
| 2460 | 2505 | |
| 2506 | + /** | |
| 2507 | + * 采购可以筛选其他采购 | |
| 2508 | + */ | |
| 2509 | + if (roleCode === 'procure' || roleCode === 'admin') { | |
| 2510 | + mainOrdersColumns.push({ | |
| 2511 | + title: '采购名称', | |
| 2512 | + width: 120, | |
| 2513 | + dataIndex: 'supplierName', | |
| 2514 | + valueType: 'select', | |
| 2515 | + request: async () => { | |
| 2516 | + const res = await postServiceOrderProvideProcurementRoles(); | |
| 2517 | + let options = res.data?.map((item) => { | |
| 2518 | + return { label: item, value: item }; | |
| 2519 | + }); | |
| 2520 | + return options; | |
| 2521 | + }, | |
| 2522 | + hideInTable: true, | |
| 2523 | + }); | |
| 2524 | + } | |
| 2525 | + | |
| 2526 | + /** | |
| 2527 | + * 仓库可以筛选发货仓库 | |
| 2528 | + */ | |
| 2529 | + if (roleCode === 'warehouseKeeper' || roleCode === 'admin') { | |
| 2530 | + mainOrdersColumns.push({ | |
| 2531 | + title: '发货仓库', | |
| 2532 | + width: 120, | |
| 2533 | + dataIndex: 'shippingWarehouse', | |
| 2534 | + valueType: 'select', | |
| 2535 | + valueEnum: enumToProTableEnumValue(SHIPPING_WAREHOUSE_OPTIONS), | |
| 2536 | + hideInTable: true, | |
| 2537 | + }); | |
| 2538 | + } | |
| 2539 | + | |
| 2461 | 2540 | //判断是否是采购,是的话新增一个筛选条件 |
| 2462 | 2541 | if (roleCode === 'procure' || roleCode === 'admin') { |
| 2463 | 2542 | mainOrdersColumns.push({ |
| ... | ... | @@ -2731,7 +2810,6 @@ const OrderPage = () => { |
| 2731 | 2810 | // </Button>, |
| 2732 | 2811 | // ); |
| 2733 | 2812 | |
| 2734 | - console.log(toolBtns); | |
| 2735 | 2813 | return toolBtns; |
| 2736 | 2814 | } |
| 2737 | 2815 | |
| ... | ... | @@ -3150,6 +3228,20 @@ const OrderPage = () => { |
| 3150 | 3228 | /> |
| 3151 | 3229 | )} |
| 3152 | 3230 | |
| 3231 | + {shippingWarehouseChangeModalVisible && ( | |
| 3232 | + <ShippingWarehouseChangeModal | |
| 3233 | + setVisible={setShippingWarehouseChangeModalVisible} | |
| 3234 | + subOrderIds={ids} | |
| 3235 | + originShippingWarehouse={orderRow?.shippingWarehouse} | |
| 3236 | + onClose={() => { | |
| 3237 | + setShippingWarehouseChangeModalVisible(false); | |
| 3238 | + setOrderRow({}); | |
| 3239 | + setIds([]); | |
| 3240 | + refreshTable(); | |
| 3241 | + }} | |
| 3242 | + /> | |
| 3243 | + )} | |
| 3244 | + | |
| 3153 | 3245 | {contextHolder} |
| 3154 | 3246 | </PageContainer> |
| 3155 | 3247 | ); | ... | ... |
src/services/definition.ts
| ... | ... | @@ -1458,6 +1458,11 @@ export interface ServerResult { |
| 1458 | 1458 | result?: number; |
| 1459 | 1459 | } |
| 1460 | 1460 | |
| 1461 | +export interface ShippingWarehouseChangeDto { | |
| 1462 | + ids?: Array<number>; | |
| 1463 | + shippingWarehouse?: string; | |
| 1464 | +} | |
| 1465 | + | |
| 1461 | 1466 | export interface SysLogQueryVO { |
| 1462 | 1467 | address?: string; |
| 1463 | 1468 | browser?: string; | ... | ... |
src/services/request.ts
| ... | ... | @@ -63,6 +63,7 @@ import type { |
| 63 | 63 | SalOrderSaveDto, |
| 64 | 64 | SaveReply, |
| 65 | 65 | ServerResult, |
| 66 | + ShippingWarehouseChangeDto, | |
| 66 | 67 | SysLogQueryVO, |
| 67 | 68 | SystemCustomFieldReq, |
| 68 | 69 | UnitMaterialUnitListReq, |
| ... | ... | @@ -9520,6 +9521,77 @@ export const postServiceOrderSendProduct = /* #__PURE__ */ (() => { |
| 9520 | 9521 | return request; |
| 9521 | 9522 | })(); |
| 9522 | 9523 | |
| 9524 | +/** @description request parameter type for postServiceOrderShippingWarehouseChange */ | |
| 9525 | +export interface PostServiceOrderShippingWarehouseChangeOption { | |
| 9526 | + /** | |
| 9527 | + * @description | |
| 9528 | + * dto | |
| 9529 | + */ | |
| 9530 | + body: { | |
| 9531 | + /** | |
| 9532 | + @description | |
| 9533 | + dto */ | |
| 9534 | + dto: ShippingWarehouseChangeDto; | |
| 9535 | + }; | |
| 9536 | +} | |
| 9537 | + | |
| 9538 | +/** @description response type for postServiceOrderShippingWarehouseChange */ | |
| 9539 | +export interface PostServiceOrderShippingWarehouseChangeResponse { | |
| 9540 | + /** | |
| 9541 | + * @description | |
| 9542 | + * OK | |
| 9543 | + */ | |
| 9544 | + 200: ServerResult; | |
| 9545 | + /** | |
| 9546 | + * @description | |
| 9547 | + * Created | |
| 9548 | + */ | |
| 9549 | + 201: any; | |
| 9550 | + /** | |
| 9551 | + * @description | |
| 9552 | + * Unauthorized | |
| 9553 | + */ | |
| 9554 | + 401: any; | |
| 9555 | + /** | |
| 9556 | + * @description | |
| 9557 | + * Forbidden | |
| 9558 | + */ | |
| 9559 | + 403: any; | |
| 9560 | + /** | |
| 9561 | + * @description | |
| 9562 | + * Not Found | |
| 9563 | + */ | |
| 9564 | + 404: any; | |
| 9565 | +} | |
| 9566 | + | |
| 9567 | +export type PostServiceOrderShippingWarehouseChangeResponseSuccess = | |
| 9568 | + PostServiceOrderShippingWarehouseChangeResponse[200]; | |
| 9569 | +/** | |
| 9570 | + * @description | |
| 9571 | + * 修改发货仓库 | |
| 9572 | + * @tags 内部订单 | |
| 9573 | + * @produces * | |
| 9574 | + * @consumes application/json | |
| 9575 | + */ | |
| 9576 | +export const postServiceOrderShippingWarehouseChange = /* #__PURE__ */ (() => { | |
| 9577 | + const method = 'post'; | |
| 9578 | + const url = '/service/order/shippingWarehouseChange'; | |
| 9579 | + function request( | |
| 9580 | + option: PostServiceOrderShippingWarehouseChangeOption, | |
| 9581 | + ): Promise<PostServiceOrderShippingWarehouseChangeResponseSuccess> { | |
| 9582 | + return requester(request.url, { | |
| 9583 | + method: request.method, | |
| 9584 | + ...option, | |
| 9585 | + }) as unknown as Promise<PostServiceOrderShippingWarehouseChangeResponseSuccess>; | |
| 9586 | + } | |
| 9587 | + | |
| 9588 | + /** http method */ | |
| 9589 | + request.method = method; | |
| 9590 | + /** request url */ | |
| 9591 | + request.url = url; | |
| 9592 | + return request; | |
| 9593 | +})(); | |
| 9594 | + | |
| 9523 | 9595 | /** @description request parameter type for postServiceOrderSupplierPrint */ |
| 9524 | 9596 | export interface PostServiceOrderSupplierPrintOption { |
| 9525 | 9597 | /** | ... | ... |