修改打印机页面,增加叫号管理页面、霸王餐、店铺优惠券

This commit is contained in:
2025-02-22 18:13:19 +08:00
parent 5238df86e5
commit 5a877b550b
32 changed files with 2972 additions and 394 deletions

118
src/api/account/printer.ts Normal file
View File

@@ -0,0 +1,118 @@
import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/printer";
const API = {
getList(data: getListRequest) {
return request<any>({
url: `${baseURL}`,
method: "get",
params: data
});
},
add(data: addRequest) {
return request({
url: `${baseURL}`,
method: "post",
data: data,
});
},
delete(id: number | string) {
return request({
url: `${baseURL}`,
method: "delete",
data: { id },
});
},
edit(data: editRequest) {
return request({
url: `${baseURL}`,
method: "put",
data: data,
});
},
get(id: number | string) {
return request<any>({
url: `${baseURL}/detail`,
method: "get",
params: { id }
});
},
}
export default API;
export interface getListRequest {
/**
* 类型 USB 网络 蓝牙
*/
connectionType?: string;
/**
* 名称
*/
name?: string;
[property: string]: any;
}
/**
* PrinterAddDTO
*/
export interface addRequest {
/**
* ip地址
*/
address?: null | string;
/**
* 打印分类Id
*/
categoryIds?: null | string;
/**
* 分类
*/
categoryList?: null | string;
/**
* 分类打印 0-所有 1-部分分类 2-部分商品
*/
classifyPrint: null | string;
/**
* 现在打印机支持USB 和 网络、蓝牙
*/
connectionType: null | string;
/**
* 打印机品牌
*/
contentType: null | string;
/**
* 设备名称
*/
name: null | string;
/**
* 端口
*/
port?: null | string;
/**
* 打印方式 all-全部打印 normal-仅打印结账单「前台」one-仅打印制作单「厨房」
*/
printMethod: null | string;
/**
* 打印数量 c1m1^2=顾客+商家[2张] m1^1=商家[1张] c1^1顾客[1张] c2m1^3顾客2+商家1[3张]
*/
printQty: null | string;
/**
* 打印类型JSON数组 refund-确认退款单 handover-交班单 queue-排队取号
*/
printType: null | string;
/**
* 小票尺寸 58mm 80mm
*/
receiptSize?: null | string;
/**
* 排序
*/
sort?: number | null;
/**
* 打印类型分类label标签cash小票kitchen出品
*/
subType?: null | string;
[property: string]: any;
}
export interface editRequest extends addRequest {
id: number | string
}