From 28f7dc412b779d153fdcf4c4119aeb76d833762f Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Sun, 22 Nov 2026 18:00:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E4=B8=8E=E6=89=93=E5=8D=B0=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=20UI=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 收货部分(detail-container / ProductInfoEditor): - 顶部搜索框样式统一,新增「搜索」按钮,扫描图标由 camera 改为 scan - 删除按钮去掉图标、字号 36rpx、高度调大;「新增商品」按钮去掉 + 图标、高度调大 - 表单标签、输入值、单位、按钮字号统一为 36rpx(参考收货单信息) - 「存放库位」扫描图标调大;「快速生成」按钮单行显示 - 底部「共 x 项」与页码字号 34rpx,页码单行显示 更多操作与整单作废(receivingDetail): - 「···」菜单由 u-action-sheet 改为底部「更多操作」抽屉(参考上架作业样式) - 整单作废二次确认由 uni.showModal 改为居中自定义弹窗(参考完成盘点弹窗样式) 打印弹窗(PrintPanel / WorkbenchPrint): - 打印选项弹窗参考筛选条件弹窗样式,新增「取消」按钮 - 内容与按钮字号统一 36rpx - 选择工作台/打印机/模板三个弹窗顶部圆角统一、新增右上角关闭按钮 --- src/components/PrintPanel/PrintPanel.vue | 48 +++- .../WorkbenchPrint/WorkbenchPrint.vue | 51 +++- .../components/ProductInfoEditor.vue | 33 ++- .../receiving/components/detail-container.vue | 33 ++- .../storage/receiving/receivingDetail.vue | 266 ++++++++++++++---- 5 files changed, 338 insertions(+), 93 deletions(-) diff --git a/src/components/PrintPanel/PrintPanel.vue b/src/components/PrintPanel/PrintPanel.vue index 5d89611..0cdaa7c 100644 --- a/src/components/PrintPanel/PrintPanel.vue +++ b/src/components/PrintPanel/PrintPanel.vue @@ -4,13 +4,17 @@ - - 打印选项 + + 打印选项 + + + @@ -18,6 +22,7 @@ @@ -66,21 +71,36 @@ export default { \ No newline at end of file diff --git a/src/pages/work/storage/receiving/components/ProductInfoEditor.vue b/src/pages/work/storage/receiving/components/ProductInfoEditor.vue index 1842007..6f6ce37 100644 --- a/src/pages/work/storage/receiving/components/ProductInfoEditor.vue +++ b/src/pages/work/storage/receiving/components/ProductInfoEditor.vue @@ -175,7 +175,7 @@ - + @@ -893,11 +893,26 @@ padding: 20rpx; box-sizing: border-box; + /* 表单标签、输入框字号统一为 36rpx(参考收货单信息) */ + ::v-deep .u-form-item__body__left__content__label { + font-size: 36rpx; + white-space: nowrap; + } + + ::v-deep .u-input__content__field-wrapper__field { + font-size: 36rpx !important; + } + + /* 按钮字号统一为 36rpx */ + ::v-deep .u-button { + font-size: 36rpx !important; + } + .section { margin-bottom: 30rpx; .section-title { - font-size: 32rpx; + font-size: 34rpx; font-weight: bold; color: #333; margin-bottom: 20rpx; @@ -917,7 +932,7 @@ .detail-item-label { width: 220rpx; color: #333; - font-size: 15px !important; + font-size: 36rpx; flex-shrink: 0; white-space: nowrap; } @@ -933,7 +948,7 @@ .detail-item-value { flex: 1; color: #333; - font-size: 15px !important; + font-size: 36rpx; } } @@ -971,7 +986,7 @@ .space-name { flex: 1; color: #333; - font-size: 28rpx; + font-size: 36rpx; } } } @@ -1025,7 +1040,7 @@ .unit-text { width: 100rpx; color: #666; - font-size: 28rpx; + font-size: 36rpx; text-align: center; margin-left: 10rpx; flex-shrink: 0; @@ -1068,16 +1083,16 @@ } .quick-generate-btn { - width: 200rpx; - + width: 240rpx; flex-shrink: 0; + white-space: nowrap; } } .date-display { padding: 18rpx 0; color: #333; - font-size: 35rpx; + font-size: 36rpx; } } \ No newline at end of file diff --git a/src/pages/work/storage/receiving/components/detail-container.vue b/src/pages/work/storage/receiving/components/detail-container.vue index 8de89fe..40407ec 100644 --- a/src/pages/work/storage/receiving/components/detail-container.vue +++ b/src/pages/work/storage/receiving/components/detail-container.vue @@ -7,8 +7,7 @@ - - 删除 + + 删除 @@ -41,8 +40,8 @@ 共 {{ totalDetails }} 项 {{ currentPage }} / {{ totalPages }} - - 新增商品 + + 新增商品 @@ -417,6 +416,18 @@ .detail-actions { display: flex; gap: 10rpx; + + ::v-deep .delete-btn { + height: 68rpx; + padding: 0 24rpx; + display: flex; + align-items: center; + justify-content: center; + } + + .delete-btn-text { + font-size: 36rpx; + } } } @@ -511,7 +522,7 @@ .total { color: #666; - font-size: 28rpx; + font-size: 34rpx; } .list-actions { @@ -521,9 +532,15 @@ .page-info { width: 100rpx; - font-size: 28rpx; + font-size: 34rpx; color: #666; text-align: center; + white-space: nowrap; + } + + ::v-deep .add-btn { + font-size: 36rpx; + height: 68rpx; } } } diff --git a/src/pages/work/storage/receiving/receivingDetail.vue b/src/pages/work/storage/receiving/receivingDetail.vue index b58492e..2037f10 100644 --- a/src/pages/work/storage/receiving/receivingDetail.vue +++ b/src/pages/work/storage/receiving/receivingDetail.vue @@ -34,10 +34,56 @@ - - + - + + + 更多操作 + + + + 刷新数据 + + + 完成收货 + + + 打印收货单 + + + 整单作废 + + + 关闭 + + + + + + + + + 整单作废 + + 确定要作废当前收货单吗?此操作不可撤销。 + + + 再想想 + + 确定作废 + + + + + @@ -97,29 +143,7 @@ // 对话框控制 showActionSheet: false, - - // 下拉菜单 - actionList: [{ - name: '刷新数据', - color: '#2979ff', - action:"initData" - }, - { - name: '完成收货', - color: '#9a3130', - action:"completeReceiving" - }, - { - name: '打印收货单', - color: '#9a3130', - action:"comfir" - }, - { - name: '整单作废', - color: '#FF0000', - action:"cancel" - } - ], + showCancelConfirm: false, }; }, @@ -629,17 +653,29 @@ }, // 操作菜单处理 - handleAction(index) { - console.log("菜单点击",index); - switch (index.action) { + handleAction(action) { + console.log("菜单点击", action); + this.showActionSheet = false; + switch (action) { case "initData": this.initData(); break; case "completeReceiving": this.showComplete = true; break; + case "printReceiving": + this.handlePrint({ + type: "STOCK", + value: { + product_barcode: this.receivingInfo.receiving_number, + product_name: this.receivingInfo.creator_name + } + }); + break; case "cancel": - this.cancel(); + this.showCancelConfirm = true; + this.speakMessage('请确认作废'); + break; } }, async completeReceiving() { @@ -802,27 +838,13 @@ }); } }, + confirmCancel() { + this.showCancelConfirm = false; + this.cancel(); + }, async cancel() { try { - this.speakMessage('请确认作废'); - // 1. 显示确认弹窗 - const confirmResult = await uni.showModal({ - title: '整单作废', - content: '确定要作废当前收货单吗?此操作不可撤销。', - confirmText: '确定作废', - confirmColor: '#e64340', - cancelText: '再想想', - cancelColor: '#999' - }); - console.log(confirmResult); - if (!confirmResult[1].confirm) { - this.showToastMessage('已取消', 'none', { - speak: false - }); - return; - } - - // 2. 显示加载状态 + // 1. 显示加载状态 uni.showLoading({ title: '正在作废...', mask: true @@ -1166,4 +1188,150 @@ } } } + + // 更多操作弹窗 + .action-drawer { + padding: 20rpx 24rpx calc(24rpx + env(safe-area-inset-bottom)); + background: #f8f9fa; + border-top-left-radius: 20px; + border-top-right-radius: 20px; + overflow: hidden; + } + + .action-drawer__header { + padding: 8rpx 0 32rpx; + text-align: center; + } + + .action-drawer__title { + font-size: 40rpx; + font-weight: bold; + color: #303133; + } + + .action-drawer__body { + display: flex; + flex-direction: column; + } + + .action-drawer__item + .action-drawer__item { + margin-top: 20rpx; + } + + .action-drawer__item { + background: #ffffff; + border-radius: 12rpx; + padding: 24rpx; + display: flex; + justify-content: center; + align-items: center; + } + + .action-drawer__item:active { + opacity: 0.75; + } + + .action-drawer__item--neutral { + background: #f5f7fa; + border: 1rpx solid #dcdfe6; + } + + .action-drawer__item--neutral .action-drawer__item-text { + color: #606266; + } + + .action-drawer__item--close { + background: #e4e7ed; + border: 1rpx solid #dcdfe6; + } + + .action-drawer__item--close .action-drawer__item-text { + color: #606266; + } + + .action-drawer__item--primary-outline { + background: #eaf2ff; + border: 1rpx solid #b8d4ff; + } + + .action-drawer__item--danger-outline { + background: #fef0f0; + border: 1rpx solid #fbc4c4; + } + + .action-drawer__item-text { + font-size: 38rpx; + color: #303133; + } + + .action-drawer__item-text--primary { + color: #2979ff; + font-weight: bold; + } + + .action-drawer__item-text--danger { + color: #f56c6c; + font-weight: bold; + } + + // 整单作废确认弹窗 + .cancel-confirm-popup { + width: 640rpx; + padding: 40rpx 32rpx 32rpx; + background: #ffffff; + border-radius: 20rpx; + box-sizing: border-box; + } + + .cancel-confirm-popup__title { + font-size: 42rpx; + font-weight: bold; + color: #303133; + text-align: center; + margin-bottom: 32rpx; + } + + .cancel-confirm-popup__body { + margin-bottom: 36rpx; + padding: 24rpx; + background: #f5f7fa; + border-radius: 12rpx; + } + + .cancel-confirm-popup__text { + font-size: 36rpx; + color: #303133; + line-height: 1.6; + } + + .cancel-confirm-popup__actions { + display: flex; + align-items: center; + } + + .cancel-confirm-popup__btn { + flex: 1; + height: 88rpx; + border-radius: 12rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 36rpx; + font-weight: 500; + } + + .cancel-confirm-popup__btn + .cancel-confirm-popup__btn { + margin-left: 20rpx; + } + + .cancel-confirm-popup__btn--cancel { + background: #f5f7fa; + color: #606266; + border: 1rpx solid #dcdfe6; + } + + .cancel-confirm-popup__btn--confirm { + background: #f56c6c; + color: #ffffff; + } \ No newline at end of file