Bladeren bron

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

覃浩 2 jaren geleden
bovenliggende
commit
33958902bf
33 gewijzigde bestanden met toevoegingen van 5182 en 179 verwijderingen
  1. 311 0
      src/utils/lodop/LodopFuncs.js
  2. 97 0
      src/utils/lodop/print.css
  3. 992 0
      src/utils/lodop/print.js
  4. 1 0
      src/utils/lodop/print.min.css
  5. 1 0
      src/utils/lodop/print.min.js
  6. 100 24
      src/views/room/fangtailive.vue
  7. 1 1
      src/views/room/modules/checkIn/BillRoomInfo.vue
  8. 3 1
      src/views/settings/components/modules/dictionaryInfoLeft.vue
  9. 4 5
      src/views/settings/components/modules/printComponents/breakFastCouponPrint.vue
  10. 272 0
      src/views/settings/components/modules/printComponents/changeRoomPrint.vue
  11. 4 2
      src/views/settings/components/modules/printComponents/extractPrint.vue
  12. 552 0
      src/views/settings/components/modules/printComponents/handoverDetailPrint.vue
  13. 724 0
      src/views/settings/components/modules/printComponents/handoverPrint.vue
  14. 48 4
      src/views/settings/components/modules/printComponents/hotelEntryPrint.vue
  15. 47 3
      src/views/settings/components/modules/printComponents/hotelOutPrint.vue
  16. 43 2
      src/views/settings/components/modules/printComponents/incomePrint.vue
  17. 32 10
      src/views/settings/components/modules/printComponents/paymentPrint.vue
  18. 25 1
      src/views/settings/components/modules/printComponents/posCheckOutPrint.vue
  19. 29 4
      src/views/settings/components/modules/printComponents/refundPrint.vue
  20. 542 0
      src/views/settings/components/modules/printComponents/registrationPrint.vue
  21. 30 20
      src/views/settings/components/modules/printComponents/renewalOrderPrint.vue
  22. 43 3
      src/views/settings/components/modules/printComponents/settlePrint.vue
  23. 695 0
      src/views/settings/components/modules/printComponents/shiftHandoverPrint.vue
  24. 46 4
      src/views/settings/components/modules/printComponents/teamCheckIn.vue
  25. 40 6
      src/views/settings/components/modules/printComponents/teamCheckOut.vue
  26. 277 75
      src/views/settings/components/modules/printTemplateForm.vue
  27. 2 2
      src/views/settings/components/pos/modules/batchAddForm.vue
  28. 19 4
      src/views/settings/components/pos/posTable.vue
  29. 1 1
      src/views/settings/components/pos/tabletOrdering.vue
  30. 6 6
      src/views/settings/components/printTemplate.vue
  31. 9 1
      src/views/system/YezhuList.vue
  32. 126 0
      src/views/system/modules/yezhu/shuilvForm.vue
  33. 60 0
      src/views/system/modules/yezhu/shuilvModal.vue

+ 311 - 0
src/utils/lodop/LodopFuncs.js

@@ -0,0 +1,311 @@
+// //==本JS是加载Lodop插件或Web打印服务CLodop/Lodop7的综合示例,可直接使用,建议理解后融入自己程序==
+//
+// //用双端口加载主JS文件Lodop.js(或CLodopfuncs.js兼容老版本)以防其中某端口被占:
+// var MainJS ="CLodopfuncs.js",
+//     URL_WS1   = "ws://localhost:8000/"+MainJS,                //ws用8000/18000
+//     URL_WS2   = "ws://localhost:18000/"+MainJS,
+//     URL_HTTP1 = "http://localhost:8000/"+MainJS,              //http用8000/18000
+//     URL_HTTP2 = "http://localhost:18000/"+MainJS,
+//     URL_HTTP3 = "https://localhost.lodop.net:8443/"+MainJS;   //https用8000/8443
+//
+// var CreatedOKLodopObject, CLodopIsLocal, LoadJsState;
+//
+// //==判断是否需要CLodop(那些不支持插件的浏览器):==
+// function needCLodop() {
+//     try {
+//         var ua = navigator.userAgent;
+//         if (ua.match(/Windows\sPhone/i) ||
+//             ua.match(/iPhone|iPod|iPad/i) ||
+//             ua.match(/Android/i) ||
+//             ua.match(/Edge\D?\d+/i))
+//             return true;
+//         var verTrident = ua.match(/Trident\D?\d+/i);
+//         var verIE = ua.match(/MSIE\D?\d+/i);
+//         var verOPR = ua.match(/OPR\D?\d+/i);
+//         var verFF = ua.match(/Firefox\D?\d+/i);
+//         var x64 = ua.match(/x64/i);
+//         if ((!verTrident) && (!verIE) && (x64)) return true;
+//         else if (verFF) {
+//             verFF = verFF[0].match(/\d+/);
+//             if ((verFF[0] >= 41) || (x64)) return true;
+//         } else if (verOPR) {
+//             verOPR = verOPR[0].match(/\d+/);
+//             if (verOPR[0] >= 32) return true;
+//         } else if ((!verTrident) && (!verIE)) {
+//             var verChrome = ua.match(/Chrome\D?\d+/i);
+//             if (verChrome) {
+//                 verChrome = verChrome[0].match(/\d+/);
+//                 if (verChrome[0] >= 41) return true;
+//             }
+//         }
+//         return false;
+//     } catch (err) {
+//         return true;
+//     }
+// }
+//
+// //==检查加载成功与否,如没成功则用http(s)再试==
+// //==低版本CLODOP6.561/Lodop7.043及前)用本方法==
+// function checkOrTryHttp() {
+//   if (window.getCLodop) {
+//      LoadJsState = "complete";
+//      return true;
+//   }
+//   if (LoadJsState == "loadingB" || LoadJsState == "complete") return;
+//   LoadJsState = "loadingB";
+//   var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
+//   var JS1 = document.createElement("script")
+//      ,JS2 = document.createElement("script")
+//      ,JS3 = document.createElement("script");
+//   JS1.src = URL_HTTP1;
+//   JS2.src = URL_HTTP2;
+//   JS3.src = URL_HTTP3;
+//   JS1.onload = JS2.onload = JS3.onload = JS2.onerror = JS3.onerror=function(){LoadJsState = "complete";}
+//   JS1.onerror = function(e) {
+//       if (window.location.protocol !== 'https:')
+//           head.insertBefore(JS2, head.firstChild); else
+//           head.insertBefore(JS3, head.firstChild);
+//   }
+//   head.insertBefore(JS1,head.firstChild);
+// }
+//
+// //==加载Lodop对象的主过程:==
+// (function loadCLodop(){
+//   if (!needCLodop()) return;
+//   CLodopIsLocal = !!((URL_WS1 + URL_WS2).match(/\/\/localho|\/\/127.0.0./i));
+//   LoadJsState = "loadingA";
+//   if (!window.WebSocket && window.MozWebSocket) window.WebSocket=window.MozWebSocket;
+//   //ws方式速度快(小于200ms)且可避免CORS错误,但要求Lodop版本足够新:
+//   try {
+//     var WSK1=new WebSocket(URL_WS1);
+//     WSK1.onopen = function(e) { setTimeout("checkOrTryHttp();",200); }
+//     WSK1.onmessage = function(e) {if (!window.getCLodop) eval(e.data);}
+//     WSK1.onerror = function(e) {
+//          var WSK2=new WebSocket(URL_WS2);
+//          WSK2.onopen = function(e) {setTimeout("checkOrTryHttp();",200);}
+//          WSK2.onmessage = function(e) {if (!window.getCLodop) eval(e.data);}
+//          WSK2.onerror= function(e) {checkOrTryHttp();}
+//     }
+//   } catch(e){
+//     checkOrTryHttp();
+//   }
+// })();
+//
+// //==获取LODOP对象主过程,判断是否安装、需否升级:==
+// function getLodop(oOBJECT, oEMBED) {
+//     var strFontTag = "<br><font color='#FF00FF'>打印控件";
+//     var strLodopInstall = strFontTag + "未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>";
+//     var strLodopUpdate = strFontTag + "需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>";
+//     var strLodop64Install = strFontTag + "未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>";
+//     var strLodop64Update = strFontTag + "需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>";
+//     var strCLodopInstallA = "<br><font color='#FF00FF'>Web打印服务CLodop未安装启动,点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>";
+//     var strCLodopInstallB = "<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)";
+//     var strCLodopUpdate = "<br><font color='#FF00FF'>Web打印服务CLodop需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>";
+//     var strLodop7FontTag = "<br><font color='#FF00FF'>Web打印服务Lodop7";
+//     var strLodop7HrefX86 = "点击这里<a href='Lodop7_Linux_X86_64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)";
+//     var strLodop7HrefARM = "点击这里<a href='Lodop7_Linux_ARM64.tar.gz'  target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)";
+//     var strLodop7Install_X86 = strLodop7FontTag + "未安装启动," + strLodop7HrefX86;
+//     var strLodop7Install_ARM = strLodop7FontTag + "未安装启动," + strLodop7HrefARM;
+//     var strLodop7Update_X86 = strLodop7FontTag + "需升级," + strLodop7HrefX86;
+//     var strLodop7Update_ARM = strLodop7FontTag + "需升级," + strLodop7HrefARM;
+//     var strInstallOK = ",成功后请刷新本页面或重启浏览器。</font>";
+//     var LODOP;
+//     try {
+//         var isWinIE = (/MSIE/i.test(navigator.userAgent)) || (/Trident/i.test(navigator.userAgent));
+//         var isWinIE64 = isWinIE && (/x64/i.test(navigator.userAgent));
+//         var isLinuxX86 = (/Linux/i.test(navigator.platform)) && (/x86/i.test(navigator.platform));
+//         var isLinuxARM = (/Linux/i.test(navigator.platform)) && (/aarch/i.test(navigator.platform));
+//
+//         if (needCLodop() || isLinuxX86 || isLinuxARM) {
+//             try {
+//                 LODOP = window.getCLodop();
+//             } catch (err) {}
+//             if (!LODOP && LoadJsState !== "complete") {
+//                 if (!LoadJsState)
+//                     alert("未曾加载Lodop主JS文件,请先调用loadCLodop过程."); else
+//                     alert("网页还没下载完毕,请稍等一下再操作.");
+//                 return;
+//             }
+//             var strAlertMessage;
+//             if (!LODOP) {
+//                 if (isLinuxX86)
+//                     strAlertMessage = strLodop7Install_X86;
+//                 else if (isLinuxARM)
+//                     strAlertMessage = strLodop7Install_ARM;
+//                 else
+//                     strAlertMessage = strCLodopInstallA + (CLodopIsLocal ? strCLodopInstallB : "");
+//                 document.body.innerHTML = strAlertMessage + strInstallOK + document.body.innerHTML;
+//                 return;
+//             } else {
+//                 if (isLinuxX86 && LODOP.CVERSION < "7.0.4.3")
+//                     strAlertMessage = strLodop7Update_X86;
+//                 else if (isLinuxARM && LODOP.CVERSION < "7.0.4.3")
+//                     strAlertMessage = strLodop7Update_ARM;
+//                 else if (CLODOP.CVERSION < "6.5.7.1")
+//                     strAlertMessage = strCLodopUpdate;
+//
+//                 if (strAlertMessage)
+//                     document.body.innerHTML = strAlertMessage + strInstallOK + document.body.innerHTML;
+//             }
+//         } else {
+//             //==如果页面有Lodop插件就直接使用,否则新建:==
+//             if (oOBJECT || oEMBED) {
+//                 if (isWinIE)
+//                     LODOP = oOBJECT;
+//                 else
+//                     LODOP = oEMBED;
+//             } else if (!CreatedOKLodopObject) {
+//                 LODOP = document.createElement("object");
+//                 LODOP.setAttribute("width", 0);
+//                 LODOP.setAttribute("height", 0);
+//                 LODOP.setAttribute("style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;");
+//                 if (isWinIE)
+//                     LODOP.setAttribute("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
+//                 else
+//                     LODOP.setAttribute("type", "application/x-print-lodop");
+//                 document.documentElement.appendChild(LODOP);
+//                 CreatedOKLodopObject = LODOP;
+//             } else
+//                 LODOP = CreatedOKLodopObject;
+//             //==Lodop插件未安装时提示下载地址:==
+//             if ((!LODOP) || (!LODOP.VERSION)) {
+//                 document.body.innerHTML = (isWinIE64 ? strLodop64Install : strLodopInstall) + strInstallOK + document.body.innerHTML;
+//                 return LODOP;
+//             }
+//             if (LODOP.VERSION < "6.2.2.6") {
+//                 document.body.innerHTML = (isWinIE64 ? strLodop64Update : strLodopUpdate) + strInstallOK + document.body.innerHTML;
+//             }
+//         }
+//         //===如下空白位置适合调用统一功能(如注册语句、语言选择等):=======================
+//
+//
+//         //===============================================================================
+//         return LODOP;
+//     } catch (err) {
+//         alert("getLodop出错:" + err);
+//     }
+// }
+//
+var CreatedOKLodop7766=null;
+
+//====判断是否需要安装CLodop云打印服务器:====
+export function needCLodop(){
+    try{
+        var ua=navigator.userAgent;
+        if (ua.match(/Windows\sPhone/i) !=null) return true;
+        if (ua.match(/iPhone|iPod/i) != null) return true;
+        if (ua.match(/Android/i) != null) return true;
+        if (ua.match(/Edge\D?\d+/i) != null) return true;
+
+        var verTrident=ua.match(/Trident\D?\d+/i);
+        var verIE=ua.match(/MSIE\D?\d+/i);
+        var verOPR=ua.match(/OPR\D?\d+/i);
+        var verFF=ua.match(/Firefox\D?\d+/i);
+        var x64=ua.match(/x64/i);
+        if ((verTrident==null)&&(verIE==null)&&(x64!==null))
+            return true; else
+        if ( verFF !== null) {
+            verFF = verFF[0].match(/\d+/);
+            if ((verFF[0]>= 42)||(x64!==null)) return true;
+        } else
+        if ( verOPR !== null) {
+            verOPR = verOPR[0].match(/\d+/);
+            if ( verOPR[0] >= 32 ) return true;
+        } else
+        if ((verTrident==null)&&(verIE==null)) {
+            var verChrome=ua.match(/Chrome\D?\d+/i);
+            if ( verChrome !== null ) {
+                verChrome = verChrome[0].match(/\d+/);
+                if (verChrome[0]>=42) return true;
+            };
+        };
+        return false;
+    } catch(err) {return true;};
+};
+
+//====页面引用CLodop云打印必须的JS文件:====
+if (needCLodop()) {
+    var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
+    var oscript = document.createElement("script");
+    oscript.src ="http://localhost:8000/CLodopfuncs.js?priority=1";
+    head.insertBefore( oscript,head.firstChild );
+
+    //引用双端口(8000和18000)避免其中某个被占用:
+    oscript = document.createElement("script");
+    oscript.src ="http://localhost:18000/CLodopfuncs.js?priority=0";
+    head.insertBefore( oscript,head.firstChild );
+};
+
+//====获取LODOP对象的主过程:====
+export function getLodop(oOBJECT,oEMBED){
+    var strHtmInstall="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
+    var strHtmUpdate="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
+    var strHtm64_Install="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
+    var strHtm64_Update="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
+    var strHtmFireFox="<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>";
+    var strHtmChrome="<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>";
+    var strCLodopInstall="<br><font color='#FF00FF'>CLodop云打印服务(localhost本地)未安装启动!点击这里<a href='http://www.c-lodop.com/download/CLodop_Setup_for_Win32NT_https_3.008Extend.zip' target='_self'>执行安装</a>,安装后请刷新页面。</font>";
+    var strCLodopUpdate="<br><font color='#FF00FF'>CLodop云打印服务需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>";
+    var LODOP;
+    try{
+        var isIE = (navigator.userAgent.indexOf('MSIE')>=0) || (navigator.userAgent.indexOf('Trident')>=0);
+        if (needCLodop()) {
+            try{ LODOP=getCLodop();} catch(err) {};
+            if (!LODOP && document.readyState!=="complete") {alert("C-Lodop没准备好,请稍后再试!"); return;};
+            if (!LODOP) {
+                // if (isIE) document.write(strCLodopInstall); else
+                // document.documentElement.innerHTML=strCLodopInstall+document.documentElement.innerHTML;
+                // return;
+            } else {
+
+                if (CLODOP.CVERSION<"3.0.0.2") {
+                    if (isIE) document.write(strCLodopUpdate); else
+                        document.documentElement.innerHTML=strCLodopUpdate+document.documentElement.innerHTML;
+                };
+                if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
+                if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
+            };
+        } else {
+            var is64IE  = isIE && (navigator.userAgent.indexOf('x64')>=0);
+            //=====如果页面有Lodop就直接使用,没有则新建:==========
+            if (oOBJECT!=undefined || oEMBED!=undefined) {
+                if (isIE) LODOP=oOBJECT; else  LODOP=oEMBED;
+            } else if (CreatedOKLodop7766==null){
+                LODOP=document.createElement("object");
+                LODOP.setAttribute("width",0);
+                LODOP.setAttribute("height",0);
+                LODOP.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;");
+                if (isIE) LODOP.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
+                else LODOP.setAttribute("type","application/x-print-lodop");
+                document.documentElement.appendChild(LODOP);
+                CreatedOKLodop7766=LODOP;
+            } else LODOP=CreatedOKLodop7766;
+            //=====Lodop插件未安装时提示下载地址:==========
+            if ((LODOP==null)||(typeof(LODOP.VERSION)=="undefined")) {
+                if (navigator.userAgent.indexOf('Chrome')>=0)
+                    document.documentElement.innerHTML=strHtmChrome+document.documentElement.innerHTML;
+                if (navigator.userAgent.indexOf('Firefox')>=0)
+                    document.documentElement.innerHTML=strHtmFireFox+document.documentElement.innerHTML;
+                if (is64IE) document.write(strHtm64_Install); else
+                if (isIE)   document.write(strHtmInstall);    else
+                    document.documentElement.innerHTML=strHtmInstall+document.documentElement.innerHTML;
+                return LODOP;
+            };
+        };
+        if (LODOP.VERSION<"6.0") {
+            if (!needCLodop()){
+                if (is64IE) document.write(strHtm64_Update); else
+                if (isIE) document.write(strHtmUpdate); else
+                    document.documentElement.innerHTML=strHtmUpdate+document.documentElement.innerHTML;
+            };
+            return LODOP;
+        };
+        //===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
+        //LODOP.SET_LICENSES("北京XXXXX公司","8xxxxxxxxxxxxx5","","");
+
+        //===========================================================
+        return LODOP;
+    } catch(err) {alert("getLodop出错:"+err);};
+};
+
+

