diff --git a/README.en-US.md b/README.en-US.md deleted file mode 100644 index 9fb64d6..0000000 --- a/README.en-US.md +++ /dev/null @@ -1,176 +0,0 @@ -
- vue3-element-admin -

vue3-element-admin

- - - - - - - - - - - 有来技术 - - - 有来技术 - - - 有来技术 - -
- - -![](https://foruda.gitee.com/images/1708618984641188532/a7cca095_716974.png "rainbow.png") - -
- 👀 Live Preview | 📖 Read Documentation | 🌐 中文 -
- - - - -## Introduction - -[vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) is a free and open-source admin template for backend management frontend, built with popular technologies such as Vue3, Vite5, TypeScript, Element-Plus, and Pinia (with accompanying [backend source code](https://gitee.com/youlaiorg/youlai-boot)). - - - - -## Project Features - -- **Simple and Easy-to-use**: Upgraded version of [vue-element-admin](https://gitee.com/panjiachen/vue-element-admin) for Vue3, with minimal encapsulation and easy to get started. - -- **Data Interaction**: Support both local `Mock` data and remote API. Comes with [Java backend source code](https://gitee.com/youlaiorg/youlai-boot) and online API documentation. - -- **Permission Management**: Complete permission system for users, roles, menus, dictionaries, and departments. - -- **Essential Infrastructure**: Dynamic routing, button permissions, internationalization, code style, Git commit conventions, and common component encapsulation. - -- **Continuous Updates**: Since 2021, the project has maintained an open-source status with continuous updates, integrating new tools and dependencies in real time, and has accumulated a broad user base. - -## Project Preview - -![Light Mode](https://foruda.gitee.com/images/1709651876583793739/0ba1ee1c_716974.png) - -![Dark Mode](https://foruda.gitee.com/images/1709651875494206224/2a2b0b53_716974.png) - -![API Documentation](https://foruda.gitee.com/images/1687755822857820115/96054330_716974.png) - -## Project Links - -| Project | Gitee | Github | GitCode | -|----------| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| Frontend | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.net/youlai/vue3-element-admin) | -| Lite | [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | [vue3-element-template](https://github.com/youlaitech/vue3-element-template) |-| -| Backend | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) | [youlai-boot](https://gitcode.net/youlai/youlai-boot) | - -## Environment Setup - -| Environment | Name and Version | Download Link | -| -------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ | -| **Development Tool** | VSCode | [Download](https://code.visualstudio.com/Download) | -| **Runtime Environment** | Node ≥18 | [Download](http://nodejs.cn/download) | - - -## Project Setup - -```bash -# Clone the repository -git clone https://gitee.com/youlaiorg/vue3-element-admin.git - -# Change directory -cd vue3-element-admin - -# Install pnpm -npm install pnpm -g - -# Install dependencies -pnpm install - -# Start the project -pnpm run dev -``` - -## Project Deployment - -```bash -# Build the project -pnpm run build - -# Upload files to the remote server -Copy the files generated in the `dist` directory to the `/usr/share/nginx/html` directory. - -# nginx.cofig configuration -server { - listen 80; - server_name localhost; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - # Reverse proxy configuration - location /prod-api/ { - proxy_pass http://vapi.youlai.tech/; # Replace vapi.youlai.tech with your backend API address - } -} -``` - -## Local Mock - -The project supports both online API and local mock API. By default, it uses the online API. If you want to switch to the mock API, modify the value of `VITE_MOCK_DEV_SERVER` in the `.env.development` file to `true`. - -## Backend API - -> If you have a basic understanding of Java development, follow these steps to convert online API to local backend API and set up a full-stack development environment. - -1. Get the backend source code based on `Java` and `SpringBoot` from [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git). -2. Follow the instructions in the backend project's README.md to set up the local environment. -3. Modify the value of `VITE_APP_API_URL` in the `.env.development` file to `http://localhost:8989`, replacing it with the backend API URL. - -## Notes - -- **Auto import plugin is disabled by default** - - Component type declarations have been automatically generated for the template project. If you add and use new components, follow the instructions in the screenshot to enable automatic generation. After automatic generation is complete, remember to set it back to `false` to avoid conflicts. - - ![](https://foruda.gitee.com/images/1687755823137387608/412ea803_716974.png) - -- **Blank page when accessing the project** - - Try upgrading your browser, as older browser engines may not support certain new JavaScript syntax, such as optional chaining operator `?.`. - -- **Red highlight on project components, functions, and imports** - - Restart VSCode to try again. - -- **Other issues** - - If you have any other issues or suggestions, please open an [issue](https://gitee.com/youlaiorg/vue3-element-admin/issues/new). - -## Project Documentation - -- [Building a Backend Management System from Scratch with Vue3, Vite, TypeScript, and Element-Plus](https://blog.csdn.net/u013737132/article/details/130191394) - -- [ESLint+Prettier+Stylelint+EditorConfig for Standardized and Unified Frontend Code Style](https://blog.csdn.net/u013737132/article/details/130190788) -- [Git Commit Conventions with Husky, Lint-staged, Commitlint, Commitizen, and cz-git](https://blog.csdn.net/u013737132/article/details/130191363) - -## Commit Conventions - -Execute `pnpm run commit` to invoke interactive git commit and complete the information input and selection according to the prompts. - -![](https://foruda.gitee.com/images/1687755823165218215/c1705416_716974.png) - -## Community 🚀 - -> **Follow "Youlai Tech" WeChat Official Account to get the QR code for the community.** -> -> If the QR code for the community has expired, please add my WeChat (haoxianrui) and indicate whether you are interested in "Frontend", "Backend", or "Full Stack" to get the latest QR code. -> -> This measure is taken to ensure the quality of the community and prevent marketing advertising from infiltrating. Thank you for your understanding! - -| Official Account | Community | -|:----:|:----:| -| ![Youlai Tech WeChat Official Account QR Code](https://foruda.gitee.com/images/1687689212187063809/3c69eaee_716974.png) | ![Community QR Code](https://foruda.gitee.com/images/1687689212139273561/6a65ef69_716974.png) | - diff --git a/src/api/system/order.ts b/src/api/system/order.ts new file mode 100644 index 0000000..e4f77c1 --- /dev/null +++ b/src/api/system/order.ts @@ -0,0 +1,216 @@ +import request from "@/utils/request"; +import { System_BaseUrl } from "@/api/config"; +const baseURL = System_BaseUrl + "/admin/order"; +const OrderApi = { + getList(params: getListRequest) { + return request({ + url: `${baseURL}`, + method: "get", + params: params, + }); + }, + add() {}, + edit() {}, + delete() {}, +}; + +export default OrderApi; +// 订单状态 +export type statusType = + | "unpaid" + | "in-production" + | "wait-out" + | "done" + | "refunding" + | "refund" + | "part-refund" + | "cancelled" + | ""; + +// 发货类型 +export type sendType = "post" | "takeaway" | "takeself" | "table" | ""; +//订单类型 +export type orderType = "cash" | "miniapp" | "offline" | ""; +//是否回收站 0-否,1回收站 默认查未删除 +export type isDel = 0 | 1; + +export interface getListRequest { + endTime?: string; + /** + * 是否回收站 0-否,1回收站 默认查未删除 + */ + isDel?: isDel; + /** + * 订单编号 + */ + orderNo?: string; + /** + * 订单类型-cash收银-miniapp小程序-offline线下 + */ + orderType?: orderType; + /** + * 支付类型 + */ + payType?: string; + /** + * 平台类型 + */ + platformType?: string; + /** + * 查询包含该商品的 所有订单 + */ + productName?: string; + /** + * 发货类型post快递,takeaway外卖,takeself,自提table---堂食 + */ + sendType?: sendType; + /** + * 店铺Id + */ + shopId?: number; + startTime?: string; + /** + * 状态: unpaid-待支付;in-production 制作中;wait-out + * 待取餐;;done-订单完成;refunding-申请退单;refund-退单;part-refund 部分退单;cancelled-取消订单 + */ + status?: statusType; + /** + * 台桌id + */ + tableId?: string; + /** + * 台桌名称 + */ + tableName?: string; + [property: string]: any; +} + +/** + * CzgResultPageOrderInfoVo + */ +export interface getListResponse { + code?: number; + data?: PageOrderInfoVo; + msg?: string; + [property: string]: any; +} + +/** + * PageOrderInfoVo + */ +export interface PageOrderInfoVo { + maxPageSize?: number; + optimizeCountQuery?: boolean; + pageNumber?: number; + pageSize?: number; + records?: OrderInfoVo[]; + totalPage?: number; + totalRow?: number; + [property: string]: any; +} + +/** + * 订单表 通用展示类 + * + * OrderInfoVo + */ +export interface OrderInfoVo { + createTime?: string; + /** + * 用餐模式 堂食 dine-in 外带 take-out 外卖 take-away + */ + dineMode?: string; + /** + * 订单商品列表 + */ + goods?: OrderDetailSmallVO[]; + id?: number; + /** + * 是否使用了霸王餐 + */ + isFreeDine?: number; + /** + * 订单金额 (扣除各类折扣) + */ + orderAmount?: number; + /** + * 订单编号 + */ + orderNo?: string; + /** + * 订单类型- + * cash收银(除小程序以外 都属于收银) + * miniapp小程序 + */ + orderType?: orderType; + /** + * 订单原金额 不含折扣价格 + */ + originAmount?: number; + /** + * 支付时间 + */ + paidTime?: string; + /** + * 实际支付金额 + */ + payAmount?: number; + /** + * 支付订单号 + */ + payOrderNo?: string; + /** + * 支付类型 + * 主扫 main-scan + * 被扫 back-scan + * 微信小程序 wechat-mini + * 支付宝小程序 alipay-mini + * 会员支付 vip-pay + * 现金支付 cash-pay + */ + payType?: string; + /** + * 平台类型 pc 收银机客户端 wechat 微信小程序 alipay 支付宝小程序 admin-pc PC管理端 admin-app APP管理端 + */ + platformType?: string; + /** + * 是否支持退款,1支持退单, 0不支持退单 + */ + refundAble?: number; + /** + * 退单金额 + */ + refundAmount?: number; + /** + * 备注 + */ + remark?: string; + /** + * 店铺Id + */ + shopId?: string; + /** + * 状态: unpaid-待支付;in-production 制作中;wait-out + * 待取餐;;done-订单完成;refunding-申请退单;refund-退单;part-refund 部分退单;cancelled-取消订单 + */ + status?: statusType; + /** + * 台桌名称 + */ + tableName?: string; + [property: string]: any; +} + +/** + * 订单详情 实体类。 + * + * OrderDetailSmallVO + */ +export interface OrderDetailSmallVO { + num?: number; + productImg?: string; + productName?: string; + refundNum?: number; + skuName?: string; + [property: string]: any; +} diff --git a/src/api/system/version.ts b/src/api/system/version.ts index b5df642..f34499c 100644 --- a/src/api/system/version.ts +++ b/src/api/system/version.ts @@ -4,14 +4,28 @@ const baseURL = System_BaseUrl + "/admin/version"; const VersionApi = { getList() { - return request({ + return request({ url: `${baseURL}/list`, method: "get", }); }, + add(data: addRequest) { + return request({ + url: `${baseURL}`, + method: "post", + data, + }); + }, + edit(data: editRequest) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, delete(id: string) { return request({ - url: `${baseURL}/id`, + url: `${baseURL}/` + id, method: "delete", }); }, @@ -19,7 +33,7 @@ const VersionApi = { export default VersionApi; -export interface getListResponse { +export interface versionForm { /** * 版本 id */ @@ -50,3 +64,62 @@ export interface getListResponse { version?: string; [property: string]: any; } + +export interface addRequest { + /** + * 是否强制更新,0:不强制更新;1:强制更新 + */ + isForce: number; + /** + * 更新内容 + */ + message: string; + /** + * 渠道,pc 桌面端, manager_app 管理端, phone_book 电话机点餐 + */ + source: string; + /** + * 类型,0 windows,1 安卓,2 iOS + */ + type: string; + /** + * 下载地址 + */ + url: string; + /** + * 版本号 + */ + version: string; + [property: string]: any; +} +export interface editRequest { + /** + * 版本id,ID 编号 + */ + id: number; + /** + * 是否强制升级,0:不强制更新;1:强制更新 + */ + isForce: number; + /** + * 更新内容 + */ + message: string; + /** + * 渠道,pc 桌面端, manager_app 管理端, phone_book 电话机点餐 + */ + source: string; + /** + * 类型,0 windows,1 安卓,2 iOS + */ + type: string; + /** + * 下载地址 + */ + url: string; + /** + * 版本号 + */ + version: string; + [property: string]: any; +} diff --git a/src/components/CURD/PageForm.vue b/src/components/CURD/PageForm.vue index 87fea8e..c1f73c4 100644 --- a/src/components/CURD/PageForm.vue +++ b/src/components/CURD/PageForm.vue @@ -28,7 +28,7 @@ - -