From 2db9f6811aa96da47221b76d0324f7c351f59671 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 11 Apr 2026 15:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=95=86=E5=93=81=E4=BF=AE=E6=94=B9=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=BA=93=E5=AD=98=E7=9B=B8=E5=85=B3=E4=B8=9C=E8=A5=BF?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=80=80=E8=8F=9C=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E9=80=80=E5=BA=93=E5=AD=98=E7=9A=84=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=A2=9E=E5=8A=A0=E9=80=80=E8=8F=9C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E9=80=80=E5=BA=93=E5=AD=98=E7=9A=84=E9=80=89=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E5=BA=97=E9=93=BA=E5=A2=9E=E5=8A=A0=E9=80=80=E8=8F=9C?= =?UTF-8?q?=E9=80=80=E5=BA=93=E5=AD=98=E6=A8=A1=E5=BC=8F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=80=80=E6=AC=BE=E9=80=80=E8=8F=9C?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=80=80=E5=BA=93=E5=AD=98=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=B4=AD=E7=89=A9=E8=BD=A6=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=89=A9=E5=93=81=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/api/cateGory.js | 10 + http/api/cons.js | 14 +- pageCategory/edit-category/edit-category.vue | 65 +- pageConsumables/addConsumables.vue | 407 +-- pageConsumables/warehouseEntry.vue | 73 +- pageMarket/packagePopularize/selectGoods.vue | 2 +- pageProduct/add-Product/add-Product.vue | 2576 +++++++++-------- .../add-Product/components/edit-haocai.vue | 95 +- .../add-Product/components/link-goods.vue | 11 + pageProduct/index/components/goods.vue | 4 +- pages/shopSetUp/index.vue | 1306 +++++---- .../index/components/list-goods-item.vue | 76 +- pagesCreateOrder/index/index.vue | 276 +- pagesOrder/detail/components/tuicai.vue | 215 +- pagesOrder/tuikuan/tuikuan.vue | 245 +- 15 files changed, 3002 insertions(+), 2373 deletions(-) create mode 100644 pageProduct/add-Product/components/link-goods.vue diff --git a/http/api/cateGory.js b/http/api/cateGory.js index f0fa636..b35c16d 100644 --- a/http/api/cateGory.js +++ b/http/api/cateGory.js @@ -14,6 +14,16 @@ export function categoryPage(data, urlType = 'product') { } }) } +/** + * 获取分类详情 + * @returns + */ +export function getCategoryDetail(id, urlType = 'product') { + return request({ + url: `${urlType}/admin/prod/category/`+id, + method: "GET", + }) +} /** * 分类添加 diff --git a/http/api/cons.js b/http/api/cons.js index db30404..a9812ca 100644 --- a/http/api/cons.js +++ b/http/api/cons.js @@ -14,7 +14,19 @@ export function getConsPage(data, urlType = 'product') { } }) } - +/** + * 耗材库存列表接口 + * @returns + */ +export function getConsStock(data, urlType = 'product') { + return request({ + url: `${urlType}/admin/product/cons/consStock`, + method: "GET", + data: { + ...data + } + }) +} /** * 获取耗材列表 * @returns diff --git a/pageCategory/edit-category/edit-category.vue b/pageCategory/edit-category/edit-category.vue index 4311a81..971dd65 100644 --- a/pageCategory/edit-category/edit-category.vue +++ b/pageCategory/edit-category/edit-category.vue @@ -13,15 +13,22 @@ - + + + + + + + + @@ -34,7 +41,7 @@ - + @@ -42,23 +49,44 @@ - - + + diff --git a/pageConsumables/addConsumables.vue b/pageConsumables/addConsumables.vue index cdd5a1d..ed03caa 100644 --- a/pageConsumables/addConsumables.vue +++ b/pageConsumables/addConsumables.vue @@ -18,6 +18,12 @@ 预警值 + + 是否检测耗材 + + + + 耗材类型 @@ -55,7 +61,8 @@ 默认入库单位 - + @@ -63,226 +70,252 @@ - + - + + + .form-wrap { + padding: 28upx 28upx 0; + + .form { + padding: 28upx; + background-color: #fff; + border-radius: 16upx; + } + + .row { + height: 84upx; + display: flex; + gap: 20upx; + align-items: center; + background-color: #fcfcfc; + padding: 0 20upx; + + &:not(:last-child) { + margin-bottom: 28upx; + } + + .label { + font-size: 32upx; + color: #333; + } + + .ipt { + flex: 1; + } + } + } + \ No newline at end of file diff --git a/pageConsumables/warehouseEntry.vue b/pageConsumables/warehouseEntry.vue index 61222f7..f773c7e 100644 --- a/pageConsumables/warehouseEntry.vue +++ b/pageConsumables/warehouseEntry.vue @@ -11,26 +11,26 @@ * 入库时间 - - + + * 入库数量 - + *单价 - + 单位 - + + 应付金额 @@ -43,7 +43,8 @@ 供应商 - {{datas.status[nowStatusIndex]}} + {{datas.status[nowStatusIndex]}} + 新增 @@ -57,21 +58,32 @@ - + + \ No newline at end of file diff --git a/pageProduct/add-Product/components/edit-haocai.vue b/pageProduct/add-Product/components/edit-haocai.vue index 7deaf7b..1b6b217 100644 --- a/pageProduct/add-Product/components/edit-haocai.vue +++ b/pageProduct/add-Product/components/edit-haocai.vue @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/pageProduct/index/components/goods.vue b/pageProduct/index/components/goods.vue index 86e8090..f2e4c61 100644 --- a/pageProduct/index/components/goods.vue +++ b/pageProduct/index/components/goods.vue @@ -6,10 +6,10 @@ 排序 {{data.sort}} - + diff --git a/pages/shopSetUp/index.vue b/pages/shopSetUp/index.vue index 0763e02..0c9d350 100644 --- a/pages/shopSetUp/index.vue +++ b/pages/shopSetUp/index.vue @@ -1,132 +1,90 @@ + .extend_content { + display: flex; + margin-top: 32rpx; + + .preview { + min-width: 146rpx; + height: 342rpx; + position: relative; + margin-right: 32rpx; + background-color: #f7f7f7; + + ::v-deep .bg, + ::v-deep .bg .u-image, + ::v-deep .bg .u-image__image { + width: 146rpx !important; + height: 342rpx !important; + position: absolute; + top: 0; + } + + ::v-deep .index_bg .u-image, + ::v-deep .index_bg .u-image__image { + width: 146rpx !important; + height: 242rpx !important; + position: absolute; + top: 0; + } + + ::v-deep .my_bg .u-image, + ::v-deep .my_bg .u-image__image { + width: 146rpx !important; + height: 90rpx !important; + position: absolute; + top: 0; + } + + ::v-deep .member_bg .u-image, + ::v-deep .member_bg .u-image__image { + width: 34rpx !important; + height: 63rpx !important; + position: absolute; + top: 22rpx; + left: 0; + right: 0; + margin: auto; + border-radius: 5rpx !important; + } + + ::v-deep .shopinfo_bg .u-image, + ::v-deep .shopinfo_bg .u-image__image { + width: 146rpx !important; + height: 50rpx !important; + position: absolute; + top: 0; + } + + ::v-deep .bg.ticket_logo, + ::v-deep .bg.ticket_logo .u-image, + ::v-deep .bg.ticket_logo .u-image__image { + width: 359rpx !important; + height: 232rpx !important; + position: absolute; + top: 0; + } + + ::v-deep .ticket_logo.img .u-image, + ::v-deep .ticket_logo.img .u-image__image { + width: 146rpx !important; + height: 50rpx !important; + position: absolute; + top: 0; + left: 10rpx; + } + + .shopinfo_bg_f { + width: 146rpx; + height: 290rpx; + position: absolute; + bottom: 0; + background-color: #fff; + } + } + + .extend_img { + display: flex; + flex-direction: column; + + .extend_title { + font-weight: 400; + font-size: 24rpx; + color: #333333; + margin-bottom: 16rpx; + } + + .fileUp { + width: 148rpx; + height: 148rpx; + position: relative; + + .file { + width: 148rpx; + height: 148rpx; + position: absolute; + top: 0; + } + } + + ::v-deep .u-image, + ::v-deep .u-image__image { + width: 148rpx !important; + height: 148rpx !important; + } + } + } + } + } + + .column { + flex-direction: column; + + .label { + align-self: flex-start; + } + } + + .m { + margin-bottom: 12rpx; + } + + .cutShop { + width: 530rpx; + height: 80rpx; + line-height: 80rpx; + background: #318afe; + border-radius: 56rpx; + font-weight: 500; + font-size: 32rpx; + color: #ffffff; + margin: 48rpx auto 0 auto; + text-align: center; + } + + .right { + display: flex; + align-items: center; + font-weight: 400; + font-size: 28rpx; + color: #999999; + position: relative; + + .file { + width: 112rpx; + height: 112rpx; + line-height: 112rpx; + position: absolute; + top: 0; + bottom: 0; + right: 0; + margin: auto; + } + + .fileImg { + width: 112rpx !important; + height: 112rpx !important; + + ::v-deep .u-avatar__image { + width: 112rpx !important; + height: 112rpx !important; + } + } + } + } + + .color-red { + color: red; + } + \ No newline at end of file diff --git a/pagesCreateOrder/index/components/list-goods-item.vue b/pagesCreateOrder/index/components/list-goods-item.vue index 41c09ad..169eda0 100644 --- a/pagesCreateOrder/index/components/list-goods-item.vue +++ b/pagesCreateOrder/index/components/list-goods-item.vue @@ -3,7 +3,9 @@ 限时折扣 - + + 剩余库存:{{nowStockerNumber}} + {{ data.name }} @@ -32,7 +34,7 @@ - + {{ data.chooseNumber.toFixed(2) }} @@ -56,7 +58,7 @@ - + @@ -107,6 +109,10 @@ return {}; }, }, + consStockList: { + type: Array, + default:[] + } }); //判断是否是时间折扣商品 @@ -156,12 +162,64 @@ return false; } return ( - (item.isStock == 1 && item.stockNumber <= 0) || + !consStockisFull(item) || item.isSoldStock == 1 || item.isSale == 0 || !isProductAvailable(item.days, item.startTime, item.endTime) ); }); + const stockNumber=computed(()=>{ + + }) + + // 1. 筛选匹配的耗材列表 + const conslist=computed(()=>{ + if(props.consStockList.length<=0){ + return [] + } + return props.consStockList.filter(v => { + return props.data.consList.find(i =>{ + return i.consInfoId == v.consId + }); + }); + }) + // 2. 找到 stockNumber 最小的那一项 + const minConsItem=computed(()=>{ + if(conslist.value.length<=0){ + return null + } + return conslist.value.reduce((prev, current) => { + return prev.stockNumber < current.stockNumber ? prev : current; + }); + }) + // 3. 找到和 minItem 的 consId 一样的那个消耗配置项 + const targetCons=computed(()=>{ + if(!minConsItem.value){ + return null + } + return props.data.consList.find(i => i.consInfoId == minConsItem.value.consId); + }) + const nowStockerNumber=computed(()=>{ + if(!targetCons.value||!minConsItem.value){ + return 9999 + } + return Math.floor(minConsItem.value.stockNumber/targetCons.value.surplusStock) + }) + function consStockisFull(item) { + // 无数据直接返回 true(或按你需求返回 false) + if (!conslist.value.length) return true; + + if(!minConsItem.value)return true; + + if(!targetCons.value) return true; + + // 4. 判断:最小库存 > 每份消耗库存 → 返回 true,否则 false + if (nowStockerNumber.value>=1) { + return true; + } else { + return false; + } + } // 判断商品是否在可售时间内 function isProductAvailable(sellDaysStr, startTimeStr, endTimeStr) { // 将后端返回的字符串转换为数组 @@ -306,4 +364,14 @@ color: rgba(255, 255, 255, 0.8); text-decoration: line-through; } + .nowStockerNumber{ + position: absolute; + left: 24rpx; + bottom: 80rpx; + background-color: rgba(255, 255, 255, .8); + color: red; + padding: 4rpx 8rpx; + font-size: 24rpx; + border-radius: 4rpx ; + } \ No newline at end of file diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue index ca872cc..b0aad30 100644 --- a/pagesCreateOrder/index/index.vue +++ b/pagesCreateOrder/index/index.vue @@ -36,9 +36,7 @@ + @scroll="rightScroll" @scrolltoupper="scrolltoupper"> diff --git a/pagesOrder/tuikuan/tuikuan.vue b/pagesOrder/tuikuan/tuikuan.vue index 752f449..179b2fb 100644 --- a/pagesOrder/tuikuan/tuikuan.vue +++ b/pagesOrder/tuikuan/tuikuan.vue @@ -2,16 +2,19 @@ - + - + - - + + - + + + * @@ -27,7 +30,7 @@