Просмотр исходного кода

feat(api): 新增综合查询接口及类型定义

yz 3 недель назад
Родитель
Сommit
4d63ce08de
2 измененных файлов с 225 добавлено и 0 удалено
  1. 43 0
      src/api/comprehensive/index.js
  2. 182 0
      src/api/types/comprehensive.d.ts

+ 43 - 0
src/api/comprehensive/index.js

@@ -0,0 +1,43 @@
+// @ts-check
+/**
+ * 综合查询接口(来自 doc/shipdoc.md)
+ */
+import request from '@/router/axios'
+
+/**
+ * @typedef {import('@/api/types/comprehensive').ShippingStatusInquiryParams} ShippingStatusInquiryParams
+ * @typedef {import('@/api/types/comprehensive').ARBillHeadStatusInquiryParams} ARBillHeadStatusInquiryParams
+ * @typedef {import('@/api/types/comprehensive').ShippingStatusInquiryResponse} ShippingStatusInquiryResponse
+ * @typedef {import('@/api/types/comprehensive').ARBillHeadStatusInquiryResponse} ARBillHeadStatusInquiryResponse
+ */
+
+const U9CLOUD_PREFIX = '/api/blade-u9cloud'
+
+/**
+ * 发货状态综合查询
+ * GET /comprehensive/query/ShippingStatusInquiry
+ * @param {ShippingStatusInquiryParams} params - 查询参数
+ * @returns {Promise<ShippingStatusInquiryResponse>}
+ */
+export const getShippingStatusInquiry = async (params) => {
+  return request({
+    url: `${U9CLOUD_PREFIX}/comprehensive/query/ShippingStatusInquiry`,
+    method: 'get',
+    params
+  })
+}
+
+/**
+ * 发票及开票信息综合查询(应收单)
+ * GET /comprehensive/query/ARBillHeadStatusInquiry
+ * @param {ARBillHeadStatusInquiryParams} params - 查询参数
+ * @returns {Promise<ARBillHeadStatusInquiryResponse>}
+ */
+export const getARBillHeadStatusInquiry = async (params) => {
+  return request({
+    url: `${U9CLOUD_PREFIX}/comprehensive/query/ARBillHeadStatusInquiry`,
+    method: 'get',
+    params
+  })
+}
+

+ 182 - 0
src/api/types/comprehensive.d.ts