+ 97 - 0
src/utils/lodop/print.css

@@ -0,0 +1,97 @@
+/*
+|--------------------------------------------------------------------------
+| Modules
+|--------------------------------------------------------------------------
+*/
+/*
+|--------------------------------------------------------------------------
+| Aliases
+|--------------------------------------------------------------------------
+*/
+/*
+|--------------------------------------------------------------------------
+| Partials
+|--------------------------------------------------------------------------
+*/
+.printModal {
+  font-family: sans-serif;
+  display: flex;
+  text-align: center;
+  font-weight: 300;
+  font-size: 30px;
+  left: 0;
+  top: 0;
+  position: absolute;
+  color: #045fb4;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(255, 255, 255, 0.9); }
+
+/*
+|--------------------------------------------------------------------------
+| Close Button
+|--------------------------------------------------------------------------
+*/
+.printClose {
+  position: absolute;
+  right: 10px;
+  top: 10px; }
+
+.printClose:before {
+  content: "\00D7";
+  font-family: "Helvetica Neue", sans-serif;
+  font-weight: 100;
+  line-height: 1px;
+  padding-top: 0.5em;
+  display: block;
+  font-size: 2em;
+  text-indent: 1px;
+  overflow: hidden;
+  height: 1.25em;
+  width: 1.25em;
+  text-align: center;
+  cursor: pointer; }
+
+.printSpinner {
+  margin-top: 3px;
+  margin-left: -40px;
+  position: absolute;
+  display: inline-block;
+  width: 25px;
+  height: 25px;
+  border: 2px solid #045fb4;
+  border-radius: 50%;
+  animation: spin 0.75s infinite linear; }
+
+.printSpinner::before, .printSpinner::after {
+  left: -2px;
+  top: -2px;
+  display: none;
+  position: absolute;
+  content: '';
+  width: inherit;
+  height: inherit;
+  border: inherit;
+  border-radius: inherit; }
+
+.printSpinner, .printSpinner::before, .printSpinner::after {
+  display: inline-block;
+  border-color: transparent;
+  border-top-color: #045fb4;
+  animation-duration: 1.2s; }
+
+.printSpinner::before {
+  transform: rotate(120deg); }
+
+.printSpinner::after {
+  transform: rotate(240deg); }
+
+/* Keyframes for the animation */
+@keyframes spin {
+  from {
+    transform: rotate(0deg); }
+  to {
+    transform: rotate(360deg); } }
+
+
+/*# sourceMappingURL=print.map*/

+ 992 - 0
src/utils/lodop/print.js

@@ -0,0 +1,992 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory();
+	else if(typeof define === 'function' && define.amd)
+		define([], factory);
+	else if(typeof exports === 'object')
+		exports["printJS"] = factory();
+	else
+		root["printJS"] = factory();
+})(window, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "./src/index.js":
+/*!**********************!*\
+  !*** ./src/index.js ***!
+  \**********************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _sass_index_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sass/index.scss */ "./src/sass/index.scss");
+/* harmony import */ var _sass_index_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_sass_index_scss__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _js_init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./js/init */ "./src/js/init.js");
+
+
+var printJS = _js_init__WEBPACK_IMPORTED_MODULE_1__["default"].init;
+
+if (typeof window !== 'undefined') {
+  window.printJS = printJS;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (printJS);
+
+/***/ }),
+
+/***/ "./src/js/browser.js":
+/*!***************************!*\
+  !*** ./src/js/browser.js ***!
+  \***************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var Browser = {
+  // Firefox 1.0+
+  isFirefox: function isFirefox() {
+    return typeof InstallTrigger !== 'undefined';
+  },
+  // Internet Explorer 6-11
+  isIE: function isIE() {
+    return navigator.userAgent.indexOf('MSIE') !== -1 || !!document.documentMode;
+  },
+  // Edge 20+
+  isEdge: function isEdge() {
+    return !Browser.isIE() && !!window.StyleMedia;
+  },
+  // Chrome 1+
+  isChrome: function isChrome() {
+    var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
+    return !!context.chrome;
+  },
+  // At least Safari 3+: "[object HTMLElementConstructor]"
+  isSafari: function isSafari() {
+    return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || navigator.userAgent.toLowerCase().indexOf('safari') !== -1;
+  },
+  // IOS Chrome
+  isIOSChrome: function isIOSChrome() {
+    return navigator.userAgent.toLowerCase().indexOf('crios') !== -1;
+  }
+};
+/* harmony default export */ __webpack_exports__["default"] = (Browser);
+
+/***/ }),
+
+/***/ "./src/js/functions.js":
+/*!*****************************!*\
+  !*** ./src/js/functions.js ***!
+  \*****************************/
+/*! exports provided: addWrapper, capitalizePrint, collectStyles, addHeader, cleanUp, isRawHTML */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addWrapper", function() { return addWrapper; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "capitalizePrint", function() { return capitalizePrint; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "collectStyles", function() { return collectStyles; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addHeader", function() { return addHeader; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanUp", function() { return cleanUp; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRawHTML", function() { return isRawHTML; });
+/* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modal */ "./src/js/modal.js");
+/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browser */ "./src/js/browser.js");
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+
+
+function addWrapper(htmlData, params) {
+  var bodyStyle = 'font-family:' + params.font + ' !important; font-size: ' + params.font_size + ' !important; width:100%;';
+  return '<div style="' + bodyStyle + '">' + htmlData + '</div>';
+}
+function capitalizePrint(obj) {
+  return obj.charAt(0).toUpperCase() + obj.slice(1);
+}
+function collectStyles(element, params) {
+  var win = document.defaultView || window; // String variable to hold styling for each element
+
+  var elementStyle = ''; // Loop over computed styles
+
+  var styles = win.getComputedStyle(element, '');
+
+  for (var key = 0; key < styles.length; key++) {
+    // Check if style should be processed
+    if (params.targetStyles.indexOf('*') !== -1 || params.targetStyle.indexOf(styles[key]) !== -1 || targetStylesMatch(params.targetStyles, styles[key])) {
+      if (styles.getPropertyValue(styles[key])) elementStyle += styles[key] + ':' + styles.getPropertyValue(styles[key]) + ';';
+    }
+  } // Print friendly defaults (deprecated)
+
+
+  // elementStyle += 'max-width: ' + params.maxWidth + 'px !important; font-size: ' + params.font_size + ' !important;';
+  elementStyle += 'max-width: ' + params.maxWidth + 'px !important;'; //解决print.js 不能修改font_size属性问题
+  return elementStyle;
+}
+
+function targetStylesMatch(styles, value) {
+  for (var i = 0; i < styles.length; i++) {
+    if (_typeof(value) === 'object' && value.indexOf(styles[i]) !== -1) return true;
+  }
+
+  return false;
+}
+
+function addHeader(printElement, params) {
+  // Create the header container div
+  var headerContainer = document.createElement('div'); // Check if the header is text or raw html
+
+  if (isRawHTML(params.header)) {
+    headerContainer.innerHTML = params.header;
+  } else {
+    // Create header element
+    var headerElement = document.createElement('h1'); // Create header text node
+
+    var headerNode = document.createTextNode(params.header); // Build and style
+
+    headerElement.appendChild(headerNode);
+    headerElement.setAttribute('style', params.headerStyle);
+    headerContainer.appendChild(headerElement);
+  }
+
+  printElement.insertBefore(headerContainer, printElement.childNodes[0]);
+}
+function cleanUp(params) {
+  // If we are showing a feedback message to user, remove it
+  if (params.showModal) _modal__WEBPACK_IMPORTED_MODULE_0__["default"].close(); // Check for a finished loading hook function
+
+  if (params.onLoadingEnd) params.onLoadingEnd(); // If preloading pdf files, clean blob url
+
+  if (params.showModal || params.onLoadingStart) window.URL.revokeObjectURL(params.printable); // Run onPrintDialogClose callback
+
+  var event = 'mouseover';
+
+  if (_browser__WEBPACK_IMPORTED_MODULE_1__["default"].isChrome() || _browser__WEBPACK_IMPORTED_MODULE_1__["default"].isFirefox()) {
+    // Ps.: Firefox will require an extra click in the document to fire the focus event.
+    event = 'focus';
+  }
+
+  var handler = function handler() {
+    // Make sure the event only happens once.
+    window.removeEventListener(event, handler);
+    params.onPrintDialogClose(); // Remove iframe from the DOM
+
+    var iframe = document.getElementById(params.frameId);
+
+    if (iframe) {
+      iframe.remove();
+    }
+  };
+
+  window.addEventListener(event, handler);
+}
+function isRawHTML(raw) {
+  var regexHtml = new RegExp('<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>');
+  return regexHtml.test(raw);
+}
+
+/***/ }),
+
+/***/ "./src/js/html.js":
+/*!************************!*\
+  !*** ./src/js/html.js ***!
+  \************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./functions */ "./src/js/functions.js");
+/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./print */ "./src/js/print.js");
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+  print: function print(params, printFrame) {
+    // Get the DOM printable element
+    var printElement = isHtmlElement(params.printable) ? params.printable : document.getElementById(params.printable); // Check if the element exists
+
+    if (!printElement) {
+      window.console.error('Invalid HTML element id: ' + params.printable);
+      return;
+    } // Clone the target element including its children (if available)
+
+
+    params.printableElement = cloneElement(printElement, params); // Add header
+
+    if (params.header) {
+      Object(_functions__WEBPACK_IMPORTED_MODULE_0__["addHeader"])(params.printableElement, params);
+    } // Print html element contents
+
+
+    _print__WEBPACK_IMPORTED_MODULE_1__["default"].send(params, printFrame);
+  }
+});
+
+function cloneElement(element, params) {
+  // Clone the main node (if not already inside the recursion process)
+  var clone = element.cloneNode(); // Loop over and process the children elements / nodes (including text nodes)
+
+  var childNodesArray = Array.prototype.slice.call(element.childNodes);
+
+  for (var i = 0; i < childNodesArray.length; i++) {
+    // Check if we are skipping the current element
+    if (params.ignoreElements.indexOf(childNodesArray[i].id) !== -1) {
+      continue;
+    } // Clone the child element
+
+
+    var clonedChild = cloneElement(childNodesArray[i], params); // Attach the cloned child to the cloned parent node
+
+    clone.appendChild(clonedChild);
+  } // Get all styling for print element (for nodes of type element only)
+
+
+  if (params.scanStyles && element.nodeType === 1) {
+    clone.setAttribute('style', Object(_functions__WEBPACK_IMPORTED_MODULE_0__["collectStyles"])(element, params));
+  } // Check if the element needs any state processing (copy user input data)
+
+
+  switch (element.tagName) {
+    case 'SELECT':
+      // Copy the current selection value to its clone
+      clone.value = element.value;
+      break;
+
+    case 'CANVAS':
+      // Copy the canvas content to its clone
+      clone.getContext('2d').drawImage(element, 0, 0);
+      break;
+  }
+
+  return clone;
+}
+
+function isHtmlElement(printable) {
+  // Check if element is instance of HTMLElement or has nodeType === 1 (for elements in iframe)
+  return _typeof(printable) === 'object' && printable && (printable instanceof HTMLElement || printable.nodeType === 1);
+}
+
+/***/ }),
+
+/***/ "./src/js/image.js":
+/*!*************************!*\
+  !*** ./src/js/image.js ***!
+  \*************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./functions */ "./src/js/functions.js");
+/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./print */ "./src/js/print.js");
+/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./browser */ "./src/js/browser.js");
+
+
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+  print: function print(params, printFrame) {
+    // Check if we are printing one image or multiple images
+    if (params.printable.constructor !== Array) {
+      // Create array with one image
+      params.printable = [params.printable];
+    } // Create printable element (container)
+
+
+    params.printableElement = document.createElement('div'); // Create all image elements and append them to the printable container
+
+    params.printable.forEach(function (src) {
+      // Create the image element
+      var img = document.createElement('img');
+      img.setAttribute('style', params.imageStyle); // Set image src with the file url
+
+      img.src = src; // The following block is for Firefox, which for some reason requires the image's src to be fully qualified in
+      // order to print it
+
+      if (_browser__WEBPACK_IMPORTED_MODULE_2__["default"].isFirefox()) {
+        var fullyQualifiedSrc = img.src;
+        img.src = fullyQualifiedSrc;
+      } // Create the image wrapper
+
+
+      var imageWrapper = document.createElement('div'); // Append image to the wrapper element
+
+      imageWrapper.appendChild(img); // Append wrapper to the printable element
+
+      params.printableElement.appendChild(imageWrapper);
+    }); // Check if we are adding a print header
+
+    if (params.header) Object(_functions__WEBPACK_IMPORTED_MODULE_0__["addHeader"])(params.printableElement, params); // Print image
+
+    _print__WEBPACK_IMPORTED_MODULE_1__["default"].send(params, printFrame);
+  }
+});
+
+/***/ }),
+
+/***/ "./src/js/init.js":
+/*!************************!*\
+  !*** ./src/js/init.js ***!
+  \************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser */ "./src/js/browser.js");
+/* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal */ "./src/js/modal.js");
+/* harmony import */ var _pdf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pdf */ "./src/js/pdf.js");
+/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./html */ "./src/js/html.js");
+/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "./src/js/raw-html.js");
+/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./image */ "./src/js/image.js");
+/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./json */ "./src/js/json.js");
+
+
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+
+
+
+
+
+
+
+var printTypes = ['pdf', 'html', 'image', 'json', 'raw-html'];
+/* harmony default export */ __webpack_exports__["default"] = ({
+  init: function init() {
+    var params = {
+      printable: null,
+      fallbackPrintable: null,
+      type: 'pdf',
+      header: null,
+      headerStyle: 'font-weight: 300;',
+      maxWidth: 800,
+      properties: null,
+      gridHeaderStyle: 'font-weight: bold; padding: 5px; border: 1px solid #dddddd;',
+      gridStyle: 'border: 1px solid lightgray; margin-bottom: -1px;',
+      showModal: false,
+      onError: function onError(error) {
+        throw error;
+      },
+      onLoadingStart: null,
+      onLoadingEnd: null,
+      onPrintDialogClose: function onPrintDialogClose() {},
+      onIncompatibleBrowser: function onIncompatibleBrowser() {},
+      modalMessage: 'Retrieving Document...',
+      frameId: 'printJS',
+      printableElement: null,
+      documentTitle: 'Document',
+      targetStyle: ['clear', 'display', 'width', 'min-width', 'height', 'min-height', 'max-height'],
+      targetStyles: ['border', 'box', 'break', 'text-decoration'],
+      ignoreElements: [],
+      repeatTableHeader: true,
+      css: null,
+      style: null,
+      scanStyles: true,
+      base64: false,
+      // Deprecated
+      onPdfOpen: null,
+      font: 'TimesNewRoman',
+      font_size: '12pt',
+      honorMarginPadding: true,
+      honorColor: false,
+      imageStyle: 'max-width: 100%;'
+    }; // Check if a printable document or object was supplied
+
+    var args = arguments[0];
+
+    if (args === undefined) {
+      throw new Error('printJS expects at least 1 attribute.');
+    } // Process parameters
+
+
+    switch (_typeof(args)) {
+      case 'string':
+        params.printable = encodeURI(args);
+        params.fallbackPrintable = params.printable;
+        params.type = arguments[1] || params.type;
+        break;
+
+      case 'object':
+        params.printable = args.printable;
+        params.fallbackPrintable = typeof args.fallbackPrintable !== 'undefined' ? args.fallbackPrintable : params.printable;
+        params.fallbackPrintable = params.base64 ? "data:application/pdf;base64,".concat(params.fallbackPrintable) : params.fallbackPrintable;
+
+        for (var k in params) {
+          if (k === 'printable' || k === 'fallbackPrintable') continue;
+          params[k] = typeof args[k] !== 'undefined' ? args[k] : params[k];
+        }
+
+        break;
+
+      default:
+        throw new Error('Unexpected argument type! Expected "string" or "object", got ' + _typeof(args));
+    } // Validate printable
+
+
+    if (!params.printable) throw new Error('Missing printable information.'); // Validate type
+
+    if (!params.type || typeof params.type !== 'string' || printTypes.indexOf(params.type.toLowerCase()) === -1) {
+      throw new Error('Invalid print type. Available types are: pdf, html, image and json.');
+    } // Check if we are showing a feedback message to the user (useful for large files)
+
+
+    if (params.showModal) _modal__WEBPACK_IMPORTED_MODULE_1__["default"].show(params); // Check for a print start hook function
+
+    if (params.onLoadingStart) params.onLoadingStart(); // To prevent duplication and issues, remove any used printFrame from the DOM
+
+    var usedFrame = document.getElementById(params.frameId);
+    if (usedFrame) usedFrame.parentNode.removeChild(usedFrame); // Create a new iframe for the print job
+
+    var printFrame = document.createElement('iframe');
+
+    if (_browser__WEBPACK_IMPORTED_MODULE_0__["default"].isFirefox()) {
+      // Set the iframe to be is visible on the page (guaranteed by fixed position) but hidden using opacity 0, because
+      // this works in Firefox. The height needs to be sufficient for some part of the document other than the PDF
+      // viewer's toolbar to be visible in the page
+      printFrame.setAttribute('style', 'width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0');
+    } else {
+      // Hide the iframe in other browsers
+      printFrame.setAttribute('style', 'visibility: hidden; height: 0; width: 0; position: absolute; border: 0');
+    } // Set iframe element id
+
+
+    printFrame.setAttribute('id', params.frameId); // For non pdf printing, pass an html document string to srcdoc (force onload callback)
+
+    if (params.type !== 'pdf') {
+      printFrame.srcdoc = '<html><head><title>' + params.documentTitle + '</title>'; // Attach css files
+
+      if (params.css) {
+        // Add support for single file
+        if (!Array.isArray(params.css)) params.css = [params.css]; // Create link tags for each css file
+
+        params.css.forEach(function (file) {
+          printFrame.srcdoc += '<link rel="stylesheet" href="' + file + '">';
+        });
+      }
+
+      printFrame.srcdoc += '</head><body></body></html>';
+    } // Check printable type
+
+
+    switch (params.type) {
+      case 'pdf':
+        // Check browser support for pdf and if not supported we will just open the pdf file instead
+        if (_browser__WEBPACK_IMPORTED_MODULE_0__["default"].isIE()) {
+          try {
+            console.info('Print.js doesn\'t support PDF printing in Internet Explorer.');
+            var win = window.open(params.fallbackPrintable, '_blank');
+            win.focus();
+            params.onIncompatibleBrowser();
+          } catch (error) {
+            params.onError(error);
+          } finally {
+            // Make sure there is no loading modal opened
+            if (params.showModal) _modal__WEBPACK_IMPORTED_MODULE_1__["default"].close();
+            if (params.onLoadingEnd) params.onLoadingEnd();
+          }
+        } else {
+          _pdf__WEBPACK_IMPORTED_MODULE_2__["default"].print(params, printFrame);
+        }
+
+        break;
+
+      case 'image':
+        _image__WEBPACK_IMPORTED_MODULE_5__["default"].print(params, printFrame);
+        break;
+
+      case 'html':
+        _html__WEBPACK_IMPORTED_MODULE_3__["default"].print(params, printFrame);
+        break;
+
+      case 'raw-html':
+        _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"].print(params, printFrame);
+        break;
+
+      case 'json':
+        _json__WEBPACK_IMPORTED_MODULE_6__["default"].print(params, printFrame);
+        break;
+    }
+  }
+});
+
+/***/ }),
+
+/***/ "./src/js/json.js":
+/*!************************!*\
+  !*** ./src/js/json.js ***!
+  \************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./functions */ "./src/js/functions.js");
+/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./print */ "./src/js/print.js");
+function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+  print: function print(params, printFrame) {
+    // Check if we received proper data
+    if (_typeof(params.printable) !== 'object') {
+      throw new Error('Invalid javascript data object (JSON).');
+    } // Validate repeatTableHeader
+
+
+    if (typeof params.repeatTableHeader !== 'boolean') {
+      throw new Error('Invalid value for repeatTableHeader attribute (JSON).');
+    } // Validate properties
+
+
+    if (!params.properties || !Array.isArray(params.properties)) {
+      throw new Error('Invalid properties array for your JSON data.');
+    } // We will format the property objects to keep the JSON api compatible with older releases
+
+
+    params.properties = params.properties.map(function (property) {
+      return {
+        field: _typeof(property) === 'object' ? property.field : property,
+        displayName: _typeof(property) === 'object' ? property.displayName : property,
+        columnSize: _typeof(property) === 'object' && property.columnSize ? property.columnSize + ';' : 100 / params.properties.length + '%;'
+      };
+    }); // Create a print container element
+
+    params.printableElement = document.createElement('div'); // Check if we are adding a print header
+
+    if (params.header) {
+      Object(_functions__WEBPACK_IMPORTED_MODULE_0__["addHeader"])(params.printableElement, params);
+    } // Build the printable html data
+
+
+    params.printableElement.innerHTML += jsonToHTML(params); // Print the json data
+
+    _print__WEBPACK_IMPORTED_MODULE_1__["default"].send(params, printFrame);
+  }
+});
+
+function jsonToHTML(params) {
+  // Get the row and column data
+  var data = params.printable;
+  var properties = params.properties; // Create a html table
+
+  var htmlData = '<table style="border-collapse: collapse; width: 100%;">'; // Check if the header should be repeated
+
+  if (params.repeatTableHeader) {
+    htmlData += '<thead>';
+  } // Add the table header row
+
+
+  htmlData += '<tr>'; // Add the table header columns
+
+  for (var a = 0; a < properties.length; a++) {
+    htmlData += '<th style="width:' + properties[a].columnSize + ';' + params.gridHeaderStyle + '">' + Object(_functions__WEBPACK_IMPORTED_MODULE_0__["capitalizePrint"])(properties[a].displayName) + '</th>';
+  } // Add the closing tag for the table header row
+
+
+  htmlData += '</tr>'; // If the table header is marked as repeated, add the closing tag
+
+  if (params.repeatTableHeader) {
+    htmlData += '</thead>';
+  } // Create the table body
+
+
+  htmlData += '<tbody>'; // Add the table data rows
+
+  for (var i = 0; i < data.length; i++) {
+    // Add the row starting tag
+    htmlData += '<tr>'; // Print selected properties only
+
+    for (var n = 0; n < properties.length; n++) {
+      var stringData = data[i]; // Support nested objects
+
+      var property = properties[n].field.split('.');
+
+      if (property.length > 1) {
+        for (var p = 0; p < property.length; p++) {
+          stringData = stringData[property[p]];
+        }
+      } else {
+        stringData = stringData[properties[n].field];
+      } // Add the row contents and styles
+
+
+      htmlData += '<td style="width:' + properties[n].columnSize + params.gridStyle + '">' + stringData + '</td>';
+    } // Add the row closing tag
+
+
+    htmlData += '</tr>';
+  } // Add the table and body closing tags
+
+
+  htmlData += '</tbody></table>';
+  return htmlData;
+}
+
+/***/ }),
+
+/***/ "./src/js/modal.js":
+/*!*************************!*\
+  !*** ./src/js/modal.js ***!
+  \*************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var Modal = {
+  show: function show(params) {
+    // Build modal
+    var modalStyle = 'font-family:sans-serif; ' + 'display:table; ' + 'text-align:center; ' + 'font-weight:300; ' + 'font-size:30px; ' + 'left:0; top:0;' + 'position:fixed; ' + 'z-index: 9990;' + 'color: #0460B5; ' + 'width: 100%; ' + 'height: 100%; ' + 'background-color:rgba(255,255,255,.9);' + 'transition: opacity .3s ease;'; // Create wrapper
+
+    var printModal = document.createElement('div');
+    printModal.setAttribute('style', modalStyle);
+    printModal.setAttribute('id', 'printJS-Modal'); // Create content div
+
+    var contentDiv = document.createElement('div');
+    contentDiv.setAttribute('style', 'display:table-cell; vertical-align:middle; padding-bottom:100px;'); // Add close button (requires print.css)
+
+    var closeButton = document.createElement('div');
+    closeButton.setAttribute('class', 'printClose');
+    closeButton.setAttribute('id', 'printClose');
+    contentDiv.appendChild(closeButton); // Add spinner (requires print.css)
+
+    var spinner = document.createElement('span');
+    spinner.setAttribute('class', 'printSpinner');
+    contentDiv.appendChild(spinner); // Add message
+
+    var messageNode = document.createTextNode(params.modalMessage);
+    contentDiv.appendChild(messageNode); // Add contentDiv to printModal
+
+    printModal.appendChild(contentDiv); // Append print modal element to document body
+
+    document.getElementsByTagName('body')[0].appendChild(printModal); // Add event listener to close button
+
+    document.getElementById('printClose').addEventListener('click', function () {
+      Modal.close();
+    });
+  },
+  close: function close() {
+    var printModal = document.getElementById('printJS-Modal');
+
+    if (printModal) {
+      printModal.parentNode.removeChild(printModal);
+    }
+  }
+};
+/* harmony default export */ __webpack_exports__["default"] = (Modal);
+
+/***/ }),
+
+/***/ "./src/js/pdf.js":
+/*!***********************!*\
+  !*** ./src/js/pdf.js ***!
+  \***********************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./print */ "./src/js/print.js");
+/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./functions */ "./src/js/functions.js");
+
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+  print: function print(params, printFrame) {
+    // Check if we have base64 data
+    if (params.base64) {
+      var bytesArray = Uint8Array.from(atob(params.printable), function (c) {
+        return c.charCodeAt(0);
+      });
+      createBlobAndPrint(params, printFrame, bytesArray);
+      return;
+    } // Format pdf url
+
+
+    params.printable = /^(blob|http|\/\/)/i.test(params.printable) ? params.printable : window.location.origin + (params.printable.charAt(0) !== '/' ? '/' + params.printable : params.printable); // Get the file through a http request (Preload)
+
+    var req = new window.XMLHttpRequest();
+    req.responseType = 'arraybuffer';
+    req.addEventListener('error', function () {
+      Object(_functions__WEBPACK_IMPORTED_MODULE_1__["cleanUp"])(params);
+      params.onError(req.statusText, req); // Since we don't have a pdf document available, we will stop the print job
+    });
+    req.addEventListener('load', function () {
+      // Check for errors
+      if ([200, 201].indexOf(req.status) === -1) {
+        Object(_functions__WEBPACK_IMPORTED_MODULE_1__["cleanUp"])(params);
+        params.onError(req.statusText, req); // Since we don't have a pdf document available, we will stop the print job
+
+        return;
+      } // Print requested document
+
+
+      createBlobAndPrint(params, printFrame, req.response);
+    });
+    req.open('GET', params.printable, true);
+    req.send();
+  }
+});
+
+function createBlobAndPrint(params, printFrame, data) {
+  // Pass response or base64 data to a blob and create a local object url
+  var localPdf = new window.Blob([data], {
+    type: 'application/pdf'
+  });
+  localPdf = window.URL.createObjectURL(localPdf); // Set iframe src with pdf document url
+
+  printFrame.setAttribute('src', localPdf);
+  _print__WEBPACK_IMPORTED_MODULE_0__["default"].send(params, printFrame);
+}
+
+/***/ }),
+
+/***/ "./src/js/print.js":
+/*!*************************!*\
+  !*** ./src/js/print.js ***!
+  \*************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser */ "./src/js/browser.js");
+/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./functions */ "./src/js/functions.js");
+
+
+var Print = {
+  send: function send(params, printFrame) {
+    // Append iframe element to document body
+    document.getElementsByTagName('body')[0].appendChild(printFrame); // Get iframe element
+
+    var iframeElement = document.getElementById(params.frameId); // Wait for iframe to load all content
+
+    iframeElement.onload = function () {
+      if (params.type === 'pdf') {
+        // Add a delay for Firefox. In my tests, 1000ms was sufficient but 100ms was not
+        if (_browser__WEBPACK_IMPORTED_MODULE_0__["default"].isFirefox()) {
+          setTimeout(function () {
+            return performPrint(iframeElement, params);
+          }, 1000);
+        } else {
+          performPrint(iframeElement, params);
+        }
+
+        return;
+      } // Get iframe element document
+
+
+      var printDocument = iframeElement.contentWindow || iframeElement.contentDocument;
+      if (printDocument.document) printDocument = printDocument.document; // Append printable element to the iframe body
+
+      printDocument.body.appendChild(params.printableElement); // Add custom style
+
+      if (params.type !== 'pdf' && params.style) {
+        // Create style element
+        var style = document.createElement('style');
+        style.innerHTML = params.style; // Append style element to iframe's head
+
+        printDocument.head.appendChild(style);
+      } // If printing images, wait for them to load inside the iframe
+
+
+      var images = printDocument.getElementsByTagName('img');
+
+      if (images.length > 0) {
+        loadIframeImages(Array.from(images)).then(function () {
+          return performPrint(iframeElement, params);
+        });
+      } else {
+        performPrint(iframeElement, params);
+      }
+    };
+  }
+};
+
+function performPrint(iframeElement, params) {
+  try {
+    iframeElement.focus(); // If Edge or IE, try catch with execCommand
+
+    if (_browser__WEBPACK_IMPORTED_MODULE_0__["default"].isEdge() || _browser__WEBPACK_IMPORTED_MODULE_0__["default"].isIE()) {
+      try {
+        iframeElement.contentWindow.document.execCommand('print', false, null);
+      } catch (e) {
+        iframeElement.contentWindow.print();
+      }
+    } else {
+      // Other browsers
+      iframeElement.contentWindow.print();
+    }
+  } catch (error) {
+    params.onError(error);
+  } finally {
+    if (_browser__WEBPACK_IMPORTED_MODULE_0__["default"].isFirefox()) {
+      // Move the iframe element off-screen and make it invisible
+      iframeElement.style.visibility = 'hidden';
+      iframeElement.style.left = '-1px';
+    }
+
+    Object(_functions__WEBPACK_IMPORTED_MODULE_1__["cleanUp"])(params);
+  }
+}
+
+function loadIframeImages(images) {
+  var promises = images.map(function (image) {
+    if (image.src && image.src !== window.location.href) {
+      return loadIframeImage(image);
+    }
+  });
+  return Promise.all(promises);
+}
+
+function loadIframeImage(image) {
+  return new Promise(function (resolve) {
+    var pollImage = function pollImage() {
+      !image || typeof image.naturalWidth === 'undefined' || image.naturalWidth === 0 || !image.complete ? setTimeout(pollImage, 500) : resolve();
+    };
+
+    pollImage();
+  });
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (Print);
+
+/***/ }),
+
+/***/ "./src/js/raw-html.js":
+/*!****************************!*\
+  !*** ./src/js/raw-html.js ***!
+  \****************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _print__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./print */ "./src/js/print.js");
+
+/* harmony default export */ __webpack_exports__["default"] = ({
+  print: function print(params, printFrame) {
+    // Create printable element (container)
+    params.printableElement = document.createElement('div');
+    params.printableElement.setAttribute('style', 'width:100%'); // Set our raw html as the printable element inner html content
+
+    params.printableElement.innerHTML = params.printable; // Print html contents
+
+    _print__WEBPACK_IMPORTED_MODULE_0__["default"].send(params, printFrame);
+  }
+});
+
+/***/ }),
+
+/***/ "./src/sass/index.scss":
+/*!*****************************!*\
+  !*** ./src/sass/index.scss ***!
+  \*****************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+// extracted by mini-css-extract-plugin
+
+/***/ }),
+
+/***/ 0:
+/*!****************************!*\
+  !*** multi ./src/index.js ***!
+  \****************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./src/index.js */"./src/index.js");
+
+
+/***/ })
+
+/******/ })["default"];
+});
+//# sourceMappingURL=print.map

