You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
13 KiB
1 lines
13 KiB
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package2/other/logisticsOrderDetail"],{"04e5":function(t,e,i){"use strict";(function(t,a){var n=i("47a9"),r=i("3b2d");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n(i("60b9"));var d=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var i=o(e);if(i&&i.has(t))return i.get(t);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in t)if("default"!==d&&Object.prototype.hasOwnProperty.call(t,d)){var s=n?Object.getOwnPropertyDescriptor(t,d):null;s&&(s.get||s.set)?Object.defineProperty(a,d,s):a[d]=t[d]}a.default=t,i&&i.set(t,a);return a}(i("769c")),s=n(i("2df0"));i("072a");function o(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(o=function(t){return t?i:e})(t)}var C={data:function(){return{bigImg:[],bufferData:[],deviceType:"ios",itemData:{},changeList:[],bufferDataSmall:[],bufferDataBig:[],shopRemark:[],yNum:0}},components:{kkPrinter:function(){Promise.all([i.e("common/vendor"),i.e("components/kk-printer/index")]).then(function(){return resolve(i("4af3"))}.bind(null,i)).catch(i.oe)}},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var i=JSON.parse(t);for(var a in i)e+=i[a]+"/"}return e},maxNum:function(t){return t>=10?10:t<0?0:void 0}},onShow:function(){t.openBluetoothAdapter({mode:"central"})},onLoad:function(t){this.itemData=JSON.parse(t.item);var e=this.itemData.orderNumber,i=(this.itemData.shipperName,this.itemData.receiverName),n=this.itemData.arrivalStationName,r=this.itemData.createTime,s=0==this.itemData.count?1:this.itemData.count;if(a.getStorageSync("remark")){var o=a.getStorageSync("remark");this.shopRemark=o.split("\n")}for(var C=1;C<=s;C++){var h=d.CreatCPCLPage(600,480,1,0,0);h+=d.addCPCLBox(10,10,570,450,3),h+=d.addCPCLLocation(2),h+=d.addCPCLSETMAG(2,2),h+=d.addCPCLText("0",20,"24","0",0,this.itemData.companyName),h+=d.addCPCLLine(10,80,570,80,2),h+=d.addCPCLLocation(0),h+=d.addCPCLSETMAG(1,1),h+=d.addCPCLText("20",100,"24","0",0,"开票日期:"+r),h+=d.addCPCLLine(10,140,570,140,2),h+=d.addCPCLLine(382,140,382,316,2),h+=d.addCPCLSETMAG(2,2),h+=d.addCPCLText("20",160,"24","0",0,"到站:"+n),h+=d.addCPCLLine(10,220,382,220,2),h+=d.addCPCLText("20",248,"24","0",0,"收:"+i),h+=d.addCPCLLine(10,316,570,316,2),h+=d.addCPCLSETMAG(1,1),h+=d.addCPCLText("20",336,"24","0",0,"共"+this.itemData.count+"件"),h+=d.addCPCLText("112",336,"24","0",0,"自提"),h+=d.addCPCLLine(170,316,170,450,2),h+=d.addCPCLText("186",336,"24","0",0,"单号:"+e+"-"+C),h+=d.addCPCLLine(10,376,570,376,2),h+=d.addCPCLText("20",396,"24","0",0,"undefined"==this.itemData.receiverMobile||null==this.itemData.receiverMobile?"":this.itemData.receiverMobile),h+=d.addCPCLText("186",396,"24","0",0,"备注:"+this.itemData.remark),h+=d.addCPCLQRCode(400,150,"H","1",4,e),h+=d.addCPCLPrint(),this.bufferDataSmall.push(h)}var c="";if(1==a.getStorageSync("zhiType")){c=d.CreatCPCLPage(600,1800,1,0,0),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLLocation(2),c+=d.addCPCLText("30","30","24","0","0",this.getPrintByte(this.itemData.companyName)),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLLocation(0);var u=this.itemData.orderNumber;"1899370468356526080"!=a.getStorageSync("transCompany")&&"1782981706819702784"!=a.getStorageSync("transCompany")||(u=this.itemData.orderNumber.split("-")[1]+this.itemData.orderNumber.split("-")[2].replace("-","")),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLText("30","150","24","0","0","单号:"+this.getPrintByte(u)),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLText("30","210","24","0","0",this.timestampToDatetime()),c+=d.addCPCLLine(25,270,1080,270,2),c+=d.addCPCLText("30","290","24","0","0","始发站:"+this.getPrintByte(this.itemData.goStationName)),c+=d.addCPCLText("300","290","24","0","0","到达站:"+this.getPrintByte(this.itemData.arrivalStationName)),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLText("30","340","24","0","0","收:"+this.getPrintByte(this.itemData.receiverName)),c+=d.addCPCLSETMAG(1,2),c+=d.addCPCLText("300","340","24","0","0"," "+this.getPrintByte(this.itemData.receiverMobile)),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLText("30","410","24","0","0","地址:"+this.getPrintByte(this.itemData.receiverAddress)),c+=d.addCPCLLine(25,470,1080,470,2),c+=d.addCPCLText("30","490","24","0","0","发货人:"+this.getPrintByte(this.itemData.shipperName)),c+=d.addCPCLText("300","490","24","0","0","电话:"+this.getPrintByte(this.itemData.shipperMobile)),c+=d.addCPCLLine(25,550,1080,550,2),c+=d.addCPCLText("30","570","24","0","0","重量:"+this.getPrintByte(this.itemData.weight)+"kg"),c+=d.addCPCLText("300","570","24","0","0","件数:"+this.getPrintByte(this.itemData.count)),c+=d.addCPCLText("30","630","24","0","0","运费:"+this.getPrintByte(this.itemData.freight)+"元"),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLText("300","620","24","0","0","物品:"+this.getPrintByte(this.itemData.objectName)),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLText("30","690","24","0","0","小费:"+this.getPrintByte(this.itemData.tips)+"元");var m="";if("0"==this.getPrintByte(this.itemData.methodOfSettlement)?m="现付":"1"==this.getPrintByte(this.itemData.methodOfSettlement)?m="月付":"2"==this.getPrintByte(this.itemData.methodOfSettlement)&&(m="提付"),c+=d.addCPCLText("300","690","24","0","0","结算:"+m),c+=d.addCPCLText("30","750","24","0","0","中转费:"+this.getPrintByte(this.itemData.transitFee)+"元"),c+=d.addCPCLText("300","750","24","0","0","落地费:"+this.getPrintByte(this.itemData.landingFee)+"元"),c+=d.addCPCLText("30","810","24","0","0","送货费:"+this.getPrintByte(this.itemData.deliveryFee)+"元"),c+=d.addCPCLText("300","810","24","0","0","保费:"+this.getPrintByte(this.itemData.premium)+"元"),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLText("30","860","24","0","0","总费用:"+this.getPrintByte(this.itemData.allCost)+"元"),c+=d.addCPCLLine(25,920,1080,920,2),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLText("30","940","24","0","0","备注:"+this.getPrintByte(this.itemData.remark)),c+=d.addCPCLText("30","1000","24","0","0","收货人签字:"),c+=d.addCPCLLine(25,1060,1080,1060,2),this.yNum=1060,c+=d.addCPCLSETMAG(1,1),this.shopRemark.length>0)for(var P=0;P<this.shopRemark.length;P++)c+=d.addCPCLText("30",this.countPrint(),"24","0",0,this.shopRemark[P])}else{if(c=d.CreatCPCLPage(600,480,1,0,0),c+=d.addCPCLBox(10,10,570,450,3),c+=d.addCPCLSETMAG(2,2),c+=d.addCPCLSETBOLD("2"),c+=d.addCPCLLocation(0),c+=d.addCPCLText("30","30","24","0","0",this.getPrintByte(this.itemData.companyName)),c+=d.addCPCLSETMAG(1,1),c+=d.addCPCLSETBOLD("2"),c+=d.addCPCLText("300","30","24","0","0","单号:"+this.getPrintByte(this.itemData.orderNumber)),c+=d.addCPCLSETBOLD("2"),c+=d.addCPCLBox(25,50,555,50,2),c+=d.addCPCLText("30","90","24","0","0","收货人:"+this.getPrintByte(this.itemData.receiverName)),c+=d.addCPCLText("300","90","24","0","0","到达站:"+this.getPrintByte(this.itemData.arrivalStationName)),c+=d.addCPCLText("30","140","24","0","0","地址:"+this.getPrintByte(this.itemData.receiverAddress)),c+=d.addCPCLText("300","140","24","0","0","电话:"+this.getPrintByte(this.itemData.receiverMobile)),c+=d.addCPCLLine(25,180,555,180,2),c+=d.addCPCLText("30","190","24","0","0","发货人:"+this.getPrintByte(this.itemData.shipperName)),c+=d.addCPCLText("300","190","24","0","0","电话:"+this.getPrintByte(this.itemData.shipperMobile)),c+=d.addCPCLLine(25,240,555,240,2),"1751796589518786560"!=a.getStorageSync("transCompany")&&"1899371352842964992"!=a.getStorageSync("transCompany")&&"1782981706819702784"!=a.getStorageSync("transCompany")){c+=d.addCPCLText("30","250","24","0","0","重量:"+this.getPrintByte(this.itemData.weight)),c+=d.addCPCLText("300","250","24","0","0","件数:"+this.getPrintByte(this.itemData.count)+"件");var g="";"0"==this.getPrintByte(this.itemData.methodOfSettlement)?g="现金":"1"==this.getPrintByte(this.itemData.methodOfSettlement)?g="月付":"2"==this.getPrintByte(this.itemData.methodOfSettlement)&&(g="提付"),c+=d.addCPCLText("30","290","24","0","0","结算方式:"+g)}else{var L=0,f=0;0!=this.itemData.weight&&(0==f?L=30:L+=130,c+=d.addCPCLText(L.toString(),"250","24","0","0","重量:"+this.getPrintByte(this.itemData.weight)),f=1),0!=this.itemData.count&&(0==f?L=30:L+=130,c+=d.addCPCLText(L.toString(),"250","24","0","0","件数:"+this.getPrintByte(this.itemData.count)),f=1),0!=this.itemData.freight&&(0==f?L=30:L+=130,c+=d.addCPCLText(L.toString(),"250","24","0","0","运费:"+this.getPrintByte(this.itemData.freight)),f=1),0!=this.itemData.tips&&"1751796589518786560"!=a.getStorageSync("transCompany")&&(0==f?L=30:L+=130,c+=d.addCPCLText(L.toString(),"250","24","0","0","小费:"+this.getPrintByte(this.itemData.tips)),f=1),L=0,f=0;var l="";"0"==this.getPrintByte(this.itemData.methodOfSettlement)?l="现金":"1"==this.getPrintByte(this.itemData.methodOfSettlement)?l="月付":"2"==this.getPrintByte(this.itemData.methodOfSettlement)&&(l="提付"),c+=d.addCPCLText("30","290","24","0","0","结算:"+l),0!=this.itemData.transitFee&&(0==f?L=160:L+=130,c+=d.addCPCLText(L.toString(),"290","24","0","0","中转费:"+this.getPrintByte(this.itemData.transitFee)),f=1),0!=this.itemData.landingFee&&(0==f?L=160:L+=130,c+=d.addCPCLText(L.toString(),"290","24","0","0","落地费:"+this.getPrintByte(this.itemData.landingFee)),f=1),0!=this.itemData.deliveryFee&&(0==f?L=160:L+=130,c+=d.addCPCLText(L.toString(),"290","24","0","0","送货费:"+this.getPrintByte(this.itemData.deliveryFee)),f=1),0!=this.itemData.objectName&&(0==f?L=160:L+=130,c+=d.addCPCLText(L.toString(),"290","24","0","0","物品:"+this.getPrintByte(this.itemData.objectName)),f=1)}c+=d.addCPCLLine(25,330,555,330,2),c+=d.addCPCLText("30","340","24","0","0","备注:"+this.getPrintByte(this.itemData.remark)),c+=d.addCPCLLine(25,400,555,400,2),c+=d.addCPCLText("30","410","24","0","0","操作人:"+this.getPrintByte(this.itemData.creatBy)),c+=d.addCPCLText("300","410","24","0","0",this.getPrintByte(this.itemData.createTime))}c+=d.addCPCLPrint(),this.bufferDataBig.push(c),this.getOrderChangeLog()},methods:{countPrint:function(){return this.yNum+=40},timestampToDatetime:function(){var t=new Date,e=t.getFullYear(),i=t.getMonth()+1,a=t.getDate(),n=t.getHours(),r=t.getMinutes(),d=t.getSeconds();return e+"-"+i+"-"+a+" "+n+":"+r+":"+d},goPrint:function(){var t=this;this.bufferData=this.bufferDataBig,this.$nextTick((function(){setTimeout((function(e){t.bufferData=[]}),1e3),a.hideLoading()}))},largeImg:function(t){a.previewImage({urls:[t]})},getPrintByte:function(t){return void 0==t||null==t?"":"冀J059DE"==t||"测试勿选"==t?"顺达快运":t},getOrderChangeLog:function(){var t=this,e=this;a.request({url:this.tui.interfaceUrl()+"/app/logisticsOrder/getLogisticsOrderChangeLog?orderId="+this.itemData.id,header:{"content-type":"application/json",appWLToken:this.tui.getToken()},method:"GET",dataType:"json",success:function(t){401==t.data.code&&(a.clearStorage(),a.navigateTo({url:"/package2/login/login"})),200==t.data.code&&(e.changeList=t.data.result)},fail:function(e){t.tui.toast("网络不给力,请稍后再试~")}})},onPrintSmall1:function(){var t=this;this.bufferData=this.bufferDataSmall,this.$nextTick((function(){setTimeout((function(e){t.bufferData=[]}),1e3),a.hideLoading()}))},xierushuju:function(){var t=this;"小标签"==this.defaultText?t.$emit("onPrintSmall1"):"确认打印"==this.defaultText?t.$emit("goPrint"):t.$emit("onPrint"),t.$nextTick((function(){for(var e="",i=0;i<t.bufferData.length;i++)e+=t.bufferData[i];for(var a="android"==t.deviceType?20:180,n="android"==t.deviceType?20:180,r=s.default.strToGBKByte(e),d=0,o=0,C=r.byteLength;d<C;d+=a,o++){var h=r.slice(d,d+a<=C?d+a:C);setTimeout(t._writeBLECharacteristicValue,o*n,h)}}))},_writeBLECharacteristicValue:function(e){var i=this;t.writeBLECharacteristicValue({deviceId:a.getStorageSync("deviceId"),serviceId:a.getStorageSync("serviceId"),characteristicId:a.getStorageSync("characteristicId"),value:e,success:function(t){},fail:function(e){t.closeBLEConnection({deviceId:a.getStorageSync("deviceId"),success:function(t){}}),a.getStorageSync("deviceId")?i.xierushuju():i.jiantingshebei()}}),a.hideLoading()}}};e.default=C}).call(this,i("3223")["default"],i("df3c")["default"])},"2eda":function(t,e,i){"use strict";var a=i("65a8"),n=i.n(a);n.a},"3d5b":function(t,e,i){"use strict";i.r(e);var a=i("6acd"),n=i("8ff8");for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("2eda");var d=i("828b"),s=Object(d["a"])(n["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=s.exports},"65a8":function(t,e,i){},"6acd":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return a}));var a={uniCard:function(){return i.e("uni_modules/uni-card/components/uni-card/uni-card").then(i.bind(null,"1e6b"))},uniTooltip:function(){return i.e("uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip").then(i.bind(null,"aedb"))}},n=function(){var t=this.$createElement;this._self._c},r=[]},"8ff8":function(t,e,i){"use strict";i.r(e);var a=i("04e5"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},dc89:function(t,e,i){"use strict";(function(t,e){var a=i("47a9");i("7859");a(i("3240"));var n=a(i("3d5b"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(n.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["dc89","common/runtime","common/vendor"]]]);
|