diff --git a/.editorconfig b/.editorconfig index 2326a69..81e2335 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,30 +1,15 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# 表示是最顶层的配置文件 root = true -# 对所有文件生效 [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -# 对 JS、TS、Vue 文件的配置 -[*.{js,jsx,ts,tsx,vue}] -indent_style = tab -indent_size = 2 - -# 对 JSON、YAML 文件的配置 -[*.{json,yml,yaml}] -indent_style = tab -indent_size = 2 - -# 对 Markdown 文件的配置 -[*.md] +insert_final_newline = false trim_trailing_whitespace = false +indent_style = space +indent_size = 2 +[*.{js,ts,vue,json}] +indent_size = 2 - - - +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 4b2eea7..a56dfc6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,37 +1,12 @@ -# 设置默认行为,以防人们没有设置 core.autocrlf -* text=auto - -# 明确声明你想要始终规范化并在检出时转换为原生行结束符的文本文件 -*.vue text eol=lf +# 禁用行尾转换 +* text=auto eol=lf *.js text eol=lf *.ts text eol=lf -*.jsx text eol=lf -*.tsx text eol=lf +*.vue text eol=lf *.json text eol=lf -*.css text eol=lf -*.scss text eol=lf -*.sass text eol=lf -*.html text eol=lf -*.htm text eol=lf -*.xml text eol=lf -*.md text eol=lf -*.yml text eol=lf -*.yaml text eol=lf - -# 明确声明你不想规范化并希望原样保留的文件 -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.svg binary -*.eot binary -*.ttf binary -*.woff binary -*.woff2 binary -*.otf binary - - - - +# 禁用空白行处理 +*.js -whitespace +*.ts -whitespace +*.vue -whitespace +*.json -whitespace \ No newline at end of file diff --git a/.gitignore b/.gitignore index e5d97f3..30119dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,48 @@ -.DS_Store -node_modules -/dist -docker/dist +# Cursor +.cursor/ +.cursorrules +.cursorignore +# IDE +.vscode/ +.idea/ -# local env files -.env -.env.development -.env.prod -.env.dev-local -.env.*.local +# 临时文件 +*.tmp +*.temp -# Log files +# 日志文件 +*.log npm-debug.log* yarn-debug.log* yarn-error.log* -pnpm-debug.log* -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? +# 依赖目录 +node_modules/ +.pnpm-store/ -# lock -package-lock.json -yarn.lock -pnpm-lock.yaml +# 构建输出 +dist/ +build/ -.env.development +.env.local +.env.development.local +.env.test.local + + +# 操作系统文件 +.DS_Store +Thumbs.db + +# 编辑器文件 +*.swp +*.swo +*~ + +# 测试覆盖率 +coverage/ +.nyc_output/ + +# 缓存文件 +.cache/ +.parcel-cache/ \ No newline at end of file diff --git a/package.json b/package.json index 6db2dfa..42327a2 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@axolo/json-editor-vue": "^0.3.2", "@chenfengyuan/vue-qrcode": "^2.0.0", "@element-plus/icons-vue": "^2.0.10", + "@map-component/vue-tmap": "^1.0.1", "@popperjs/core": "2.11.8", "@vueuse/core": "^10.4.1", "@vxe-ui/plugin-render-element": "^4.0.10", diff --git a/src/api/supermarketerp/inventoryInOutReport.ts b/src/api/supermarketerp/inventoryInOutReport.ts new file mode 100644 index 0000000..f0d00ce --- /dev/null +++ b/src/api/supermarketerp/inventoryInOutReport.ts @@ -0,0 +1,44 @@ +import request from "/@/utils/request" +import type { + InventoryInOutQueryParams, + InventoryInOutPageApiResponse, + InventoryInOutListApiResponse, + InventoryInOutSummaryApiResponse, +} from "./types/inventoryInOutReport" + +// 分页查询进销存报表 +export function getInventoryInOutPage(params?: InventoryInOutQueryParams): Promise { + return request({ + url: "/supermarket/report/inventory-inout/page", + method: "get", + params, + }) +} + +// 列表查询进销存报表(用于导出) +export function getInventoryInOutList(params?: InventoryInOutQueryParams): Promise { + return request({ + url: "/supermarket/report/inventory-inout/list", + method: "get", + params, + }) +} + +// 获取进销存汇总统计 +export function getInventoryInOutSummary(params?: InventoryInOutQueryParams): Promise { + return request({ + url: "/supermarket/report/inventory-inout/summary", + method: "get", + params, + }) +} + +// 导出Excel(后端直接导出) +export function exportInventoryInOutExcel(params?: InventoryInOutQueryParams): Promise { + return request({ + url: "/supermarket/report/inventory-inout/export", + method: "get", + params, + responseType: 'blob' + }) +} diff --git a/src/api/supermarketerp/report.ts b/src/api/supermarketerp/report.ts index b287795..dacc73b 100644 --- a/src/api/supermarketerp/report.ts +++ b/src/api/supermarketerp/report.ts @@ -17,3 +17,100 @@ export function getInventoryPageSum(params?: object) { params, }) } + +// 导出出入库明细 orderType: 1入库 2出库 +export function exportInventory(params?: object) { + return request({ + url: "/supermarket/smErpInventoryRecords/inventoryType/export", + method: "get", + params, + }) +} + +// ==================== 新增报表接口 ==================== + +// 1. 进货单明细 +export function getPurchaseDetailPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/purchaseDetail/page", + method: "get", + params, + }) +} + +// 2. 退货单明细 +export function getReturnDetailPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/returnDetail/page", + method: "get", + params, + }) +} + +// 3. 进销存报表 +export function getInventoryReportPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/inventory/page", + method: "get", + params, + }) +} + +export function getInventoryReportList(params?: object) { + return request({ + url: "/supermarket/superMarketReport/inventory/list", + method: "get", + params, + }) +} + +// 4. 毛利报表 +export function getProfitReportPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/profit/page", + method: "get", + params, + }) +} + +export function getProfitReportList(params?: object) { + return request({ + url: "/supermarket/superMarketReport/profit/list", + method: "get", + params, + }) +} + +// 5. 销售报表 +export function getSalesReportPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/sales/page", + method: "get", + params, + }) +} + +export function getSalesReportList(params?: object) { + return request({ + url: "/supermarket/superMarketReport/sales/list", + method: "get", + params, + }) +} + +// 6. 盘存报表 +export function getStocktakeReportPage(params?: object) { + return request({ + url: "/supermarket/superMarketReport/stocktake/page", + method: "get", + params, + }) +} + +export function getStocktakeReportList(params?: object) { + return request({ + url: "/supermarket/superMarketReport/stocktake/list", + method: "get", + params, + }) +} \ No newline at end of file diff --git a/src/api/supermarketerp/supermarketCategory.ts b/src/api/supermarketerp/supermarketCategory.ts index 7c238f0..64c9b8f 100644 --- a/src/api/supermarketerp/supermarketCategory.ts +++ b/src/api/supermarketerp/supermarketCategory.ts @@ -39,3 +39,13 @@ export function putObj(obj?: Object) { }) } +/** + * 下拉 + */ +export function getSimpleCategoryAll() { + return request({ + url: '/supermarket/supermarketCategory/simpleAll', + method: 'get', + }) +} + diff --git a/src/api/wallet/mch-pick-up.ts b/src/api/wallet/mch-pick-up.ts new file mode 100644 index 0000000..2453349 --- /dev/null +++ b/src/api/wallet/mch-pick-up.ts @@ -0,0 +1,40 @@ +import request from "/@/utils/request" + +export function fetchList(query?: Object) { + return request({ + url: "/wallet/mch-pick-up/page", + method: "get", + params: query, + }) +} + +export function addObj(obj?: Object) { + return request({ + url: "/wallet/mch-pick-up", + method: "post", + data: obj, + }) +} + +export function getObj(id?: string) { + return request({ + url: "/wallet/mch-pick-up/" + id, + method: "get", + }) +} + +export function delObjs(ids?: Object) { + return request({ + url: "/wallet/mch-pick-up", + method: "delete", + data: ids, + }) +} + +export function putObj(obj?: Object) { + return request({ + url: "/wallet/mch-pick-up", + method: "put", + data: obj, + }) +} diff --git a/src/api/wallet/wallet-transaction.ts b/src/api/wallet/wallet-transaction.ts index e4c58d3..479deca 100644 --- a/src/api/wallet/wallet-transaction.ts +++ b/src/api/wallet/wallet-transaction.ts @@ -15,6 +15,14 @@ export function pageTh(query?: any) { }) } +export function thTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/th-total", + method: "post", + data: data, + }) +} + export function pageCz(query?: any) { return request({ url: "/wallet/wallet-transaction/page-cz", @@ -27,6 +35,14 @@ export function pageCz(query?: any) { }) } +export function czTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/cz-total", + method: "post", + data: data, + }) +} + export function pageJz(query?: any) { return request({ url: "/wallet/wallet-transaction/page-jz", @@ -39,6 +55,14 @@ export function pageJz(query?: any) { }) } +export function jzTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/jz-total", + method: "post", + data: data, + }) +} + export function pageXf(query?: any) { return request({ url: "/wallet/wallet-transaction/page-xf", @@ -51,6 +75,14 @@ export function pageXf(query?: any) { }) } +export function xfTotal(data: any) { + return request({ + url: "/wallet/wallet-transaction/xf-total", + method: "post", + data: data, + }) +} + export function pageTk(query?: any) { return request({ url: "/wallet/wallet-transaction/page-tk", @@ -63,6 +95,14 @@ export function pageTk(query?: any) { }) } +export function tkTotal(data: any) { + return request({ + url: "/wallet/wallet-transaction/tk-total", + method: "post", + data: data, + }) +} + export function updateBalance(obj?: Object) { return request({ url: "/wallet/wallet-transaction/update-balance", diff --git a/src/components/BusinessHours/index.vue b/src/components/BusinessHours/index.vue new file mode 100644 index 0000000..7e8aa79 --- /dev/null +++ b/src/components/BusinessHours/index.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/src/components/Select/SelectMch.vue b/src/components/Select/SelectMch.vue index b0cc2e8..3c11246 100644 --- a/src/components/Select/SelectMch.vue +++ b/src/components/Select/SelectMch.vue @@ -1,17 +1,7 @@ @@ -31,12 +60,21 @@ const form = reactive({ nutritionSetting: { // 喜爱菜品排行需要排除的菜品分类 topExcludeCategoryIds: [], + // 荤菜菜品分类 + hcCategoryIds: [], + // 素菜菜品分类 + scCategoryIds: [], + // 主食菜品分类 + zsCategoryIds: [], }, }) const dataRules = ref({ // 车辆考勤配置 "nutritionSetting.topExcludeCategoryIds": [{ required: true, message: '喜爱菜品排行需要排除的菜品分类不能为空', trigger: 'blur' }], + "nutritionSetting.hcCategoryIds": [{ required: true, message: '荤菜菜品分类不能为空', trigger: 'blur' }], + "nutritionSetting.scCategoryIds": [{ required: true, message: '素菜菜品分类不能为空', trigger: 'blur' }], + "nutritionSetting.zsCategoryIds": [{ required: true, message: '主食菜品分类不能为空', trigger: 'blur' }], }) onMounted(() => { @@ -50,6 +88,9 @@ async function getSetting() { if (!data.nutritionSetting) { data.nutritionSetting = { topExcludeCategoryIds: [], + hcCategoryIds: [], + scCategoryIds: [], + zsCategoryIds: [], } } if (data) { diff --git a/src/views/supermarketerp/report/inventory/index.vue b/src/views/supermarketerp/report/inventory/index.vue new file mode 100644 index 0000000..7bc11a5 --- /dev/null +++ b/src/views/supermarketerp/report/inventory/index.vue @@ -0,0 +1,190 @@ + + + + diff --git a/src/views/supermarketerp/report/jsxs/components/ProductRankingTable.vue b/src/views/supermarketerp/report/jsxs/components/ProductRankingTable.vue index 474f965..fe2491f 100644 --- a/src/views/supermarketerp/report/jsxs/components/ProductRankingTable.vue +++ b/src/views/supermarketerp/report/jsxs/components/ProductRankingTable.vue @@ -345,3 +345,12 @@ const handleCurrentChange = (page: number) => { + + + + + + + + + diff --git a/src/views/supermarketerp/report/jsxs/components/SalesChart.vue b/src/views/supermarketerp/report/jsxs/components/SalesChart.vue index 4f5417d..fcb8a1e 100644 --- a/src/views/supermarketerp/report/jsxs/components/SalesChart.vue +++ b/src/views/supermarketerp/report/jsxs/components/SalesChart.vue @@ -195,3 +195,12 @@ defineExpose({ + + + + + + + + + diff --git a/src/views/supermarketerp/report/jsxs/components/SummaryCard.vue b/src/views/supermarketerp/report/jsxs/components/SummaryCard.vue index a75da1c..6fa56fa 100644 --- a/src/views/supermarketerp/report/jsxs/components/SummaryCard.vue +++ b/src/views/supermarketerp/report/jsxs/components/SummaryCard.vue @@ -211,3 +211,12 @@ const trendClass = computed(() => { + + + + + + + + + diff --git a/src/views/supermarketerp/report/jsxs/components/index.ts b/src/views/supermarketerp/report/jsxs/components/index.ts index b0167b7..24690fa 100644 --- a/src/views/supermarketerp/report/jsxs/components/index.ts +++ b/src/views/supermarketerp/report/jsxs/components/index.ts @@ -16,3 +16,12 @@ export { default as ProductRankingTable } from './ProductRankingTable.vue'; + + + + + + + + + diff --git a/src/views/supermarketerp/report/jsxs/constants/index.ts b/src/views/supermarketerp/report/jsxs/constants/index.ts index d6c3f85..7e3de21 100644 --- a/src/views/supermarketerp/report/jsxs/constants/index.ts +++ b/src/views/supermarketerp/report/jsxs/constants/index.ts @@ -216,3 +216,12 @@ export const SUCCESS_MESSAGES = { + + + + + + + + + diff --git a/src/views/supermarketerp/report/jsxs/utils/index.ts b/src/views/supermarketerp/report/jsxs/utils/index.ts index e8f36d6..edf6d8d 100644 --- a/src/views/supermarketerp/report/jsxs/utils/index.ts +++ b/src/views/supermarketerp/report/jsxs/utils/index.ts @@ -205,3 +205,12 @@ export const TABLE_CONFIG = { + + + + + + + + + diff --git a/src/views/supermarketerp/report/jxc/FLOW.md b/src/views/supermarketerp/report/jxc/FLOW.md new file mode 100644 index 0000000..ad791b9 --- /dev/null +++ b/src/views/supermarketerp/report/jxc/FLOW.md @@ -0,0 +1,143 @@ +# 进销存报表功能流程 + +## 页面布局流程 + +``` +┌─────────────────────────────────────────────────────────────┐ +│ 页面头部 │ +│ ┌─────────────────┐ ┌─────────────────┐ │ +│ │ 进销存报表 │ │ 刷新数据按钮 │ │ +│ │ 统计商品库存变化 │ │ │ │ +│ └─────────────────┘ └─────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 查询条件区域 │ +│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐│ +│ │时间范围 │ │商品名称 │ │商品编码 │ │分类选择 │ │仓库选择 ││ +│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘│ +│ ┌─────────┐ ┌─────────────────────────────────────────────┐│ +│ │仅显示有 │ │ 查询/重置/导出按钮 ││ +│ │发生额 │ │ ││ +│ └─────────┘ └─────────────────────────────────────────────┘│ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 汇总统计卡片 │ +│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ +│ │商品总数 │ │总入库 │ │总出库 │ │库存周转 │ │ +│ │150 │ │3000.0 │ │2500.0 │ │率48% │ │ +│ │有发生额85│ │500000元 │ │200000元 │ │均价80元 │ │ +│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 数据表格 │ +│ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ +│ │商品 │ │商品 │ │分类 │ │单位 │ │期初 │ │入库 │ │出库 │ │ +│ │编码 │ │名称 │ │ │ │ │ │数量 │ │数量 │ │数量 │ │ +│ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │ +│ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ +│ │期末 │ │入库 │ │出库 │ │操作 │ │ +│ │数量 │ │金额 │ │金额 │ │ │ │ +│ └─────┘ └─────┘ └─────┘ └─────┘ │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 分页组件 │ +│ 共100条记录 每页10条 ← 1 2 3 4 5 → 跳转到第__页 │ +└─────────────────────────────────────────────────────────────┘ +``` + +## 数据流程 + +``` +用户输入查询条件 + │ + ▼ + 验证查询参数 + │ + ▼ +┌─────────────────┐ +│ 调用分页查询API │ +│ /page接口 │ +└─────────────────┘ + │ + ▼ +┌─────────────────┐ +│ 调用汇总统计API │ +│ /summary接口 │ +└─────────────────┘ + │ + ▼ + 更新页面数据 + │ + ▼ + 渲染表格和卡片 +``` + +## 导出流程 + +``` +用户点击导出按钮 + │ + ▼ + 显示确认对话框 + │ + ▼ + 用户确认导出 + │ + ▼ +┌─────────────────┐ +│ 调用导出API │ +│ /export接口 │ +└─────────────────┘ + │ + ▼ + 接收Excel文件流 + │ + ▼ + 创建下载链接 + │ + ▼ + 自动下载文件 +``` + +## 错误处理流程 + +``` +API调用失败 + │ + ▼ + 捕获错误信息 + │ + ▼ + 显示错误提示 + │ + ▼ + 加载模拟数据 + │ + ▼ + 继续正常显示 +``` + +## 响应式布局 + +``` +桌面端 (>= 768px) 移动端 (< 768px) +┌─────────────────┐ ┌─────────────────┐ +│ 水平排列查询条件 │ │ 垂直堆叠查询条件 │ +│ 4列汇总卡片 │ │ 1列汇总卡片 │ +│ 完整表格显示 │ │ 简化表格显示 │ +└─────────────────┘ └─────────────────┘ +``` + + + + + + diff --git a/src/views/supermarketerp/report/jxc/README.md b/src/views/supermarketerp/report/jxc/README.md new file mode 100644 index 0000000..27e09c5 --- /dev/null +++ b/src/views/supermarketerp/report/jxc/README.md @@ -0,0 +1,135 @@ +# 进销存报表功能 + +## 功能概述 + +进销存报表模块用于统计商品在特定时间段内的库存变化情况,包括: + +- **期初库存**:统计期初始时的库存数量 +- **入库数量及金额**:统计期内所有入库操作的数量和金额 +- **出库数量及金额**:统计期内所有出库操作的数量和金额 +- **期末库存**:统计期结束时的库存数量 + +支持按商品、分类、时间范围等多维度查询,并提供分页和导出功能。 + +## 文件结构 + +``` +src/views/supermarketerp/report/jxc/ +├── index.vue # 主页面组件 +└── README.md # 说明文档 + +src/api/supermarketerp/ +└── inventoryInOutReport.ts # API接口文件 +``` + +## 主要功能 + +### 1. 查询条件 +- **时间范围**:支持日期范围选择器 +- **商品名称**:支持模糊查询 +- **商品编码**:支持模糊查询 +- **分类**:下拉选择器 +- **仓库**:下拉选择器 +- **仅显示有发生额**:复选框,过滤无变动商品 + +### 2. 汇总统计卡片 +- **商品总数**:显示总商品数和有发生额商品数 +- **总入库**:显示总入库数量和金额 +- **总出库**:显示总出库数量和金额 +- **库存周转率**:显示周转率和平均单价 + +### 3. 数据表格 +- **商品编码**:商品唯一标识 +- **商品名称**:商品名称 +- **分类**:商品分类 +- **单位**:基础单位 +- **期初数量**:统计期初始库存 +- **入库数量**:统计期内入库总量 +- **出库数量**:统计期内出库总量 +- **期末数量**:统计期结束库存 +- **入库金额**:统计期内入库总金额 +- **出库金额**:统计期内出库总金额 + +### 4. 分页功能 +- 支持页码切换 +- 支持每页显示条数切换(10、20、50、100) +- 显示总记录数 + +### 5. 导出功能 +- 支持导出Excel文件 +- 导出文件名包含查询时间范围 +- 后端直接生成Excel文件 + +## API接口 + +### 1. 分页查询 +```typescript +getInventoryInOutPage(params) +// URL: /admin/report/inventory-inout/page +// Method: GET +``` + +### 2. 汇总统计 +```typescript +getInventoryInOutSummary(params) +// URL: /admin/report/inventory-inout/summary +// Method: GET +``` + +### 3. 导出Excel +```typescript +exportInventoryInOutExcel(params) +// URL: /admin/report/inventory-inout/export +// Method: GET +``` + +## 权限要求 + +- **查看权限**:`supermarket_inventoryInOutReport_view` +- **导出权限**:`supermarket_inventoryInOutReport_export` + +## 使用说明 + +1. **进入页面**:导航到超市ERP > 报表 > 进销存报表 +2. **设置查询条件**:选择时间范围和其他过滤条件 +3. **点击查询**:获取符合条件的数据 +4. **查看汇总**:在卡片区域查看关键指标 +5. **浏览详情**:在表格中查看详细数据 +6. **导出数据**:点击导出按钮下载Excel文件 + +## 技术特性 + +- **响应式设计**:支持移动端和桌面端 +- **实时查询**:查询条件变化时自动重新加载数据 +- **错误处理**:网络异常时显示模拟数据 +- **加载状态**:查询和导出时显示加载状态 +- **数据格式化**:货币、数字、百分比格式化显示 + +## 样式特点 + +- **现代化UI**:使用Element Plus组件库 +- **渐变卡片**:汇总统计卡片使用渐变背景 +- **悬停效果**:卡片和按钮支持悬停动画 +- **响应式布局**:移动端自动调整布局 + +## 注意事项 + +1. **时间范围**:建议查询时间范围不超过1年 +2. **数据量**:导出数据量建议控制在10000条以内 +3. **权限**:确保用户具有相应的查看和导出权限 +4. **网络**:网络异常时会使用模拟数据展示 + +## 更新日志 + +- **v1.0.0** (2024-12-19) + - 初始版本发布 + - 实现基础查询功能 + - 实现汇总统计功能 + - 实现导出Excel功能 + - 完善响应式设计 + + + + + + diff --git a/src/views/supermarketerp/report/jxc/index.vue b/src/views/supermarketerp/report/jxc/index.vue new file mode 100644 index 0000000..61f0c56 --- /dev/null +++ b/src/views/supermarketerp/report/jxc/index.vue @@ -0,0 +1,630 @@ + + + + + diff --git a/src/views/supermarketerp/report/profit/index.vue b/src/views/supermarketerp/report/profit/index.vue new file mode 100644 index 0000000..1d11c82 --- /dev/null +++ b/src/views/supermarketerp/report/profit/index.vue @@ -0,0 +1,155 @@ + + + + diff --git a/src/views/supermarketerp/report/purchaseDetail/index.vue b/src/views/supermarketerp/report/purchaseDetail/index.vue new file mode 100644 index 0000000..e274a99 --- /dev/null +++ b/src/views/supermarketerp/report/purchaseDetail/index.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/views/supermarketerp/report/returnDetail/index.vue b/src/views/supermarketerp/report/returnDetail/index.vue new file mode 100644 index 0000000..b899bae --- /dev/null +++ b/src/views/supermarketerp/report/returnDetail/index.vue @@ -0,0 +1,109 @@ + + + + diff --git a/src/views/supermarketerp/report/sales/index.vue b/src/views/supermarketerp/report/sales/index.vue new file mode 100644 index 0000000..8ef1fe0 --- /dev/null +++ b/src/views/supermarketerp/report/sales/index.vue @@ -0,0 +1,178 @@ + + + + diff --git a/src/views/supermarketerp/report/stocktake/index.vue b/src/views/supermarketerp/report/stocktake/index.vue new file mode 100644 index 0000000..af0625c --- /dev/null +++ b/src/views/supermarketerp/report/stocktake/index.vue @@ -0,0 +1,192 @@ + + + + diff --git a/src/views/supermarketerp/report/warehousing/index.vue b/src/views/supermarketerp/report/warehousing/index.vue index b3286c0..f6ba6c5 100644 --- a/src/views/supermarketerp/report/warehousing/index.vue +++ b/src/views/supermarketerp/report/warehousing/index.vue @@ -6,15 +6,17 @@ - - - + + + 查询 重置 @@ -25,6 +27,7 @@
({ orderType: 1, }, pageList: getInventoryPage, + isPage: true, }) -const { getDataList, currentChangeHandle, sizeChangeHandle, downBlobFile, tableStyle } = useTable(state) +// 包装 getDataList 方法,处理日期范围 +const { getDataList: originalGetDataList, currentChangeHandle, sizeChangeHandle, downBlobFile, tableStyle } = useTable(state) + +const getDataList = () => { + // 处理日期范围 + if (state.queryForm.dateRange && state.queryForm.dateRange.length === 2) { + state.queryForm.startDate = state.queryForm.dateRange[0] + state.queryForm.endDate = state.queryForm.dateRange[1] + } else { + state.queryForm.startDate = undefined + state.queryForm.endDate = undefined + } + originalGetDataList() +} // 清空搜索条件 const resetQuery = () => { @@ -89,6 +106,15 @@ const selectionChangHandle = (objs: { id: string }[]) => { // 导出excel const exportExcel = () => { - downBlobFile("/supermarketerp/smErpInventoryWarning/export", Object.assign(state.queryForm, { ids: selectObjs }), "入库记录.xlsx") + // 处理日期范围 + const params: any = { ...state.queryForm } + if (params.dateRange && params.dateRange.length === 2) { + params.startDate = params.dateRange[0] + params.endDate = params.dateRange[1] + } + // 删除前端使用的 dateRange 字段 + delete params.dateRange + + downBlobFile("/supermarket/smErpInventoryRecords/inventoryType/export", params, "入库记录.xlsx") } diff --git a/src/views/test-jsonp.vue b/src/views/test-jsonp.vue new file mode 100644 index 0000000..997254d --- /dev/null +++ b/src/views/test-jsonp.vue @@ -0,0 +1,208 @@ + + + + + \ No newline at end of file diff --git a/src/views/wallet/wallet-cz/index.vue b/src/views/wallet/wallet-cz/index.vue index 5ff332a..f01be91 100644 --- a/src/views/wallet/wallet-cz/index.vue +++ b/src/views/wallet/wallet-cz/index.vue @@ -1,16 +1,9 @@