| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- import service from '/@/utils/request';
- export interface Paged<T> {
- total: number;
- page: number;
- pageSize: number;
- list: T[];
- }
- export interface SupplierDeliveryRow {
- id?: string;
- sffb?: string;
- wlbm?: string;
- wlms?: string;
- buyer?: string;
- gysdm?: string;
- gysmc?: string;
- cgdd?: string;
- ddhh?: number;
- jhdsl?: number;
- dfhsl?: number;
- dsnum?: string;
- requestdate?: string;
- schedqty?: number;
- jqhfnew?: string;
- ztsl?: number;
- zsl1?: number;
- rksl?: number;
- bhgsl?: number;
- thsl?: number;
- bz?: string;
- }
- export interface SupplierShipmentRow {
- mid: number;
- id: number;
- shddh?: string;
- poBill?: string;
- usage?: string;
- jhshrq?: string;
- shMaterialCode?: string;
- shMaterialName?: string;
- shDeliveryQuantity?: number;
- sfpc?: number;
- pcrksl?: number;
- shPurchaseName?: string;
- shpc?: string;
- scph?: string;
- wldh?: string;
- dycs?: number;
- shzt?: string;
- th?: string;
- state?: number;
- }
- export interface SupplierShipmentDetailRow {
- id?: number | null;
- hh?: number | null;
- poBill?: string;
- poBillLine?: string;
- orderType?: string;
- shMaterialCode?: string;
- shMaterialName?: string;
- th?: string;
- shDeliveryQuantity?: number | null;
- bzsl?: number | null;
- bqsl?: number | null;
- shMaterialDw?: string;
- scrq?: string;
- scph?: string;
- remarks?: string;
- djsl?: number | null;
- jybb?: string;
- jhdbh?: string;
- }
- export interface SupplierShipmentFormData {
- id?: number | null;
- shddh?: string;
- jhshrq?: string;
- wlsc?: string;
- yjdhrq?: string;
- shPurchaseName?: string;
- shPurchaseNum?: string;
- wldh?: string;
- sfpc?: number;
- chbg?: string;
- pcsm?: string;
- details: SupplierShipmentDetailRow[];
- }
- export function fetchSupplierDeliveryList(params: any) {
- return service.get<Paged<SupplierDeliveryRow>>('/api/ProcurementExecution/supplier-delivery/list', { params }).then((r) => r.data);
- }
- export function publishSupplierDelivery(ids: string) {
- return service.post('/api/ProcurementExecution/supplier-delivery/publish', { ids }).then((r) => r.data);
- }
- export function replySupplierDeliveryByPlanDate(ids: string) {
- return service.post('/api/ProcurementExecution/supplier-delivery/reply-by-plan-date', { ids }).then((r) => r.data);
- }
- export function replySupplierDeliveryDueDate(ids: string, jqhf: string) {
- return service.post('/api/ProcurementExecution/supplier-delivery/reply-due-date', { ids, jqhf }).then((r) => r.data);
- }
- export function closeDeliveryOrder(dsNum: string) {
- return service.post('/api/ProcurementExecution/supplier-delivery/close', { dsNum }).then((r) => r.data);
- }
- export function fetchSupplierShipmentList(params: any) {
- return service.get<Paged<SupplierShipmentRow>>('/api/ProcurementExecution/supplier-shipment/list', { params }).then((r) => r.data);
- }
- export function fetchSupplierShipmentDetail(id: number) {
- return service.get<SupplierShipmentFormData>(`/api/ProcurementExecution/supplier-shipment/${id}`).then((r) => r.data);
- }
- export function fetchSupplierShipmentDraft(ids: string) {
- return service.get<SupplierShipmentFormData>('/api/ProcurementExecution/supplier-shipment/create-draft', { params: { ids } }).then((r) => r.data);
- }
- export function saveSupplierShipment(body: SupplierShipmentFormData) {
- return service.post('/api/ProcurementExecution/supplier-shipment/save', body).then((r) => {
- const d = r.data as { result?: { id?: number; message?: string; shddh?: string }; shddh?: string };
- return d?.result ?? d;
- });
- }
- export function deleteSupplierShipment(id: number) {
- return service.post('/api/ProcurementExecution/supplier-shipment/delete', { id }).then((r) => r.data);
- }
- export function shipmentPlaceholderAction(action: 'generate-label' | 'print-shipping-note' | 'print-label', id: number) {
- return service.post(`/api/ProcurementExecution/supplier-shipment/${action}`, { id }).then((r) => r.data);
- }
- export interface SupplierShipmentLabelRow {
- glid?: number | null;
- wlbm?: string | null;
- wlmc?: string | null;
- ggxh?: string | null;
- zxsl?: number | null;
- dw?: string | null;
- remarks?: string | null;
- bz?: number | null;
- ddlx?: string | null;
- ddh?: string | null;
- shdh?: string | null;
- shdhh?: string | null;
- scrq?: string | null;
- scph?: string | null;
- xh?: string | null;
- gysmc?: string | null;
- th?: string | null;
- bbh?: string | null;
- yt?: string | null;
- ccrq?: string | null;
- shpc?: string | null;
- }
- export function fetchSupplierShipmentLabelData(shddh: string) {
- return service
- .get<{ list: SupplierShipmentLabelRow[] }>(`/api/ProcurementExecution/supplier-shipment/label-data`, { params: { shddh } })
- .then((r) => r.data);
- }
- // ── S4 采购退货单 ──
- export interface PurchaseReturnListRow {
- id?: number;
- detailRecId?: number;
- receiver?: string;
- suppName?: string;
- rctDate?: string;
- ordNbr?: string;
- itemNum?: string;
- descr?: string;
- descr1?: string;
- rctQty?: number;
- isPlan?: boolean;
- }
- export interface PurchaseReturnKv {
- value?: string;
- label?: string;
- }
- export interface PurchaseReturnDetailRow {
- recID?: number | null;
- line?: number;
- itemNum?: string;
- ordNbr?: string;
- ordLine?: number;
- qtyOrded?: number;
- qtyReceived?: number;
- rctQty?: number;
- lotSerial?: string;
- um?: string;
- location?: string;
- qcDescr?: string;
- remark?: string;
- rctDate?: string;
- typed?: string;
- taxIn?: boolean;
- taxClass?: string;
- curr?: string;
- potype?: string;
- qtyReturn?: number;
- rctNbr?: string;
- rctLine?: number;
- custPO?: string;
- blanketLine?: number;
- umConversion?: number;
- poCost?: number;
- supp?: string;
- _edit?: boolean;
- }
- export function fetchPurchaseReturnList(params: any) {
- return service.get<Paged<PurchaseReturnListRow>>('/api/ProcurementExecution/purchase-return/list', { params }).then((r) => r.data);
- }
- export function fetchPurchaseReturnDetail(id: number) {
- return service.get<{ master: Record<string, any>; details: PurchaseReturnDetailRow[] }>(`/api/ProcurementExecution/purchase-return/${id}`).then((r) => r.data);
- }
- export function savePurchaseReturn(body: any) {
- return service.post<{ id: number; receiver?: string }>('/api/ProcurementExecution/purchase-return/save', body).then((r) => r.data);
- }
- export function deletePurchaseReturn(id: number) {
- return service.post<{ message?: string }>(`/api/ProcurementExecution/purchase-return/delete/${id}`).then((r) => r.data);
- }
- export function fetchPurchaseReturnSuppliers() {
- return service.get<PurchaseReturnKv[]>('/api/ProcurementExecution/purchase-return/options/suppliers').then((r) => r.data);
- }
- export function fetchPurchaseReturnRcReceivers(supp: string) {
- return service.get<PurchaseReturnKv[]>('/api/ProcurementExecution/purchase-return/options/rc-receivers', { params: { supp } }).then((r) => r.data);
- }
- export function fetchPurchaseReturnRcLines(receiver: string) {
- return service
- .get<{ head?: Record<string, any>; lines: PurchaseReturnDetailRow[] }>('/api/ProcurementExecution/purchase-return/rc-detail-lines', {
- params: { receiver },
- })
- .then((r) => r.data);
- }
- export function fetchPurchaseReturnDepartments() {
- return service.get<PurchaseReturnKv[]>('/api/ProcurementExecution/purchase-return/options/departments').then((r) => r.data);
- }
- export function fetchPurchaseReturnLocations() {
- return service.get<PurchaseReturnKv[]>('/api/ProcurementExecution/purchase-return/options/locations').then((r) => r.data);
- }
- export function fetchPurchaseReturnQcReasons() {
- return service.get<PurchaseReturnKv[]>('/api/ProcurementExecution/purchase-return/options/qc-reasons').then((r) => r.data);
- }
- export function fetchPurchaseReturnItemOptions(params: { keyword?: string; page?: number; pageSize?: number }) {
- return service
- .get<{ total: number; page: number; pageSize: number; list: PurchaseReturnKv[] }>(`/api/ProcurementExecution/purchase-return/item-options`, {
- params,
- })
- .then((r) => r.data);
- }
- // ── S4 IQC退货查询(只读)──
- export interface IqcReturnListRow {
- rowKey?: string;
- entryId?: number;
- fBillNo?: string;
- ordNbr?: string;
- pch?: string;
- fMaterialCfg?: string;
- sortName?: string;
- supp?: string;
- gysmc?: string;
- wlmc?: string;
- ggxh?: string;
- frInsQty?: number;
- bhgsl?: number;
- clfs?: number;
- thyy?: string;
- fInspectStatus?: string;
- fApplyTime?: string;
- fInspeEndDate?: string;
- }
- export function fetchIqcReturnList(params: any) {
- return service.get<Paged<IqcReturnListRow>>('/api/ProcurementExecution/iqc-return/list', { params }).then((r) => r.data);
- }
- // ── S4 供应商欠料看板(只读)──
- export interface SupplierShortageKanbanRow {
- rowNum?: number;
- supplier_Number?: string;
- supplier_Name?: string;
- itemNum?: string;
- descr?: string;
- descr1?: string;
- d0?: number;
- d1?: number;
- d2?: number;
- d3?: number;
- d4?: number;
- d5?: number;
- d6?: number;
- d7?: number;
- d8?: number;
- d9?: number;
- d10?: number;
- d11?: number;
- d12?: number;
- d13?: number;
- d14?: number;
- }
- export function fetchSupplierShortageKanbanList(params: any) {
- return service
- .get<Paged<SupplierShortageKanbanRow>>('/api/ProcurementExecution/supplier-shortage-kanban/list', { params })
- .then((r) => r.data);
- }
- export function refreshSupplierShortageKanban() {
- return service.post<{ ok: boolean; elapsedMs?: number; message?: string }>('/api/ProcurementExecution/supplier-shortage-kanban/refresh').then((r) => r.data);
- }
|