diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue
index 22acffa5..ece8ba29 100644
--- a/klp-ui/src/views/wms/delivery/waybill/index.vue
+++ b/klp-ui/src/views/wms/delivery/waybill/index.vue
@@ -26,8 +26,8 @@
-
+
@@ -55,7 +55,7 @@
-
+
搜索
重置
@@ -113,7 +113,8 @@
-
+
@@ -140,7 +141,8 @@
-
+
@@ -190,8 +192,10 @@
-
-
+
+
@@ -642,18 +646,24 @@ export default {
handlePrint(row, printType) {
this.loading = true;
this.printType = printType || 0;
- updateDeliveryWaybill({
- waybillId: row.waybillId,
- status: 2
- }).then(() => {
- row.status = 2;
- });
// 获取发货单明细
listDeliveryWaybillDetail({
waybillId: row.waybillId,
pageNum: 1,
pageSize: 1000 // 获取所有明细
}).then(response => {
+ // 该发货单不能是空的
+ if (response.rows.length === 0) {
+ this.$modal.msgError("发货单为空不能打印");
+ this.loading = false;
+ return;
+ }
+ updateDeliveryWaybill({
+ waybillId: row.waybillId,
+ status: 2
+ }).then(() => {
+ row.status = 2;
+ });
// 处理字段映射,确保与wayBill组件使用的字段名一致
this.currentWaybillDetails = response.rows.map(item => ({
coilId: item.coilId,