webpackJsonp([19],{"+F6w":function(n,t,e){var i=e("Km1E");"string"==typeof i&&(i=[[n.i,i,""]]),i.locals&&(n.exports=i.locals);e("rjj0")("22d2651d",i,!0)},"74QC":function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=e("fZjL"),r=e.n(a),o=e("Dd8w"),s=e.n(o),l=e("Xxa5"),c=e.n(l),d=e("exGp"),m=e.n(d),p=e("//Fk"),h=e.n(p),f=e("bOdI"),u=e.n(f),g=e("Zrlr"),b=e.n(g),x=e("wxAW"),v=e.n(x),w=(e("hky6"),e("UVPs")),y=e("TwlK"),k=e.n(y),_=e("Lokx"),z=e.n(_),S=function(){function n(){b()(this,n),this.printWindow=null}return v()(n,[{key:"print",value:function(n){var t=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.width,a=e.height,r=e.marginTop,o=e.marginLeft,s=e.fontSize;this.printWindow=window.open("","_blank"),this.printWindow.document.write("\n \n \n 打印标签\n \n \n "+n+"\n \n "),this.printWindow.document.close(),setTimeout(function(){t.printWindow.focus(),t.printWindow.print(),setTimeout(function(){t.printWindow.close()},500)},500)}}]),n}(),C={name:"systemLogs",data:function(){var n;return n={printer:null,loading:!1,params:{page_no:1,page_size:20},tableData:"",searchTime:"",showLogDetail:!1,currDetailLog:{},advancedForm:{},PrintVisible:!1,codeList:[],barcodeValue:"",multipleSelection:[],scale:100},u()(n,"codeList",[]),u()(n,"PrintVisible",!1),u()(n,"printOrientation","portrait"),u()(n,"selectedSize","large"),u()(n,"sizeOptions",[{label:"45×10mm",value:"medium",width:45,height:10,marginTop:.55,marginLeft:2,fontSize:8},{label:"50×20mm",value:"large",width:50,height:20,marginTop:-5,marginLeft:2.5,fontSize:12},{label:"25×10mm",value:"small",width:25,height:10,marginTop:0,marginLeft:-1,fontSize:6}]),u()(n,"printOptions",{id:"deliverySheet",popTitle:"条码打印",preview:!1,extraCss:"\n @page {\n size: auto;\n margin: 0;\n }\n body {\n margin: 0;\n -webkit-print-color-adjust: exact;\n }\n .tips-t {\n page-break-after: always;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n padding: 1mm;\n /* 移除边框 */\n border: none !important;\n outline: none !important;\n }\n /* 移除所有可能的边框和轮廓 */\n * {\n border: none !important;\n outline: none !important;\n }\n .content-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n .barcode-container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 70%;\n }\n .numOrder {\n font-size: 10px;\n margin-top: 0.5mm;\n }\n /* 打印时隐藏所有边框 */\n @media print {\n * {\n border: none !important;\n outline: none !important;\n -webkit-print-color-adjust: exact;\n }\n .tips-t {\n border: none !important;\n outline: none !important;\n }\n }\n "}),n},mounted:function(){this.GET_SystemLogs(),this.rowDrop()},created:function(){this.printer=new S},watch:u()({PrintVisible:function(n){var t=this;n&&this.$nextTick(function(){t.generateBarcodes()})},selectedSize:{handler:function(n){var t=this;this.$nextTick(function(){t.generateBarcodes()})}}},"selectedSize",{handler:function(n){var t={large:{width:"50mm",height:"20mm"},medium:{width:"45mm",height:"10mm"},small:{width:"25mm",height:"10mm"}}[n];this.printOptions.extraCss="\n @page {\n size: "+t.width+" "+t.height+";\n margin: 0;\n }\n body {\n margin: 0;\n -webkit-print-color-adjust: exact;\n }\n * {\n border: none !important;\n outline: none !important;\n }\n .tips-t {\n width: "+t.width+";\n height: "+t.height+";\n page-break-after: always;\n margin-top:-15px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n padding: 1mm;\n border: none !important;\n outline: none !important;\n }\n .content-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n .barcode-container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 70%;\n }\n .barcode-container svg {\n max-width: 100%;\n max-height: 100%;\n }\n .numOrder {\n font-size: 10px;\n margin-top: 0.5mm;\n }\n @media print {\n * {\n border: none !important;\n outline: none !important;\n -webkit-print-color-adjust: exact;\n }\n .tips-t {\n border: none !important;\n outline: none !important;\n }\n }\n "},immediate:!0}),methods:(i={generateBarcodes:function(){var n=this;return new h.a(function(t,e){try{n.$nextTick(function(){n.codeList.forEach(function(t,e){var i=n.getBarcodeOptions(),a=document.getElementById("barcode-"+e);if(a){for(;a.firstChild;)a.removeChild(a.firstChild);k()("#barcode-"+e,String(t).toUpperCase(),i)}}),t()})}catch(n){e(n)}})},getBarcodeOptions:function(){var n={large:{width:1.5,height:40},medium:{width:1.2,height:20},small:{width:1,height:15}}[this.selectedSize]||{width:1.5,height:40};return{format:"CODE128",width:n.width,height:n.height,displayValue:!1,margin:5,fontSize:"small"===this.selectedSize?8:12,textMargin:2}},handleCancle:function(){this.PrintVisible=!1},handleSelectionChange:function(n){this.multipleSelection=n},batchPrint:function(){var n=this;return m()(c.a.mark(function t(){var e;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:try{e=n.multipleSelection.map(function(n){return n.sku}),n.codeList=e,n.PrintVisible=!0}catch(t){n.$message.error("批量打印失败:"+t.message)}case 1:case"end":return t.stop()}},t,n)}))()},handlePrintGoodsLend:function(){var n=this;return m()(c.a.mark(function t(){var e,i;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n.selectedSize){t.next=4;break}return n.$message.warning("请先选择打印尺寸"),t.abrupt("return");case 4:if(e=n.sizeOptions.find(function(t){return t.value===n.selectedSize})){t.next=7;break}throw new Error("无效的打印尺寸");case 7:return t.next=9,n.generateBarcodes();case 9:i=n.codeList.map(function(n,t){var e=document.getElementById("barcode-"+t);if(!e)throw new Error("条形码生成失败");return'\n \n "}).join(""),n.printer.print(i,{width:e.width,height:e.height,marginTop:e.marginTop,marginLeft:e.marginLeft,fontSize:e.fontSize}),n.$message.success("打印成功"),n.PrintVisible=!1,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),n.$message.error("打印失败:"+t.t0.message);case 18:case"end":return t.stop()}},t,n,[[0,15]])}))()}},u()(i,"handleCancle",function(){this.PrintVisible=!1,this.codeList=[]}),u()(i,"PrintIng",function(n){var t=this;return m()(c.a.mark(function e(){return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:try{t.barcodeValue=n.sku,t.codeList=[n.sku],t.PrintVisible=!0}catch(n){t.$message.error("打印失败:"+n.message)}case 1:case"end":return e.stop()}},e,t)}))()}),u()(i,"rowDrop",function(){var n=document.querySelector(".draggable-table .el-table__body-wrapper tbody"),t=this;z.a.create(n,{animation:300,handle:".drag-handle",onEnd:function(n){var e=n.newIndex,i=(n.oldIndex,t.tableData.data.splice(e,1)[0]);t.tableData.data.splice(e,0,i),t.updateList(i.id,e)}})}),u()(i,"updateList",function(n,t){var e=this,i=[{position:"own",product_id:this.tableData.data[t].id,sort:this.tableData.data[t].sort}];t>0&&i.push({position:"before",product_id:this.tableData.data[t-1].id,sort:this.tableData.data[t-1].sort}),t