Przeglądaj źródła

feat(pl): add blank slip print commands to plan list toolbar

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu 3 miesięcy temu
rodzic
commit
8dbb816d01
1 zmienionych plików z 18 dodań i 6 usunięć
  1. 18 6
      web-admin/src/views/pl/plan/index.vue

+ 18 - 6
web-admin/src/views/pl/plan/index.vue

@@ -126,12 +126,8 @@
           >
             <el-icon><Bell /></el-icon>等客户通知
           </el-button>
-          <el-dropdown
-            trigger="click"
-            :disabled="selectedRows.length < 1"
-            @command="handleToolbarPrintSlip"
-          >
-            <el-button class="btn-ghost" :disabled="selectedRows.length < 1">
+          <el-dropdown trigger="click" @command="handleToolbarPrintSlip">
+            <el-button class="btn-ghost">
               <el-icon><Printer /></el-icon>打印单据
               <el-icon class="el-icon--right"><ArrowDown /></el-icon>
             </el-button>
@@ -155,6 +151,9 @@
                 >
                   分装单
                 </el-dropdown-item>
+                <el-dropdown-item divided command="blank-inbound">空白入库单</el-dropdown-item>
+                <el-dropdown-item command="blank-delivery">空白送(提)货单</el-dropdown-item>
+                <el-dropdown-item command="blank-subpack">空白分装单</el-dropdown-item>
               </el-dropdown-menu>
             </template>
           </el-dropdown>
@@ -1132,6 +1131,19 @@ function handleViewPrintSlipCommand(command: string) {
 }
 
 function handleToolbarPrintSlip(command: string) {
+  if (command === 'blank-inbound') {
+    inboundSlipPrintRef.value?.openBlank()
+    return
+  }
+  if (command === 'blank-delivery') {
+    deliverySlipPrintRef.value?.openBlank()
+    return
+  }
+  if (command === 'blank-subpack') {
+    subpackSlipPrintRef.value?.openBlank()
+    return
+  }
+
   const cmd = command as PlPrintSlipCommand
   const plans = selectedRows.value
   const check = canBatchPrintSlip(plans, cmd)