(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/inventory/inventoryDetail"],{"2cb0":function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){return s}));var s={uniSegmentedControl:function(){return e.e("uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control").then(e.bind(null,"4108"))},uniNumberBox:function(){return e.e("uni_modules/uni-number-box/components/uni-number-box/uni-number-box").then(e.bind(null,"8ea0"))},uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(e.bind(null,"d3ec"))},uniTable:function(){return e.e("uni_modules/uni-table/components/uni-table/uni-table").then(e.bind(null,"e466"))},uniTr:function(){return e.e("uni_modules/uni-table/components/uni-tr/uni-tr").then(e.bind(null,"17f7"))},uniTh:function(){return e.e("uni_modules/uni-table/components/uni-th/uni-th").then(e.bind(null,"f640"))},uniTd:function(){return e.e("uni_modules/uni-table/components/uni-td/uni-td").then(e.bind(null,"01c0"))},uniPopup:function(){return e.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(e.bind(null,"4d18"))},uniFormsItem:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item")]).then(e.bind(null,"ac84"))},uniDataSelect:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(e.bind(null,"c807"))},uniPopupDialog:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog")]).then(e.bind(null,"9ec8"))},uniFab:function(){return e.e("uni_modules/uni-fab/components/uni-fab/uni-fab").then(e.bind(null,"b7a1"))}},n=function(){var t=this,i=t.$createElement,e=(t._self._c,t.__map(t.pecsList,(function(i,e){var s=t.__get_orig(i),n=t._f("sliceMsg")(i.attributeList);return{$orig:s,f0:n}}))),s=t.shopprintList.length,n=t.shopprintList.length>0&&("0"==t.printingMethod||"3"==t.printingMethod),a=t.shopprintList.length>0&&("0"==t.printingMethod||"3"==t.printingMethod),o=t.__map(t.GDList.stockLogList,(function(i,e){var s=t.__get_orig(i),n=t._f("sliceMsg")(i.attributeList);return{$orig:s,f1:n}}));t._isMounted||(t.e0=function(i){t.isPrint=!1},t.e1=function(i){return t.$refs.detailPopup.close()}),t.$mp.data=Object.assign({},{$root:{l0:e,g0:s,g1:n,g2:a,l1:o}})},a=[]},"62ac":function(t,i,e){"use strict";var s=e("885b"),n=e.n(s);n.a},6344:function(t,i,e){"use strict";(function(t,s){var n=e("47a9"),a=e("3b2d");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var o=n(e("af34")),h=(n(e("3cc2")),function(t,i){if(!i&&t&&t.__esModule)return t;if(null===t||"object"!==a(t)&&"function"!==typeof t)return{default:t};var e=u(i);if(e&&e.has(t))return e.get(t);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var h=n?Object.getOwnPropertyDescriptor(t,o):null;h&&(h.get||h.set)?Object.defineProperty(s,o,h):s[o]=t[o]}s.default=t,e&&e.set(t,s);return s}(e("b37f"))),d=n(e("ec9a"));function u(t){if("function"!==typeof WeakMap)return null;var i=new WeakMap,e=new WeakMap;return(u=function(t){return t?e:i})(t)}var r={data:function(){return{pageNum:1,pages:1,dataList:[],closetanPopup:!1,detailList:[],typeList1:[{value:"0",text:"厂标(40*60)"},{value:"3",text:"厂标(50*80)"},{value:"1",text:"二维码签(50*40)"},{value:"5",text:"标签(40*30)"},{value:"2",text:"大号标签居中(50*40)"},{value:"4",text:"大号标签居左(50*40)"},{value:"6",text:"标签居中(20*10)"}],typeList:[{value:"0",text:"打印长票"},{value:"1",text:"打印短票"}],printQR:[{value:"0",text:"打印"},{value:"1",text:"不打印"}],isQRCode:"0",GDList:[],customizeText:"",printingMethod:"0",zidingyi:!1,shopprintContent:"",shopprintList:[],isPrint:!1,bufferData:[],items:["库存","销售明细","销售退货","入库明细"],current:0,horizontal:"right",pecsList:[],defaultText:"",type:t.getStorageSync("type"),size:"",color:"",number:"",printNum:1,list:[{type:"供应商",checked:!1,text:""},{type:"货号",checked:!1,text:""},{type:"品名",checked:!1,text:""},{type:"零售价",checked:!1,text:""},{type:"批发价",checked:!1,text:""}],multipleList:[],content:[{iconPath:"/static/images/tabbar/home.png",selectedIconPath:"/static/images/tabbar/home-sel.png",text:"自定打印",active:!1},{iconPath:"/static/images/tabbar/home.png",selectedIconPath:"/static/images/tabbar/home-sel.png",text:"删除商品",active:!1}],printList:new Map,shippList:[],yNum:10}},filters:{sliceMsg:function(t){var i="";if("string"==typeof t){var e=JSON.parse(t);for(var s in e)i+=e[s]+"/"}return i},maxNum:function(t){return t>=10?10:t<0?0:void 0}},components:{kkPrinter:function(){Promise.all([e.e("common/vendor"),e.e("components/kk-printer/index")]).then(function(){return resolve(e("6e81"))}.bind(null,e)).catch(e.oe)}},onHide:function(){setTimeout((function(i){t.closeBLEConnection({deviceId:t.getStorageSync("deviceId"),success:function(t){},fail:function(t){}})}),5e3)},onLoad:function(t){s.openBluetoothAdapter({mode:"central"}),this.getCategoryList(),this.dataList=JSON.parse(t.item)},onReachBottom:function(){this.pageNum>=this.pages||(this.status="loading",this.pageNum++,this.getWaitStorage())},onShow:function(){this.getShareList()},methods:{changeList:function(){if(""!=this.shopprintContent){var t=JSON.parse(this.shopprintContent);this.shippList=t}console.log(this.shippList);for(var i=0;i0&&(e.dataList.stockCount=e.dataList.stockCount-i.stockCount,t.removeStorageSync("noReload"))):t.showToast({title:"删除失败",icon:"none"})}))}})},sliceMsg:function(t){var i="";if("string"==typeof t){var e=JSON.parse(t);for(var s in e)i+=e[s]+" "}return i},countPrint:function(){return this.yNum+=50},onPrint:function(i){var e=this,s=this;this.printList.forEach((function(i,n){if(i.productCount<1)e.tui.toast("请输入 "+i.attributeList+" 数量再打印");else for(var a=0;a0){for(var g=0;g12){var l=Math.ceil(Number(this.shippList[r].name.length)/12);u+=l}else u+=1;var p=0;p=Math.ceil((400-24*u)/u),u<=7&&"0"==this.isQRCode&&(p=30);var c=h.CreatCPCLPage(320,480,1,0);c+=h.addCPCLSETBOLD("1"),-1!=this.multipleList.indexOf("供应商")&&(c+=h.addCPCLSETMAG(2,2),c+=h.addCPCLLocation(2),c+=h.addCPCLText("0",this.yNum,"24","0",0,null==this.dataList.supplierName?"":this.dataList.supplierName)),c+=h.addCPCLSETMAG(1,1),c+=h.addCPCLLocation(0),c+=h.addCPCLText("20",this.yNum+=20,"24","0",0,""),-1!=this.multipleList.indexOf("品名")&&("1853332569559535619"==t.getStorageSync("shopId")&&(c+=h.addCPCLSETMAG(2,2)),c+=h.addCPCLText("20",this.yNum+=25+p,"24","0",0,"品名: "+(null==this.dataList.productName?"":this.dataList.productName))),-1!=this.multipleList.indexOf("货号")&&("1853332569559535619"==t.getStorageSync("shopId")&&(c+=h.addCPCLSETMAG(2,2)),c+=h.addCPCLText("20",this.yNum+=25+p,"24","0",0,"货号: "+(null==this.dataList.productSn?"":this.dataList.productSn))),""==this.color&&""==this.size||(c+=h.addCPCLText("20",this.yNum+=25+p,"24","0",0,"规格: "+this.color+" "+this.size)),-1!=this.multipleList.indexOf("批发价")&&(c+=h.addCPCLText("20",this.yNum+=25+p,"24","0",0,"批发价: "+this.dataList.wholesalePrice)),-1!=this.multipleList.indexOf("零售价")&&(c+=h.addCPCLText("20",this.yNum+=25+p,"24","0",0,"零售价: "+this.dataList.price));var L=0;if(this.shippList.length>0){for(var g=0;g0||this.shippList[g].rightIcon.length>0){c+=h.addCPCLLocation(0);var f=300;(this.shippList[g].name+this.shippList[g].value).length>0&&(f-=20),C=Math.floor((f-(32*(this.shippList[g].leftIcon.length+this.shippList[g].rightIcon.length)+25*(this.shippList[g].name+this.shippList[g].value).length))/2)}else c+=h.addCPCLLocation(2);else c+=h.addCPCLLocation(0);"notblod"==this.shippList[g].modelBlod?c+=h.addCPCLSETBOLD("0"):c+=h.addCPCLSETBOLD("1");var m=25*(this.shippList[g].name.length-this.shippList[g].name.replace(/^\s+/," ").length)+20;if(this.shippList[g].leftIcon.length>0||this.shippList[g].rightIcon.length>0?this.yNum+=32+p:this.yNum+=25+p,console.log("beginNum",m),console.log("that.shippList",this.shippList),this.shippList[g].leftIcon.length>0){C+=21;for(var P=0;P0||this.shippList[g].rightIcon.length>0?c+=h.addCPCLText((m+C).toString(),this.yNum+4,"24","0",0,this.shippList[g].name+": "+this.shippList[g].value):c+=h.addCPCLText((m+C).toString(),this.yNum,"24","0",0,this.shippList[g].name+": "+this.shippList[g].value);else if(this.shippList[g].name.length>12)for(var x=Math.ceil(Number(this.shippList[g].name.length)/12),v=0;v0||this.shippList[g].rightIcon.length>0?c+=h.addCPCLText((m+C).toString(),this.yNum+4,"24","0",0,this.shippList[g].name.substring(12*v,12*(v+1))):c+=h.addCPCLText((m+C).toString(),this.yNum,"24","0",0,this.shippList[g].name.substring(12*v,12*(v+1))),this.shippList[g].leftIcon.length>0||this.shippList[g].rightIcon.length>0?this.yNum+=32+p:this.yNum+=25+p;else this.shippList[g].leftIcon.length>0||this.shippList[g].rightIcon.length>0?c+=h.addCPCLText((m+C).toString(),this.yNum+4,"24","0",0,this.shippList[g].name):c+=h.addCPCLText((m+C).toString(),this.yNum,"24","0",0,this.shippList[g].name);if(this.shippList[g].rightIcon.length>0){var y=Number(25*(this.shippList[g].name+this.shippList[g].value).length+20)+C;console.log("iconWidth1",y);for(var N=0;N15){var D=Math.ceil(Number(this.shippList[O].name.length)/15);I+=D}else I+=1;var M;M=Math.ceil((560-24*I)/I);var k=h.CreatCPCLPage(400,640,1,0);k+=h.addCPCLSETBOLD("1"),-1!=this.multipleList.indexOf("供应商")&&(k+=h.addCPCLSETMAG(2,2),k+=h.addCPCLLocation(2),k+=h.addCPCLText("0",this.yNum,"24","0",0,null==this.dataList.supplierName?"":this.dataList.supplierName)),k+=h.addCPCLSETMAG(1,1),k+=h.addCPCLLocation(0),k+=h.addCPCLText("30",this.yNum+=30,"24","0",0,""),-1!=this.multipleList.indexOf("品名")&&(k+=h.addCPCLText("30",this.yNum+=25+M,"24","0",0,"品名: "+(null==this.dataList.productName?"":this.dataList.productName))),-1!=this.multipleList.indexOf("货号")&&(k+=h.addCPCLText("30",this.yNum+=25+M,"24","0",0,"货号: "+(null==this.dataList.productSn?"":this.dataList.productSn))),""==this.color&&""==this.size||(k+=h.addCPCLText("30",this.yNum+=25+M,"24","0",0,"规格: "+this.color+" "+this.size)),-1!=this.multipleList.indexOf("批发价")&&(k+=h.addCPCLText("30",this.yNum+=25+M,"24","0",0,"批发价: "+this.dataList.wholesalePrice)),-1!=this.multipleList.indexOf("零售价")&&(k+=h.addCPCLText("30",this.yNum+=25+M,"24","0",0,"零售价: "+this.dataList.price));if(this.shippList.length>0){for(var E=0;E0||this.shippList[E].rightIcon.length>0){k+=h.addCPCLLocation(0);var G=370;(this.shippList[E].name+this.shippList[E].value).length>0&&(G-=30),_=Math.floor((G-(32*(this.shippList[E].leftIcon.length+this.shippList[E].rightIcon.length)+25*(this.shippList[E].name+this.shippList[E].value).length))/2)}else k+=h.addCPCLLocation(2);else k+=h.addCPCLLocation(0);"notblod"==this.shippList[E].modelBlod?k+=h.addCPCLSETBOLD("0"):k+=h.addCPCLSETBOLD("1");var z=25*(this.shippList[E].name.length-this.shippList[E].name.replace(/^\s+/," ").length)+30;if(this.shippList[E].leftIcon.length>0||this.shippList[E].rightIcon.length>0?this.yNum+=32+M:this.yNum+=25+M,console.log("beginNum",z),console.log("that.shippList",this.shippList),this.shippList[E].leftIcon.length>0){_+=31;for(var B=0;B0||this.shippList[E].rightIcon.length>0?k+=h.addCPCLText((z+_).toString(),this.yNum+4,"24","0",0,this.shippList[E].name+": "+this.shippList[E].value):k+=h.addCPCLText((z+_).toString(),this.yNum,"24","0",0,this.shippList[E].name+": "+this.shippList[E].value);else if(this.shippList[E].name.length>15)for(var R=Math.ceil(Number(this.shippList[E].name.length)/15),w=0;w0||this.shippList[E].rightIcon.length>0?k+=h.addCPCLText((z+_).toString(),this.yNum+4,"24","0",0,this.shippList[E].name.substring(15*w,15*(w+1))):k+=h.addCPCLText((z+_).toString(),this.yNum,"24","0",0,this.shippList[E].name.substring(15*w,15*(w+1))),this.shippList[E].leftIcon.length>0||this.shippList[E].rightIcon.length>0?this.yNum+=32+M:this.yNum+=25+M;else this.shippList[E].leftIcon.length>0||this.shippList[E].rightIcon.length>0?k+=h.addCPCLText((z+_).toString(),this.yNum+4,"24","0",0,this.shippList[E].name):k+=h.addCPCLText((z+_).toString(),this.yNum,"24","0",0,this.shippList[E].name);if(this.shippList[E].rightIcon.length>0){var A=Number(25*(this.shippList[E].name+this.shippList[E].value).length+30)+_;console.log("iconWidth1",A);for(var $=0;$