| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- import request from "@/utils/request";
- // 查询学习卡列表
- export function listCards(query) {
- return request({
- url: "/dz/cards/list",
- method: "get",
- params: query,
- });
- }
- // 查询学习卡详细
- export function getCards(cardId) {
- return request({
- url: "/dz/cards/" + cardId,
- method: "get",
- });
- }
- // 新增学习卡
- export function addCards(data) {
- return request({
- url: "/dz/cards",
- method: "post",
- data: data,
- });
- }
- // 修改学习卡
- export function updateCards(data) {
- return request({
- url: "/dz/cards",
- method: "put",
- data: data,
- });
- }
- // 删除学习卡
- export function delCards(cardIds) {
- // 如果是数组,转换为逗号分隔的字符串
- const ids = Array.isArray(cardIds) ? cardIds.join(",") : cardIds;
- return request({
- url: "/dz/cards/" + ids,
- method: "delete",
- });
- }
- // 制卡
- export function issueCard(institutionId, type, count) {
- return request({
- url: "/dz/cards/issueCard",
- method: "post",
- params: {
- institutionId,
- type,
- count,
- },
- });
- }
- // 分配卡
- export function assignCard(params) {
- // 支持两种方式:
- // 1. 通过cardIds(选中的卡片ID列表)
- // 2. 通过begin和end(卡号段)
- return request({
- url: "/dz/cards/assignCard",
- method: "post",
- params: params,
- });
- }
- // 获取考生类型列表
- export function getExamTypes(location) {
- return request({
- url: "/front/user/examTypes",
- method: "get",
- params: {
- location,
- },
- });
- }
- // 获取代理商列表
- export function getAgentList(query) {
- return request({
- url: "/dz/agent/list",
- method: "get",
- params: query,
- });
- }
- // 缴费
- export function payCard(cardIds) {
- return request({
- url: "/dz/cards/change/pay",
- method: "post",
- params: {
- action: "Pay",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- },
- });
- }
- // 关卡
- export function closeCard(cardIds) {
- return request({
- url: "/dz/cards/change/close",
- method: "post",
- params: {
- action: "Close",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- },
- });
- }
- // 重开
- export function reopenCard(cardIds) {
- return request({
- url: "/dz/cards/change/reopen",
- method: "post",
- params: {
- action: "ReOpen",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- },
- });
- }
- // 退费
- export function refundCard(cardIds) {
- return request({
- url: "/dz/cards/change/refund",
- method: "post",
- params: {
- action: "Refund",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- },
- });
- }
- // 结算
- export function settleCard(cardIds) {
- return request({
- url: "/dz/cards/change/settlement",
- method: "post",
- params: {
- action: "Settlement",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- },
- });
- }
- // 续费
- export function renewCard(cardIds, days) {
- const params = {
- action: "Renew",
- cardIds: Array.isArray(cardIds) ? cardIds.join(",") : cardIds,
- };
- if (days != null) {
- params.days = days;
- }
- return request({
- url: "/dz/cards/change/renew",
- method: "post",
- params: params,
- });
- }
- // 获取学校列表
- export function getSchoolList(query) {
- return request({
- url: "/dz/school/getSchoolList",
- method: "get",
- params: query,
- });
- }
- // 获取校区列表
- export function getCampusSchoolList(query) {
- return request({
- url: "/dz/school/getCampusSchoolList",
- method: "get",
- params: query,
- });
- }
- // 关联校区
- export function associateCampus(params) {
- // 支持两种方式:
- // 1. 通过cardIds(选中的卡片ID列表)
- // 2. 通过begin和end(卡号段)
- return request({
- url: "/dz/cards/changeCampus",
- method: "post",
- params: params,
- });
- }
- // 申请开卡
- export function requestOpenCard(
- agentId,
- province,
- schoolId,
- beginCardNo,
- endCardNo
- ) {
- return request({
- url: "/dz/cards/openCard",
- method: "post",
- params: {
- agentId: agentId,
- locationId: province,
- schoolId,
- begin: beginCardNo,
- end: endCardNo,
- },
- });
- }
- // 统计学习卡数据
- export function getCardStatistics(query) {
- return request({
- url: "/dz/cards/statistics",
- method: "get",
- params: query,
- });
- }
- // 统计详情 - 查询学习卡列表
- export function getStatisticsDetail(query) {
- return request({
- url: "/dz/cards/statisticsDetail",
- method: "get",
- params: query,
- });
- }
- // 根据卡号获取用户信息
- export function getUserByCardId(cardId) {
- return request({
- url: "/dz/cards/cardUser/" + cardId,
- method: "get",
- params: {},
- });
- }
- // 更新卡用户信息
- export function updateCardUser(data) {
- return request({
- url: "/dz/cards/updateCardUser",
- method: "post",
- data: data,
- });
- }
|