feat: 添加分组接口
This commit is contained in:
@@ -34,7 +34,9 @@ export interface walmartCardRecord extends walmartCardUpdateRecord {
|
||||
export interface WalmartCardParams
|
||||
extends Partial<walmartCardRecord>,
|
||||
Partial<CommonStrIdParams>,
|
||||
Pagination {}
|
||||
Pagination {
|
||||
groupId?: number;
|
||||
}
|
||||
|
||||
export function addWalmartCard(data: KamiApiCardInfoWalmartV1AccountCreateReq) {
|
||||
return axios.post('/api/cardInfo/walmart/account/create', data);
|
||||
|
||||
@@ -85,9 +85,10 @@ export interface walmartCardOrderRecord {
|
||||
export interface walmartCardOrderParams
|
||||
extends Partial<walmartCardOrderRecord>,
|
||||
Pagination {
|
||||
dateRange?: Date[];
|
||||
startDate?: Date | null;
|
||||
dateRange?: string[];
|
||||
endDate?: Date | null;
|
||||
accountNickName?: string;
|
||||
groupId?: number | null;
|
||||
}
|
||||
|
||||
// 获取充值列表
|
||||
|
||||
@@ -181,6 +181,7 @@ models/kami-api-card-info-walmart-v1-account-wallet-list-req.ts
|
||||
models/kami-api-card-info-walmart-v1-account-wallet-list-res.ts
|
||||
models/kami-api-card-info-walmart-v1-card-redeem-account-summary.ts
|
||||
models/kami-api-card-info-walmart-v1-group-add-req.ts
|
||||
models/kami-api-card-info-walmart-v1-group-all-list-res.ts
|
||||
models/kami-api-card-info-walmart-v1-group-delete-req.ts
|
||||
models/kami-api-card-info-walmart-v1-group-list-req.ts
|
||||
models/kami-api-card-info-walmart-v1-group-list-res.ts
|
||||
|
||||
@@ -255,9 +255,9 @@ import type { KamiApiCardInfoWalmartV1AccountUpdateStatusReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCardInfoWalmartV1AccountWalletListRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCardInfoWalmartV1GroupDeleteReq } from '../models';
|
||||
import type { KamiApiCardInfoWalmartV1GroupAddReq } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCardInfoWalmartV1GroupListReq } from '../models';
|
||||
import type { KamiApiCardInfoWalmartV1GroupAllListRes } from '../models';
|
||||
// @ts-ignore
|
||||
import type { KamiApiCardInfoWalmartV1GroupListRes } from '../models';
|
||||
// @ts-ignore
|
||||
@@ -4927,6 +4927,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@@ -4937,6 +4938,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
nickName?: string,
|
||||
cookie?: string,
|
||||
createdUserName?: string,
|
||||
groupId?: number,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'current' is not null or undefined
|
||||
@@ -4991,6 +4993,10 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['CreatedUserName'] = createdUserName;
|
||||
}
|
||||
|
||||
if (groupId !== undefined) {
|
||||
localVarQueryParameter['groupId'] = groupId;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
@@ -5435,17 +5441,15 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 添加账户分组
|
||||
* @param {string} name 分组名称
|
||||
* @summary 添加沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupAddReq} [kamiApiCardInfoWalmartV1GroupAddReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupAddDelete: async (
|
||||
name: string,
|
||||
apiCardInfoWalmartGroupAddPost: async (
|
||||
kamiApiCardInfoWalmartV1GroupAddReq?: KamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('apiCardInfoWalmartGroupAddDelete', 'name', name);
|
||||
const localVarPath = `/api/cardInfo/walmart/group/add`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@@ -5454,6 +5458,95 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'POST',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有沃尔玛账户分组
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupAllListGet: async (
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/cardInfo/walmart/group/allList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'GET',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupDeleteDelete: async (
|
||||
id: number,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('apiCardInfoWalmartGroupDeleteDelete', 'id', id);
|
||||
const localVarPath = `/api/cardInfo/walmart/group/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'DELETE',
|
||||
...baseOptions,
|
||||
@@ -5462,8 +5555,8 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarQueryParameter['name'] = name;
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['id'] = id;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
@@ -5482,63 +5575,21 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupDeleteReq} [kamiApiCardInfoWalmartV1GroupDeleteReq]
|
||||
* @summary 获取沃尔玛账户分组
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupDeletePut: async (
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq?: KamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/cardInfo/walmart/group/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'PUT',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupListReq} [kamiApiCardInfoWalmartV1GroupListReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupListPut: async (
|
||||
kamiApiCardInfoWalmartV1GroupListReq?: KamiApiCardInfoWalmartV1GroupListReq,
|
||||
apiCardInfoWalmartGroupListGet: async (
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'current' is not null or undefined
|
||||
assertParamExists('apiCardInfoWalmartGroupListGet', 'current', current);
|
||||
// verify required parameter 'pageSize' is not null or undefined
|
||||
assertParamExists('apiCardInfoWalmartGroupListGet', 'pageSize', pageSize);
|
||||
const localVarPath = `/api/cardInfo/walmart/group/list`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@@ -5548,14 +5599,20 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
}
|
||||
|
||||
const localVarRequestOptions = {
|
||||
method: 'PUT',
|
||||
method: 'GET',
|
||||
...baseOptions,
|
||||
...options
|
||||
};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
if (current !== undefined) {
|
||||
localVarQueryParameter['current'] = current;
|
||||
}
|
||||
|
||||
if (pageSize !== undefined) {
|
||||
localVarQueryParameter['pageSize'] = pageSize;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
@@ -5565,11 +5622,6 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
...headersFromBaseOptions,
|
||||
...options.headers
|
||||
};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(
|
||||
kamiApiCardInfoWalmartV1GroupListReq,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@@ -5578,7 +5630,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupUpdateReq} [kamiApiCardInfoWalmartV1GroupUpdateReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -5729,6 +5781,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
* @param {string} [merchantId] 商户ID
|
||||
* @param {string} [attach] 附加信息
|
||||
* @param {string} [accountNickName] 账户昵称
|
||||
* @param {number} [groupId] 组ID
|
||||
* @param {string} [accountCk] 账户cookie
|
||||
* @param {Array<string>} [dateRange] 时间范围
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -5741,6 +5794,7 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
merchantId?: string,
|
||||
attach?: string,
|
||||
accountNickName?: string,
|
||||
groupId?: number,
|
||||
accountCk?: string,
|
||||
dateRange?: Array<string>,
|
||||
options: RawAxiosRequestConfig = {}
|
||||
@@ -5789,6 +5843,10 @@ export const DefaultApiAxiosParamCreator = function (
|
||||
localVarQueryParameter['accountNickName'] = accountNickName;
|
||||
}
|
||||
|
||||
if (groupId !== undefined) {
|
||||
localVarQueryParameter['groupId'] = groupId;
|
||||
}
|
||||
|
||||
if (accountCk !== undefined) {
|
||||
localVarQueryParameter['accountCk'] = accountCk;
|
||||
}
|
||||
@@ -13084,6 +13142,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@@ -13094,6 +13153,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
nickName?: string,
|
||||
cookie?: string,
|
||||
createdUserName?: string,
|
||||
groupId?: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
@@ -13109,6 +13169,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
nickName,
|
||||
cookie,
|
||||
createdUserName,
|
||||
groupId,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
@@ -13393,25 +13454,25 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 添加账户分组
|
||||
* @param {string} name 分组名称
|
||||
* @summary 添加沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupAddReq} [kamiApiCardInfoWalmartV1GroupAddReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiCardInfoWalmartGroupAddDelete(
|
||||
name: string,
|
||||
async apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq?: KamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupAddDelete(
|
||||
name,
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupAddDelete']?.[
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupAddPost']?.[
|
||||
localVarOperationServerIndex
|
||||
]?.url;
|
||||
return (axios, basePath) =>
|
||||
@@ -13424,25 +13485,25 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupDeleteReq} [kamiApiCardInfoWalmartV1GroupDeleteReq]
|
||||
* @summary 获取所有沃尔玛账户分组
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq?: KamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
async apiCardInfoWalmartGroupAllListGet(
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<KamiApiCardInfoWalmartV1GroupAllListRes>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupAllListGet(
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupDeletePut']?.[
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupAllListGet']?.[
|
||||
localVarOperationServerIndex
|
||||
]?.url;
|
||||
return (axios, basePath) =>
|
||||
@@ -13455,13 +13516,46 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupListReq} [kamiApiCardInfoWalmartV1GroupListReq]
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq?: KamiApiCardInfoWalmartV1GroupListReq,
|
||||
async apiCardInfoWalmartGroupDeleteDelete(
|
||||
id: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupDeleteDelete(
|
||||
id,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupDeleteDelete']?.[
|
||||
localVarOperationServerIndex
|
||||
]?.url;
|
||||
return (axios, basePath) =>
|
||||
createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取沃尔玛账户分组
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiCardInfoWalmartGroupListGet(
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
options?: RawAxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
@@ -13470,13 +13564,14 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
) => AxiosPromise<KamiApiCardInfoWalmartV1GroupListRes>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq,
|
||||
await localVarAxiosParamCreator.apiCardInfoWalmartGroupListGet(
|
||||
current,
|
||||
pageSize,
|
||||
options
|
||||
);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath =
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupListPut']?.[
|
||||
operationServerMap['DefaultApi.apiCardInfoWalmartGroupListGet']?.[
|
||||
localVarOperationServerIndex
|
||||
]?.url;
|
||||
return (axios, basePath) =>
|
||||
@@ -13489,7 +13584,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupUpdateReq} [kamiApiCardInfoWalmartV1GroupUpdateReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -13592,6 +13687,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
* @param {string} [merchantId] 商户ID
|
||||
* @param {string} [attach] 附加信息
|
||||
* @param {string} [accountNickName] 账户昵称
|
||||
* @param {number} [groupId] 组ID
|
||||
* @param {string} [accountCk] 账户cookie
|
||||
* @param {Array<string>} [dateRange] 时间范围
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -13604,6 +13700,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
merchantId?: string,
|
||||
attach?: string,
|
||||
accountNickName?: string,
|
||||
groupId?: number,
|
||||
accountCk?: string,
|
||||
dateRange?: Array<string>,
|
||||
options?: RawAxiosRequestConfig
|
||||
@@ -13621,6 +13718,7 @@ export const DefaultApiFp = function (configuration?: Configuration) {
|
||||
merchantId,
|
||||
attach,
|
||||
accountNickName,
|
||||
groupId,
|
||||
accountCk,
|
||||
dateRange,
|
||||
options
|
||||
@@ -18124,6 +18222,7 @@ export const DefaultApiFactory = function (
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@@ -18134,6 +18233,7 @@ export const DefaultApiFactory = function (
|
||||
nickName?: string,
|
||||
cookie?: string,
|
||||
createdUserName?: string,
|
||||
groupId?: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCardInfoWalmartV1AccountListRes> {
|
||||
return localVarFp
|
||||
@@ -18144,6 +18244,7 @@ export const DefaultApiFactory = function (
|
||||
nickName,
|
||||
cookie,
|
||||
createdUserName,
|
||||
groupId,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
@@ -18301,58 +18402,70 @@ export const DefaultApiFactory = function (
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 添加账户分组
|
||||
* @param {string} name 分组名称
|
||||
* @summary 添加沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupAddReq} [kamiApiCardInfoWalmartV1GroupAddReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupAddDelete(
|
||||
name: string,
|
||||
apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq?: KamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<object> {
|
||||
return localVarFp
|
||||
.apiCardInfoWalmartGroupAddDelete(name, options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupDeleteReq} [kamiApiCardInfoWalmartV1GroupDeleteReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq?: KamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<object> {
|
||||
return localVarFp
|
||||
.apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
.apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupListReq} [kamiApiCardInfoWalmartV1GroupListReq]
|
||||
* @summary 获取所有沃尔玛账户分组
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq?: KamiApiCardInfoWalmartV1GroupListReq,
|
||||
apiCardInfoWalmartGroupAllListGet(
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCardInfoWalmartV1GroupAllListRes> {
|
||||
return localVarFp
|
||||
.apiCardInfoWalmartGroupAllListGet(options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupDeleteDelete(
|
||||
id: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<object> {
|
||||
return localVarFp
|
||||
.apiCardInfoWalmartGroupDeleteDelete(id, options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取沃尔玛账户分组
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiCardInfoWalmartGroupListGet(
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
options?: RawAxiosRequestConfig
|
||||
): AxiosPromise<KamiApiCardInfoWalmartV1GroupListRes> {
|
||||
return localVarFp
|
||||
.apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq,
|
||||
options
|
||||
)
|
||||
.apiCardInfoWalmartGroupListGet(current, pageSize, options)
|
||||
.then(request => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupUpdateReq} [kamiApiCardInfoWalmartV1GroupUpdateReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -18407,6 +18520,7 @@ export const DefaultApiFactory = function (
|
||||
* @param {string} [merchantId] 商户ID
|
||||
* @param {string} [attach] 附加信息
|
||||
* @param {string} [accountNickName] 账户昵称
|
||||
* @param {number} [groupId] 组ID
|
||||
* @param {string} [accountCk] 账户cookie
|
||||
* @param {Array<string>} [dateRange] 时间范围
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -18419,6 +18533,7 @@ export const DefaultApiFactory = function (
|
||||
merchantId?: string,
|
||||
attach?: string,
|
||||
accountNickName?: string,
|
||||
groupId?: number,
|
||||
accountCk?: string,
|
||||
dateRange?: Array<string>,
|
||||
options?: RawAxiosRequestConfig
|
||||
@@ -18431,6 +18546,7 @@ export const DefaultApiFactory = function (
|
||||
merchantId,
|
||||
attach,
|
||||
accountNickName,
|
||||
groupId,
|
||||
accountCk,
|
||||
dateRange,
|
||||
options
|
||||
@@ -21717,6 +21833,7 @@ export class DefaultApi extends BaseAPI {
|
||||
* @param {string} [nickName] 用户昵称
|
||||
* @param {string} [cookie]
|
||||
* @param {string} [createdUserName] 创建用户昵称
|
||||
* @param {number} [groupId] 分组ID
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
@@ -21728,6 +21845,7 @@ export class DefaultApi extends BaseAPI {
|
||||
nickName?: string,
|
||||
cookie?: string,
|
||||
createdUserName?: string,
|
||||
groupId?: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
@@ -21738,6 +21856,7 @@ export class DefaultApi extends BaseAPI {
|
||||
nickName,
|
||||
cookie,
|
||||
createdUserName,
|
||||
groupId,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
@@ -21910,36 +22029,19 @@ export class DefaultApi extends BaseAPI {
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 添加账户分组
|
||||
* @param {string} name 分组名称
|
||||
* @summary 添加沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupAddReq} [kamiApiCardInfoWalmartV1GroupAddReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiCardInfoWalmartGroupAddDelete(
|
||||
name: string,
|
||||
public apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq?: KamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiCardInfoWalmartGroupAddDelete(name, options)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupDeleteReq} [kamiApiCardInfoWalmartV1GroupDeleteReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq?: KamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiCardInfoWalmartGroupDeletePut(
|
||||
kamiApiCardInfoWalmartV1GroupDeleteReq,
|
||||
.apiCardInfoWalmartGroupAddPost(
|
||||
kamiApiCardInfoWalmartV1GroupAddReq,
|
||||
options
|
||||
)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
@@ -21947,27 +22049,56 @@ export class DefaultApi extends BaseAPI {
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupListReq} [kamiApiCardInfoWalmartV1GroupListReq]
|
||||
* @summary 获取所有沃尔玛账户分组
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq?: KamiApiCardInfoWalmartV1GroupListReq,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
public apiCardInfoWalmartGroupAllListGet(options?: RawAxiosRequestConfig) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiCardInfoWalmartGroupListPut(
|
||||
kamiApiCardInfoWalmartV1GroupListReq,
|
||||
options
|
||||
)
|
||||
.apiCardInfoWalmartGroupAllListGet(options)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改账户分组
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiCardInfoWalmartGroupDeleteDelete(
|
||||
id: number,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiCardInfoWalmartGroupDeleteDelete(id, options)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取沃尔玛账户分组
|
||||
* @param {number} current 页数
|
||||
* @param {ApiCardInfoWalmartGroupListGetPageSizeEnum} pageSize 页码
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public apiCardInfoWalmartGroupListGet(
|
||||
current: number,
|
||||
pageSize: ApiCardInfoWalmartGroupListGetPageSizeEnum,
|
||||
options?: RawAxiosRequestConfig
|
||||
) {
|
||||
return DefaultApiFp(this.configuration)
|
||||
.apiCardInfoWalmartGroupListGet(current, pageSize, options)
|
||||
.then(request => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 修改沃尔玛账户分组
|
||||
* @param {KamiApiCardInfoWalmartV1GroupUpdateReq} [kamiApiCardInfoWalmartV1GroupUpdateReq]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@@ -22028,6 +22159,7 @@ export class DefaultApi extends BaseAPI {
|
||||
* @param {string} [merchantId] 商户ID
|
||||
* @param {string} [attach] 附加信息
|
||||
* @param {string} [accountNickName] 账户昵称
|
||||
* @param {number} [groupId] 组ID
|
||||
* @param {string} [accountCk] 账户cookie
|
||||
* @param {Array<string>} [dateRange] 时间范围
|
||||
* @param {*} [options] Override http request option.
|
||||
@@ -22041,6 +22173,7 @@ export class DefaultApi extends BaseAPI {
|
||||
merchantId?: string,
|
||||
attach?: string,
|
||||
accountNickName?: string,
|
||||
groupId?: number,
|
||||
accountCk?: string,
|
||||
dateRange?: Array<string>,
|
||||
options?: RawAxiosRequestConfig
|
||||
@@ -22053,6 +22186,7 @@ export class DefaultApi extends BaseAPI {
|
||||
merchantId,
|
||||
attach,
|
||||
accountNickName,
|
||||
groupId,
|
||||
accountCk,
|
||||
dateRange,
|
||||
options
|
||||
@@ -23879,6 +24013,19 @@ export type ApiCardInfoWalmartAccountSummaryDownloadGetPageSizeEnum =
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const ApiCardInfoWalmartGroupListGetPageSizeEnum = {
|
||||
NUMBER_5: 5,
|
||||
NUMBER_10: 10,
|
||||
NUMBER_15: 15,
|
||||
NUMBER_20: 20,
|
||||
NUMBER_50: 50,
|
||||
NUMBER_100: 100
|
||||
} as const;
|
||||
export type ApiCardInfoWalmartGroupListGetPageSizeEnum =
|
||||
(typeof ApiCardInfoWalmartGroupListGetPageSizeEnum)[keyof typeof ApiCardInfoWalmartGroupListGetPageSizeEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const ApiCardInfoWalmartOrderListGetPageSizeEnum = {
|
||||
NUMBER_5: 5,
|
||||
NUMBER_10: 10,
|
||||
|
||||
@@ -170,6 +170,7 @@ export * from './kami-api-card-info-walmart-v1-account-wallet-list-req';
|
||||
export * from './kami-api-card-info-walmart-v1-account-wallet-list-res';
|
||||
export * from './kami-api-card-info-walmart-v1-card-redeem-account-summary';
|
||||
export * from './kami-api-card-info-walmart-v1-group-add-req';
|
||||
export * from './kami-api-card-info-walmart-v1-group-all-list-res';
|
||||
export * from './kami-api-card-info-walmart-v1-group-delete-req';
|
||||
export * from './kami-api-card-info-walmart-v1-group-list-req';
|
||||
export * from './kami-api-card-info-walmart-v1-group-list-res';
|
||||
|
||||
@@ -30,6 +30,12 @@ export interface KamiApiCardInfoWalmartV1AccountCreateReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountCreateReq
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 分组ID
|
||||
* @type {number}
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountCreateReq
|
||||
*/
|
||||
groupId?: number;
|
||||
/**
|
||||
* 最大充值限制
|
||||
* @type {number}
|
||||
|
||||
@@ -54,6 +54,12 @@ export interface KamiApiCardInfoWalmartV1AccountListReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountListReq
|
||||
*/
|
||||
CreatedUserName?: string;
|
||||
/**
|
||||
* 分组ID
|
||||
* @type {number}
|
||||
* @memberof KamiApiCardInfoWalmartV1AccountListReq
|
||||
*/
|
||||
groupId?: number;
|
||||
}
|
||||
|
||||
export const KamiApiCardInfoWalmartV1AccountListReqPageSizeEnum = {
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { KamiInternalModelEntityV1CardRedeemAccountGroup } from './kami-internal-model-entity-v1-card-redeem-account-group';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface KamiApiCardInfoWalmartV1GroupAllListRes
|
||||
*/
|
||||
export interface KamiApiCardInfoWalmartV1GroupAllListRes {
|
||||
/**
|
||||
*
|
||||
* @type {Array<KamiInternalModelEntityV1CardRedeemAccountGroup>}
|
||||
* @memberof KamiApiCardInfoWalmartV1GroupAllListRes
|
||||
*/
|
||||
list?: Array<KamiInternalModelEntityV1CardRedeemAccountGroup>;
|
||||
}
|
||||
@@ -54,6 +54,12 @@ export interface KamiApiCardInfoWalmartV1ListReq {
|
||||
* @memberof KamiApiCardInfoWalmartV1ListReq
|
||||
*/
|
||||
accountNickName?: string;
|
||||
/**
|
||||
* 组ID
|
||||
* @type {number}
|
||||
* @memberof KamiApiCardInfoWalmartV1ListReq
|
||||
*/
|
||||
groupId?: number;
|
||||
/**
|
||||
* 账户cookie
|
||||
* @type {string}
|
||||
|
||||
@@ -54,6 +54,22 @@
|
||||
:unchecked-value="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="groupId" label="分组">
|
||||
<a-select
|
||||
v-model="formData.groupId"
|
||||
placeholder="请选择分组"
|
||||
:showSearch="true"
|
||||
:filter-option="false"
|
||||
:allowClear="true"
|
||||
>
|
||||
<a-option
|
||||
v-for="(item, index) in groupList"
|
||||
:key="index"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="remark" label="备注">
|
||||
<a-textarea v-model="formData.remark" />
|
||||
</a-form-item>
|
||||
@@ -91,6 +107,7 @@ import useLoading from '@/hooks/loading';
|
||||
import { FormInstance } from '@arco-design/web-vue';
|
||||
import { ref, PropType, watch, reactive } from 'vue';
|
||||
import { isNull } from '@/utils/is.ts';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
import {
|
||||
addWalmartCard,
|
||||
detectCookie,
|
||||
@@ -101,6 +118,7 @@ import {
|
||||
KamiApiCardInfoWalmartV1AccountCreateReq,
|
||||
KamiApiCardInfoWalmartV1AccountListRecord
|
||||
} from '@/api/generated/index.ts';
|
||||
import type { KamiInternalModelEntityV1CardRedeemAccountGroup } from '@/api/generated/index.ts';
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@@ -140,6 +158,7 @@ const renderData = reactive<{ cookieStatus: boolean; loading: boolean }>({
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:visible']);
|
||||
const groupList = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
|
||||
|
||||
const handleOk = () => {
|
||||
if (formData.value) {
|
||||
@@ -205,6 +224,13 @@ const checkCookie = async () => {
|
||||
renderData.loading = false;
|
||||
}
|
||||
};
|
||||
|
||||
const getAllGroupList = () => {
|
||||
apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
groupList.value = res.data.list;
|
||||
});
|
||||
};
|
||||
getAllGroupList();
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider style="margin-top: 0" />
|
||||
<a-row style="margin-bottom: 16px">
|
||||
<a-row style="justify-content: space-around; margin-bottom: 16px">
|
||||
<a-space>
|
||||
<a-button
|
||||
v-if="checkTokenFromLogin()"
|
||||
@@ -79,6 +79,16 @@
|
||||
</a-button>
|
||||
<batchImportModel @close="() => search()" />
|
||||
</a-space>
|
||||
<a-radio-group type="button" :onChange="onChangeRadio">
|
||||
<a-radio value="">全部</a-radio>
|
||||
<a-radio
|
||||
v-for="(item, index) in groupList"
|
||||
:key="index"
|
||||
:value="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-row>
|
||||
<a-table
|
||||
:loading="loading"
|
||||
@@ -212,7 +222,11 @@ import {
|
||||
walmartCardUpdateRecord
|
||||
} from '@/api/card-walmart-account';
|
||||
import { batchImportModel } from './components/component.tsx';
|
||||
import { KamiApiCardInfoWalmartV1AccountListRecord } from '@/api/generated/index.ts';
|
||||
import {
|
||||
ApiCardInfoWalmartAccountGetListGetPageSizeEnum,
|
||||
KamiApiCardInfoWalmartV1AccountListRecord,
|
||||
KamiInternalModelEntityV1CardRedeemAccountGroup
|
||||
} from '@/api/generated/index.ts';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
|
||||
const basePagination: Pagination = {
|
||||
@@ -302,7 +316,8 @@ const generateFormModel = () => {
|
||||
nickname: '',
|
||||
maxAmountLimit: 0,
|
||||
status: 1,
|
||||
createdUserName: ''
|
||||
createdUserName: '',
|
||||
groupId: null
|
||||
};
|
||||
};
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
@@ -316,20 +331,27 @@ const state = reactive({
|
||||
account: null
|
||||
});
|
||||
|
||||
const groupList = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
|
||||
|
||||
const fetchData = async (
|
||||
params: WalmartCardParams = { current: 1, pageSize: 50 }
|
||||
) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const {
|
||||
data: { list, total }
|
||||
} = await queryWalmartCardList(params);
|
||||
renderData.value = list;
|
||||
const res = await apiClient.apiCardInfoWalmartAccountGetListGet(
|
||||
params.current,
|
||||
params.pageSize as ApiCardInfoWalmartAccountGetListGetPageSizeEnum,
|
||||
params.name,
|
||||
params.nickname,
|
||||
params.cookie,
|
||||
params.createdUserName,
|
||||
params.groupId
|
||||
);
|
||||
renderData.value = res.data.list;
|
||||
pagination.current = params.current;
|
||||
pagination.pageSize = params.pageSize;
|
||||
pagination.total = total;
|
||||
pagination.total = res.data.total;
|
||||
} catch (err) {
|
||||
// you can report use errorHandler or other
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -350,6 +372,12 @@ const reset = () => {
|
||||
formModel.value = generateFormModel();
|
||||
};
|
||||
|
||||
const getAllGroupList = () => {
|
||||
apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
groupList.value = res.data.list;
|
||||
});
|
||||
};
|
||||
|
||||
const deleteOne = async (id: string) => {
|
||||
try {
|
||||
await deleteWalmartCard({ id });
|
||||
@@ -443,7 +471,13 @@ const refreshButton = (record: walmartCardUpdateRecord) => {
|
||||
};
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
getAllGroupList();
|
||||
});
|
||||
|
||||
const onChangeRadio = (value: string | number | boolean) => {
|
||||
formModel.value.groupId = value as number;
|
||||
fetchData();
|
||||
};
|
||||
const download = () => {
|
||||
downloadDataList();
|
||||
};
|
||||
|
||||
247
src/views/card-walmart-info/group/index.vue
Normal file
247
src/views/card-walmart-info/group/index.vue
Normal file
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<div class="group-container">
|
||||
<div class="search-container">
|
||||
<a-form :model="searchForm" layout="inline">
|
||||
<a-form-item field="name" label="分组名称">
|
||||
<a-input
|
||||
v-model="searchForm.name"
|
||||
placeholder="请输入分组名称"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleSearch">查询</a-button>
|
||||
<a-button @click="resetSearch">重置</a-button>
|
||||
<a-button type="primary" status="success" @click="handleAdd">
|
||||
新增分组
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
@page-change="onPageChange"
|
||||
@page-size-change="onPageSizeChange"
|
||||
>
|
||||
<template #columns>
|
||||
<a-table-column title="ID" data-index="id" :width="80" />
|
||||
<a-table-column title="分组名称" data-index="name" />
|
||||
<a-table-column title="描述" data-index="description" />
|
||||
<a-table-column title="创建时间" data-index="createTime" :width="180" />
|
||||
<a-table-column title="更新时间" data-index="updateTime" :width="180" />
|
||||
<a-table-column title="操作" :width="200" fixed="right">
|
||||
<template #cell="{ record }">
|
||||
<a-space>
|
||||
<a-button type="text" @click="handleEdit(record)">编辑</a-button>
|
||||
<a-button
|
||||
type="text"
|
||||
status="danger"
|
||||
@click="handleDelete(record)"
|
||||
>
|
||||
删除
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table-column>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- 新增/编辑对话框 -->
|
||||
<a-modal
|
||||
v-model:visible="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
@cancel="dialogVisible = false"
|
||||
@before-ok="handleSubmit"
|
||||
>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-align="right"
|
||||
:label-col-props="{ span: 6 }"
|
||||
:wrapper-col-props="{ span: 18 }"
|
||||
>
|
||||
<a-form-item field="name" label="分组名称">
|
||||
<a-input v-model="form.name" placeholder="请输入分组名称" />
|
||||
</a-form-item>
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-textarea
|
||||
v-model="form.description"
|
||||
placeholder="请输入描述"
|
||||
:auto-size="{ minRows: 3, maxRows: 5 }"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
import { KamiApiCardInfoWalmartV1GroupListReqPageSizeEnum } from '@/api/generated/models/kami-api-card-info-walmart-v1-group-list-req';
|
||||
import { KamiInternalModelEntityV1CardRedeemAccountGroup } from '@/api/generated/index.ts';
|
||||
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
name: ''
|
||||
});
|
||||
|
||||
// 表格数据
|
||||
const tableData = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
|
||||
const loading = ref(false);
|
||||
|
||||
// 分页
|
||||
const pagination = reactive({
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
showTotal: true,
|
||||
showPageSize: true,
|
||||
pageSizeOptions: [10, 20, 50, 100]
|
||||
});
|
||||
|
||||
// 对话框
|
||||
const dialogVisible = ref(false);
|
||||
const dialogTitle = ref('');
|
||||
const formRef = ref();
|
||||
|
||||
// 表单
|
||||
const form = reactive({
|
||||
id: null,
|
||||
name: '',
|
||||
description: ''
|
||||
});
|
||||
|
||||
// 表单校验规则
|
||||
const rules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入分组名称' },
|
||||
{ minLength: 2, maxLength: 50, message: '长度在 2 到 50 个字符' }
|
||||
]
|
||||
};
|
||||
|
||||
// 查询数据
|
||||
const handleSearch = () => {
|
||||
pagination.current = 1;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const resetSearch = () => {
|
||||
searchForm.name = '';
|
||||
pagination.current = 1;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
// 获取数据
|
||||
const fetchData = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
// TODO: 调用后端API
|
||||
const res = await apiClient.apiCardInfoWalmartGroupListGet(
|
||||
pagination.current,
|
||||
pagination.pageSize as KamiApiCardInfoWalmartV1GroupListReqPageSizeEnum
|
||||
);
|
||||
tableData.value = res.data.list;
|
||||
pagination.total = res.data.total;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
Message.error('获取数据失败');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
dialogTitle.value = '新增分组';
|
||||
form.id = '';
|
||||
form.name = '';
|
||||
form.description = '';
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = row => {
|
||||
dialogTitle.value = '编辑分组';
|
||||
form.id = row.id;
|
||||
form.name = row.name;
|
||||
form.description = row.description;
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row: KamiInternalModelEntityV1CardRedeemAccountGroup) => {
|
||||
Modal.warning({
|
||||
title: '提示',
|
||||
content: '确认删除该分组吗?',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: async () => {
|
||||
try {
|
||||
await apiClient.apiCardInfoWalmartGroupDeleteDelete(row.id);
|
||||
Message.success('删除成功');
|
||||
fetchData();
|
||||
} catch (error) {
|
||||
Message.error('删除失败');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 提交表单
|
||||
const handleSubmit = async () => {
|
||||
const { validate } = formRef.value;
|
||||
try {
|
||||
await validate();
|
||||
if (form.id) {
|
||||
apiClient.apiCardInfoWalmartGroupUpdatePut({
|
||||
id: form.id,
|
||||
name: form.name
|
||||
});
|
||||
} else {
|
||||
await apiClient.apiCardInfoWalmartGroupAddPost({
|
||||
name: form.name
|
||||
});
|
||||
}
|
||||
Message.success(form.id ? '更新成功' : '创建成功');
|
||||
dialogVisible.value = false;
|
||||
fetchData();
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 分页处理
|
||||
const onPageChange = current => {
|
||||
pagination.current = current;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
const onPageSizeChange = pageSize => {
|
||||
pagination.pageSize = pageSize;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
// 初始化
|
||||
fetchData();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.group-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -81,7 +81,19 @@
|
||||
</a-row>
|
||||
<a-divider style="margin-top: 0" />
|
||||
<a-space direction="vertical" fill>
|
||||
<config v-if="state.showConfig" />
|
||||
<a-row style="justify-content: space-around">
|
||||
<config v-if="state.showConfig" />
|
||||
<a-radio-group type="button" :onChange="onChangeRadio">
|
||||
<a-radio value="">全部</a-radio>
|
||||
<a-radio
|
||||
v-for="(item, index) in groupList"
|
||||
:key="index"
|
||||
:value="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-row>
|
||||
<a-table
|
||||
:loading="loading"
|
||||
:pagination="{
|
||||
@@ -177,7 +189,11 @@ import {
|
||||
queryWalmartCardOrderList,
|
||||
walmartCardOrderParams
|
||||
} from '@/api/card-walmart-order.ts';
|
||||
import { KamiInternalModelEntityV1CardRedeemOrderInfo } from '@/api/generated/index.ts';
|
||||
import {
|
||||
ApiCardInfoWalmartOrderListGetPageSizeEnum,
|
||||
KamiInternalModelEntityV1CardRedeemAccountGroup,
|
||||
KamiInternalModelEntityV1CardRedeemOrderInfo
|
||||
} from '@/api/generated/index.ts';
|
||||
import { apiClient } from '@/api/index.ts';
|
||||
|
||||
const basePagination: Pagination = {
|
||||
@@ -192,6 +208,8 @@ const state = reactive({
|
||||
const pagination = reactive({
|
||||
...basePagination
|
||||
});
|
||||
|
||||
const groupList = ref<KamiInternalModelEntityV1CardRedeemAccountGroup[]>([]);
|
||||
const columns: TableColumnData[] = [
|
||||
{
|
||||
title: '序号',
|
||||
@@ -271,7 +289,8 @@ const generateFormModel = () => {
|
||||
accountNickName: '',
|
||||
accountCk: '',
|
||||
status: null,
|
||||
dateRange: []
|
||||
dateRange: [],
|
||||
groupId: null
|
||||
};
|
||||
};
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
@@ -283,7 +302,8 @@ const formModel = ref<{
|
||||
attach: string;
|
||||
giftCardPwd: string;
|
||||
status: number;
|
||||
dateRange: Date[];
|
||||
dateRange: string[];
|
||||
groupId: number | null;
|
||||
}>(generateFormModel());
|
||||
|
||||
const fetchData = async (
|
||||
@@ -294,13 +314,21 @@ const fetchData = async (
|
||||
) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const {
|
||||
data: { list, total }
|
||||
} = await queryWalmartCardOrderList(params);
|
||||
renderData.value = list;
|
||||
const res = await apiClient.apiCardInfoWalmartOrderListGet(
|
||||
params.current,
|
||||
params.pageSize as ApiCardInfoWalmartOrderListGetPageSizeEnum,
|
||||
params.giftCardPwd,
|
||||
params.merchantId,
|
||||
params.attach,
|
||||
params.accountNickName,
|
||||
params.groupId,
|
||||
params.cookie,
|
||||
params.dateRange
|
||||
);
|
||||
renderData.value = res.data.list;
|
||||
pagination.current = params.current;
|
||||
pagination.pageSize = params.pageSize;
|
||||
pagination.total = total;
|
||||
pagination.total = res.data.total;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
@@ -316,9 +344,9 @@ const onPageSizeChange = (pageSize: number) => {
|
||||
};
|
||||
const search = () => {
|
||||
fetchData({
|
||||
current: 1,
|
||||
...basePagination,
|
||||
...formModel.value,
|
||||
current: 1
|
||||
...formModel.value
|
||||
});
|
||||
};
|
||||
const showOrderHistory = (orderNo: string) => {
|
||||
@@ -391,4 +419,19 @@ const callback = async (orderNo: string) => {
|
||||
});
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const getAllGroupList = () => {
|
||||
apiClient.apiCardInfoWalmartGroupAllListGet().then(res => {
|
||||
groupList.value = res.data.list;
|
||||
});
|
||||
};
|
||||
|
||||
const onChangeRadio = (value: string | number | boolean) => {
|
||||
formModel.value.groupId = value as number;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getAllGroupList();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user