(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de1bf"],{"83f4":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ids-customer-check-waybill-construction-site"})},r=[],i=n("2f62"),c=n("897d"),a=n.n(c),u=n("4532"),s=n("3d20"),l=n.n(s);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e=v(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t){var e=h(t,"string");return"symbol"===m(e)?e:String(e)}function h(t,e){if("object"!==m(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var d={name:"iDS-CustomerCheckWaybillConstructionSite",components:{PullTo:a.a},data:function(){return{contractID:""}},computed:{height:function(){return"calc(".concat(window.innerHeight,"px - 48px - ").concat(u["a"].vm.getContentBottomHeight()," ")+")"}},methods:b({scan:function(){var t=this;window.cordova&&window.cordova.plugins.barcodeScanner&&window.cordova.plugins.barcodeScanner.scan((function(e){if(e&&e.text){var n={quickResponseCodeID:e.text,relationResourceType:"prd_task_detail",action:"get"};u["a"].vm.dispatchQrcode({data:n,authorization:{Authorization:"Bearer "+u["a"].vm.getUserToken()},vm:u["a"].vm}).then((function(){var e=u["a"].vm.getQrcodeInfo(),n=e.relationResourceId;t.mScanForCheckConstructionSite(n)}),(function(){l.a.fire({text:"无效货单，请重新扫描？",title:"重新扫描",type:"info",showConfirmButton:!1,timer:1500}),t.$router.back(-1)}))}else l.a.fire({text:"无效货单，请重新扫描？",title:"重新扫描",type:"info",showConfirmButton:!1,timer:1500}),t.$router.back(-1)}),(function(e){l.a.fire({text:"无效货单，请重新扫描？",title:"重新扫描",type:"info",showConfirmButton:!1,timer:1500}),t.$router.back(-1)}),{prompt:"请将二维码置于框内",resultDisplayDuration:0,showTorchButton:!0})},mScanForCheckConstructionSite:function(t){var e=this,n={taskDetailID:t,contractID:this.contractID};this.scanForCheckConstructionSite({authorization:{Authorization:"Bearer "+u["a"].vm.getUserToken()},data:n,vm:u["a"].vm}).then((function(){l.a.fire({text:"货单扫描成功",title:"成功",type:"success",showConfirmButton:!1,timer:1500}),e.$router.back(-1)}))},changeView:function(){u["a"].vm.setTitleList({visible:!1,list:[],change:function(){},curValue:""}),u["a"].vm.setTitle("工地校验"),u["a"].vm.setBackDisabled(!1),u["a"].vm.setBackIcon("arrow_back"),u["a"].vm.setBottomNavVisible(!1),u["a"].vm.setBottomBtnVisible(!1),u["a"].vm.setMsgInputVisible(!1),u["a"].vm.setContentHeight({value:"calc(".concat(window.innerHeight,"px - 48px ")+")"}),u["a"].vm.setMenuItems(this.menuButtons),u["a"].vm.setMenuIcon("menu"),u["a"].vm.setMenuDisabled(!1)}},Object(i["b"])("waybill",["scanForCheckConstructionSite"])),created:function(){console.log("调试代码"),null!=u["a"].vm.getUserToken()&&null!=u["a"].vm.getUserId()?(this.contractID=this.$route.params.curProjectID,this.scan(),this.changeView()):window.location.href="/"},mounted:function(){},beforeDestroy:function(){u["a"].vm.setMenuDisabled(!0),u["a"].vm.setMenuItems([]),u["a"].vm.setMenuIcon("")}},y=d,w=n("2877"),g=Object(w["a"])(y,o,r,!1,null,null,null);e["default"]=g.exports}}]);