File diff suppressed because it is too large
+ 1 - 0
src/utils/lodop/print.min.css


File diff suppressed because it is too large
+ 1 - 0
src/utils/lodop/print.min.js


+ 100 - 24
src/views/room/fangtailive.vue

@@ -181,7 +181,11 @@
                           预离:{{ roomLive.livingData.livingOrder.dueOutTime }}
                         </p>
                         <p>
-                          已住:{{ roomLive.livingData.livingOrder.liveDayCount }}晚 已付:{{ roomLive.livingData.livingOrder.shouKuan }}元
+                          已住:{{
+                            roomLive.livingData.livingOrder.liveDayCount
+                          }}晚 已付:{{
+                            roomLive.livingData.livingOrder.shouKuan
+                          }}元
                         </p>
                         <!-- <p>来源:{{ roomLive.detail.mobile }} 消费:300元</p> -->
                         <p>
@@ -190,7 +194,10 @@
                             roomLive.livingData.price.length > 0
                               ? roomLive.livingData.price[0].price
                               : 0
-                          }}/晚 余额:{{ (roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei) }}
+                          }}/晚 余额:{{
+                            roomLive.livingData.livingOrder.shouKuan -
+                            roomLive.livingData.livingOrder.xiaoFei
+                          }}
                           <!-- {{ roomLive.detail.balance }} -->
                         </p>
                         <p>
