From 7803c38c27894b95cb4d1c3b36906870b62a0297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Fri, 24 Apr 2026 14:31:20 +0800
Subject: [PATCH] =?UTF-8?q?fix(wayBill):=20=E4=BF=AE=E6=94=B9=E6=89=93?=
=?UTF-8?q?=E5=8D=B0=E5=A4=B1=E8=B4=A5=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?=
=?UTF-8?q?=E5=B9=B6=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
feat(CoilSelector): 添加镀层质量列并优化钢卷选择逻辑
1. 在wayBill组件中,当打印失败时不再尝试下载PDF,而是直接显示错误提示
2. 在CoilSelector组件中添加镀层质量列
3. 优化钢卷选择逻辑,增加对未判级钢卷的限制条件
---
klp-ui/src/components/CoilSelector/index.vue | 26 +++++++++++++++----
.../views/wms/delivery/components/wayBill.vue | 13 +++++-----
.../wms/delivery/components/wayBill2.vue | 13 +++++-----
3 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/klp-ui/src/components/CoilSelector/index.vue b/klp-ui/src/components/CoilSelector/index.vue
index ddde3b6b..fcfb86d1 100644
--- a/klp-ui/src/components/CoilSelector/index.vue
+++ b/klp-ui/src/components/CoilSelector/index.vue
@@ -95,6 +95,7 @@
+
@@ -113,6 +114,7 @@
+
@@ -121,7 +123,7 @@
总净重:{{ coilTrimStatistics.total_net_weight || 0 }}t
-
+
@@ -147,6 +149,7 @@
+
@@ -569,11 +572,24 @@ export default {
this.$message.warning('您没有权限选择此钢卷');
return; // 终止后续逻辑
}
- const disabledOList = ['O', 'C+', 'C', 'C-', 'D+', 'D', 'D-']
- if (this.disableO && disabledOList.includes(row.qualityStatus)) {
- this.$message.warning(`${row.qualityStatus}卷不能选择`);
- return;
+ if (this.disableO) {
+ // 并且钢卷的warehouseId不是1988150210872930306
+ // 1988150380649967617
+ // 1988150800092950529
+ // 1988151027466170370其中之一,才不能选择
+ const warehouseIds = ['1988150210872930306', '1988150380649967617', '1988150800092950529', '1988151027466170370'];
+ // 如果没有判级就不能选择,除非是那分剪四个库区
+ if (!row.qualityStatus && !warehouseIds.includes(row.warehouseId)) {
+ this.$message.warning('未判级的钢卷不能选择');
+ return;
+ }
+ const disabledOList = ['O', 'C+', 'C', 'C-', 'D+', 'D', 'D-']
+ if (disabledOList.includes(row.qualityStatus)) {
+ this.$message.warning(`${row.qualityStatus}卷不能选择`);
+ return;
+ }
}
+
this.handleSelect(row);
},
diff --git a/klp-ui/src/views/wms/delivery/components/wayBill.vue b/klp-ui/src/views/wms/delivery/components/wayBill.vue
index 38791f42..12328983 100644
--- a/klp-ui/src/views/wms/delivery/components/wayBill.vue
+++ b/klp-ui/src/views/wms/delivery/components/wayBill.vue
@@ -478,12 +478,13 @@ export default {
const win = window.open(url, '_blank');
if (!win) {
- const a = document.createElement('a');
- a.href = url;
- a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
+ this.$message.error('打印失败,请检查浏览器设置');
+ // const a = document.createElement('a');
+ // a.href = url;
+ // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
+ // document.body.appendChild(a);
+ // a.click();
+ // document.body.removeChild(a);
}
},
async exportExcelByXLSX() {
diff --git a/klp-ui/src/views/wms/delivery/components/wayBill2.vue b/klp-ui/src/views/wms/delivery/components/wayBill2.vue
index cb29572e..3afe63e4 100644
--- a/klp-ui/src/views/wms/delivery/components/wayBill2.vue
+++ b/klp-ui/src/views/wms/delivery/components/wayBill2.vue
@@ -478,12 +478,13 @@ export default {
const win = window.open(url, '_blank');
if (!win) {
- const a = document.createElement('a');
- a.href = url;
- a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
+ this.$message.error('打印失败,请检查浏览器设置');
+ // const a = document.createElement('a');
+ // a.href = url;
+ // a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
+ // document.body.appendChild(a);
+ // a.click();
+ // document.body.removeChild(a);
}
},
async exportExcelByXLSX() {