require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package2/other/newLogisticsBill"],{"32de":function(e,t,i){"use strict";(function(e,a){var r=i("47a9"),o=i("3b2d");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i("7eb4")),s=r(i("ee10")),c=r(i("af34")),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var i=l(t);if(i&&i.has(e))return i.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var s=r?Object.getOwnPropertyDescriptor(e,n):null;s&&(s.get||s.set)?Object.defineProperty(a,n,s):a[n]=e[n]}a.default=e,i&&i.set(e,a);return a}(i("769c")),u=r(i("2df0"));function l(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(l=function(e){return e?i:t})(e)}var h=requirePlugin("WechatSI"),g=h.getRecordRecognitionManager(),v={data:function(){return{faBookShow:!1,weightCount:1,printcount:"",shouBookShow:!1,moreShouList:[],weigthAdd:"",moreFaList:[],newFa:!1,orderList:[],daodaList:[],newShou:!1,linshiPrice:0,addForm:{nickName:"",mobile:"",address:""},pageNum:1,bufferData:[],voiceText:"",addressType:"",isVoice:!1,priceCurrent:0,priceItems:[{value:0,name:"否"},{value:1,name:"是"}],arrivalStationList:[],goStationList:[],payTypeList:[{value:"0",text:"现金"},{value:"1",text:"月付"},{value:"2",text:"提付"}],userData:{},isSearching:!1,isShowSearch:!1,devicesList:[],deviceId:"",services:"",serviceId:"",deviceType:"ios",voiceDataPrint:{},voiceData:{createBy:e.getStorageSync("contacts"),companyId:e.getStorageSync("transCompany"),companyName:e.getStorageSync("companyName"),imagePath:"",weightHistory:"",circuitId:"",circuitName:"",shipperName:"",shipperMobile:"",shipperAddress:"",receiverName:"",receiverMobile:"",receiverAddress:"",newReceiverName:"",newShipperName:"",goStationId:"",goStationName:"沧州",arrivalStationId:"",arrivalStationName:"",landingFee:0,deliveryFee:0,weight:0,count:1,freight:0,premium:0,transitFee:0,transferAddition:0,paymentForGoods:0,tips:0,methodOfSettlement:"2",cost:0,allCost:0,orderNumber:"",objectName:"",remark:"",receivingUserId:"",receivingUserName:""},recordState:!1,userList:[],isEdit:!1,transferStationList:[],productPicture:[],customList:[],shopRemark:[]}},onShow:function(){var t=this;e.getSystemInfo({success:function(e){t.deviceType=e.osName},fail:function(e){}}),"1751796589518786560"!=e.getStorageSync("transCompany")&&"1899371352842964992"!=e.getStorageSync("transCompany")&&"1782981706819702784"!=e.getStorageSync("transCompany")||a.openBluetoothAdapter({mode:"central",success:function(t){a.createBLEConnection({deviceId:e.getStorageSync("deviceId"),success:function(){},fail:function(e){}})},fail:function(i){"10001"==i.errCode?e.showToast({duration:2e3,title:"请打开蓝牙后,再进行连接",icon:"none",mask:!0}):(t.tui.toast("连接失败,请重启蓝牙或删除小程序重新进入-1"),t.isShowSearch=!0),setTimeout((function(t){e.hideLoading()}),2e3)}}),e.authorize({scope:"scope.record",success:function(){},fail:function(){this.tui.toast("您未授权,语音功能可能会出现错误")}}),this.userData&&("ji"==this.userData.userType?(this.voiceData.shipperName=this.userData.shipperOrReceiverName,this.voiceData.shipperMobile=this.userData.mobile,this.voiceData.shipperAddress=this.userData.addressInfo,this.voiceData.shipperId=this.userData.id):"shou"==this.userData.userType&&(this.voiceData.receiverName=this.userData.shipperOrReceiverName,this.voiceData.receiverMobile=this.userData.mobile,this.voiceData.receiverAddress=this.userData.addressInfo,this.voiceData.receiverId=this.userData.id)),this.getStationByCompanyId(),this.getGoStationList(),this.getUserList()},onLoad:function(t){if(e.getStorageSync("remark")){var i=e.getStorageSync("remark");this.shopRemark=i.split("\n")}if(t.editData){this.isEdit=!0;var a=JSON.parse(t.editData);this.voiceData.imagePath=a.imagePath,this.voiceData.circuitId=a.circuitId,this.voiceData.circuitName=a.circuitName,this.voiceData.shipperName=a.shipperName,this.voiceData.shipperMobile=a.shipperMobile,this.voiceData.shipperAddress=a.shipperAddress,this.voiceData.receiverName=a.receiverName,this.voiceData.receiverMobile=a.receiverMobile,this.voiceData.receiverAddress=a.receiverAddress,this.voiceData.goStationId=a.goStationId,this.voiceData.goStationName=a.goStationName,this.voiceData.arrivalStationId=a.arrivalStationId,this.voiceData.arrivalStationName=a.arrivalStationName,this.voiceData.landingFee=a.landingFee,this.voiceData.deliveryFee=a.deliveryFee,this.voiceData.weight=a.weight,this.voiceData.count=a.count,this.voiceData.freight=a.freight,this.voiceData.premium=a.premium,this.voiceData.transitFee=a.transitFee,this.voiceData.paymentForGoods=a.paymentForGoods,this.voiceData.tips=a.tips,this.voiceData.methodOfSettlement=a.methodOfSettlement,this.voiceData.cost=a.cost,this.voiceData.allCost=a.allCost,this.voiceData.orderNumber=a.orderNumber,this.voiceData.objectName=a.objectName,this.voiceData.remark=a.remark,this.voiceData.weightHistory=a.weightHistory,this.voiceData.receivingUserId=a.receivingUserId,this.voiceData.receivingUserName=a.receivingUserName,this.voiceData.id=a.id,this.getStationByCompanyId(),this.arrivalStationChange(a.arrivalStationId)}},methods:{countPrint:function(){return this.yNum+=40},doNothing:function(){},addWeight:function(){""!=this.voiceData.weightHistory&&void 0!=this.voiceData.weightHistory||(this.voiceData.weightHistory=this.voiceData.weight+"+"),this.$refs.inputDialog.open()},addWeight1:function(e){e.target.value>0&&(-1==e.target.value.indexOf(".")&&-1==String(this.voiceData.weight).indexOf(".")?this.voiceData.weight=Number(this.voiceData.weight)+Number(e.target.value):this.voiceData.weight=(Number(this.voiceData.weight)+Number(e.target.value)).toFixed(2),this.voiceData.weightHistory+=e.target.value+"+")},priceChange:function(t,i){var a=this;e.showLoading({title:"加载中...",mask:!0});if(this.voiceData.transferAddition=t,this.priceCurrent=i,0==t){this.voiceData.transitFee=0;for(var r=0;r1&&(t.newShou=!1,t.voiceData.newReceiverName="",t.voiceData.newReceiverMobile="",i.data.result.data[0].receiverList.push({mobile:i.data.result.data[0].receiverMobile,shipperOrReceiverName:i.data.result.data[0].receiverName,id:""}),t.moreShouList=i.data.result.data[0].receiverList,t.$refs.moreShouPopup.open()),null!=i.data.result.data[0].shipperList&&i.data.result.data[0].shipperList.length>1&&(t.newFa=!1,t.voiceData.newShipperName="",t.voiceData.newShipperMobile="",i.data.result.data[0].shipperList.push({mobile:i.data.result.data[0].shipperMobile,shipperOrReceiverName:i.data.result.data[0].shipperName,id:""}),t.moreFaList=i.data.result.data[0].shipperList,t.$refs.moreFaPopup.open()),i.data.result.data[0])""!=i.data.result.data[0][a]&&null!=i.data.result.data[0][a]&&0!=i.data.result.data[0][a]&&(i.data.result.data[0].arrivalStationName&&"arrivalStationName"==a&&t.pinyinMatch(i.data.result.data[0].arrivalStationName),i.data.result.data[0].hasOwnProperty(a)&&t.voiceData.hasOwnProperty(a)&&"receiverName"!=i.data.result.data[0][a]&&"receiverMobile"!=i.data.result.data[0][a]&&"shipperName"!=i.data.result.data[0][a]&&"shipperMobile"!=i.data.result.data[0][a]&&(t.voiceData[a]=i.data.result.data[0][a]),null!=i.data.result.data[0].receiverList&&0==i.data.result.data[0].receiverList.length?(t.voiceData.receiverName=i.data.result.data[0].receiverName,t.voiceData.receiverMobile=i.data.result.data[0].receiverMobile,t.voiceData.newReceiverName="",t.voiceData.newReceiverMobile="",t.newShou=!0):null!=i.data.result.data[0].receiverList&&1==i.data.result.data[0].receiverList.length&&(t.newShou=!1,t.voiceData.receiverName=i.data.result.data[0].receiverList[0].shipperOrReceiverName,t.voiceData.receiverMobile=i.data.result.data[0].receiverList[0].mobile,t.voiceData.receiverAddress=i.data.result.data[0].receiverList[0].addressInfo,t.voiceData.receiverId=i.data.result.data[0].receiverList[0].id,t.voiceData.newReceiverName=i.data.result.data[0].receiverName,t.voiceData.newReceiverMobile=i.data.result.data[0].receiverMobile),null!=i.data.result.data[0].shipperList&&0==i.data.result.data[0].shipperList.length?(t.voiceData.shipperName=i.data.result.data[0].shipperName,t.voiceData.shipperMobile=i.data.result.data[0].shipperMobile,t.newFa=!0,t.voiceData.newShipperName="",t.voiceData.newShipperMobile=""):null!=i.data.result.data[0].shipperList&&1==i.data.result.data[0].shipperList.length&&(t.voiceData.shipperName=i.data.result.data[0].shipperList[0].shipperOrReceiverName,t.voiceData.shipperMobile=i.data.result.data[0].shipperList[0].mobile,t.voiceData.shipperAddress=i.data.result.data[0].shipperList[0].addressInfo,t.voiceData.shipperId=i.data.result.data[0].shipperList[0].id,t.voiceData.newShipperName=i.data.result.data[0].shipperName,t.voiceData.newShipperMobile=i.data.result.data[0].shipperMobile,t.newFa=!1),t.$forceUpdate());e.hideLoading(),setTimeout((function(e){t.getAllCost()}),300)},fail:function(i){t.tui.toast("网络不给力,请稍后再试~"),e.hideLoading()}})}else this.tui.toast("识别内容不能为空")},shuliangChange:function(e){this.linshiPrice==e.target.value?this.voiceData.count=e.target.value:""==e.target.value?this.voiceData.count=this.linshiPrice:this.voiceData.count=e.target.value},pinyinMatch:function(t){var i=this;-1!=t.indexOf("。")&&(t=t.split("。")[0]),e.request({url:this.tui.interfaceUrl()+"/app/logisticsStation/getLogisticsStationPageList",data:{pageNum:1,pageSize:10,circuitId:"",stationName:t},header:{"content-type":"application/json",appWLToken:this.tui.getToken()},method:"POST",dataType:"json",success:function(t){if(401==t.data.code&&(e.clearStorage(),e.navigateTo({url:"/package2/login/login"})),200==t.data.code)if(""!=t.data.result.records)for(var a=0;a0&&(r=e.printcount);for(var o=1;o<=r;o++){var n=d.CreatCPCLPage(600,480,1,0,0);n+=d.addCPCLBox(10,10,570,450,3),n+=d.addCPCLLocation(2),n+=d.addCPCLSETMAG(2,2),n+=d.addCPCLText("0",20,"24","0",0,t.voiceDataPrint.companyName),n+=d.addCPCLLine(10,80,570,80,2),n+=d.addCPCLLocation(0),n+=d.addCPCLSETMAG(1,1),n+=d.addCPCLText("20",100,"24","0",0,"开票日期:"+t.getMonth()),n+=d.addCPCLLine(10,140,570,140,2),n+=d.addCPCLLine(382,140,382,316,2),n+=d.addCPCLSETMAG(2,2),n+=d.addCPCLText("20",160,"24","0",0,"到站:"+t.voiceDataPrint.arrivalStationName),n+=d.addCPCLLine(10,220,382,220,2),n+=d.addCPCLText("20",248,"24","0",0,"收:"+t.voiceDataPrint.receiverName),n+=d.addCPCLLine(10,316,570,316,2),n+=d.addCPCLSETMAG(1,1),n+=d.addCPCLText("20",336,"24","0",0,"共"+r+"件");var s="";"0"==t.getPrintByte(t.voiceDataPrint.methodOfSettlement)?s="现金":"1"==t.getPrintByte(t.voiceDataPrint.methodOfSettlement)?s="月付":"2"==t.getPrintByte(t.voiceDataPrint.methodOfSettlement)&&(s="提付"),n+=d.addCPCLText("112",336,"24","0",0,s),n+=d.addCPCLLine(170,316,170,450,2),n+=d.addCPCLText("186",336,"24","0",0,"单号:"+t.voiceDataPrint.orderNumber+"-"+o),n+=d.addCPCLLine(10,376,570,376,2),n+=d.addCPCLText("20",396,"24","0",0,"undefined"==t.voiceDataPrint.receiverMobile?"":t.voiceDataPrint.receiverMobile),n+=d.addCPCLText("186",396,"24","0",0,"备注:"+t.voiceDataPrint.remark),n+=d.addCPCLQRCode(400,150,"H","1",4,t.voiceDataPrint.orderNumber),n+=d.addCPCLPrint(),t.bufferData.push(n),i(t.bufferData)}}))},wuliuData:function(){var t=this,i=this;return console.log("数据",this.voiceDataPrint),new Promise((function(a,r){for(var o=e.getStorageSync("wlNum"),n=0;n0)for(var l=0;l