@@ -371,18 +378,30 @@
                                     ? roomLive.livingData.price[0].price
                                     : 0
                                 }}/付{{
-                                  roomLive.livingData && roomLive.livingData.livingOrder ?
-                                  roomLive.livingData.livingOrder.shouKuan:0
-                                }}/余{{ 
-                                  roomLive.livingData && roomLive.livingData.livingOrder ?
-                                  (roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei):0
+                                  roomLive.livingData &&
+                                  roomLive.livingData.livingOrder
+                                    ? roomLive.livingData.livingOrder.shouKuan
+                                    : 0
+                                }}/余{{
+                                  roomLive.livingData &&
+                                  roomLive.livingData.livingOrder
+                                    ? roomLive.livingData.livingOrder.shouKuan -
+                                      roomLive.livingData.livingOrder.xiaoFei
+                                    : 0
                                 }}</span
                               >
                             </div>
-                            <a-tag color="blue" v-if="
-                              roomLive.livingData && roomLive.livingData.livingOrder 
-                              && ((roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei) < 0)
-                            ">欠</a-tag>
+                            <a-tag
+                              color="blue"
+                              v-if="
+                                roomLive.livingData &&
+                                roomLive.livingData.livingOrder &&
+                                roomLive.livingData.livingOrder.shouKuan -
+                                  roomLive.livingData.livingOrder.xiaoFei <
+                                  0
+                              "
+                              >欠</a-tag
+                            >
                             <a-tag
                               color="blue"
                               v-if="
