From 940ceee222f153d418329b8ea5a470be1141ece0 Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Wed, 9 Oct 2024 09:33:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/settings.js | 53 +++++++++--------- src/views/product/components/stockHistory.vue | 13 ++++- src/views/product/index.vue | 55 ++++++++++--------- 3 files changed, 67 insertions(+), 54 deletions(-) diff --git a/src/settings.js b/src/settings.js index 71195ba..94719f3 100644 --- a/src/settings.js +++ b/src/settings.js @@ -2,7 +2,7 @@ module.exports = { /** * @description 网站标题 */ - title: '管理后台', + title: "管理后台", /** * @description 是否显示 tagsView */ @@ -22,7 +22,7 @@ module.exports = { /** * @description token key */ - TokenKey: 'ELADMIN-TOEKN', + TokenKey: "ELADMIN-TOEKN", /** * @description 请求超时时间,毫秒(默认2分钟) */ @@ -38,36 +38,37 @@ module.exports = { /** * 底部文字,支持html语法 */ - footerTxt: '© 2018-2024 超掌柜科技 Apache License 2.0', + footerTxt: + '© 2018-2024 超掌柜科技 Apache License 2.0', /** * 备案号 */ - caseNumber: '陕ICP备2022008069号', + caseNumber: "陕ICP备2022008069号", typeEnum: [ { - label: '计量商品', - intro: '单价购买', - typeEnum: 'normal' + label: "单规格", + intro: "单价购买", + typeEnum: "normal" }, { - label: '多规格', - intro: '多种不同规格', - typeEnum: 'sku' - }, - { - label: '套餐商品', - intro: '选职多种组合', - typeEnum: 'group' - }, - { - label: '称重商品', - intro: '按重量售卖', - typeEnum: 'weight' - }, - { - label: '时价商品', - intro: '收银端可更改价格', - typeEnum: 'currentPrice' + label: "多规格", + intro: "多种不同规格", + typeEnum: "sku" } + // { + // label: '套餐商品', + // intro: '选职多种组合', + // typeEnum: 'group' + // }, + // { + // label: '称重商品', + // intro: '按重量售卖', + // typeEnum: 'weight' + // }, + // { + // label: '时价商品', + // intro: '收银端可更改价格', + // typeEnum: 'currentPrice' + // } ] -} +}; diff --git a/src/views/product/components/stockHistory.vue b/src/views/product/components/stockHistory.vue index 1bd95c8..a07f500 100644 --- a/src/views/product/components/stockHistory.vue +++ b/src/views/product/components/stockHistory.vue @@ -42,6 +42,12 @@ import dayjs from 'dayjs' import { tbProductStockDetailStock } from '@/api/shop.js' export default { + props: { + query: { + type: Object, + default: {} + } + }, data() { return { dayjs, @@ -77,7 +83,12 @@ export default { page: this.tableData.page, size: this.tableData.size, shopId: localStorage.getItem('shopId'), - column: this.key + column: this.key, + productName: this.query.name, + categoryId: this.query.categoryId, + type: this.query.typeEnum, + startTime: this.query.createdAt[0] || '', + endTime: this.query.createdAt[1] || '', }) this.tableData.loading = false this.tableData.data = res.content diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 5c47368..e8eeb76 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -1,32 +1,22 @@ - - - - - - - - - - - - - - - - - - - - 查询 - 重置 - 库存预警:{{ warnLine }} - - + + + + + + + + + + + 查询 + 重置 + 库存预警:{{ warnLine }} + @@ -149,6 +139,7 @@ {{ scope.row.conInfos | conInfosFilter }} + @@ -216,7 +207,7 @@ - + @@ -430,6 +421,7 @@ export default { queryHandle() { localStorage.setItem('shopIndexQuery', JSON.stringify(this.query)) this.getTableData() + this.tbProductStockDetailStockCount() }, //表格拖拽 tableDrag() { @@ -474,9 +466,11 @@ export default { this.query.categoryId = '' this.query.typeEnum = '' this.query.productId = '' + this.query.createdAt = [] this.tableData.page = 0 localStorage.setItem('shopIndexQuery', JSON.stringify(this.query)) this.getTableData() + this.tbProductStockDetailStockCount() }, // 分页回调 paginationChange(e) { @@ -561,6 +555,13 @@ export default { justify-content: space-between; } +.flex { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; +} + .data_wrap { display: flex; justify-content: space-between;