|
@@ -0,0 +1,47 @@
|
|
|
+/**
|
|
|
+ * 获取客户列表
|
|
|
+ * @param {Object} params - 查询参数
|
|
|
+ * @param {number} params.size - 每页条数
|
|
|
+ * @param {number} params.current - 当前页码
|
|
|
+ * @param {string} [params.customerName] - 客户名称筛选
|
|
|
+ * @returns {Promise<AxiosResponse<CustomerResponse>>} 分页客户数据
|
|
|
+ */
|
|
|
+export const getCustomerList = async (params) => {
|
|
|
+ return request({
|
|
|
+ url: '/api/blade-factory/api/factory/view-customer',
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ ...params,
|
|
|
+ // 确保分页参数类型正确
|
|
|
+ size: Number(params.size),
|
|
|
+ current: Number(params.current)
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * @typedef {Object} CustomerRecord
|
|
|
+ * @property {string} id - 客户ID
|
|
|
+ * @property {number} ORG_ID - 组织ID
|
|
|
+ * @property {string} Customer_CODE - 客户编码
|
|
|
+ * @property {string} Customer_NAME - 客户名称
|
|
|
+ * @property {string} Customer_ShortName - 客户简称
|
|
|
+ * @property {string} TaxSchedule_NAME - 税率名称
|
|
|
+ * @property {number} TaxRate - 税率
|
|
|
+ * @property {string} TradeCurrency_NAME - 交易币种
|
|
|
+ * @property {string} ShippmentRule_NAME - 出货规则
|
|
|
+ * @property {string} RecervalTerm_NAME - 收款条件
|
|
|
+ * @property {string} CreatedOn - 创建时间
|
|
|
+ */
|
|
|
+
|
|
|
+/**
|
|
|
+ * @typedef {Object} CustomerResponse
|
|
|
+ * @property {number} code - 状态码
|
|
|
+ * @property {boolean} success - 请求状态
|
|
|
+ * @property {Object} data - 响应数据
|
|
|
+ * @property {CustomerRecord[]} data.records - 客户记录
|
|
|
+ * @property {number} data.total - 总记录数
|
|
|
+ * @property {number} data.size - 每页大小
|
|
|
+ * @property {number} data.current - 当前页码
|
|
|
+ * @property {string} msg - 消息描述
|
|
|
+ */
|