diff --git a/java-mall-app-shop-admin/api/order.js b/java-mall-app-shop-admin/api/order.js index 872b96e..5ea888a 100644 --- a/java-mall-app-shop-admin/api/order.js +++ b/java-mall-app-shop-admin/api/order.js @@ -14,14 +14,15 @@ import config from "../config/config"; * status: 1, 1-进行中;2-超时的订单;3-退款的订单 * } * @returns { } - * @see https://mall.gpxscs.cn/mobile/shop/userOrder/mch/order/list + * @see https://mall.gpxscs.cn/admin/shop/shop-order-base/mch/order/list */ export function GetOrderList(params) { return http({ - url: "/shop/userOrder/mch/order/list", + url: "/shop/shop-order-base/mch/order/list", method: "post", data: params, + baseURL: config.adminApi, }); } diff --git a/java-mall-app-shop-admin/api/warehouse/classifyList.js b/java-mall-app-shop-admin/api/warehouse/classifyList.js new file mode 100644 index 0000000..b110804 --- /dev/null +++ b/java-mall-app-shop-admin/api/warehouse/classifyList.js @@ -0,0 +1,52 @@ +import http from "../../utils/http"; +import config from "../../config/config"; + +/** 获取店铺商品分类 + * + * @author Seven + * @data 2025-7-11 + * @returns { } + * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-category/list + */ + +export function GetCommodityClassify() { + return http({ + url: "/shop/shop-base-product-category/list", + method: "get", + baseURL: config.adminApi, + }); +} + +/** 修改店铺商品分类 + * + * @author Seven + * @data 2025-7-13 + * @returns { } + * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-category/edit + */ + +export function UpdateCommodityClassify(params) { + return http({ + url: "/shop/shop-base-product-category/edit", + method: "post", + params, + baseURL: config.adminApi, + }); +} + +/** 删除店铺商品分类 + * + * @author Seven + * @data 2025-7-13 + * @returns { category_id } + * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-category/delete + */ + +export function DelectCommodityClassify(params) { + return http({ + url: "/shop/shop-base-product-category/delete", + method: "post", + params, + baseURL: config.adminApi, + }); +} diff --git a/java-mall-app-shop-admin/api/warehouse/productList.js b/java-mall-app-shop-admin/api/warehouse/productList.js index 6aafee6..9cec28a 100644 --- a/java-mall-app-shop-admin/api/warehouse/productList.js +++ b/java-mall-app-shop-admin/api/warehouse/productList.js @@ -70,3 +70,21 @@ export function DelectCommodity(params) { baseURL: config.adminApi, }); } + +/** 获取商品规格 库存 和 价格 + * + * @author Seven + * @data 2025-7-6 + * @param { product_id } + * @returns { } + * @see https://mall.gpxscs.cn/api/admin/shop/shop-product-item/items?product_id=23591&source_lang=zh_CN + */ + +export function GetCommoditSpecification(params) { + return http({ + url: "/shop/shop-product-item/items", + method: "post", + params, + baseURL: config.adminApi, + }); +} diff --git a/java-mall-app-shop-admin/api/warehouse/typeManage.js b/java-mall-app-shop-admin/api/warehouse/typeManage.js new file mode 100644 index 0000000..b5a1036 --- /dev/null +++ b/java-mall-app-shop-admin/api/warehouse/typeManage.js @@ -0,0 +1,23 @@ +import http from "../../utils/http"; +import config from "../../config/config"; + +/** 获取店铺商品分类 + * + * @author Seven + * @data 2025-7-12 + * @params { + * pageNum + * pageSize + * } + * @returns { } + * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-product-type/list + */ + +export function GetTypeManageList(params) { + return http({ + url: "/shop/shop-base-product-type/list", + method: "get", + params, + baseURL: config.adminApi, + }); +} diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/batch.vue b/java-mall-app-shop-admin/pages/warehouse/manage/batch.vue index d55bdaf..cbec742 100644 --- a/java-mall-app-shop-admin/pages/warehouse/manage/batch.vue +++ b/java-mall-app-shop-admin/pages/warehouse/manage/batch.vue @@ -573,7 +573,7 @@ export default { height: 0, //scroll-view高度 top: 0, currentTab: 0, //预设当前项的值 - current: -1, // 手风琴状态 + current: 0, // 手风琴状态 scrollViewId: "id_0", commodityStatusList: [ { @@ -638,19 +638,7 @@ export default { showRightPopup: false, }; }, - computed: { - hasCheckboxValue() { - // 递归检查 checkboxList 是否有值 - const check = (items) => { - for (const item of items) { - if (item.checkboxList?.length > 0) return true; - if (item.children?.length > 0 && check(item.children)) return true; - } - return false; - }; - return check(this.tabbar); - }, - }, + computed: {}, onLoad: function (options) { setTimeout(() => { uni.getSystemInfo({ @@ -727,9 +715,8 @@ export default { // 应用递归函数处理整个 tabbar this.tabbar = resetCheckboxLists(res.data); - console.log(this.tabbar); if (this.tabbar.length > 0) { - if (this.tabbar[0].children.length) { + if (this.tabbar[0].children.length > 0) { this.current = 0; // 打开手风琴 this.currentTab = this.tabbar[0].children[0].id; this.currCategoryId = this.tabbar[0].children[0].id; @@ -980,7 +967,6 @@ export default { let index = e.index; //手风琴展开状态 -1 == 不展开 const oldCategoryId = this.currCategoryId; - this.current = this.current == index ? -1 : e.index; // 如果current没有实际变化(点击的是已经展开的项),直接返回 @@ -1318,9 +1304,14 @@ export default { if (res && res.status == 200) { uni.$u.toast("操作成功"); + this.commodityList = this.commodityList.filter( + (item) => !productIds.includes(item.product_id) + ); + await this.updateCommodityStatistics(); this.clearCheckboxLists(this.tabbar); + this.selectCommodityList = []; } diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/batchSearch.vue b/java-mall-app-shop-admin/pages/warehouse/manage/batchSearch.vue index c8c50de..7565d35 100644 --- a/java-mall-app-shop-admin/pages/warehouse/manage/batchSearch.vue +++ b/java-mall-app-shop-admin/pages/warehouse/manage/batchSearch.vue @@ -460,8 +460,8 @@ export default { this.checkboxAllList = []; if (this.isNoDownCommodityData) return; this.loadingDownCommodityData = true; + this.pageNum = this.pageNum + 1; this.time = setTimeout(() => { - this.pageNum = this.pageNum + 1; this.getProductList(); }, 500); }, @@ -791,6 +791,12 @@ export default { } } + .commodity-type-popup { + .commodity-type-popup-content { + height: 500px; + } + } + .no-data { .no-data-bg { margin: 60% auto; diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/classifyList.vue b/java-mall-app-shop-admin/pages/warehouse/manage/classifyList.vue index e69de29..782780e 100644 --- a/java-mall-app-shop-admin/pages/warehouse/manage/classifyList.vue +++ b/java-mall-app-shop-admin/pages/warehouse/manage/classifyList.vue @@ -0,0 +1,1139 @@ + + + + + diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/components/tui-collapse/classify-collapse.vue b/java-mall-app-shop-admin/pages/warehouse/manage/components/tui-collapse/classify-collapse.vue new file mode 100644 index 0000000..5ee9f1b --- /dev/null +++ b/java-mall-app-shop-admin/pages/warehouse/manage/components/tui-collapse/classify-collapse.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/editClassify.vue b/java-mall-app-shop-admin/pages/warehouse/manage/editClassify.vue new file mode 100644 index 0000000..994886a --- /dev/null +++ b/java-mall-app-shop-admin/pages/warehouse/manage/editClassify.vue @@ -0,0 +1,1005 @@ + + + + + diff --git a/java-mall-app-shop-admin/pages/warehouse/manage/productList.vue b/java-mall-app-shop-admin/pages/warehouse/manage/productList.vue index a537b7f..89e001a 100644 --- a/java-mall-app-shop-admin/pages/warehouse/manage/productList.vue +++ b/java-mall-app-shop-admin/pages/warehouse/manage/productList.vue @@ -142,6 +142,7 @@ 商品新建 + + + 价格/库存修改 + + + + + + + + + + + + + + + @@ -228,6 +290,7 @@ import { GetProductCategoryTree, GetProductList, UpdateProductPutaway, + GetCommoditSpecification, } from "@/api/warehouse/productList"; import navBar from "@/components/uni-nav-bar/uni-nav-bar"; import tuiCollapse from "../manage/components/tui-collapse/tui-collapse.vue"; @@ -306,6 +369,8 @@ export default { isRefreshing: false, time: null, time2: null, + showBottomPopup: false, + currSpecificationList: [], }; }, computed: {}, @@ -353,6 +418,21 @@ export default { this.scrollViewId = `id_0`; } }, + handerClosePopup() { + this.showBottomPopup = false; + }, + async handerShowPricePopup(item) { + let params = { + product_id: item.product_id, + }; + + let res = await GetCommoditSpecification(params); + + if (res && res.status == 200) { + this.showBottomPopup = true; + this.currSpecificationList = res.data.items; + } + }, async getProductCategoryTree() { let res = await GetProductCategoryTree(); if (res && res.status == 200) { @@ -966,6 +1046,107 @@ export default { } } + .productList-price-popup { + ::v-deep.u-popup__content { + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; + } + + .productList-price-popup-content { + // width: 100%; + + .productList-price-popup-title { + padding: 40rpx; + text-align: center; + font-weight: 500; + } + + .select-commodity-price-list { + padding: 20rpx; + + .commodity-item { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 40rpx; + padding: 0 40rpx; + + .u-icon-jianhao { + ::v-deep.u-icon__icon { + color: $base-color !important; + } + } + + .commodity-info { + display: flex; + + .commodity-img { + position: relative; + margin-right: 20rpx; + width: 60px; + height: 60px; + border: 1px solid #ebebeb; + border-radius: 16rpx; + } + + .commodity-img-sold-out { + &::before { + position: absolute; + bottom: 0; + width: 100%; + height: 20px; + line-height: 20px; + content: "已下架"; + text-align: center; + background: rgba(0, 0, 0, 0.6); + color: #fff; + z-index: 99; + font-size: 14px; + border-bottom-left-radius: 16rpx; + border-bottom-right-radius: 16rpx; + } + } + + .commodity-info-box { + display: flex; + flex-flow: column; + justify-content: space-between; + + .commodity-name { + font-weight: bold; + font-size: 34rpx; + word-break: break-all; /* 允许在任意字符间断行 */ + overflow-wrap: break-word; /* 优先在单词间断行 */ + display: -webkit-box; + -webkit-line-clamp: 2; /* 限制最多2行 */ + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; /* 超出部分显示省略号 */ + } + + .commodity-inventory { + margin: 6rpx 0; + font-size: 25rpx; + color: #626262; + } + + .commodity-price { + font-size: 32rpx; + font-weight: bold; + color: #ea3938; + + .currency { + margin-right: 4px; + font-size: 24rpx; + } + } + } + } + } + } + } + } + .commodity-loading { margin: 70% auto; display: flex; diff --git a/java-mall-app-shop-admin/pages/warehouse/warehouse.vue b/java-mall-app-shop-admin/pages/warehouse/warehouse.vue index ed81db4..fd050d4 100644 --- a/java-mall-app-shop-admin/pages/warehouse/warehouse.vue +++ b/java-mall-app-shop-admin/pages/warehouse/warehouse.vue @@ -2,47 +2,77 @@ {{ dashboardInfo.store_info.store_name }} - - - - + + + + + + + 商品管理 - 商品管理 - - - - + + + + + 规格管理 - 品牌管理 - - - - + + + + + 类型管理 - 分类管理 - - - - + + + + + 分类管理 - 商品图库 + @@ -105,23 +135,35 @@ export default { background: #fff; } - .warehouse-list { - display: flex; - align-items: center; - justify-content: space-between; + .warehouse-content { margin: 10px; padding: 20px; + border-radius: 24rpx; background: #fff; box-shadow: 0 12rpx 16rpx 0 rgba(0, 0, 0, 0.1); - border-radius: 24rpx; - .warehouse-item { + .warehouse-list { display: flex; - flex-flow: column; align-items: center; + justify-content: space-between; - .warehouse-item-img { - margin-bottom: 20rpx; + .warehouse-item { + display: flex; + flex-flow: column; + align-items: center; + + .warehouse-item-img { + margin-bottom: 20rpx; + } + } + } + + .warehouse-list-2 { + margin-top: 40rpx; + justify-content: flex-start; + + .warehouse-item-2 { + margin-left: 48rpx; } } } diff --git a/java-mall-app-shop-admin/static/font/iconfont.css b/java-mall-app-shop-admin/static/font/iconfont.css index a91cfd8..9456be8 100644 --- a/java-mall-app-shop-admin/static/font/iconfont.css +++ b/java-mall-app-shop-admin/static/font/iconfont.css @@ -21,6 +21,10 @@ -moz-osx-font-smoothing: grayscale; } +.custom-icon-jiahao:before { + content: "\e640"; +} + .custom-icon-jianhao:before { content: "\e664"; } diff --git a/java-mall-app-shop-admin/static/font/iconfont.ttf b/java-mall-app-shop-admin/static/font/iconfont.ttf index a0c4c98..856fbc1 100644 Binary files a/java-mall-app-shop-admin/static/font/iconfont.ttf and b/java-mall-app-shop-admin/static/font/iconfont.ttf differ diff --git a/java-mall-app-shop-admin/static/font/iconfont.woff b/java-mall-app-shop-admin/static/font/iconfont.woff index 84885ba..6479da0 100644 Binary files a/java-mall-app-shop-admin/static/font/iconfont.woff and b/java-mall-app-shop-admin/static/font/iconfont.woff differ diff --git a/java-mall-app-shop-admin/static/font/iconfont.woff2 b/java-mall-app-shop-admin/static/font/iconfont.woff2 index b70e688..b9e768e 100644 Binary files a/java-mall-app-shop-admin/static/font/iconfont.woff2 and b/java-mall-app-shop-admin/static/font/iconfont.woff2 differ diff --git a/java-mall-app-shop-admin/static/warehouse/commodity-type.png b/java-mall-app-shop-admin/static/warehouse/commodity-type.png new file mode 100644 index 0000000..1906dbd Binary files /dev/null and b/java-mall-app-shop-admin/static/warehouse/commodity-type.png differ diff --git a/java-mall-app-shop-admin/static/warehouse/no-classify.png b/java-mall-app-shop-admin/static/warehouse/no-classify.png new file mode 100644 index 0000000..8e1a22a Binary files /dev/null and b/java-mall-app-shop-admin/static/warehouse/no-classify.png differ diff --git a/java-mall-app-shop-admin/static/warehouse/no-commodity-type.png b/java-mall-app-shop-admin/static/warehouse/no-commodity-type.png new file mode 100644 index 0000000..8db15bb Binary files /dev/null and b/java-mall-app-shop-admin/static/warehouse/no-commodity-type.png differ diff --git a/java-mall-app-shop-admin/static/warehouse/specification.png b/java-mall-app-shop-admin/static/warehouse/specification.png new file mode 100644 index 0000000..c15499a Binary files /dev/null and b/java-mall-app-shop-admin/static/warehouse/specification.png differ