@@ -476,8 +495,19 @@
                         </div>
                         <a-menu
                           slot="overlay"
+                          style="width: 126px"
                           @click="(e) => onMenuClick(e, roomLive)"
                         >
+                          <template
+                            v-if="
+                              roomLive.roomInfo.roomStatus === 3 ||
+                              roomLive.roomInfo.roomStatus === 4
+                            "
+                          >
+                            <a-menu-item key="6"> 详单 </a-menu-item>
+
+                            <a-menu-item key="7"> 账单 </a-menu-item>
+                          </template>
                           <a-menu-item
                             key="1"
                             v-if="
@@ -503,21 +533,55 @@
                             置干净
                           </a-menu-item>
                           <a-menu-item key="3" v-else> 置脏 </a-menu-item>
-                          <a-menu-item
-                            key="41"
-                            v-if="roomLive.roomInfo.roomStatus === 5"
+                          <template
+                            v-if="
+                              roomLive.roomInfo.roomStatus !== 3 &&
+                              roomLive.roomInfo.roomStatus !== 4
+                            "
                           >
-                            完成维修
-                          </a-menu-item>
-                          <a-menu-item key="4" v-else> 置维修 </a-menu-item>
-                          <a-menu-item
-                            key="51"
-                            v-if="roomLive.roomInfo.roomStatus === 6"
+                            <a-menu-item
+                              key="41"
+                              v-if="roomLive.roomInfo.roomStatus === 5"
+                            >
+                              完成维修
+                            </a-menu-item>
+                            <a-menu-item key="4" v-else> 置维修 </a-menu-item>
+                            <a-menu-item
+                              key="51"
+                              v-if="roomLive.roomInfo.roomStatus === 6"
+                            >
+                              解锁
+                            </a-menu-item>
+                            <a-menu-item key="5" v-else> 锁房 </a-menu-item>
+                          </template>
+                          <template
+                            v-if="
+                              roomLive.roomInfo.roomStatus === 3 ||
+                              roomLive.roomInfo.roomStatus === 4
+                            "
                           >
-                            解锁
-                          </a-menu-item>
-                          <a-menu-item key="5" v-else> 锁房 </a-menu-item>
-                          <!-- <a-menu-item key="3"> 日志 </a-menu-item> -->
+                            <a-menu-item key="8"> 查房 </a-menu-item>
+
+                            <a-menu-item key="9"> 入账 </a-menu-item>
+
+                            <a-menu-item key="10"> 续租/提前 </a-menu-item>
+
+                            <a-menu-item key="11"> 制房卡 </a-menu-item>
+
+                            <a-menu-item key="12"> 注销房卡 </a-menu-item>
+
+                            <a-menu-item key="13"> 换房 </a-menu-item>
+
+                            <a-menu-item key="14"> 合并联房 </a-menu-item>
+
+                            <a-menu-item key="15"> 添加同住 </a-menu-item>
+
+                            <a-menu-item key="16"> 结账退房 </a-menu-item>
+
+                            <a-menu-item key="17"> 撤销入住 </a-menu-item>
+                          </template>
+
+                          <a-menu-item key="18"> 日志 </a-menu-item>
                         </a-menu>
                       </a-dropdown>
                     </a-popover>
@@ -1407,6 +1471,18 @@ export default {
             }
           }
         );
+      } else if (e.key == 6 || e.key == 7) {
+        this.handleBillInfo(row);
+        return;
+      } else if (e.key == 11 || e.key == 12) {
+        this.$message.error("接口程序未打开,请打开接口程序");
+        return;
+      } else if (e.key == 15) {
+        this.handleBillInfo(row);
+        return;
+      } else if (e.key == 18) {
+        this.$message.error("暂未实现");
+        return;
       }
     },
     modalBillRoomFormOk(e) {

+ 1 - 1
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -872,7 +872,7 @@ export default {
       );
     },
     addlivingCustomer(id, roomId) {
-      console.log(id);
+      console.log(id, roomId);
       this.$refs.modalCustomerForm.add(id, roomId);
       this.$refs.modalCustomerForm.title = "添加同住人";
       this.$refs.modalCustomerForm.disableSubmit = false;

+ 3 - 1
src/views/settings/components/modules/dictionaryInfoLeft.vue

@@ -39,9 +39,11 @@
 
             queryTreeData(keyword) {
                 console.log('获取数据')
+                let storeInfo = JSON.parse(localStorage.getItem("storeInfo"))
                 this.commonRequestThen(queryBusDictTreeList({
                     departName: keyword ? keyword : undefined,
-                    ids: this.dictId ? this.dictId : undefined
+                    ids: this.dictId ? this.dictId : undefined,
+                    hotelId: storeInfo ? storeInfo.id : undefined
                 }))
             },
 

+ 4 - 5
src/views/settings/components/modules/printComponents/breakFastCouponPrint.vue

@@ -12,12 +12,11 @@
             <div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">房号:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{feeInfo.roomNo}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">用餐时间:</div>
-                    <div class="print-fee-value">
-                    </div>
+                    <div class="print-fee-value">{{feeInfo.userTime}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-value">
@@ -69,8 +68,8 @@
                 type: Object,
                 default() {
                     return {
-                        openTime: '2023-05-16 15:30',
-                        payTime:'2023-05-16 15:30',
+                        roomNo: '8207',
+                        userTime:'2023-05-16 08:30',
                     }
                 }
             },

File diff suppressed because it is too large
+ 272 - 0
src/views/settings/components/modules/printComponents/changeRoomPrint.vue


+ 4 - 2
src/views/settings/components/modules/printComponents/extractPrint.vue

@@ -10,7 +10,7 @@
             <div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">手牌:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{feeInfo.handCardNo}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">开牌时间:</div>
@@ -26,7 +26,7 @@
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">备注:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{ feeInfo.remarks }}</div>
                 </div>
             </div>
         </div>
@@ -50,8 +50,10 @@
                 type: Object,
                 default() {
                     return {
+                        handCardNo:'H001',
                         openTime: '2023-05-16 15:30',
                         payTime:'2023-05-16 15:30',
+                        remarks:'999'
                     }
                 }
             },

+ 552 - 0
src/views/settings/components/modules/printComponents/handoverDetailPrint.vue

@@ -0,0 +1,552 @@
+<template>
+    <div class="a5">
+        <div class="content">
+            <div class="print-title">{{ storeInfo.name }}交班明细表</div>
+
+            <div class="print-fee-info">
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-value">当班:{{ feeInfo.startTime }} 至 {{ feeInfo.endTime }} </div>
+                    <div class="print-fee-value">交班模式:{{ feeInfo.mode}} </div>
+                    <div class="print-fee-value">班次:{{ feeInfo.classes }} </div>
+                </div>
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-value">操作员:{{ nickname() }} </div>
+                    <div class="print-fee-value">打印人:{{ nickname() }} </div>
+                </div>
+            </div>
+
+            <!--收款-->
+<!--            <div class="table">-->
+<!--                <div class="row border-top border-bottom border-left border-right font-weight font-size-18">-->
+<!--                    收款-->
+<!--                </div>-->
+<!--                <div class="wrapper-td" :key="index" v-for="(item, index) in data_payment">-->
+<!--                    <div class="row border-bottom border-left border-right font-weight">-->
+<!--                        {{ item.payName }}-->
+<!--                    </div>-->
+<!--                    <div class="row">-->
+<!--                        <div class="row border-bottom border-left border-right ">-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                项目名称-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                付款方式-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                单据号-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                姓名-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                房间号-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                金额-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                发生时间-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                营业日-->
+<!--                            </div>-->
+<!--                            <div class="flex-1">-->
+<!--                                备注-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <div class="row" :key="index1" v-for="(itemChild, index1) in item.children">-->
+<!--                        <div class="row border-bottom border-left border-right ">-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.projectName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.payName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.receiptNo }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.customerName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.roomNo }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.money }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.occurTime }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.businessDay }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1">-->
+<!--                                {{ itemChild.remarks }}-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <div class="row border-bottom border-left border-right font-weight font-size-18">-->
+<!--                        收款合计:{{ item.amount }}-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--            </div>-->
+<!--            <div style="height: 5px"></div>-->
+            <!--收款-->
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    收款
+                </div>
+                <div :key="index" v-for="(item, index) in data_payment">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    收款合计:{{data_payment_amount}}
+                </div>
+            </div>
+
+            <!--退款-->
+            <div style="height: 8px"></div>
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    退款
+                </div>
+                <div :key="index" v-for="(item, index) in data_refund">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    退款合计:{{data_refund_amount}}
+                </div>
+            </div>
+
+            <!--收支明细-->
+            <div style="height: 8px"></div>
+            <div style="border-top: 3px solid #333333;border-left: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-right border-bottom font-size-18">
+                    收支明细
+                </div>
+                <table style="width: 100%;table-layout: fixed;border-collapse: collapse;" class="border-bottom">
+                    <tr>
+                        <th class="border-right" v-for="item in data_detail">{{item.name}}:{{item.money}}</th>
+                    </tr>
+                </table>
+<!--                <div class="row">-->
+<!--                    <div class="flex-1 border-left" :key="index" v-for="(item, index) in data_detail">-->
+<!--                        <span class="border-left">-->
+<!--                            {{item.name}}:{{item.money}}-->
+<!--                        </span>-->
+<!--                    </div>-->
+<!--                </div>-->
+            </div>
+
+            <!--营业额-->
+            <div style="height: 8px"></div>
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    营业额
+                </div>
+                <div :key="index" v-for="(item, index) in data_turnover">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    费用合计:{{data_turnover_amount}}
+                </div>
+            </div>
+
+        </div>
+    </div>
+</template>
+
+<script>
+    import { mapActions, mapGetters, mapState } from 'vuex'
+    import { httpAction, getAction } from '@/api/manage'
+
+    export default {
+        props: {
+            title: {
+                type: String,
+                default: '交班明细表'
+            },
+            feeInfo: {
+                type: Object,
+                default() {
+                    return {
+                        startTime: '2023-05-15 15:30',
+                        endTime: '2023-05-16 15:30',
+                        mode:'权责发生制',
+                        classes:'早班',
+                    }
+                }
+            },
+            //收款
+            data_payment:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'支付宝',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_payment_amount:{
+                type:Number ,
+                default() {
+                    return 1500
+                }
+            },
+            //退款
+            data_refund:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'支付宝',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_refund_amount:{
+                type:Number ,
+                default() {
+                    return 1500
+                }
+            },
+            //收支明细
+            data_detail:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            name:'支付宝',
+                            money:55
+                        },
+                        {
+                            name:'微信',
+                            money:33
+                        },
+                        {
+                            name:'现金',
+                            money:99
+                        },
+                    ];
+                }
+            },
+            //营业额
+            data_turnover:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'房费',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_turnover_amount:{
+                type:Number ,
+                default() {
+                    return 0
+                }
+            },
+        },
+        data() {
+            let storeInfo = JSON.parse(localStorage.getItem("storeInfo"))
+            return {
+                storeInfo,
+                printDate: new Date().format('yyyy/MM/dd hh:mm:ss'),
+                tableHeader:["序号","书名","价格","数量"],
+                dat:[
+                    {bookName:"围城",price:"75",quantity:"0"},
+                    {bookName:"骆驼祥子",price:"55",quantity:"0"},
+                    {bookName:"百年孤独",price:"69",quantity:"0"},
+                    {bookName:"梦里花落知多少",price:"39",quantity:"0"}
+
+                ],
+            }
+        },
+        created() {
+        },
+        methods: {
+            ...mapGetters(["nickname", "avatar", "userInfo"]),
+        }
+    }
+</script>
+
+<style lang="less">
+    .row{
+        width: 100%;
+        display: flex;
+        flex-direction: row;
+    }
+    .item-row{
+        width: 100%;
+        white-space: nowrap;
+    }
+    .flex-1{
+        flex: 1;
+        width:0px;
+    }
+    .font-weight{
+        font-weight: 600;
+    }
+    .font-size-16{
+        font-size: 16px;
+    }
+    .font-size-18{
+        font-size: 18px;
+    }
+    .border-top{
+        border-top: 3px solid #333333;
+    }
+    .border-bottom{
+        border-bottom: 3px solid #333333;
+    }
+    .border-left{
+        border-left: 3px solid #333333;
+    }
+    .border-right{
+        border-right: 3px solid #333333;
+    }
+
+    .a5 {
+        width: 210mm;
+        border: 1px solid #00000055;
+        padding: 3mm;
+
+        .print-fee-info {
+            display: flex;
+            flex-wrap: wrap;
+
+
+            .print-fee-item-wrapper {
+                width: 50%;
+            }
+
+            .row{
+                width: 100%;
+            }
+
+            .print-fee-title {
+                width: 20%;
+                text-align: right;
+            }
+
+            .row .print-fee-title {
+                width: 10%;
+            }
+
+        }
+
+        .print-no{
+            text-align: center;
+        }
+        .print-title {
+            text-align: center;
+            font-size: 16px;
+            font-weight: 600;
+        }
+        .a5-partail{
+            display: flex;
+            flex-wrap: wrap;
+            .print-fee-item-wrapper {
+                margin: 3mm 0;
+                width: 45%;
+            }
+            .row{
+                width: 100%;
+            }
+        }
+    }
+    .print-fee-item-wrapper {
+        display: flex;
+        width: 100%;
+        padding: 4px 0;
+        font-size: small;
+
+        .print-fee-title {
+            width: 65px;
+            text-align: right;
+        }
+
+        .print-fee-value {
+            flex: 1;
+            padding-right: 5px;
+        }
+
+        .value-underline {
+            border-bottom: 1px solid #00000088;
+        }
+    }
+</style>

