From 1ff3526312e320509b2522a0295e95169fafcd8f Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期二, 16 九月 2025 15:57:01 +0800
Subject: [PATCH] 修改config

---
 Scripts/config.js |  131 ++++++++++++++++++++++++++++++++++---------
 1 files changed, 103 insertions(+), 28 deletions(-)

diff --git a/Scripts/config.js b/Scripts/config.js
index 0a74c83..f5d8bf5 100644
--- a/Scripts/config.js
+++ b/Scripts/config.js
@@ -1,7 +1,10 @@
-锘�/*var APIURL = "http://192.168.1.187:8083/api/";*///鍚庣鍙戝竷娴嬭瘯鍦板潃
-var APIURL = "http://localhost:5204/api/";
-/*var APIURL_PC = "http://192.168.1.187:81/";*/ //PC鍚庣鐨勫湴鍧�
-var APIURL_PC = "http://192.168.1.187:8081/";//
+锘�//var APIURL = "http://192.168.1.187:8083/api/";//PDA鍚庣鍙戝竷娴嬭瘯鍦板潃锛堝唴缃戯級
+//var APIURL = "http://192.168.1.187:83/api/";//PDA鍚庣鍙戝竷姝e紡鍦板潃锛堝唴缃戯級
+var APIURL = "http://localhost:5204/api/";//鏈湴璋冭瘯鍦板潃
+
+//var APIURL_PC = "http://192.168.1.187:81/"; //PC鍚庣鐨勬寮忓湴鍧�锛堝唴缃戯級
+var APIURL_PC = "http://116.148.211.203:8081/"; //PC鍚庣鐨勬祴璇曞湴鍧�锛堝缃戯級
+
 var APIURL_IMAGE = APIURL_PC+"upload/";
 var ISNEEDLOGIN = true;
 String.prototype.trim = function () {
@@ -83,6 +86,8 @@
         url = (APIURL_PC + url);
     }
     let headers = { 'Content-Type': 'application/json', }
+    var orgId = Cookies.get('orgId')
+    headers['OrgId'] = orgId;
     if (isToken) {
         var timestamp = (new Date()).getTime();
         var token = Cookies.get('loginGuid')
@@ -165,31 +170,101 @@
 }
 
 