@@ -0,0 +1,182 @@
+import { AxiosResponse } from 'axios';
+
+/**
+ * 综合查询接口通用响应结构(见 shipdoc.md 示例)
+ */
+export interface ComprehensiveApiResponse<T> {
+  code: number;
+  msg: string;
+  data: T;
+}
+
+/**
+ * 发货状态综合查询 - 查询参数
+ * GET /comprehensive/query/ShippingStatusInquiry
+ */
+export interface ShippingStatusInquiryParams {
+  /** 页码(分页参数) */
+  pageNum?: number;
+  /** 每页大小(分页参数) */
+  pageSize?: number;
+
+  orgId?: number | string;
+  orgCode?: string;
+  orgName?: string;
+  docTypeId?: number | string;
+  docTypeCode?: string;
+  docTypeName?: string;
+  docNo?: string;
+  customerId?: number | string;
+  customerCode?: string;
+  itemId?: number | string;
+  itemCode?: string;
+  specs?: string;
+  finallyPrice?: number;
+  totalMoneyTc?: number;
+  totalNetMoneyTc?: number;
+  totalTaxTc?: number;
+  whId?: number | string;
+  whCode?: string;
+  whName?: string;
+  soDocNo?: string;
+  soDocLineNo?: number | string;
+  shipAddress?: string;
+
+  businessDateStart?: string;
+  businessDateEnd?: string;
+
+  qtyMin?: number;
+  qtyMax?: number;
+  orderPriceMin?: number;
+  orderPriceMax?: number;
+
+  fuzzyFields?: string;
+  fuzzyValue?: string;
+
+  statusList?: string;
+  lineStatusList?: string;
+}
+
+/**
+ * 发货状态综合查询 - 响应记录(字段参考 shipdoc.md 示例)
+ */
+export interface ShippingStatusInquiryRecord {
+  orgId?: number | string;
+  orgCode?: string;
+  orgName?: string;
+  docTypeId?: number | string;
+  docTypeCode?: string;
+  docTypeName?: string;
+  docNo?: string;
+  customerId?: number | string;
+  customerCode?: string;
+  itemId?: number | string;
+  itemCode?: string;
+  specs?: string;
+  finallyPrice?: number;
+  totalMoneyTc?: number;
+  totalNetMoneyTc?: number;
+  totalTaxTc?: number;
+  whId?: number | string;
+  whCode?: string;
+  whName?: string;
+  soDocNo?: string;
+  soDocLineNo?: number | string;
+  shipAddress?: string;
+  businessDate?: string;
+  status?: number | string;
+  lineStatus?: number | string;
+  [key: string]: any;
+}
+
+/**
+ * 发票及开票信息综合查询 - 查询参数
+ * GET /comprehensive/query/ARBillHeadStatusInquiry
+ */
+export interface ARBillHeadStatusInquiryParams {
+  /** 页码(分页参数) */
+  pageNum?: number;
+  /** 每页大小(分页参数) */
+  pageSize?: number;
+
+  orgId?: number | string;
+  orgCode?: string;
+  orgName?: string;
+  docTypeId?: number | string;
+  docTypeCode?: string;
+  docTypeName?: string;
+  docNo?: string;
+  docStatus?: number | string;
+  customerId?: number | string;
+  customerCode?: string;
+  customerName?: string;
+  custSiteId?: number | string;
+  custSiteCode?: string;
+  custSiteName?: string;
+  itemId?: number | string;
+  itemCode?: string;
+  itemName?: string;
+  specs?: string;
+  soDocNo?: string;
+  soDocLineNo?: number | string;
+
+  businessDateStart?: string;
+  businessDateEnd?: string;
+
+  qtyMin?: number;
+  qtyMax?: number;
+  taxPriceMin?: number;
+  taxPriceMax?: number;
+  arocMoneyTotalMoneyMin?: number;
+  arocMoneyTotalMoneyMax?: number;
+
+  fuzzyFields?: string;
+  fuzzyValue?: string;
+
+  docStatusList?: string;
+}
+
+/**
+ * 发票及开票信息综合查询 - 响应记录(字段参考 shipdoc.md 示例)
+ */
+export interface ARBillHeadStatusInquiryRecord {
+  orgId?: number | string;
+  orgCode?: string;
+  orgName?: string;
+  docTypeId?: number | string;
+  docTypeCode?: string;
+  docTypeName?: string;
+  docNo?: string;
+  businessDate?: string;
+  docStatus?: number | string;
+  customerId?: number | string;
+  customerCode?: string;
+  customerName?: string;
+  custSiteId?: number | string;
+  custSiteCode?: string;
+  custSiteName?: string;
+  itemId?: number | string;
+  itemCode?: string;
+  itemName?: string;
+  specs?: string;
+  qty?: number;
+  taxPrice?: number;
+  puAmount?: number;
+  arocMoneyNonTax?: number;
+  arocMoneyGoodsTax?: number;
+  arocMoneyTotalMoney?: number;
+  arfcMoneyNonTax?: number;
+  arfcMoneyGoodsTax?: number;
+  arfcMoneyTotalMoney?: number;
+  soDocNo?: string;
+  soDocLineNo?: number | string;
+  [key: string]: any;
+}
+
+export type ShippingStatusInquiryResponse = AxiosResponse<
+  ComprehensiveApiResponse<ShippingStatusInquiryRecord[]>
+>;
+
+export type ARBillHeadStatusInquiryResponse = AxiosResponse<
+  ComprehensiveApiResponse<ARBillHeadStatusInquiryRecord[]>
+>;