File diff suppressed because it is too large
+ 724 - 0
src/views/settings/components/modules/printComponents/handoverPrint.vue


+ 48 - 4
src/views/settings/components/modules/printComponents/hotelEntryPrint.vue

@@ -42,6 +42,19 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodType}}</div>
+                <div class="fee-cell">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+                <div class="fee-cell">{{item.size}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
         <div v-else>
             <div class="print-fee-info">
@@ -80,11 +93,17 @@
                 </div>
             </div>
 
-        </div>
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+            </div>
+            <div class="info-split"></div>
 
-        <div class="info-split"></div>
-        <div class="info-split-dashed"></div>
-        <div class="info-split"></div>
+        </div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
@@ -152,6 +171,31 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                    ];
+                }
             }
         },
         data() {

+ 47 - 3
src/views/settings/components/modules/printComponents/hotelOutPrint.vue

@@ -36,6 +36,18 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodType}}</div>
+                <div class="fee-cell">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+                <div class="fee-cell">{{item.size}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
         <div v-else>
             <div class="print-fee-info">
@@ -70,11 +82,18 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
 
-        <div class="info-split"></div>
-        <div class="info-split-dashed"></div>
-        <div class="info-split"></div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
@@ -142,6 +161,31 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                    ];
+                }
             }
         },
         data() {

+ 43 - 2
src/views/settings/components/modules/printComponents/incomePrint.vue

@@ -65,14 +65,21 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell flex-2">{{item.projectName}}</div>
+            <div class="fee-cell">{{item.payAmount}}</div>
+            <div class="fee-cell">{{item.cost}}</div>
+            <div class="fee-cell">{{item.payTypeName}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
                 <div class="fee-cell flex-2"></div>
                 <div class="fee-cell">合计:</div>
-                <div class="fee-cell">0</div>
-                <div class="fee-cell">0</div>
+                <div class="fee-cell">{{totalAmount}}</div>
+                <div class="fee-cell">{{totalCost}}</div>
                 <div class="fee-cell flex-3"></div>
             </div>
         </div>
@@ -103,6 +110,7 @@
         </div>
         <div class="qr-code-wrapper">
             <div class="code-content"></div>
+<!--            <img class="j-editable-image" style="height: 120px;" id="image" src="https://img.xjishu.com/img/zl/2018/6/30/1241359458913.gif"/>-->
             <div style="margin-bottom: 10px;font-size: smaller;">扫码自助开票</div>
         </div>
     </div>
@@ -142,6 +150,39 @@ export default {
         defContent: {
             type: String,
             default: ""
+        },
+        dataSource:{
+            type:Array,
+            default() {
+                return [
+                    {
+                        roomNo:'8212',
+                        projectName:'科目一',
+                        payAmount:'88',
+                        cost:'98',
+                        payTypeName:'微信',
+                    },
+                    {
+                        roomNo:'8212',
+                        projectName:'科目一',
+                        payAmount:'88',
+                        cost:'98',
+                        payTypeName:'微信',
+                    }
+                ];
+            }
+        },
+        totalAmount: {
+            type: Number,
+            default() {
+                return 188
+            }
+        },
+        totalCost: {
+            type: Number,
+            default() {
+                return 218
+            }
         }
     },
     data() {

+ 32 - 10
src/views/settings/components/modules/printComponents/paymentPrint.vue

@@ -7,16 +7,25 @@
                 <div class="print-fee-title">单号:</div>
                 <div class="print-fee-value value-underline">{{ feeInfo.no }}</div>
             </div>
-            <div class="print-fee-item-wrapper">
-                <div class="print-fee-title">支付方式:</div>
-                <div class="print-fee-value">{{ feeInfo.payType }}</div>
-            </div>
-            <div class="print-fee-item-wrapper">
-                <div class="print-fee-title">金额:</div>
-                <div class="print-fee-value">{{ feeInfo.money }}</div>
-            </div>
+<!--            <div class="print-fee-item-wrapper">-->
+<!--                <div class="print-fee-title">支付方式:</div>-->
+<!--                <div class="print-fee-value">{{ feeInfo.payType }}</div>-->
+<!--            </div>-->
+<!--            <div class="print-fee-item-wrapper">-->
+<!--                <div class="print-fee-title">金额:</div>-->
+<!--                <div class="print-fee-value">{{ feeInfo.money }}</div>-->
+<!--            </div>-->
+
+            <table style="width: 100%;table-layout: fixed">
+                <tr  class="" v-for="(item,index) in dataSource">
+                    <td class="">支付方式:{{item.payName}}</td>
+                    <td class="">金额:{{item.money}}</td>
+                </tr>
+            </table>
         </div>
 
+        <div style="height: 20px"></div>
+
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
         <div class="a5-partail">
@@ -67,14 +76,27 @@
                 default() {
                     return {
                         no: "NO202305172255",
-                        payType:'现金',
-                        money: 198,
                     }
                 }
             },
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array,
+                default() {
+                    return [
+                        {
+                            payName:'现金',
+                            money: 198,
+                        },
+                        {
+                            payName:'现金',
+                            money: 198,
+                        }
+                    ];
+                }
             }
         },
         data() {

+ 25 - 1
src/views/settings/components/modules/printComponents/posCheckOutPrint.vue

@@ -32,13 +32,20 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource.childs">
+            <div class="fee-cell flex-3">{{item.projectName}}</div>
+            <div class="fee-cell flex-2">{{item.price}}</div>
+            <div class="fee-cell flex-2">{{item.preferentialPrice}}</div>
+            <div class="fee-cell flex-2">{{item.number}}</div>
+            <div class="fee-cell">{{item.money}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
                 <div class="fee-cell flex-5">项目合计:</div>
                 <div class="fee-cell flex-8"></div>
-                <div class="fee-cell">0</div>
+                <div class="fee-cell">{{dataSource.amount}}</div>
             </div>
         </div>
 
@@ -115,6 +122,23 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Object,
+                default() {
+                    return {
+                        amount:'99',
+                        childs:[
+                            {
+                                projectName: '点菜',
+                                price: '88.8',
+                                preferentialPrice: '78',
+                                number: '1',
+                                money: '78',
+                            },
+                        ]
+                    };
+                }
             }
         },
         data() {

+ 29 - 4
src/views/settings/components/modules/printComponents/refundPrint.vue

@@ -181,6 +181,12 @@
 
             <div class="info-split"></div>
             <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.roomNo}}</div>
+                <div class="fee-cell">{{item.layoutName}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+                <div class="fee-cell">{{item.discount}}</div>
+            </div>
             <div class="info-split"></div>
 
             <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
@@ -256,7 +262,26 @@
             defContent: {
                 type: String,
                 default: ""
-            }
+            },
+            dataSource:{
+                type:Array,
+                default() {
+                    return [
+                        {
+                            roomNo:'8212',
+                            layoutName:'星空房',
+                            discount:'98',
+                            price:'88',
+                        },
+                        {
+                            roomNo:'8212',
+                            layoutName:'星空房',
+                            discount:'98',
+                            price:'88',
+                        }
+                    ];
+                }
+            },
         },
         data() {
             let storeInfo = JSON.parse(localStorage.getItem("storeInfo"))
@@ -272,7 +297,7 @@
         }
     }
 </script>
-<style lang="less">
+<style lang="less" id="olstyle1">
     .mm58 {
         width: 58mm;
         border: 1px solid #00000055;
@@ -367,7 +392,7 @@
         display: flex;
         width: 100%;
         padding: 4px 0;
-        font-size: small;
+        font-size: 13px;
 
         .print-fee-title {
             width: 65px;
@@ -395,7 +420,7 @@
             color: black;
             flex: 1;
             margin: 0 3px;
-            font-size: smaller;
+            font-size: 13px;
             text-align: left;
         }
 

File diff suppressed because it is too large
+ 542 - 0
src/views/settings/components/modules/printComponents/registrationPrint.vue


+ 30 - 20
src/views/settings/components/modules/printComponents/renewalOrderPrint.vue

@@ -1,29 +1,29 @@
 <template>
     <div :class="sizeTypeClass">
-        <div class="print-title">{{ storeInfo.name }}续住单</div>
+        <div class="content">
+            <div class="print-title">{{ storeInfo.name }}续住单</div>
 
-        <div class="print-fee-info">
-            <div class="print-fee-item-wrapper row">
-                <div class="print-fee-title">打印时间:</div>
-                <div class="print-fee-value value-underline">{{ printDate }}</div>
+            <div class="print-fee-info">
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-title">打印时间:</div>
+                    <div class="print-fee-value">{{ printDate }}</div>
+                </div>
             </div>
-        </div>
 
-        <div class="print-feesinfo">
-            <div>
-                <div class="print-fee-item-wrapper">
+            <div class="print-feesinfo">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">客人姓名</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">房号</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">原离店时间</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">新离店时间</div>
                     <div class="print-fee-value"></div>
                 </div>
@@ -32,17 +32,17 @@
                     <div class="print-fee-value"></div>
                 </div>
             </div>
-        </div>
 
-        <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
+            <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
 
-        <div class="print-fee-item-wrapper">
-            <div class="print-fee-value" style="text-align: right">操作员:{{ nickname() }}</div>
-        </div>
-        <div class="print-fee-item-wrapper" style="font-weight: 600;font-size: 18px;">
-            <div>住客签字:</div>
-            <div class="print-fee-value value-underline"></div>
+            <div class="print-fee-item-wrapper">
+                <div class="print-fee-value" style="text-align: right">操作员:{{ nickname() }}</div>
+            </div>
+            <div class="print-fee-item-wrapper" style="font-weight: 600;font-size: 16px;">
+                <div>住客签字:</div>
+                <div class="print-fee-value value-underline"></div>
+            </div>
         </div>
     </div>
 </template>
@@ -91,6 +91,16 @@
 </script>
 
 <style lang="less">
+    .content{
+        width: 94%;
+        margin: auto;
+    }
+    .print-feesinfo{
+        border: 1px solid #1d1a1a
+    }
+    .border-bottom{
+        border-bottom: 1px solid #1d1a1a
+    }
     .mm58 {
         width: 58mm;
         border: 1px solid #00000055;

+ 43 - 3
src/views/settings/components/modules/printComponents/settlePrint.vue

@@ -49,14 +49,21 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell flex-2">{{item.projectName}}</div>
+            <div class="fee-cell">{{item.payAmount}}</div>
+            <div class="fee-cell">{{item.cost}}</div>
+            <div class="fee-cell">{{item.payTypeName}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
                 <div class="fee-cell flex-2"></div>
                 <div class="fee-cell">合计:</div>
-                <div class="fee-cell">0</div>
-                <div class="fee-cell">0</div>
+                <div class="fee-cell">{{totalAmount}}</div>
+                <div class="fee-cell">{{totalCost}}</div>
                 <div class="fee-cell flex-3"></div>
             </div>
         </div>
@@ -119,6 +126,39 @@ export default {
         defContent: {
             type: String,
             default: ""
+        },
+        dataSource:{
+            type:Array,
+            default() {
+                return [
+                    {
+                        roomNo:'8212',
+                        projectName:'科目一',
+                        payAmount:'88',
+                        cost:'98',
+                        payTypeName:'微信',
+                    },
+                    {
+                        roomNo:'8212',
+                        projectName:'科目一',
+                        payAmount:'88',
+                        cost:'98',
+                        payTypeName:'微信',
+                    }
+                ];
+            }
+        },
+        totalAmount: {
+            type: Number,
+            default() {
+                return 188
+            }
+        },
+        totalCost: {
+            type: Number,
+            default() {
+                return 218
+            }
         }
     },
     data() {
@@ -195,7 +235,7 @@ export default {
         }
 
         .print-fee-title {
-            width: 40%;
+            width: 40% !important;
             text-align: right;
         }
 

File diff suppressed because it is too large
+ 695 - 0
src/views/settings/components/modules/printComponents/shiftHandoverPrint.vue


+ 46 - 4
src/views/settings/components/modules/printComponents/teamCheckIn.vue

@@ -47,7 +47,7 @@
                 <div class="print-fee-title">离时<span v-if="sizeTypeClass == 'a5'">/CheckOut</span>:</div>
                 <div class="print-fee-value">{{ feeInfo.dueOutTime }}</div>
             </div>
-            <div class="print-fee-item-wrapper row">
+            <div class="print-fee-item-wrapper row" v-if="defModel.isShowBreakfast == 0">
                 <div class="print-fee-title">早餐<span v-if="sizeTypeClass == 'a5'">/Breakfirst</span>:</div>
                 <div class="print-fee-value">{{ feeInfo.breakFirst }}</div>
             </div>
@@ -73,6 +73,13 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell">{{item.customerName}}</div>
+            <div class="fee-cell">{{item.layoutName}}</div>
+            <div class="fee-cell">{{item.dayCount}}</div>
+            <div class="fee-cell flex-3">{{item.money}}</div>
+        </div>
         <div class="info-split"></div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
@@ -137,6 +144,38 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            defModel:{
+                type:Object,
+                default(){
+                    return {
+                        isShowIdcard:0,
+                        isShowBreakfast:0,
+                        isShowAddress:0,
+                        isShowPhone:0
+                    }
+                }
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            roomNo:'8025',
+                            customerName:'张三',
+                            layoutName:'大床房',
+                            dayCount:'8',
+                            money:'969',
+                        },
+                        {
+                            roomNo:'8025',
+                            customerName:'张三',
+                            layoutName:'大床房',
+                            dayCount:'8',
+                            money:'969',
+                        },
+                    ];
+                }
             }
         },
         data() {
@@ -176,7 +215,7 @@
                 width: 60%;
             }
             .row {
-                width: 100%;
+                width: 100% !important;
             }
 
             .small-item {
@@ -188,10 +227,13 @@
             }
 
             .print-fee-title {
-                width: fit-content;
+                /*width: fit-content;*/
                 text-align: right;
             }
