新增:批量导入商品功能

This commit is contained in:
2025-12-30 17:18:20 +08:00
parent a6cd0c3d52
commit f4e6705f3f
791 changed files with 24581 additions and 13909 deletions

View File

@@ -1,7 +1,8 @@
VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://shop-server-api.ggsxiangan.com
VITE_THINK_URL=https://server.websoft.top/api
#VITE_API_URL=https://shop-api.ggsxiangan.com/api
VITE_API_URL=http://127.0.0.1:9013/api
#VITE_API_URL=https://clinic-api.websoft.top/api
VITE_API_URL=/api
VITE_PROXY_TARGET=http://127.0.0.1:9013
VITE_SERVER_URL=https://server.websoft.top/api

6371
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

7
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,7 @@
ignoredBuiltDependencies:
- core-js
- es5-ext
- esbuild
- less
- vue-demi
- vue-echarts

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { BookingCashier, BookingCashierParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import type { CashierParam, CashierVo } from "@/api/shop/cashier/model";
import type { CashierParam, CashierVo } from '@/api/shop/cashier/model';
/**
* 分页查询收银

View File

@@ -79,7 +79,9 @@ export async function removeBookingCooperate(id?: number) {
/**
* 批量删除商务合作
*/
export async function removeBatchBookingCooperate(data: (number | undefined)[]) {
export async function removeBatchBookingCooperate(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商务合作留言记录
*/
export async function pageBookingCooperateLog(params: BookingCooperateLogParam) {
export async function pageBookingCooperateLog(
params: BookingCooperateLogParam
) {
const res = await request.get<ApiResult<PageResult<BookingCooperateLog>>>(
MODULES_API_URL + '/booking/booking-cooperate-log/page',
{
@@ -22,7 +24,9 @@ export async function pageBookingCooperateLog(params: BookingCooperateLogParam)
/**
* 查询商务合作留言记录列表
*/
export async function listBookingCooperateLog(params?: BookingCooperateLogParam) {
export async function listBookingCooperateLog(
params?: BookingCooperateLogParam
) {
const res = await request.get<ApiResult<BookingCooperateLog[]>>(
MODULES_API_URL + '/booking/booking-cooperate-log',
{
@@ -79,7 +83,9 @@ export async function removeBookingCooperateLog(id?: number) {
/**
* 批量删除商务合作留言记录
*/
export async function removeBatchBookingCooperateLog(data: (number | undefined)[]) {
export async function removeBatchBookingCooperateLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-cooperate-log/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingEmergency(id?: number) {
/**
* 批量删除紧急联系人管理
*/
export async function removeBatchBookingEmergency(data: (number | undefined)[]) {
export async function removeBatchBookingEmergency(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-emergency/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingIntegralLog(id?: number) {
/**
* 批量删除
*/
export async function removeBatchBookingIntegralLog(data: (number | undefined)[]) {
export async function removeBatchBookingIntegralLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-integral-log/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingOrderInfo(id?: number) {
/**
* 批量删除
*/
export async function removeBatchBookingOrderInfo(data: (number | undefined)[]) {
export async function removeBatchBookingOrderInfo(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-order-info/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingUserCoupon(id?: number) {
/**
* 批量删除我的优惠券
*/
export async function removeBatchBookingUserCoupon(data: (number | undefined)[]) {
export async function removeBatchBookingUserCoupon(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-coupon/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询紧急联系人表
*/
export async function pageBookingUserEmergency(params: BookingUserEmergencyParam) {
export async function pageBookingUserEmergency(
params: BookingUserEmergencyParam
) {
const res = await request.get<ApiResult<PageResult<BookingUserEmergency>>>(
MODULES_API_URL + '/booking/booking-user-emergency/page',
{
@@ -22,7 +24,9 @@ export async function pageBookingUserEmergency(params: BookingUserEmergencyParam
/**
* 查询紧急联系人表列表
*/
export async function listBookingUserEmergency(params?: BookingUserEmergencyParam) {
export async function listBookingUserEmergency(
params?: BookingUserEmergencyParam
) {
const res = await request.get<ApiResult<BookingUserEmergency[]>>(
MODULES_API_URL + '/booking/booking-user-emergency',
{
@@ -79,7 +83,9 @@ export async function removeBookingUserEmergency(id?: number) {
/**
* 批量删除紧急联系人表
*/
export async function removeBatchBookingUserEmergency(data: (number | undefined)[]) {
export async function removeBatchBookingUserEmergency(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-emergency/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeBookingUserInvoice(id?: number) {
/**
* 批量删除发票
*/
export async function removeBatchBookingUserInvoice(data: (number | undefined)[]) {
export async function removeBatchBookingUserInvoice(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/booking/booking-user-invoice/batch',
{

View File

@@ -1,5 +1,5 @@
import type { PageParam } from '@/api';
import { OrderInfo } from "@/api/shop/orderInfo/model";
import { OrderInfo } from '@/api/shop/orderInfo/model';
/**
* 场馆场地

View File

@@ -78,7 +78,9 @@ export async function removeClinicAppointment(id?: number) {
/**
* 批量删除挂号
*/
export async function removeBatchClinicAppointment(data: (number | undefined)[]) {
export async function removeBatchClinicAppointment(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-appointment/batch',
{

View File

@@ -78,7 +78,9 @@ export async function removeClinicDoctorApply(id?: number) {
/**
* 批量删除医生入驻申请
*/
export async function removeBatchClinicDoctorApply(data: (number | undefined)[]) {
export async function removeBatchClinicDoctorApply(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-apply/batch',
{

View File

@@ -1,17 +1,21 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicDoctorMedicalRecord, ClinicDoctorMedicalRecordParam } from './model';
import type {
ClinicDoctorMedicalRecord,
ClinicDoctorMedicalRecordParam
} from './model';
/**
* 分页查询医疗记录
*/
export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalRecordParam) {
const res = await request.get<ApiResult<PageResult<ClinicDoctorMedicalRecord>>>(
'/clinic/clinic-doctor-medical-record/page',
{
export async function pageClinicDoctorMedicalRecord(
params: ClinicDoctorMedicalRecordParam
) {
const res = await request.get<
ApiResult<PageResult<ClinicDoctorMedicalRecord>>
>('/clinic/clinic-doctor-medical-record/page', {
params
}
);
});
if (res.data.code === 0) {
return res.data.data;
}
@@ -21,7 +25,9 @@ export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalR
/**
* 查询医疗记录列表
*/
export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedicalRecordParam) {
export async function listClinicDoctorMedicalRecord(
params?: ClinicDoctorMedicalRecordParam
) {
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord[]>>(
'/clinic/clinic-doctor-medical-record',
{
@@ -37,7 +43,9 @@ export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedical
/**
* 添加医疗记录
*/
export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
export async function addClinicDoctorMedicalRecord(
data: ClinicDoctorMedicalRecord
) {
const res = await request.post<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record',
data
@@ -51,7 +59,9 @@ export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalReco
/**
* 修改医疗记录
*/
export async function updateClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
export async function updateClinicDoctorMedicalRecord(
data: ClinicDoctorMedicalRecord
) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record',
data
@@ -78,7 +88,9 @@ export async function removeClinicDoctorMedicalRecord(id?: number) {
/**
* 批量删除医疗记录
*/
export async function removeBatchClinicDoctorMedicalRecord(data: (number | undefined)[]) {
export async function removeBatchClinicDoctorMedicalRecord(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-medical-record/batch',
{

View File

@@ -78,7 +78,9 @@ export async function removeClinicDoctorUser(id?: number) {
/**
* 批量删除分销商用户记录表
*/
export async function removeBatchClinicDoctorUser(data: (number | undefined)[]) {
export async function removeBatchClinicDoctorUser(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-doctor-user/batch',
{

View File

@@ -5,7 +5,9 @@ import type { ClinicMedicalHistory, ClinicMedicalHistoryParam } from './model';
/**
* 分页查询病例
*/
export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam) {
export async function pageClinicMedicalHistory(
params: ClinicMedicalHistoryParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicalHistory>>>(
'/clinic/clinic-medical-history/page',
{
@@ -21,7 +23,9 @@ export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam
/**
* 查询病例列表
*/
export async function listClinicMedicalHistory(params?: ClinicMedicalHistoryParam) {
export async function listClinicMedicalHistory(
params?: ClinicMedicalHistoryParam
) {
const res = await request.get<ApiResult<ClinicMedicalHistory[]>>(
'/clinic/clinic-medical-history',
{
@@ -78,7 +82,9 @@ export async function removeClinicMedicalHistory(id?: number) {
/**
* 批量删除病例
*/
export async function removeBatchClinicMedicalHistory(data: (number | undefined)[]) {
export async function removeBatchClinicMedicalHistory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medical-history/batch',
{

View File

@@ -5,7 +5,9 @@ import type { ClinicMedicineInout, ClinicMedicineInoutParam } from './model';
/**
* 分页查询出入库
*/
export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam) {
export async function pageClinicMedicineInout(
params: ClinicMedicineInoutParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicineInout>>>(
'/clinic/clinic-medicine-inout/page',
{
@@ -21,7 +23,9 @@ export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam)
/**
* 查询出入库列表
*/
export async function listClinicMedicineInout(params?: ClinicMedicineInoutParam) {
export async function listClinicMedicineInout(
params?: ClinicMedicineInoutParam
) {
const res = await request.get<ApiResult<ClinicMedicineInout[]>>(
'/clinic/clinic-medicine-inout',
{
@@ -78,7 +82,9 @@ export async function removeClinicMedicineInout(id?: number) {
/**
* 批量删除出入库
*/
export async function removeBatchClinicMedicineInout(data: (number | undefined)[]) {
export async function removeBatchClinicMedicineInout(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-inout/batch',
{

View File

@@ -5,7 +5,9 @@ import type { ClinicMedicineStock, ClinicMedicineStockParam } from './model';
/**
* 分页查询药品库存
*/
export async function pageClinicMedicineStock(params: ClinicMedicineStockParam) {
export async function pageClinicMedicineStock(
params: ClinicMedicineStockParam
) {
const res = await request.get<ApiResult<PageResult<ClinicMedicineStock>>>(
'/clinic/clinic-medicine-stock/page',
{
@@ -21,7 +23,9 @@ export async function pageClinicMedicineStock(params: ClinicMedicineStockParam)
/**
* 查询药品库存列表
*/
export async function listClinicMedicineStock(params?: ClinicMedicineStockParam) {
export async function listClinicMedicineStock(
params?: ClinicMedicineStockParam
) {
const res = await request.get<ApiResult<ClinicMedicineStock[]>>(
'/clinic/clinic-medicine-stock',
{
@@ -78,7 +82,9 @@ export async function removeClinicMedicineStock(id?: number) {
/**
* 批量删除药品库存
*/
export async function removeBatchClinicMedicineStock(data: (number | undefined)[]) {
export async function removeBatchClinicMedicineStock(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-medicine-stock/batch',
{

View File

@@ -78,7 +78,9 @@ export async function removeClinicPatientUser(id?: number) {
/**
* 批量删除患者
*/
export async function removeBatchClinicPatientUser(data: (number | undefined)[]) {
export async function removeBatchClinicPatientUser(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-patient-user/batch',
{

View File

@@ -84,7 +84,9 @@ export async function removeClinicPrescription(id?: number) {
* 批量删除处方主表
*/
export async function removeBatchClinicPrescription(data: (number | undefined)[]) {
export async function removeBatchClinicPrescription(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription/batch',
{

View File

@@ -1,12 +1,17 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ClinicPrescriptionItem, ClinicPrescriptionItemParam } from './model';
import type {
ClinicPrescriptionItem,
ClinicPrescriptionItemParam
} from './model';
/**
* 分页查询处方明细表
*/
export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemParam) {
export async function pageClinicPrescriptionItem(
params: ClinicPrescriptionItemParam
) {
const res = await request.get<ApiResult<PageResult<ClinicPrescriptionItem>>>(
'/clinic/clinic-prescription-item/page',
{
@@ -23,7 +28,9 @@ export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemP
* 查询处方明细表
列表
*/
export async function listClinicPrescriptionItem(params?: ClinicPrescriptionItemParam) {
export async function listClinicPrescriptionItem(
params?: ClinicPrescriptionItemParam
) {
const res = await request.get<ApiResult<ClinicPrescriptionItem[]>>(
'/clinic/clinic-prescription-item',
{
@@ -55,7 +62,9 @@ export async function addClinicPrescriptionItem(data: ClinicPrescriptionItem) {
* 修改处方明细表
*/
export async function updateClinicPrescriptionItem(data: ClinicPrescriptionItem) {
export async function updateClinicPrescriptionItem(
data: ClinicPrescriptionItem
) {
const res = await request.put<ApiResult<unknown>>(
'/clinic/clinic-prescription-item',
data
@@ -84,7 +93,9 @@ export async function removeClinicPrescriptionItem(id?: number) {
* 批量删除处方明细表
*/
export async function removeBatchClinicPrescriptionItem(data: (number | undefined)[]) {
export async function removeBatchClinicPrescriptionItem(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-prescription-item/batch',
{

View File

@@ -78,7 +78,9 @@ export async function removeClinicVisitRecord(id?: number) {
/**
* 批量删除病例
*/
export async function removeBatchClinicVisitRecord(data: (number | undefined)[]) {
export async function removeBatchClinicVisitRecord(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
'/clinic/clinic-visit-record/batch',
{

View File

@@ -85,7 +85,9 @@ export async function removePrescriptionOrder(id?: number) {
* 批量删除处方主表
*/
export async function removeBatchPrescriptionOrder(data: (number | undefined)[]) {
export async function removeBatchPrescriptionOrder(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order/batch',
{

View File

@@ -1,13 +1,18 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { PrescriptionOrderItem, PrescriptionOrderItemParam } from './model';
import type {
PrescriptionOrderItem,
PrescriptionOrderItemParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询处方明细表
*/
export async function pagePrescriptionOrderItem(params: PrescriptionOrderItemParam) {
export async function pagePrescriptionOrderItem(
params: PrescriptionOrderItemParam
) {
const res = await request.get<ApiResult<PageResult<PrescriptionOrderItem>>>(
MODULES_API_URL + '/clinic/prescription-order-item/page',
{
@@ -24,7 +29,9 @@ export async function pagePrescriptionOrderItem(params: PrescriptionOrderItemPar
* 查询处方明细表
列表
*/
export async function listPrescriptionOrderItem(params?: PrescriptionOrderItemParam) {
export async function listPrescriptionOrderItem(
params?: PrescriptionOrderItemParam
) {
const res = await request.get<ApiResult<PrescriptionOrderItem[]>>(
MODULES_API_URL + '/clinic/prescription-order-item',
{
@@ -85,7 +92,9 @@ export async function removePrescriptionOrderItem(id?: number) {
* 批量删除处方明细表
*/
export async function removeBatchPrescriptionOrderItem(data: (number | undefined)[]) {
export async function removeBatchPrescriptionOrderItem(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/clinic/prescription-order-item/batch',
{

View File

@@ -8,7 +8,7 @@ import { SERVER_API_URL } from '@/config/setting';
*/
export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>(
SERVER_API_URL + '/cms/cms-article-category/page',
'/cms/cms-article-category/page',
{
params
}
@@ -24,7 +24,7 @@ export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
*/
export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<CmsArticleCategory[]>>(
SERVER_API_URL + '/cms/cms-article-category',
'/cms/cms-article-category',
{
params
}

View File

@@ -79,7 +79,9 @@ export async function removeCmsArticleComment(id?: number) {
/**
* 批量删除文章评论表
*/
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
export async function removeBatchCmsArticleComment(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/article-comment/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeCmsArticleContent(id?: number) {
/**
* 批量删除文章记录表
*/
export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
export async function removeBatchCmsArticleContent(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-content/batch',
{

View File

@@ -1,7 +1,6 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsNavigation, CmsNavigationParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { Navigation, NavigationParam } from '@/api/cms/navigation/model';
/**
@@ -9,7 +8,7 @@ import type { Navigation, NavigationParam } from '@/api/cms/navigation/model';
*/
export async function pageCmsNavigation(params: CmsNavigationParam) {
const res = await request.get<ApiResult<PageResult<CmsNavigation>>>(
SERVER_API_URL + '/cms/cms-navigation/page',
'https://cms-api.websoft.top/api/cms/cms-navigation/page',
{
params
}
@@ -25,7 +24,7 @@ export async function pageCmsNavigation(params: CmsNavigationParam) {
*/
export async function listCmsNavigation(params?: CmsNavigationParam) {
const res = await request.get<ApiResult<CmsNavigation[]>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
{
params
}
@@ -41,7 +40,7 @@ export async function listCmsNavigation(params?: CmsNavigationParam) {
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
SERVER_API_URL + '/cms/cms-navigation/tree',
'https://cms-api.websoft.top/api/cms/cms-navigation/tree',
{
params
}
@@ -56,7 +55,7 @@ export async function treeNavigation(params?: NavigationParam) {
*/
export async function addCmsNavigation(data: CmsNavigation) {
const res = await request.post<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
data
);
if (res.data.code === 0) {
@@ -70,7 +69,7 @@ export async function addCmsNavigation(data: CmsNavigation) {
*/
export async function updateCmsNavigation(data: CmsNavigation) {
const res = await request.put<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation',
'https://cms-api.websoft.top/api/cms/cms-navigation',
data
);
if (res.data.code === 0) {
@@ -84,7 +83,7 @@ export async function updateCmsNavigation(data: CmsNavigation) {
*/
export async function removeCmsNavigation(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation/' + id
'/cms/cms-navigation/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -97,7 +96,7 @@ export async function removeCmsNavigation(id?: number) {
*/
export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
SERVER_API_URL + '/cms/cms-navigation/batch',
'https://cms-api.websoft.top/api/cms/cms-navigation/batch',
{
data
}
@@ -113,7 +112,7 @@ export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
*/
export async function getCmsNavigation(id: number) {
const res = await request.get<ApiResult<CmsNavigation>>(
SERVER_API_URL + '/cms/cms-navigation/' + id
'https://cms-api.websoft.top/api/cms/cms-navigation/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsProduct, CmsProductParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { ArticleParam } from "@/api/cms/article/model";
import type { ArticleParam } from '@/api/cms/article/model';
/**
* 分页查询产品

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询规格值
*/
export async function pageCmsProductSpecValue(params: CmsProductSpecValueParam) {
export async function pageCmsProductSpecValue(
params: CmsProductSpecValueParam
) {
const res = await request.get<ApiResult<PageResult<CmsProductSpecValue>>>(
MODULES_API_URL + '/cms/cms-product-spec-value/page',
{
@@ -22,7 +24,9 @@ export async function pageCmsProductSpecValue(params: CmsProductSpecValueParam)
/**
* 查询规格值列表
*/
export async function listCmsProductSpecValue(params?: CmsProductSpecValueParam) {
export async function listCmsProductSpecValue(
params?: CmsProductSpecValueParam
) {
const res = await request.get<ApiResult<CmsProductSpecValue[]>>(
MODULES_API_URL + '/cms/cms-product-spec-value',
{
@@ -79,7 +83,9 @@ export async function removeCmsProductSpecValue(id?: number) {
/**
* 批量删除规格值
*/
export async function removeBatchCmsProductSpecValue(data: (number | undefined)[]) {
export async function removeBatchCmsProductSpecValue(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-product-spec-value/batch',
{

View File

@@ -1,4 +1,4 @@
import type {PageParam} from '@/api';
import type { PageParam } from '@/api';
/**
* 设计征集报名

View File

@@ -111,7 +111,10 @@ export async function removeBatchNavigation(data: (number | undefined)[]) {
/**
* 修改用户状态
*/
export async function updateNavigationStatus(navigationId?: number, status?: number) {
export async function updateNavigationStatus(
navigationId?: number,
status?: number
) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/navigation/status',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopDealerCapital(id?: number) {
/**
* 批量删除分销商资金明细表
*/
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
export async function removeBatchShopDealerCapital(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-capital/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopDealerReferee(id?: number) {
/**
* 批量删除分销商推荐关系表
*/
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
export async function removeBatchShopDealerReferee(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-referee/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopDealerSetting(id?: number) {
/**
* 批量删除分销商设置表
*/
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
export async function removeBatchShopDealerSetting(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-setting/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopDealerWithdraw(id?: number) {
/**
* 批量删除分销商提现明细表
*/
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
export async function removeBatchShopDealerWithdraw(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-dealer-withdraw/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopGoodsCategory(id?: number) {
/**
* 批量删除商品分类
*/
export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) {
export async function removeBatchShopGoodsCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-category/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopGoodsComment(id?: number) {
/**
* 批量删除评论表
*/
export async function removeBatchShopGoodsComment(data: (number | undefined)[]) {
export async function removeBatchShopGoodsComment(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-comment/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopGoodsRelation(id?: number) {
/**
* 批量删除商品点赞和收藏表
*/
export async function removeBatchShopGoodsRelation(data: (number | undefined)[]) {
export async function removeBatchShopGoodsRelation(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-goods-relation/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户账号
*/
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) {
export async function pageShopMerchantAccount(
params: ShopMerchantAccountParam
) {
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
MODULES_API_URL + '/mall/shop-merchant-account/page',
{
@@ -22,7 +24,9 @@ export async function pageShopMerchantAccount(params: ShopMerchantAccountParam)
/**
* 查询商户账号列表
*/
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) {
export async function listShopMerchantAccount(
params?: ShopMerchantAccountParam
) {
const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
MODULES_API_URL + '/mall/shop-merchant-account',
{
@@ -79,7 +83,9 @@ export async function removeShopMerchantAccount(id?: number) {
/**
* 批量删除商户账号
*/
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) {
export async function removeBatchShopMerchantAccount(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-account/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopMerchantApply(id?: number) {
/**
* 批量删除商户入驻申请
*/
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
export async function removeBatchShopMerchantApply(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-apply/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopMerchantCount(id?: number) {
/**
* 批量删除门店销售统计表
*/
export async function removeBatchShopMerchantCount(data: (number | undefined)[]) {
export async function removeBatchShopMerchantCount(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-count/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopMerchantType(id?: number) {
/**
* 批量删除商户类型
*/
export async function removeBatchShopMerchantType(data: (number | undefined)[]) {
export async function removeBatchShopMerchantType(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-merchant-type/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopOrderCartInfo(id?: number) {
/**
* 批量删除订单购物详情表
*/
export async function removeBatchShopOrderCartInfo(data: (number | undefined)[]) {
export async function removeBatchShopOrderCartInfo(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-cart-info/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopOrderInfoLog(id?: number) {
/**
* 批量删除订单核销
*/
export async function removeBatchShopOrderInfoLog(data: (number | undefined)[]) {
export async function removeBatchShopOrderInfoLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-order-info-log/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopUserCollection(id?: number) {
/**
* 批量删除我的收藏
*/
export async function removeBatchShopUserCollection(data: (number | undefined)[]) {
export async function removeBatchShopUserCollection(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-user-collection/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeShopWechatDeposit(id?: number) {
/**
* 批量删除押金
*/
export async function removeBatchShopWechatDeposit(data: (number | undefined)[]) {
export async function removeBatchShopWechatDeposit(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/mall/shop-wechat-deposit/batch',
{

View File

@@ -1,6 +1,6 @@
import type { PageParam } from '@/api';
import type { User } from '@/api/system/user/model';
import {AssetsUser} from "@/api/oa/assets/user/model";
import { AssetsUser } from '@/api/oa/assets/user/model';
/**
* 资产

View File

@@ -1,13 +1,16 @@
import request from '@/utils/request';
import type { ApiResult } from '@/api';
import { ChatParam } from '@/api/oa/chatgpt/model';
import {MODULES_API_URL} from "@/config/setting";
import { MODULES_API_URL } from '@/config/setting';
/**
* 发送
*/
export async function send(data: ChatParam) {
const res = await request.post<ApiResult<unknown>>(MODULES_API_URL + '/open/chat/send', data);
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/open/chat/send',
data
);
if (res.data.code === 0) {
return res.data.data;
}

View File

@@ -1,5 +1,5 @@
import type { PageParam } from '@/api';
import {Company} from "@/api/system/company/model";
import { Company } from '@/api/system/company/model';
/**
* 产品

View File

@@ -179,7 +179,6 @@ export async function getByGroup(groupId: number) {
return Promise.reject(new Error(res.data.message));
}
/**
* 删除整单
*/

View File

@@ -105,7 +105,6 @@ export async function getDealerWithdraw(id: number) {
return Promise.reject(new Error(res.data.message));
}
export async function getDealerWithdrawUnCheckNum() {
const res = await request.get<ApiResult<number>>(
MODULES_API_URL + '/shop/dealer-withdraw/uncheck-num'

View File

@@ -1,5 +1,5 @@
import type { PageParam } from '@/api';
import {ExpressTemplateDetail} from "@/api/shop/expressTemplateDetail/model";
import { ExpressTemplateDetail } from '@/api/shop/expressTemplateDetail/model';
/**
* 运费模板
@@ -24,7 +24,7 @@ export interface ExpressTemplate {
extraAmount?: number;
firstNum?: number;
extraNum?: number;
detailList?: ExpressTemplateDetail[]
detailList?: ExpressTemplateDetail[];
}
/**

View File

@@ -1,12 +1,17 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ExpressTemplateDetail, ExpressTemplateDetailParam } from './model';
import type {
ExpressTemplateDetail,
ExpressTemplateDetailParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询运费模板
*/
export async function pageExpressTemplateDetail(params: ExpressTemplateDetailParam) {
export async function pageExpressTemplateDetail(
params: ExpressTemplateDetailParam
) {
const res = await request.get<ApiResult<PageResult<ExpressTemplateDetail>>>(
MODULES_API_URL + '/shop/express-template-detail/page',
{
@@ -22,7 +27,9 @@ export async function pageExpressTemplateDetail(params: ExpressTemplateDetailPar
/**
* 查询运费模板列表
*/
export async function listExpressTemplateDetail(params?: ExpressTemplateDetailParam) {
export async function listExpressTemplateDetail(
params?: ExpressTemplateDetailParam
) {
const res = await request.get<ApiResult<ExpressTemplateDetail[]>>(
MODULES_API_URL + '/shop/express-template-detail',
{
@@ -79,7 +86,9 @@ export async function removeExpressTemplateDetail(id?: number) {
/**
* 批量删除运费模板
*/
export async function removeBatchExpressTemplateDetail(data: (number | undefined)[]) {
export async function removeBatchExpressTemplateDetail(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/express-template-detail/batch',
{

View File

@@ -1,6 +1,11 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Goods, GoodsParam } from './model';
import type {
Goods,
GoodsImportExcelParam,
GoodsImportResult,
GoodsParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
export async function getCount(params: GoodsParam) {
@@ -114,3 +119,46 @@ export async function getGoods(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量导入商品(Excel)
*/
export async function importGoodsExcel(params: GoodsImportExcelParam) {
const res = await request.post<ApiResult<GoodsImportResult>>(
MODULES_API_URL + '/shop/goods/import-excel',
{},
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
const err: any = new Error(res.data.message);
err.data = res.data.data;
return Promise.reject(err);
}
/**
* 批量导入商品(Excel) - 直接上传文件
*/
export async function importGoodsExcelFile(
file: File,
params: GoodsImportExcelParam
) {
const formData = new FormData();
formData.append('file', file);
Object.entries(params ?? {}).forEach(([key, value]) => {
if (value === undefined || value === null || key === 'path') return;
formData.append(key, String(value));
});
const res = await request.post<ApiResult<GoodsImportResult>>(
MODULES_API_URL + '/shop/goods/import-excel',
formData,
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
const err: any = new Error(res.data.message);
err.data = res.data.data;
return Promise.reject(err);
}

View File

@@ -1,7 +1,7 @@
import type { PageParam } from '@/api';
import { GoodsSpec } from '@/api/shop/goodsSpec/model';
import { GoodsSku } from '@/api/shop/goodsSku/model';
import {GoodsRoleCommission} from "@/api/shop/goodsRoleCommission/model";
import { GoodsRoleCommission } from '@/api/shop/goodsRoleCommission/model';
export interface GoodsCount {
totalNum: number;
@@ -144,3 +144,26 @@ export interface GoodsParam extends PageParam {
stock?: number;
keywords?: string;
}
export interface GoodsImportResult {
excelPath?: string;
sheetName?: string;
totalRows: number;
inserted: number;
skippedExists: number;
goods?: Goods[];
}
export interface GoodsImportExcelParam {
path?: string;
sheetName?: string;
skipExisting?: boolean;
createCategory?: boolean;
merchantId?: number;
defaultIsShow?: number;
defaultStock?: number;
/**
* Excel 中未提供轮播图(files)时的默认值(通常为 JSON 字符串,如 "[]"/"[{...}]"
*/
defaultFiles?: string;
}

View File

@@ -79,7 +79,9 @@ export async function removeGoodsDescription(id?: number) {
/**
* 批量删除商品描述表
*/
export async function removeBatchGoodsDescription(data: (number | undefined)[]) {
export async function removeBatchGoodsDescription(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/goods-description/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeGoodsIncomeConfig(id?: number) {
/**
* 批量删除分润配置
*/
export async function removeBatchGoodsIncomeConfig(data: (number | undefined)[]) {
export async function removeBatchGoodsIncomeConfig(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/goods-income-config/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商品绑定角色的分润金额
*/
export async function pageGoodsRoleCommission(params: GoodsRoleCommissionParam) {
export async function pageGoodsRoleCommission(
params: GoodsRoleCommissionParam
) {
const res = await request.get<ApiResult<PageResult<GoodsRoleCommission>>>(
MODULES_API_URL + '/shop/goods-role-commission/page',
{
@@ -22,7 +24,9 @@ export async function pageGoodsRoleCommission(params: GoodsRoleCommissionParam)
/**
* 查询商品绑定角色的分润金额列表
*/
export async function listGoodsRoleCommission(params?: GoodsRoleCommissionParam) {
export async function listGoodsRoleCommission(
params?: GoodsRoleCommissionParam
) {
const res = await request.get<ApiResult<GoodsRoleCommission[]>>(
MODULES_API_URL + '/shop/goods-role-commission',
{
@@ -79,7 +83,9 @@ export async function removeGoodsRoleCommission(id?: number) {
/**
* 批量删除商品绑定角色的分润金额
*/
export async function removeBatchGoodsRoleCommission(data: (number | undefined)[]) {
export async function removeBatchGoodsRoleCommission(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/goods-role-commission/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户商品库存
*/
export async function pageGoodsStockInMerchant(params: GoodsStockInMerchantParam) {
export async function pageGoodsStockInMerchant(
params: GoodsStockInMerchantParam
) {
const res = await request.get<ApiResult<PageResult<GoodsStockInMerchant>>>(
MODULES_API_URL + '/shop/goods-stock-in-merchant/page',
{
@@ -22,7 +24,9 @@ export async function pageGoodsStockInMerchant(params: GoodsStockInMerchantParam
/**
* 查询商户商品库存列表
*/
export async function listGoodsStockInMerchant(params?: GoodsStockInMerchantParam) {
export async function listGoodsStockInMerchant(
params?: GoodsStockInMerchantParam
) {
const res = await request.get<ApiResult<GoodsStockInMerchant[]>>(
MODULES_API_URL + '/shop/goods-stock-in-merchant',
{
@@ -79,7 +83,9 @@ export async function removeGoodsStockInMerchant(id?: number) {
/**
* 批量删除商户商品库存
*/
export async function removeBatchGoodsStockInMerchant(data: (number | undefined)[]) {
export async function removeBatchGoodsStockInMerchant(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/goods-stock-in-merchant/batch',
{

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type {ApiResult, PageResult} from '@/api';
import type {Merchant, MerchantParam} from './model';
import {MODULES_API_URL} from '@/config/setting';
import type { ApiResult, PageResult } from '@/api';
import type { Merchant, MerchantParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商户

View File

@@ -79,7 +79,9 @@ export async function removeMerchantCategory(id?: number) {
/**
* 批量删除商家分类
*/
export async function removeBatchMerchantCategory(data: (number | undefined)[]) {
export async function removeBatchMerchantCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-category/batch',
{

View File

@@ -34,7 +34,7 @@ export interface MerchantCategory {
createTime?: string;
// 修改时间
updateTime?: string;
children?: MerchantCategory[]
children?: MerchantCategory[];
}
/**

View File

@@ -1,12 +1,17 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { MerchantChargePackage, MerchantChargePackageParam } from './model';
import type {
MerchantChargePackage,
MerchantChargePackageParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商家充值套餐
*/
export async function pageMerchantChargePackage(params: MerchantChargePackageParam) {
export async function pageMerchantChargePackage(
params: MerchantChargePackageParam
) {
const res = await request.get<ApiResult<PageResult<MerchantChargePackage>>>(
MODULES_API_URL + '/shop/merchant-charge-package/page',
{
@@ -22,7 +27,9 @@ export async function pageMerchantChargePackage(params: MerchantChargePackagePar
/**
* 查询商家充值套餐列表
*/
export async function listMerchantChargePackage(params?: MerchantChargePackageParam) {
export async function listMerchantChargePackage(
params?: MerchantChargePackageParam
) {
const res = await request.get<ApiResult<MerchantChargePackage[]>>(
MODULES_API_URL + '/shop/merchant-charge-package',
{
@@ -79,7 +86,9 @@ export async function removeMerchantChargePackage(id?: number) {
/**
* 批量删除商家充值套餐
*/
export async function removeBatchMerchantChargePackage(data: (number | undefined)[]) {
export async function removeBatchMerchantChargePackage(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-charge-package/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商家充值套餐
*/
export async function pageMerchantGoodsPackage(params: MerchantGoodsPackageParam) {
export async function pageMerchantGoodsPackage(
params: MerchantGoodsPackageParam
) {
const res = await request.get<ApiResult<PageResult<MerchantGoodsPackage>>>(
MODULES_API_URL + '/shop/merchant-goods-package/page',
{
@@ -22,7 +24,9 @@ export async function pageMerchantGoodsPackage(params: MerchantGoodsPackageParam
/**
* 查询商家充值套餐列表
*/
export async function listMerchantGoodsPackage(params?: MerchantGoodsPackageParam) {
export async function listMerchantGoodsPackage(
params?: MerchantGoodsPackageParam
) {
const res = await request.get<ApiResult<MerchantGoodsPackage[]>>(
MODULES_API_URL + '/shop/merchant-goods-package',
{
@@ -79,7 +83,9 @@ export async function removeMerchantGoodsPackage(id?: number) {
/**
* 批量删除商家充值套餐
*/
export async function removeBatchMerchantGoodsPackage(data: (number | undefined)[]) {
export async function removeBatchMerchantGoodsPackage(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-goods-package/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeMerchantOfflinePay(id?: number) {
/**
* 批量删除商铺线下支付
*/
export async function removeBatchMerchantOfflinePay(data: (number | undefined)[]) {
export async function removeBatchMerchantOfflinePay(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-offline-pay/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商家套餐可使用的商品
*/
export async function pageMerchantPackageGoods(params: MerchantPackageGoodsParam) {
export async function pageMerchantPackageGoods(
params: MerchantPackageGoodsParam
) {
const res = await request.get<ApiResult<PageResult<MerchantPackageGoods>>>(
MODULES_API_URL + '/shop/merchant-package-goods/page',
{
@@ -22,7 +24,9 @@ export async function pageMerchantPackageGoods(params: MerchantPackageGoodsParam
/**
* 查询商家套餐可使用的商品列表
*/
export async function listMerchantPackageGoods(params?: MerchantPackageGoodsParam) {
export async function listMerchantPackageGoods(
params?: MerchantPackageGoodsParam
) {
const res = await request.get<ApiResult<MerchantPackageGoods[]>>(
MODULES_API_URL + '/shop/merchant-package-goods',
{
@@ -79,7 +83,9 @@ export async function removeMerchantPackageGoods(id?: number) {
/**
* 批量删除商家套餐可使用的商品
*/
export async function removeBatchMerchantPackageGoods(data: (number | undefined)[]) {
export async function removeBatchMerchantPackageGoods(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-package-goods/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询商铺播报设备
*/
export async function pageMerchantVoiceDevice(params: MerchantVoiceDeviceParam) {
export async function pageMerchantVoiceDevice(
params: MerchantVoiceDeviceParam
) {
const res = await request.get<ApiResult<PageResult<MerchantVoiceDevice>>>(
MODULES_API_URL + '/shop/merchant-voice-device/page',
{
@@ -22,7 +24,9 @@ export async function pageMerchantVoiceDevice(params: MerchantVoiceDeviceParam)
/**
* 查询商铺播报设备列表
*/
export async function listMerchantVoiceDevice(params?: MerchantVoiceDeviceParam) {
export async function listMerchantVoiceDevice(
params?: MerchantVoiceDeviceParam
) {
const res = await request.get<ApiResult<MerchantVoiceDevice[]>>(
MODULES_API_URL + '/shop/merchant-voice-device',
{
@@ -79,7 +83,9 @@ export async function removeMerchantVoiceDevice(id?: number) {
/**
* 批量删除商铺播报设备
*/
export async function removeBatchMerchantVoiceDevice(data: (number | undefined)[]) {
export async function removeBatchMerchantVoiceDevice(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/merchant-voice-device/batch',
{

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type {ApiResult, PageResult} from '@/api';
import type {Order, OrderParam} from './model';
import {MODULES_API_URL} from '@/config/setting';
import type { ApiResult, PageResult } from '@/api';
import type { Order, OrderParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询

View File

@@ -1,8 +1,8 @@
import type { PageParam } from '@/api';
import { OrderInfo } from '@/api/shop/orderInfo/model';
import {OrderDelivery} from "@/api/shop/orderDelivery/model";
import {OrderGoods} from "@/api/shop/orderGoods/model";
import {Merchant} from "@/api/shop/merchant/model";
import { OrderDelivery } from '@/api/shop/orderDelivery/model';
import { OrderGoods } from '@/api/shop/orderGoods/model';
import { Merchant } from '@/api/shop/merchant/model';
/**
*
@@ -120,7 +120,7 @@ export interface Order {
merchant?: Merchant;
orderInfo?: OrderInfo[];
orderGoods?: OrderGoods[];
orderDelivery?: OrderDelivery
orderDelivery?: OrderDelivery;
}
/**

View File

@@ -1,8 +1,7 @@
import request from '@/utils/request';
import type { ApiResult } from '@/api';
import { MODULES_API_URL } from '@/config/setting';
import {OrderDelivery} from "@/api/shop/orderDelivery/model";
import { OrderDelivery } from '@/api/shop/orderDelivery/model';
/**
* 添加

View File

@@ -1,5 +1,5 @@
import type { PageParam } from '@/api';
import {Express} from "@/api/shop/express/model";
import { Express } from '@/api/shop/express/model';
/**
*

View File

@@ -1,4 +1,4 @@
import type {PageParam} from '@/api';
import type { PageParam } from '@/api';
/**
* 开屏广告
@@ -47,4 +47,4 @@ export const SplashJumpType = [
label: '店铺',
value: 'merchant'
}
]
];

View File

@@ -39,7 +39,6 @@ export interface SwiperParam extends PageParam {
keywords?: string;
}
export const SwiperType = [
{
label: '会员商城',
@@ -72,12 +71,12 @@ export const SwiperType = [
{
label: '招商',
value: '招商'
},
]
}
];
export const SwiperJumpType = [
{
label: '商品',
value: 'goods'
}
]
];

View File

@@ -1,12 +1,17 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserBalanceInMerchant, UserBalanceInMerchantParam } from './model';
import type {
UserBalanceInMerchant,
UserBalanceInMerchantParam
} from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户在商家中的余额
*/
export async function pageUserBalanceInMerchant(params: UserBalanceInMerchantParam) {
export async function pageUserBalanceInMerchant(
params: UserBalanceInMerchantParam
) {
const res = await request.get<ApiResult<PageResult<UserBalanceInMerchant>>>(
MODULES_API_URL + '/shop/user-balance-in-merchant/page',
{
@@ -22,7 +27,9 @@ export async function pageUserBalanceInMerchant(params: UserBalanceInMerchantPar
/**
* 查询用户在商家中的余额列表
*/
export async function listUserBalanceInMerchant(params?: UserBalanceInMerchantParam) {
export async function listUserBalanceInMerchant(
params?: UserBalanceInMerchantParam
) {
const res = await request.get<ApiResult<UserBalanceInMerchant[]>>(
MODULES_API_URL + '/shop/user-balance-in-merchant',
{
@@ -79,7 +86,9 @@ export async function removeUserBalanceInMerchant(id?: number) {
/**
* 批量删除用户在商家中的余额
*/
export async function removeBatchUserBalanceInMerchant(data: (number | undefined)[]) {
export async function removeBatchUserBalanceInMerchant(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/user-balance-in-merchant/batch',
{

View File

@@ -90,7 +90,9 @@ export async function removeUserCommissionRole(id?: number) {
/**
* 批量删除用户绑定分红角色
*/
export async function removeBatchUserCommissionRole(data: (number | undefined)[]) {
export async function removeBatchUserCommissionRole(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/user-commission-role/batch',
{

View File

@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询用户在商家中的代金券
*/
export async function pageUserGoodsInMerchant(params: UserGoodsInMerchantParam) {
export async function pageUserGoodsInMerchant(
params: UserGoodsInMerchantParam
) {
const res = await request.get<ApiResult<PageResult<UserGoodsInMerchant>>>(
MODULES_API_URL + '/shop/user-goods-in-merchant/page',
{
@@ -22,7 +24,9 @@ export async function pageUserGoodsInMerchant(params: UserGoodsInMerchantParam)
/**
* 查询用户在商家中的代金券列表
*/
export async function listUserGoodsInMerchant(params?: UserGoodsInMerchantParam) {
export async function listUserGoodsInMerchant(
params?: UserGoodsInMerchantParam
) {
const res = await request.get<ApiResult<UserGoodsInMerchant[]>>(
MODULES_API_URL + '/shop/user-goods-in-merchant',
{
@@ -79,7 +83,9 @@ export async function removeUserGoodsInMerchant(id?: number) {
/**
* 批量删除用户在商家中的代金券
*/
export async function removeBatchUserGoodsInMerchant(data: (number | undefined)[]) {
export async function removeBatchUserGoodsInMerchant(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/user-goods-in-merchant/batch',
{

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Users, UsersParam } from './model';
import {MODULES_API_URL, SERVER_API_URL} from '@/config/setting';
import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting';
/**
* 分页查询

View File

@@ -1,17 +1,18 @@
import request from '@/utils/request';
import type {ApiResult} from '@/api';
import {Area} from "@/api/system/area/model";
import type { ApiResult } from '@/api';
import { Area } from '@/api/system/area/model';
export async function listArea(param: any) {
const res = await request.post<ApiResult<Area[]>>('/common/area/list-by-level', param);
const res = await request.post<ApiResult<Area[]>>(
'/common/area/list-by-level',
param
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
export async function listCity() {
const res = await request.post<ApiResult<Area[]>>('/common/area/city-list');
if (res.data.code === 0 && res.data.data) {

View File

@@ -1,8 +1,7 @@
export interface Area {
id?: any,
name?: any,
fid?: any,
levelId?: any,
children?: any,
id?: any;
name?: any;
fid?: any;
levelId?: any;
children?: any;
}

View File

@@ -79,7 +79,9 @@ export async function removeChatConversation(id?: number) {
/**
* 批量删除聊天消息表
*/
export async function removeBatchChatConversation(data: (number | undefined)[]) {
export async function removeBatchChatConversation(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/shop/chat-conversation/batch',
{

View File

@@ -90,7 +90,6 @@ export async function deleteParentMenu(id?: number) {
return Promise.reject(new Error(res.data.message));
}
/**
* 安装应用
*/

View File

@@ -79,7 +79,9 @@ export async function removeThinkCardEditLog(id?: number) {
/**
* 批量删除IC卡编辑日志
*/
export async function removeBatchThinkCardEditLog(data: (number | undefined)[]) {
export async function removeBatchThinkCardEditLog(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
THINK_API_URL + '/think/think-card-edit-log/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeThinkGatePassreord(id?: number) {
/**
* 批量删除
*/
export async function removeBatchThinkGatePassreord(data: (number | undefined)[]) {
export async function removeBatchThinkGatePassreord(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
THINK_API_URL + '/think/think-gate-passreord/batch',
{

View File

@@ -32,7 +32,6 @@ export interface ThinkGatePassreord {
deleteStatus?: string;
//
siteId?: number;
@TableField("consume_Money")
// 本次消费金额
consumeMoney?: string;
}

View File

@@ -79,7 +79,9 @@ export async function removeThinkGoodsCategory(id?: number) {
/**
* 批量删除
*/
export async function removeBatchThinkGoodsCategory(data: (number | undefined)[]) {
export async function removeBatchThinkGoodsCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
THINK_API_URL + '/think/think-goods-category/batch',
{

View File

@@ -6,7 +6,9 @@ import { THINK_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageThinkGoodsOrderInfo(params: ThinkGoodsOrderInfoParam) {
export async function pageThinkGoodsOrderInfo(
params: ThinkGoodsOrderInfoParam
) {
const res = await request.get<ApiResult<PageResult<ThinkGoodsOrderInfo>>>(
THINK_API_URL + '/think/think-goods-order-info/page',
{
@@ -22,7 +24,9 @@ export async function pageThinkGoodsOrderInfo(params: ThinkGoodsOrderInfoParam)
/**
* 查询列表
*/
export async function listThinkGoodsOrderInfo(params?: ThinkGoodsOrderInfoParam) {
export async function listThinkGoodsOrderInfo(
params?: ThinkGoodsOrderInfoParam
) {
const res = await request.get<ApiResult<ThinkGoodsOrderInfo[]>>(
THINK_API_URL + '/think/think-goods-order-info',
{
@@ -79,7 +83,9 @@ export async function removeThinkGoodsOrderInfo(id?: number) {
/**
* 批量删除
*/
export async function removeBatchThinkGoodsOrderInfo(data: (number | undefined)[]) {
export async function removeBatchThinkGoodsOrderInfo(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
THINK_API_URL + '/think/think-goods-order-info/batch',
{

View File

@@ -79,7 +79,9 @@ export async function removeThinkGoodsSpecRel(id?: number) {
/**
* 批量删除商品与规格值关系记录表
*/
export async function removeBatchThinkGoodsSpecRel(data: (number | undefined)[]) {
export async function removeBatchThinkGoodsSpecRel(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
THINK_API_URL + '/think/think-goods-spec-rel/batch',
{

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserReferee, UserRefereeParam } from '@/api/user/referee/model';
import {SERVER_API_URL} from "@/config/setting";
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询推荐关系
*/

View File

@@ -239,7 +239,7 @@
const updateColor = (color: string) => {
item.value.style.background = color;
emit('done', item);
emit('done', item.value);
};
const onClick = () => {

View File

@@ -154,7 +154,7 @@
const updateColor = (color: string) => {
item.value.style.background = color;
emit('done', item);
emit('done', item.value);
};
const onClick = () => {

View File

@@ -115,7 +115,7 @@
};
const onRadio = (record: Design) => {
pageId.value = Number(record.pageId)
pageId.value = Number(record.pageId);
updateVisible(false);
emit('done', record);
};

View File

@@ -28,7 +28,7 @@
>
<a-button type="primary" class="ele-btn-icon">
<template #icon>
<UploadOutlined/>
<UploadOutlined />
</template>
<span>上传视频</span>
</a-button>
@@ -41,7 +41,7 @@
>
<a-button type="primary" class="ele-btn-icon">
<template #icon>
<UploadOutlined/>
<UploadOutlined />
</template>
<span>上传音频</span>
</a-button>
@@ -54,7 +54,7 @@
>
<a-button type="primary" class="ele-btn-icon">
<template #icon>
<UploadOutlined/>
<UploadOutlined />
</template>
<span>上传文件</span>
</a-button>
@@ -67,7 +67,7 @@
>
<a-button type="primary" class="ele-btn-icon">
<template #icon>
<UploadOutlined/>
<UploadOutlined />
</template>
<span>上传图片</span>
</a-button>
@@ -96,8 +96,7 @@
style="margin-right: 20px"
@click="openUrl('/cms/photo/dict')"
>管理分组
</a-button
>
</a-button>
</div>
</template>
<template #bodyCell="{ column, record }">
@@ -129,22 +128,22 @@
<template v-if="column.dataIndex === 'name'">
<a-space class="ele-cell" style="display: flex">
<span>{{ record.name }}</span>
<EditOutlined title="编辑" @click="openEdit(record)"/>
<EditOutlined title="编辑" @click="openEdit(record)" />
</a-space>
</template>
<template v-if="column.key === 'action'">
<template v-if="pageId == record.pageId">
<a-radio v-model:checked="checked" @click="onRadio(record)"/>
<a-radio v-model:checked="checked" @click="onRadio(record)" />
</template>
<template v-else>
<a-space>
<lebal>
<a-radio @click="onRadio(record)"/>
<a-radio @click="onRadio(record)" />
<a class="ele-text-success">选择</a>
</lebal>
<a-divider type="vertical"/>
<a-divider type="vertical" />
<a class="ele-text-placeholder">编辑</a>
<a-divider type="vertical"/>
<a-divider type="vertical" />
<a class="ele-text-placeholder">删除</a>
</a-space>
</template>
@@ -153,26 +152,26 @@
</ele-pro-table>
</ele-modal>
<!-- 编辑弹窗 -->
<FileRecordEdit v-model:visible="showEdit" :data="current" @done="reload"/>
<FileRecordEdit v-model:visible="showEdit" :data="current" @done="reload" />
</template>
<script lang="ts" setup>
import {ref, watch} from 'vue';
import {
import { ref, watch } from 'vue';
import {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import {pageFiles, uploadOss, uploadOssByGroupId} from '@/api/system/file';
import {EleProTable, messageLoading} from 'ele-admin-pro';
import {FileRecord, FileRecordParam} from '@/api/system/file/model';
import {EditOutlined, UploadOutlined} from '@ant-design/icons-vue';
import {DictData} from '@/api/system/dict-data/model';
import {pageDictData} from '@/api/system/dict-data';
import {isImage, openUrl} from '@/utils/common';
import {message} from 'ant-design-vue/es';
import FileRecordEdit from './file-record-edit.vue';
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageFiles, uploadOss, uploadOssByGroupId } from '@/api/system/file';
import { EleProTable, messageLoading } from 'ele-admin-pro';
import { FileRecord, FileRecordParam } from '@/api/system/file/model';
import { EditOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { DictData } from '@/api/system/dict-data/model';
import { pageDictData } from '@/api/system/dict-data';
import { isImage, openUrl } from '@/utils/common';
import { message } from 'ant-design-vue/es';
import FileRecordEdit from './file-record-edit.vue';
const props = defineProps<{
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 标题
@@ -181,32 +180,32 @@ const props = defineProps<{
type?: string;
// 修改回显的数据
data?: FileRecord | null;
}>();
}>();
const emit = defineEmits<{
const emit = defineEmits<{
(e: 'done', data: FileRecord): void;
(e: 'update:visible', visible: boolean): void;
}>();
}>();
/* 更新visible */
const updateVisible = (value: boolean) => {
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
};
// 搜索内容
const searchText = ref(null);
const pageId = ref<number>(0);
const checked = ref<boolean>(true);
const groupList = ref<DictData[]>();
const showEdit = ref<boolean>(false);
const current = ref<FileRecord | null>();
const dictDataId = ref<any>(undefined);
// 搜索内容
const searchText = ref(null);
const pageId = ref<number>(0);
const checked = ref<boolean>(true);
const groupList = ref<DictData[]>();
const showEdit = ref<boolean>(false);
const current = ref<FileRecord | null>();
const dictDataId = ref<any>(undefined);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格配置
const columns = ref<ColumnItem[]>([
// 表格配置
const columns = ref<ColumnItem[]>([
{
title: 'ID',
dataIndex: 'id'
@@ -225,7 +224,7 @@ const columns = ref<ColumnItem[]>([
title: '大小',
dataIndex: 'length',
key: 'length',
customRender: ({text}) => {
customRender: ({ text }) => {
if (text < 1024) {
return text + 'B';
} else if (text < 1024 * 1024) {
@@ -242,10 +241,10 @@ const columns = ref<ColumnItem[]>([
key: 'action',
align: 'center'
}
]);
]);
// 表格数据源
const datasource: DatasourceFunction = ({page, limit, where, orders}) => {
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
where = {};
// 搜索条件
if (searchText.value) {
@@ -255,21 +254,26 @@ const datasource: DatasourceFunction = ({page, limit, where, orders}) => {
where.groupId = dictDataId.value;
}
if (props.type) {
let contentTypes = ''
let contentTypes = '';
switch (props.type) {
case 'audio' : {
case 'audio':
{
contentTypes = 'audio/mpeg';
}
break;
case 'file' : {
contentTypes = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
case 'file':
{
contentTypes =
'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
}
break;
case 'video' : {
case 'video':
{
contentTypes = 'video/mp4';
}
break;
default : {
default:
{
contentTypes = 'image/jpeg,image/png,image/jpg';
}
break;
@@ -282,21 +286,21 @@ const datasource: DatasourceFunction = ({page, limit, where, orders}) => {
page,
limit
});
};
};
/* 搜索 */
const reload = (where?: FileRecordParam) => {
tableRef?.value?.reload({page: 1, where});
};
/* 搜索 */
const reload = (where?: FileRecordParam) => {
tableRef?.value?.reload({ page: 1, where });
};
const onRadio = (record: FileRecord) => {
const onRadio = (record: FileRecord) => {
pageId.value = Number(record.id);
updateVisible(false);
emit('done', record);
};
};
const getGroupList = () => {
pageDictData({dictCode: 'groupId'}).then((res) => {
const getGroupList = () => {
pageDictData({ dictCode: 'groupId' }).then((res) => {
groupList.value = res?.list.map((d) => {
return {
label: d.dictDataName,
@@ -304,17 +308,21 @@ const getGroupList = () => {
};
});
});
};
};
const onGroupId = (index: number) => {
const onGroupId = (index: number) => {
dictDataId.value = index;
reload();
};
};
// 上传文件
const onUpload = (item) => {
const {file} = item;
if (!file.type.startsWith('image') && props.type && !['video', 'audio', 'file'].includes(props.type)) {
// 上传文件
const onUpload = (item) => {
const { file } = item;
if (
!file.type.startsWith('image') &&
props.type &&
!['video', 'audio', 'file'].includes(props.type)
) {
message.error('只能选择图片');
return;
}
@@ -362,15 +370,15 @@ const onUpload = (item) => {
hide();
});
}
};
};
const openEdit = (row?: FileRecord) => {
const openEdit = (row?: FileRecord) => {
current.value = row ?? null;
showEdit.value = true;
};
};
/* 自定义行属性 */
const customRow = (record: FileRecord) => {
/* 自定义行属性 */
const customRow = (record: FileRecord) => {
return {
// 行点击事件
// onClick: () => {
@@ -383,14 +391,14 @@ const customRow = (record: FileRecord) => {
emit('done', record);
}
};
};
};
watch(
watch(
() => props.visible,
(visible) => {
if (visible) {
getGroupList();
}
}
);
);
</script>

View File

@@ -1,20 +1,37 @@
<template>
<a-space style="display: flex;
<a-space
style="
display: flex;
align-items: center;
justify-content: flex-start;flex-wrap: wrap">
justify-content: flex-start;
flex-wrap: wrap;
"
>
<template v-for="(item, index) in data" :key="index">
<div v-if="type === 'video' || item.url.includes('.mp4')" class="relative cursor-pointer" @click="open(item.url)">
<div
v-if="type === 'video' || item.url.includes('.mp4')"
class="relative cursor-pointer"
@click="open(item.url)"
>
<img
:src="item.url + '?x-oss-process=video/snapshot,t_2000,f_jpg,w_200,h_200'"
:src="
item.url + '?x-oss-process=video/snapshot,t_2000,f_jpg,w_200,h_200'
"
style="width: 80px; height: 80px"
/>
<div class="absolute" style="left: 30px; top: 30px">
<play-circle-outlined style="font-size: 20px; color:white"/>
<play-circle-outlined style="font-size: 20px; color: white" />
</div>
</div>
<a-tag :key="item.url" closable @close="onDeleteItem(index)"
@click.native="open(item.url)" style="cursor: pointer"
v-else-if="type && ['audio', 'file'].includes(type)"> {{ item.url }}
<a-tag
:key="item.url"
closable
@close="onDeleteItem(index)"
@click.native="open(item.url)"
style="cursor: pointer"
v-else-if="type && ['audio', 'file'].includes(type)"
>
{{ item.url }}
</a-tag>
<div class="image-upload-item bg-gray-300" v-else>
<a-image-preview-group>
@@ -25,22 +42,18 @@
:src="item.url"
/>
<a class="image-upload-close" @click="onDeleteItem(index)">
<CloseOutlined/>
<CloseOutlined />
</a>
</a-image-preview-group>
</div>
</template>
<template v-if="type === 'video'">
<a-button type="primary"
@click="openEdit"
v-if="data?.length < limit">
<a-button type="primary" @click="openEdit" v-if="data?.length < limit">
选择视频
</a-button>
</template>
<template v-else-if="type === 'audio'">
<a-button type="primary"
@click="openEdit"
v-if="data?.length < limit">
<a-button type="primary" @click="openEdit" v-if="data?.length < limit">
选择音频
</a-button>
</template>
@@ -50,7 +63,7 @@
v-if="data?.length < limit || limit === -1"
class="select-picture-btn ele-text-placeholder"
>
<PlusOutlined/>
<PlusOutlined />
</a-button>
</template>
</a-space>
@@ -65,12 +78,16 @@
</template>
<script lang="ts" setup>
import {PlusOutlined, CloseOutlined, PlayCircleOutlined} from '@ant-design/icons-vue';
import {ref} from 'vue';
import SelectData from './components/select-data.vue';
import {FileRecord} from '@/api/system/file/model';
import {
PlusOutlined,
CloseOutlined,
PlayCircleOutlined
} from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { FileRecord } from '@/api/system/file/model';
const props = withDefaults(
const props = withDefaults(
defineProps<{
value?: any;
data?: any[];
@@ -85,58 +102,62 @@ const props = withDefaults(
width: 80,
limit: 1
}
);
);
const emit = defineEmits<{
const emit = defineEmits<{
(e: 'done', data: FileRecord): void;
(e: 'del', index: number): void;
(e: 'clear'): void;
}>();
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<FileRecord | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<FileRecord | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: FileRecord) => {
/* 打开编辑弹窗 */
const openEdit = (row?: FileRecord) => {
current.value = row ?? null;
showEdit.value = true;
};
};
const onChange = (row) => {
const onChange = (row) => {
row.index = props.index;
emit('done', row);
};
};
const onDeleteItem = (index: number) => {
const onDeleteItem = (index: number) => {
emit('del', index);
};
};
const open = (url: string) => {
const open = (url: string) => {
if (['docx', 'doc', 'xlsx', 'xls', 'pdf'].includes(url.split('.').pop()!)) {
window.open(`https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}`);
} else window.open(url)
}
window.open(
`https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(
url
)}`
);
} else window.open(url);
};
</script>
<style lang="less" scoped>
.select-picture-btn {
.select-picture-btn {
background-color: var(--grey-9);
border: 1px dashed var(--border-color-base);
width: 80px;
height: 80px;
font-size: 16px;
}
}
//.ant-image-img {
// width: 100px !important;
// height: 100px !important;
//}
.image-upload-item {
//.ant-image-img {
// width: 100px !important;
// height: 100px !important;
//}
.image-upload-item {
position: relative;
}
}
.image-upload-close {
.image-upload-close {
width: 18px;
height: 18px;
color: rgb(255, 255, 255);
@@ -156,9 +177,9 @@ const open = (url: string) => {
//display: flex;
//justify-content: center;
//align-items: center;
}
}
.image-upload-close:hover {
.image-upload-close:hover {
background-color: var(--red-6);
}
}
</style>

View File

@@ -99,7 +99,7 @@
},
{
title: '商户类型',
dataIndex: 'shopType',
dataIndex: 'shopType'
// key: 'shopType'
},
{

View File

@@ -18,7 +18,7 @@
import { Spec } from '@/api/shop/spec/model';
import { ref } from 'vue';
import { MerchantType } from '@/api/shop/merchantType/model';
import {listMerchantType} from "@/api/shop/merchantType";
import { listMerchantType } from '@/api/shop/merchantType';
const props = withDefaults(
defineProps<{
@@ -53,14 +53,14 @@
const data = ref<MerchantType[]>([]);
listMerchantType({}).then(list => {
data.value = list.map(d => {
listMerchantType({}).then((list) => {
data.value = list.map((d) => {
return {
name: d.name,
value: d.name
}
};
});
});
})
const onChange = (value: string) => {
props.specDict?.map((d) => {

View File

@@ -54,11 +54,11 @@
const onChange = (value: any) => {
console.log(value);
data.value.map(d => {
if(d.value == value){
emit('done',d, Number(props.index))
data.value.map((d) => {
if (d.value == value) {
emit('done', d, Number(props.index));
}
})
});
};
watch(
@@ -66,11 +66,11 @@
(specId) => {
if (specId) {
listSpecValue({ specId }).then((list) => {
data.value = list.map(v => {
v.label = v.specValue
v.value = v.specValue
data.value = list.map((v) => {
v.label = v.specValue;
v.value = v.specValue;
return v;
})
});
});
} else {
data.value = [];

View File

@@ -83,11 +83,11 @@
<span style="white-space: nowrap">{{ item.title }}</span>
</div>
</div>
<!-- <MpMenuEdit-->
<!-- v-model:visible="showMpMenuEdit"-->
<!-- :data="current"-->
<!-- @done="reload"-->
<!-- />-->
<!-- <MpMenuEdit-->
<!-- v-model:visible="showMpMenuEdit"-->
<!-- :data="current"-->
<!-- @done="reload"-->
<!-- />-->
</template>
<!-- 商户列表 -->
<template v-if="form.showShopCard">

Some files were not shown because too many files have changed in this diff Show More