diff --git a/pages/home/edit-quick-actions.vue b/pages/home/edit-quick-actions.vue index c6dacb6..dcb7c96 100644 --- a/pages/home/edit-quick-actions.vue +++ b/pages/home/edit-quick-actions.vue @@ -314,9 +314,19 @@ const menuName = String(item?.name || '').trim(); const isGoodsQuery = menuName === '商品查询' || (menuName.includes('商品') && menuName.includes('查询')); const rawPath = item?.component || item?.path || ''; + const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : ''; + const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation'; + if (isRelocation) { + uni.showToast({ + title: '该功能只支持在商品查询页面使用!', + icon: 'none', + duration: 2500 + }); + return; + } const targetPath = isGoodsQuery ? '/pages/work/product/query' - : (rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : ''); + : normalizedPath; if (!targetPath) { uni.showToast({ diff --git a/pages/index/index.vue b/pages/index/index.vue index 6fd4568..9f964d9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1121,9 +1121,19 @@ const menuName = String(item?.name || '').trim(); const isGoodsQuery = menuName === '商品查询' || (menuName.includes('商品') && menuName.includes('查询')); const rawPath = item?.component || item?.path || ''; + const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : ''; + const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation'; + if (isRelocation) { + uni.showToast({ + title: '该功能只支持在商品查询页面使用!', + icon: 'none', + duration: 2500 + }); + return; + } const targetPath = isGoodsQuery ? '/pages/work/product/query' - : (rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : ''); + : normalizedPath; if (!targetPath) { uni.showToast({ diff --git a/pages/work/product/query.vue b/pages/work/product/query.vue index 855a1dc..487efaf 100644 --- a/pages/work/product/query.vue +++ b/pages/work/product/query.vue @@ -58,7 +58,7 @@ - + {{ item.item_name || item.product_name || item.name || '未命名商品' }} @@ -162,7 +162,14 @@ > {{ getStorageSpaceText(storageItem) }} {{ getStorageQuantityText(storageItem) }} - {{ getStorageAvailableText(storageItem) }} + {{ getStorageAvailableText(storageItem) }} @@ -385,11 +392,7 @@ }; }, getLocalStorageHeadWrapStyle(sectionKey, zIndex = 1) { - const meta = (this.storageSectionMetas || []).find(item => item && item.key === sectionKey); - const top = Math.max( - Number((meta && meta.summaryHeight) || 0) + Number((meta && meta.summaryGap) || 0), - 0 - ); + const top = 0; return { top: `${top}px`, '--storage-head-offset': `${top}px`, @@ -1241,6 +1244,13 @@ } const isNonBatchMode = this.queryMode === 'nonBatch'; + if (isNonBatchMode && this.isBatchManagedItem(productItem, storageItem)) { + uni.showToast({ + title: '该商品已开启批次管理,请在批次模式下移库!', + icon: 'none' + }); + return; + } const relocationStorageId = this.getRelocationStorageId(storageItem) || this.getRelocationStorageId(productItem); const relocationProductStockId = this.getRelocationProductStockId(storageItem) || this.getRelocationProductStockId(productItem); const sourceSpaceId = this.normalizePositiveId( @@ -1284,6 +1294,10 @@ url: `/pages/work/storage/relocation?cacheKey=${cacheKey}` }); }, + isBatchManagedItem(productItem, storageItem) { + const candidates = [productItem, storageItem].filter(item => item && typeof item === 'object'); + return candidates.some(item => item.is_batch_mgmt_enabled === true); + }, getExtraImageCount(item) { const total = this.getImageList(item).length; return total > 4 ? total - 4 : 0; @@ -1583,8 +1597,7 @@ } .item-summary { - position: sticky; - top: 0; + position: relative; background: #fff; padding-bottom: 10rpx; margin-bottom: 4rpx; @@ -1719,7 +1732,7 @@ } .storage-head-fixed { - position: sticky; + position: relative; left: 0; overflow: visible; margin-bottom: 0; @@ -1728,19 +1741,11 @@ border-radius: 10rpx 10rpx 0 0; background: #edf4ff; box-sizing: border-box; - z-index: 20; + z-index: 1; isolation: isolate; &::before { - content: ''; - position: absolute; - left: -2rpx; - right: -2rpx; - top: calc(var(--storage-head-offset, 0px) * -1); - height: calc(var(--storage-head-offset, 0px) + 2rpx); - background: #fff; - pointer-events: none; - z-index: 19; + display: none; } } @@ -1797,7 +1802,7 @@ } .storage-table--batch .storage-col--space { - flex: 0.68; + flex: 0.95; } .storage-table__row { @@ -1814,7 +1819,7 @@ } .storage-table--batch .storage-table__row { - grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.68fr) minmax(0, 0.46fr) minmax(0, 0.46fr); + grid-template-columns: minmax(0, 0.65fr) minmax(0, 0.85fr) minmax(0, 0.4fr) minmax(0, 0.4fr); } .storage-table__row:last-child { @@ -1892,6 +1897,12 @@ } } + .storage-col--disabled { + color: #606266; + font-weight: 400; + text-decoration: none; + } + .storage-table--batch .storage-col--qty { padding-left: 1rpx; padding-right: 1rpx; @@ -1952,7 +1963,7 @@ .end-tip { padding: 8rpx 0 20rpx; text-align: center; - font-size: 22rpx; + font-size: 28rpx; color: #c0c4cc; } diff --git a/pages/work/storage/relocation.vue b/pages/work/storage/relocation.vue index 66e6359..c920c86 100644 --- a/pages/work/storage/relocation.vue +++ b/pages/work/storage/relocation.vue @@ -48,12 +48,13 @@ - + - + @@ -236,7 +237,11 @@ return; } - this.applyScanResult(rawCode, this.activeScanField || 'productKeyword'); + const field = this.resolveBroadcastField(); + this.applyScanResult(rawCode, field); + }, + resolveBroadcastField() { + return 'targetSpace'; }, handleFieldScan(field) { this.setActiveScanField(field); @@ -842,17 +847,19 @@ .move-quantity-item { ::v-deep .u-form-item__body__left__content__label, ::v-deep .u-form-item__body__left__content__label-text { - font-size: 36rpx !important; - font-weight: 600; + font-size: 40rpx !important; + font-weight: 700; } - ::v-deep .u-input__content__field-wrapper__field { - font-size: 36rpx !important; - font-weight: 600; + ::v-deep .move-quantity-input .u-input__content__field-wrapper__field, + ::v-deep .move-quantity-input .u-input__content__field-wrapper__field input, + ::v-deep .move-quantity-input input { + font-size: 42rpx !important; + font-weight: 700 !important; } ::v-deep .u-input__content { - min-height: 76rpx; + min-height: 72rpx; } } @@ -868,7 +875,7 @@ box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.18); text { - font-size: 22rpx; + font-size: 28rpx; font-weight: 500; color: #ffffff; line-height: 1; @@ -917,7 +924,7 @@ } &__title { - font-size: 30rpx; + font-size: 34rpx; font-weight: 600; color: #303133; flex: 1; @@ -929,14 +936,17 @@ margin-top: 10rpx; .label { - width: 140rpx; - font-size: 26rpx; + width: auto; + font-size: 30rpx; color: #606266; + white-space: nowrap; + margin-right: 8rpx; + flex-shrink: 0; } .value { flex: 1; - font-size: 26rpx; + font-size: 30rpx; color: #303133; word-break: break-all; }