-
+            .row .print-fee-title {
+                width: 10% !important;
+                text-align: left !important;
+            }
         }
 
         .print-title {

+ 40 - 6
src/views/settings/components/modules/printComponents/teamCheckOut.vue

@@ -66,17 +66,24 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource.childs">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell">{{item.projectName}}</div>
+            <div class="fee-cell" v-if="sizeTypeClass == 'a5'">{{item.occurTime}}</div>
+            <div class="fee-cell" >{{item.amount}}</div>
+            <div class="fee-cell">{{item.cost}}</div>
+            <div class="fee-cell flex-3">{{item.payName}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
-<!--                <div class="fee-cell flex-2"></div>-->
-                <div class="fee-cell">合计:</div>
-                <div class="fee-cell">/</div>
+                <div class="fee-cell flex-2">合计:</div>
                 <div class="fee-cell">/</div>
-                <div class="fee-cell">--</div>
-                <div class="fee-cell">--</div>
-                <div class="fee-cell flex-1"></div>
+                <div class="fee-cell" v-if="sizeTypeClass == 'a5'">/</div>
+                <div class="fee-cell">{{dataSource.amount}}</div>
+                <div class="fee-cell">{{dataSource.cost}}</div>
+                <div class="fee-cell flex-3"></div>
             </div>
         </div>
 
@@ -150,6 +157,33 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Object ,
+                default() {
+                    return {
+                        amount:'666',
+                        cost:'888',
+                        childs:[
+                            {
+                                roomNo:'8025',
+                                projectName:'张三',
+                                occurTime:'2023-05-15 15:30',
+                                amount:'8',
+                                cost:'969',
+                                payName:"微信",
+                            },
+                            {
+                                roomNo:'8025',
+                                projectName:'张三',
+                                occurTime:'2023-05-15 15:30',
+                                amount:'8',
+                                cost:'969',
+                                payName:"微信",
+                            },
+                        ]
+                    }
+                }
             }
         },
         data() {

+ 277 - 75
src/views/settings/components/modules/printTemplateForm.vue

@@ -5,12 +5,19 @@
         <j-form-container :disabled="formDisabled">
           <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" layout="vertical">
             <a-row >
-              <a-col :span="24">
-                <a-form-model-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-                  <a-input v-model="model.name" placeholder="请输入打印模板名称"  ></a-input>
+<!--              <a-col :span="24">-->
+<!--                <a-form-model-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">-->
+<!--                  <a-input v-model="model.name" placeholder="请输入打印模板名称" ></a-input>-->
+<!--                </a-form-model-item>-->
+<!--              </a-col>-->
+              <a-col :span="24" v-if="model.type == 10">
+                <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs">
+                  <j-dict-select-tag type="radio" v-model="model.specs" placeholder="请选择规格" dictCode="print_template_specs"
+                                     disabled="disabled"
+                                     @change="e=>onSpecsChange(e)"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-else>
                 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs">
                   <j-dict-select-tag type="radio" v-model="model.specs" placeholder="请选择规格" dictCode="print_template_specs"
                                      @change="e=>onSpecsChange(e)"/>
@@ -32,27 +39,56 @@
                   <a-input v-model="model.defaultPrint" placeholder="请输入默认打印机"  ></a-input>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if=" model.type == 1 || model.type == 9 || model.type == 14">
                 <a-form-model-item label="打印类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printType">
                   <j-dict-select-tag type="radio" v-model="model.printType" placeholder="请选择打印类型" dictCode="print_template_type"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
-                <a-form-model-item label="是否显示退菜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowRefund">
-                  <j-dict-select-tag type="radio" v-model="model.isShowRefund" placeholder="请选择是否显示退菜" dictCode="print_template_refund"/>
-                </a-form-model-item>
-              </a-col>
+                <a-col :span="24" v-if="model.type == 9">
+                    <a-form-model-item label="是否显示退菜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowRefund">
+                        <j-dict-select-tag type="radio" v-model="model.isShowRefund" placeholder="请选择是否显示退菜" dictCode="print_template_refund"/>
+                    </a-form-model-item>
+                </a-col>
+
+                <a-row>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印证件信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowIdcard">
+                            <j-dict-select-tag type="radio" v-model="model.isShowIdcard" placeholder="请选择是否打印证件信息" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                    <a-col :span="1"></a-col>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印早餐信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowBreakfast">
+                            <j-dict-select-tag type="radio" v-model="model.isShowBreakfast" placeholder="请选择是否打印早餐信息" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                </a-row>
+                <a-row>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印客人详细地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowAddress">
+                            <j-dict-select-tag type="radio" v-model="model.isShowAddress" placeholder="请选择是否打印客人详细地址" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                    <a-col :span="1"></a-col>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印客人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowPhone">
+                            <j-dict-select-tag type="radio" v-model="model.isShowPhone" placeholder="请选择是否打印客人电话" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                </a-row>
+
               <a-col :span="24">
                 <a-form-model-item label="打印份数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printSum">
                   <a-input-number v-model="model.printSum" placeholder="请输入打印份数" style="width: 100%" />
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="10">
                 <a-form-model-item label="打印时内容宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printContentOffset">
                   <a-input v-model="model.printContentOffset" placeholder="请输入打印时内容宽度偏差"  ></a-input>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="1"></a-col>
+              <a-col :span="10">
                 <a-form-model-item label="打印时纸张宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printPaperOffset">
                   <a-input v-model="model.printPaperOffset" placeholder="请输入打印时纸张宽度偏差"  ></a-input>
                 </a-form-model-item>
@@ -61,23 +97,77 @@
           </a-form-model>
         </j-form-container>
       </div>
-      <div class="right">
-        <!-- <jzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jzd> -->
-<!--        <skd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></skd>-->
-<!--        <tkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tkd>-->
-<!--        <qxd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></qxd>-->
-<!--        <zcq :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zcq>-->
-<!--        <tdrzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tdrzd>-->
-<!--        <tdjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tdjzd>-->
-<!--        <rkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></rkd>-->
-<!--        <ckd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></ckd>-->
-<!--        <hykfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hykfd>-->
-<!--        <posjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></posjzd>-->
-<!--        <zfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zfd>-->
-        <xzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></xzd>
+      <div class="right" id="print_content">
+        <div v-if="model.type == 1">
+          <jzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></jzd>
+        </div>
+        <div v-else-if="model.type == 2">
+          <skd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></skd>
+        </div>
+        <div v-else-if="model.type == 3">
+          <tkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tkd>
+        </div>
+        <div v-else-if="model.type == 4">
+          <jbb :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jbb>
+        </div>
+        <div v-else-if="model.type == 5">
+          <hfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hfd>
+        </div>
+        <div v-else-if="model.type == 6">
+          <xzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></xzd>
+        </div>
+        <div v-else-if="model.type == 7">
+          <zfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zfd>
+        </div>
+        <div v-else-if="model.type == 8">
+          <djd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></djd>
+        </div>
+        <div v-else-if="model.type == 9">
+          <posjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></posjzd>
+        </div>
+        <div v-else-if="model.type == 10">
+          <jbmxb :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jbmxb>
+        </div>
+        <div v-else-if="model.type == 11">
+          <hykfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hykfd>
+        </div>
+        <div v-else-if="model.type == 12">
+          <ckd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></ckd>
+        </div>
+        <div v-else-if="model.type == 13">
+          <rkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></rkd>
+        </div>
+        <div v-else-if="model.type == 14">
+          <tdjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></tdjzd>
+        </div>
+        <div v-else-if="model.type == 15">
+          <tdrzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></tdrzd>
+        </div>
+        <div v-else-if="model.type == 16">
+          <zcq :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zcq>
+        </div>
+        <div v-else-if="model.type == 17">
+          <qxd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></qxd>
+        </div>
+        <div v-else></div>
       </div>
     </div>
 
+      <!--      测试打印-->
+<!--      <a-dropdown>-->
+<!--          <a-button icon="printer" type="primary">-->
+<!--              打印选项-->
+<!--              <a-icon type="down" />-->
+<!--          </a-button>-->
+<!--          <a-menu slot="overlay">-->
+<!--              <a-menu-item type="primary" @click="printPreview(0)">直接打印</a-menu-item>-->
+<!--              <a-menu-item type="primary" @click="printPreview(1)">打印预览</a-menu-item>-->
+<!--              <a-menu-item type="primary" @click="printPreview(2)">打印维护</a-menu-item>-->
+<!--              <a-menu-item type="primary" @click="printPreview(3)">打印设计</a-menu-item>-->
+<!--          </a-menu>-->
+<!--      </a-dropdown>-->
+
+<!--      <a-button type="info" @click="handlePrint()">打印</a-button>-->
   </a-spin>
 </template>
 
@@ -98,6 +188,14 @@
   import posjzd from './printComponents/posCheckOutPrint.vue'
   import zfd from './printComponents/paymentPrint.vue'
   import xzd from './printComponents/renewalOrderPrint.vue'
+  import hfd from './printComponents/changeRoomPrint.vue'
+  import djd from './printComponents/registrationPrint.vue'
+  import jbb from './printComponents/handoverPrint.vue'
+  import jbmxb from './printComponents/handoverDetailPrint.vue'
+
+  import { getLodop } from '../../../../utils/lodop/LodopFuncs'
+  import Print from '../../../../utils/lodop/print.min'
+
 
   export default {
     name: 'printTemplateForm',
@@ -115,6 +213,10 @@
       posjzd,
       zfd,
       xzd,
+      hfd,
+      djd,
+      jbb,
+      jbmxb
     },
     props: {
       //表单禁用
@@ -126,7 +228,7 @@
     },
     data () {
       return {
-        sizeTypeClass: 'mm58',
+        sizeTypeClass: 'mm80',
         model:{
          },
         labelCol: {
@@ -172,58 +274,157 @@
       this.modelDefault = JSON.parse(JSON.stringify(this.model));
     },
     methods: {
-      add () {
-        this.edit(this.modelDefault);
-      },
-      edit (record) {
-        console.log(record)
-        this.model = Object.assign({}, record);
-        this.width = record.specs;
-        if (record.specs === 'A5'){
-          // this.width = '210mm';
-        }
-        this.visible = true;
-      },
-      submitForm () {
-        const that = this;
-        // 触发表单验证
-        this.$refs.form.validate(valid => {
-          if (valid) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-              var info = JSON.parse(localStorage.getItem("storeInfo"));
-              this.model.hotelId = info.id;
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
+        add() {
+            this.edit(this.modelDefault);
+        },
+        edit(record) {
+            console.log(record)
+            this.model = Object.assign({}, record);
+            this.width = record.specs;
+            if (record.specs === 'A5') {
+                // this.width = '210mm';
+                this.sizeTypeClass = "a5"
+            } else if (record.specs === '58mm') {
+                this.sizeTypeClass = "mm58"
+            } else {
+                this.sizeTypeClass = "mm80"
             }
-            httpAction(httpurl,this.model,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
+            this.visible = true;
+        },
+        submitForm() {
+            const that = this;
+            // 触发表单验证
+            this.$refs.form.validate(valid => {
+                if (valid) {
+                    that.confirmLoading = true;
+                    let httpurl = '';
+                    let method = '';
+                    if (!this.model.id) {
+                        httpurl += this.url.add;
+                        method = 'post';
+                        var info = JSON.parse(localStorage.getItem("storeInfo"));
+                        this.model.hotelId = info.id;
+                    } else {
+                        httpurl += this.url.edit;
+                        method = 'put';
+                    }
+                    httpAction(httpurl, this.model, method).then((res) => {
+                        if (res.success) {
+                            that.$message.success(res.message);
+                            that.$emit('ok');
+                        } else {
+                            that.$message.warning(res.message);
+                        }
+                    }).finally(() => {
+                        that.confirmLoading = false;
+                    })
+                }
+
             })
-          }
+        },
+        onSpecsChange(val) {
+            if (val == '80mm') {
+                this.sizeTypeClass = 'mm80'
+            } else if (val == '58mm') {
+                this.sizeTypeClass = 'mm58'
+            } else {
+                this.sizeTypeClass = 'a5'
+            }
+        },
+        printPreview(s) {
+            this.CreateOneFormPage()
+            if (s == 0) {
+                LODOP.PRINT() //直接打印
+            }
+            if (s == 1) {
+                LODOP.PREVIEW() //打印预览
+            }
+            if (s == 2) {
+                LODOP.PRINT_SETUP() //打印维护
+            }
+            if (s == 3) {
+                LODOP.PRINT_DESIGN() //打印设计
+            }
+        },
+        CreateOneFormPage() {
+            LODOP = getLodop()
+            //样式
+            var olstyle1 = '<style>' + document.getElementById('olstyle1') + '</style>'
+            var body = olstyle1 + '<body>' + document.getElementById('print_content').innerHTML + '</body>'
+            console.log(body)
+            // var body = document.getElementById('print_content').innerHTML;
+            LODOP.PRINT_INIT(this.model.name) //打印初始化
+            // LODOP.SET_PRINT_STYLE('FontSize', 18) //设置对象风格
+            LODOP.SET_PRINT_STYLE('Bold', 1) //设置对象风格
+            // LODOP.ADD_PRINT_TEXT(50,521, 130, 39, this.description) //增加纯文本项
+            var _left = 0;
+            var _wight = 2000;
+            var _height = 2000;
+            //SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)设定纸张大小
+            if (this.model.specs == '58mm') {
+                _wight = 580;
+                _height = 4000;
+            } else if (this.model.specs == '80mm') {
+                _wight = 800
+                _height = 2190;
+            } else if (this.model.specs == 'A5') {
+                _wight = 2100;
+                _height = 2970;
+            } else {
 
-        })
-      },
-      onSpecsChange(val){
-        if(val == '80mm') {
-          this.sizeTypeClass = 'mm80'
-        } else if(val == '58mm') {
-          this.sizeTypeClass = 'mm58'
-        } else {
-          this.sizeTypeClass = 'a5'
+            }
+            _left = this.model.printPaperOffset;
+            LODOP.SET_PRINT_PAGESIZE(_left, _wight, _height, '') //设定纸张大小
+            /*
+            intDispMode:预览比例,数字型,0-适度高 1-正常大小 2-适度宽
+            intToolMode:工具条和按钮,数字型 0-显示(上方)工具栏   1-显示(下方)按钮栏 2-两个都显示3-两个都不显示
+            blDirectPrint:打印按钮是否“直接打印” 1-是 0-否(弹出界面“选择打印”)
+            intWidth,intHeight 窗口的宽和高,整数型,单位px
+            strTitleButtonCaption:预览窗口和打印按钮的名称组合,字符型,用“点”分隔
+            */
+
+            LODOP.SET_PREVIEW_WINDOW(0, 0, 1, 0, 0, "");
+            // LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '55%')//设置缩放
+            // LODOP.SET_PREVIEW_WINDOW(2, 2, 0, 0, 0, '')//设置窗口
+            // 打印二维码
+            // LODOP.ADD_PRINT_BARCODE(23,23,233,233,"QRCode","https://blog.csdn.net/qq_43652509");
+            //打印网址
+            // LODOP.ADD_PRINT_URL(222,2000,2000,233,"https://blog.csdn.net/qq_43652509");
+            //打印图片
+            // LODOP.ADD_PRINT_IMAGE(100,100,400,400,"<img border='0' src='http://s1.sinaimg.cn/middle/4fe4ba17hb5afe2caa990&690' width='345' height='250'>");
+
+            // ● ADD_PRINT_HTM(intTop,intLeft,intWidth,intHeight,strHtml)增加超文本项
+            // ● ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent)增加纯文本项
+            // ● ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项
+            // ● ADD_PRINT_SHAPE(intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor)画图形
+            LODOP.ADD_PRINT_HTM(this.model.printContentOffset, this.model.printContentOffset, _wight - this.model.printContentOffset, _height - this.model.printContentOffset, body) //增加超文本项
+        },
+        handlePrint() {
+            var _content = this.model.printContentOffset;
+            var _maxWidth = 210;
+            if (this.model.specs == '58mm') {
+                _maxWidth = 580;
+            } else if (this.model.specs == '80mm') {
+                _maxWidth = 800
+            } else if (this.model.specs == 'A5') {
+                _maxWidth = 2100;
+            } else {
+
+            }
+            // var img = document.getElementById("image");
+            // img.src = 'https://img.xjishu.com/img/zl/2018/6/30/1241359458913.gif';
+            //打印图片要放在<img>标签中
+            printJS({
+                printable: "print_content", // 'printFrom', // 标签元素id
+                type: 'html',
+                header: '', // '表单',
+                targetStyles: ['*'],
+                maxWidth:_maxWidth,
+                style: '@page {margin:'+_content+'mm;size: A3;};', // 可选-打印时去掉眉页眉尾
+                ignoreElements: [], // ['no-print']
+                properties: null
+            })
         }
-      }
     }
   }
 </script>
@@ -238,6 +439,7 @@
   }
   .right{
     flex: 3;
+    padding-left: 20px;
   }
   .template{
     margin-left: 10px;

+ 2 - 2
src/views/settings/components/pos/modules/batchAddForm.vue

@@ -18,7 +18,7 @@
           </a-col> -->
                 <a-col :span="24">
                     <a-form-model-item label="pos类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="posTypeId">
-                        <a-select disabled v-model="model.posTypeId" placeholder="请选择pos类型">
+                        <a-select v-model="model.posTypeId" placeholder="请选择pos类型">
                             <a-select-option :value="item.id" v-for="item in posTypeList" :key="item.id">
                                 {{ item.name }}
                             </a-select-option>
@@ -188,7 +188,7 @@ export default {
         }).then((res) => {
             if (res.success) {
                 this.posTypeList = res.result.records;
-                this.model.posTypeId = this.posTypeList[0].id;
+                // this.model.posTypeId = this.posTypeList[0].id;
             }
         });
         getAction("/pos/posTableType/list", {

+ 19 - 4
src/views/settings/components/pos/posTable.vue

@@ -151,7 +151,7 @@ export default {
   data() {
     return {
       QRcodeVisible: false,
-      selectQRcode: "",
+      selectQRcode: null,
       queryParam: {},
       // 分页参数
       ipagination: {
@@ -234,9 +234,24 @@ export default {
   },
   methods: {
     QRcode(record){
-      console.log(record.qrCode);
-      this.selectQRcode = record.qrCode;
-      this.QRcodeVisible = true;
+      console.log(record);
+      this.selectQRcode = null;
+      if (record.qrCode) {
+        this.selectQRcode = record.qrCode;
+        this.QRcodeVisible = true;
+      }else{
+        getAction('/pos/posTable/generateQRCode?id=' + record.id).then((res) => {
+          console.log(res);
+          if (res.success) {
+            this.selectQRcode = res.result.qrCode;
+            this.QRcodeVisible = true;
+          }else{
+            this.$message.warning(res.message);
+          }
+        });
+      }
+      // this.selectQRcode = record.qrCode;
+      // this.QRcodeVisible = true;
     },
     batchAdd(){
       this.$refs.modalFormBatch.add();

+ 1 - 1
src/views/settings/components/pos/tabletOrdering.vue

@@ -96,7 +96,7 @@ export default {
         },
         reload() {
             this.confirmLoading = true
-            this.loadLayouts()
+            // this.loadLayouts()
             setTimeout(_ => {
                 this.$message.success('刷新成功')
                 this.confirmLoading = false

+ 6 - 6
src/views/settings/components/printTemplate.vue

@@ -21,7 +21,7 @@
 
         <!-- 操作按钮区域 -->
         <div class="table-operator">
-            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
 <!--            <a-button type="primary" icon="download" @click="handleExportXls('打印模板')">导出</a-button>-->
 <!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
 <!--                <a-button type="primary" icon="import">导入</a-button>-->
@@ -38,11 +38,6 @@
 
         <!-- table区域-begin -->
         <div>
-            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-                <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-            </div>
-
             <a-table
                     ref="table"
                     size="middle"
@@ -204,6 +199,11 @@
                 fieldList.push({type:'int',value:'isShowRefund',text:'状态(0-关闭;1-开启)'})
                 this.superFieldList = fieldList
             },
+            handleEdit: function (record) {
+                this.$refs.modalForm.edit(record);
+                this.$refs.modalForm.title = record.name;
+                this.$refs.modalForm.disableSubmit = false;
+            },
         }
     }
 </script>

+ 9 - 1
src/views/system/YezhuList.vue

@@ -35,7 +35,7 @@
                 >新增业主</a-button
               >
               <a-button
-                @click="handleAdd"
+                @click="handleshuilv"
                 style="margin-left: 8px"
                 type="primary"
                 >配置税率</a-button
@@ -119,6 +119,7 @@
       @ok="modalFormOk"
     ></bus-yezhu-modal>
     <user-room-relation-modal ref="UserRoomRelationModal" @ok="modalFormOk"></user-room-relation-modal>
+    <shuilv-modal ref="modalshuilvForm"></shuilv-modal>
   </a-card>
 </template>
   
@@ -126,6 +127,7 @@
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
 import SysUserModal from "./modules/yezhu/SysUserModal";
 import BusYezhuModal from "./modules/yezhu/BusYezhuModal";
+import shuilvModal from "./modules/yezhu/shuilvModal";
 import UserRoomRelationModal from "./modules/yezhu/UserRoomRelationModal";
 import { filterObj } from "@/utils/util";
 import { getAction } from "@/api/manage";
@@ -136,6 +138,7 @@ export default {
     SysUserModal,
     BusYezhuModal,
     UserRoomRelationModal,
+    shuilvModal
   },
   data() {
     return {
@@ -205,6 +208,11 @@ export default {
   },
   created() {},
   methods: {
+    handleshuilv(){
+      this.$refs.modalshuilvForm.add();
+      this.$refs.modalshuilvForm.title = "税率";
+      this.$refs.modalshuilvForm.disableSubmit = false;
+    },
     handleEdit(record) {
       record.type = 1;
       this.$refs.modalBusYezhuForm.edit(record);

+ 126 - 0
src/views/system/modules/yezhu/shuilvForm.vue

@@ -0,0 +1,126 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="税率"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="taxRate"
+            >
+              <a-input-number
+                v-model="model.taxRate"
+                placeholder="请输入税率"
+                style="width: 20%"
+              />%
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusYezhuForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { type: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        taxRate: [{ required: true, message: "请输入税率!" }],
+      },
+      url: {
+        add: "/business/busOtherRoomCard/add",
+        edit: "/business/busOtherRoomCard/edit",
+        queryById: "/business/busYezhu/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    getAction("/business/busOtherRoomCard/queryByHotelId", {}).then((res) => {
+      if (res.success) {
+        this.model = res.result;
+      }
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    });
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+            var _info = JSON.parse(localStorage.getItem("storeInfo"));
+            if (_info) {
+              this.model.hotelId = _info.id;
+            }
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/system/modules/yezhu/shuilvModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-yezhu-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-yezhu-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusYezhuForm from './shuilvForm'
+  export default {
+    name: 'BusYezhuModal',
+    components: {
+      BusYezhuForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>