From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示
---
north-glass-erp/northglass-erp/src/hook/queue.js | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/hook/queue.js b/north-glass-erp/northglass-erp/src/hook/queue.js
new file mode 100644
index 0000000..c4503dc
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/hook/queue.js
@@ -0,0 +1,33 @@
+/**
+ * Queue hook
+ * 鎵撳嵃闃熷垪鏂规硶
+ */
+export default function QueuePrinter(list,hiprintTemplate,columnsNum,printer){
+ const queue = JSON.parse(JSON.stringify(list));
+ // 娣诲姞鎵撳嵃浠诲姟
+ this.printJob = function(job) {
+ queue.push(job);
+ };
+
+ // 妯℃嫙鎵撳嵃
+ this.tick = setInterval(()=>{
+
+ if(typeof queue === 'object' && Array.isArray(queue)){
+ if (queue.length > 0) {hiprintTemplate.value.print2(queue[0],{printer:printer})
+ queue.shift(); // 鎵撳嵃浠诲姟锛屽苟浠庨槦鍒椾腑绉婚櫎
+ }else{
+ clearInterval(this.tick)
+ }
+ }else{
+ if (queue.table.length > 0) {
+ hiprintTemplate.value.print2({table:queue.table.slice(0, columnsNum)})
+ queue.table.splice(0, columnsNum);
+ }else{
+ clearInterval(this.tick)
+ }
+ }
+
+ },
+ 500)
+};
+
--
Gitblit v1.8.0