-// 鏂板鍏ㄥ眬鎵撳嵃鏂规硶
+//// 鏂板鍏ㄥ眬鎵撳嵃鏂规硶
+//Vue.prototype.sendPrintMessage = function (tbBillList) {
+//    const cfDetails = tbBillList.cfBarInfo.map(item => {
+//        return "! 0 200 200 210 1\r\n" +
+//            "PAGE - WIDTH 700 \r\n" +
+//            "GAP-SENSE \r\n" +
+///*            "BOX 0 0 700 180 0 \r\n" +*/
+//            `T 16 0 10 10 鐗╂枡缂栫爜锛歕r\n` +
+//            `T 55 3 120 10 ${item.iteM_NO}\r\n` +
+//            `T 16 0 310 10 ${item.item_name}\r\n` +
+//            "T 55 2 10 42 鐗╂枡瑙勬牸锛歕r\n" +
+//            `T 55 2 110 42 ${item.item_model}\r\n` +
+//            "T 16 0 10 78 鏁伴噺锛歕r\n" +
+//            `T 0 5 90 78 ${item.quantity}\r\n` +
+//            `T 16 5 180 78 ${item.barType}\r\n` +
+//            `BARCODE 128 1 25 35 350 130 ${item.iteM_BARCODE}\r\n` +
+///*            `T 0 1 350 130 ${item.iteM_BARCODE}\r\n` +*/
+//            "T 55 0 10 125 鍒涘缓鏃堕棿锛歕r\n" +
+//            `T 55 0 120 125 ${item.creatE_DATE}\r\n` +
+//            "T 55 0 10 150 鎵撳嵃鏃堕棿锛歕r\n" +
+//            `T 55 0 120 150 ${item.print_date}\r\n` +
+//            "B QR 580 12 M 2 U 4\r\n" +
+//            `MA,${item.iteM_BARCODE}\r\n` +
+//            "ENDQR\r\nFORM\r\nPRINT\r\n";
+//    });
+
 Vue.prototype.sendPrintMessage = function (tbBillList) {
     const cfDetails = tbBillList.cfBarInfo.map(item => {
-        return "! 0 200 200 210 1\r\n" +
-            "PAGE - WIDTH 700 \r\n" +
-            "GAP-SENSE \r\n" +
-/*            "BOX 0 0 700 180 0 \r\n" +*/
-            `T 16 0 10 10 鐗╂枡缂栫爜锛歕r\n` +
-            `T 55 3 120 10 ${item.iteM_NO}\r\n` +
-            `T 16 0 310 10 ${item.item_name}\r\n` +
-            "T 55 2 10 42 鐗╂枡瑙勬牸锛歕r\n" +
-            `T 55 2 110 42 ${item.item_model}\r\n` +
-            "T 16 0 10 78 鏁伴噺锛歕r\n" +
-            `T 0 5 90 78 ${item.quantity}\r\n` +
-            `T 16 5 180 78 ${item.barType}\r\n` +
-            `BARCODE 128 1 25 35 350 130 ${item.iteM_BARCODE}\r\n` +
-/*            `T 0 1 350 130 ${item.iteM_BARCODE}\r\n` +*/
-            "T 55 0 10 125 鍒涘缓鏃堕棿锛歕r\n" +
-            `T 55 0 120 125 ${item.creatE_DATE}\r\n` +
-            "T 55 0 10 150 鎵撳嵃鏃堕棿锛歕r\n" +
-            `T 55 0 120 150 ${item.print_date}\r\n` +
-            "B QR 580 12 M 2 U 4\r\n" +
-            `MA,${item.iteM_BARCODE}\r\n` +
-            "ENDQR\r\nFORM\r\nPRINT\r\n";
+        return "! 0 195 200 472 1\r\n" +  // 鍩虹鍋忕Щ閲忓乏绉�5鍍忕礌
+            "PAGE-WIDTH 545\r\n" +     // 椤甸潰瀹藉害鍑忓皯5鍍忕礌
+            "GAP-SENSE\r\n" +
+
+            // 澶栨 - 鏁翠綋宸︾Щ5鍍忕礌
+            "BOX -3 2 543 470 2\r\n" +
+            // ==================== 鐗╂枡鏉$爜锛堢涓�琛岋級====================
+            "LINE -3 62 425 62 1\r\n" +
+            "T 55 0 8 27 鐗╂枡鏉$爜:\r\n" +
+            `T 55 3 120 27 ${item.iteM_BARCODE}\r\n` +  // 鐗╂枡鏉$爜鍊�
+
+            // ==================== 鐗╂枡缂栫爜锛堢浜岃锛�====================
+            "LINE -3 124 543 124 1\r\n" +
+            "T 55 0 8 89 缂栫爜:\r\n" +
+            `T 55 3 120 89 ${item.iteM_NO}\r\n` +  // 鐗╂枡缂栫爜鍊�
+
+            // ==================== 渚涘簲鍟嗭紙绗笁琛岋級====================
+            "LINE -3 186 543 186 1\r\n" +     // 绗�3鏉″垎闅旂嚎锛堥棿闅�62锛�
+            "T 55 0 8 151 渚涘簲鍟�:\r\n" +
+            `T 55 3 120 151 ${item.supp_name || ''}\r\n` +  // 渚涘簲鍟嗗�硷紙鍋囪瀛楁鍚嶏級
+
+            // ==================== 鐗╂枡鍚嶇О锛堢鍥涜锛�====================
+            "LINE -3 248 543 248 1\r\n" +     // 绗�4鏉″垎闅旂嚎锛堥棿闅�62锛�
+            "T 55 0 8 213 鍚嶇О:\r\n" +
+            `T 55 3 120 213 ${item.item_name}\r\n` +  // 鐗╂枡鍚嶇О鍊�
+
+            // ==================== 瑙勬牸鍨嬪彿锛堢浜旇锛�====================
+            "LINE -3 310 543 310 1\r\n" +     // 绗�5鏉″垎闅旂嚎锛堥棿闅�62锛�
+            "T 55 0 8 275 瑙勬牸:\r\n" +
+            `T 55 3 120 275 ${item.item_model}\r\n` +  // 瑙勬牸鍨嬪彿鍊�
+
+            // ==================== 浠撳簱锛堢鍏锛�====================
+            "LINE -3 360 543 360 1\r\n" +     // 绗�6鏉″垎闅旂嚎锛堢Щ鑷崇珫绾块《绔痀=360锛�
+            "T 55 0 8 335 浠撳簱:\r\n" +
+            `T 55 3 120 335 ${item.depot_name || ''}\r\n` +  // 浠撳簱鍊硷紙鍋囪瀛楁鍚嶏級
+
+            // ==================== 鏁伴噺鍜屼粨绠″憳锛堢涓冭锛�====================
+            "LINE -3 430 543 430 1\r\n" +     // 搴曢儴妯嚎锛堜笌绔栫嚎搴曠瀵归綈锛�
+            "T 55 0 8 380 鏁伴噺:\r\n" +        // 鏂囨湰浣嶇疆淇濇寔
+            `T 55 3 120 380 ${item.quantity}\r\n` +  // 鏁伴噺鍊�
+            "T 55 0 275 380 浠撶鍛�:\r\n" +    // 鏂囨湰浣嶇疆淇濇寔
+            `T 55 3 395 380 ${item.cgy || ''}\r\n` +  // 浠撶鍛樺�硷紙鍋囪瀛楁鍚嶏級
+
+            // 涓棿绔栫嚎鍒嗛殧锛堣寖鍥碮=360-430锛屼笌涓婁笅妯嚎琛旀帴锛�
+            "LINE 265 430 265 360 1\r\n" +    // 绔栫嚎椤剁瀵归綈浠撳簱琛屽垎闅旂嚎
+
+            // ==================== 搴曢儴鏃堕棿淇℃伅 ====================
+            "T 55 0 395 440 鎵撳嵃鏃堕棿\r\n" +  // 浣嶇疆淇濇寔
+            "T 55 0 8 440 " + new Date().toLocaleString('zh-CN', {  // 鏃堕棿鏍煎紡鏀逛负骞存湀鏃ユ椂鍒嗙
+                year: 'numeric',
+                month: '2-digit',
+                day: '2-digit',
+                hour: '2-digit',
+                minute: '2-digit',
+                second: '2-digit'
+            }) + "\r\n" +
+
+            // ==================== 浜岀淮鐮佸尯鍩燂紙宸︾Щ5鍍忕礌锛�====================
+            "BOX 425 3 535 113 1\r\n" +       // 浣嶇疆淇濇寔
+            "B QR 430 8 M 2 U 5\r\n" +        // 浣嶇疆淇濇寔
+            `MA,${item.iteM_BARCODE}\r\n` +  // 浣跨敤鐗╂枡鏉$爜鐢熸垚浜岀淮鐮�
+            "ENDQR\r\n" +
+
+            "FORM\r\n" +
+            "PRINT\r\n";
     });
+
 
     let sendData = {
         Type: 'Bar',
@@ -209,8 +284,8 @@
 Vue.prototype.$playSound = function(type = 'success') {
     try {
         const audioMap = {
-            success: '/audio/OK.wav',
-            error: '/audio/NG.wav'
+            success: '/audio/YES.wav',
+            error: '/audio/NO.wav'
         };
         const audio = new Audio(audioMap[type]);
         audio.play().catch(error => {

--
Gitblit v1.9.3