(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a3aa49c2","chunk-5f9979a1","chunk-5e82f5d9","chunk-2d221fe3"],{"17eb":function(e,n,t){"use strict";t("58fb")},"290f":function(e,n,t){},"3b54":function(e,n,t){"use strict";t("290f")},"553a":function(e,n,t){"use strict";t.r(n);var a=t("7a23"),h=t("7f09"),o=t.n(h);const i=e=>(Object(a["pushScopeId"])("data-v-331e0c8b"),e=e(),Object(a["popScopeId"])(),e),c={class:"row"},l={class:"xs12"},r={class:"frame-box-media"},s={class:"box-media"},d=["src"],u={key:1,src:o.a,alt:"",class:"logo-sonphat"},p=i(()=>Object(a["createElementVNode"])("div",{class:"row justify-center font-16 pt-2"},"Ảnh xe vào bến",-1)),T={class:"row mt-3 mb-3"},m={class:"xs12"},g={class:"frame-box-camera"},y={class:"box-camera"},b={ref:"camera",autoplay:"",style:{width:"100%",height:"auto","max-height":"100%"}},C=["src"],j={key:1,src:o.a,alt:"",class:"logo-sonphat"},O={class:"row justify-center align-center font-16"};function V(e,n,t,h,o,i){const V=Object(a["resolveComponent"])("DxGallery"),D=Object(a["resolveComponent"])("DxButton"),f=Object(a["resolveComponent"])("ThongTinTraKhachVue"),v=Object(a["resolveComponent"])("ZoomImagesVue"),k=Object(a["resolveComponent"])("DxPopup");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("div",l,[Object(a["createElementVNode"])("div",r,[Object(a["createElementVNode"])("div",s,[o.DanhSachAnhXeVaoRaBen.length>0?(Object(a["openBlock"])(),Object(a["createBlock"])(V,{key:0,id:"gallery",ref:"DanhSachAnhXeVaoRaBen","data-source":o.DanhSachAnhXeVaoRaBen,loop:!0,"show-nav-buttons":!0,"show-indicator":!0,onItemClick:i.showAnh},{item:Object(a["withCtx"])(({data:e})=>[Object(a["createElementVNode"])("img",{src:e,alt:""},null,8,d)]),_:1},8,["data-source","onItemClick"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",u))]),p])])]),Object(a["createElementVNode"])("div",T,[Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("div",y,[Object(a["withDirectives"])(Object(a["createElementVNode"])("video",b,null,512),[[a["vShow"],o.DangMoCamera]]),!o.DangMoCamera&&i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan,onClick:n[0]||(n[0]=e=>i.showAnh({itemData:{src:i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan}}))},null,8,C)):o.DangMoCamera?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",j))]),Object(a["createElementVNode"])("div",O,[o.DangMoCamera||i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"color-warning font-medium",style:{cursor:"pointer"},onClick:n[1]||(n[1]=(...e)=>i.KhoiTaoMayAnh&&i.KhoiTaoMayAnh(...e))}," Tải lại camera (F5) ")),o.DangMoCamera||i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(D,{key:1,type:"warning","styling-mode":"text",icon:"mdi mdi-camera-retake",hint:"Tải lại camera",onClick:i.KhoiTaoMayAnh},null,8,["onClick"])),!o.DangMoCamera&&i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:2,class:"color-primary font-medium",style:{cursor:"pointer"},onClick:n[2]||(n[2]=(...e)=>i.KhoiTaoMayAnh&&i.KhoiTaoMayAnh(...e))}," Chụp lại ảnh (F5) ")):Object(a["createCommentVNode"])("",!0),!o.DangMoCamera&&i.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan?(Object(a["openBlock"])(),Object(a["createBlock"])(D,{key:3,type:"default","styling-mode":"text",icon:"mdi mdi-camera-retake",hint:"Chụp lại ảnh",onClick:i.KhoiTaoMayAnh},null,8,["onClick"])):Object(a["createCommentVNode"])("",!0),o.DangMoCamera?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:4,class:"color-success font-medium",style:{cursor:"pointer"},onClick:n[3]||(n[3]=(...e)=>i.ChupAnh&&i.ChupAnh(...e))}," Chụp ảnh (F6) ")):Object(a["createCommentVNode"])("",!0),o.DangMoCamera?(Object(a["openBlock"])(),Object(a["createBlock"])(D,{key:5,type:"success","styling-mode":"text",icon:"mdi mdi-camera-iris",hint:"Chụp ảnh",onClick:i.ChupAnh},null,8,["onClick"])):Object(a["createCommentVNode"])("",!0)])])])]),Object(a["createVNode"])(f,{ref:"ThongTinTraKhachVue",onXemLenhVanChuyen:i.XemLenhVanChuyen},null,8,["onXemLenhVanChuyen"]),o.ifPopupShowGallery?(Object(a["openBlock"])(),Object(a["createBlock"])(k,{key:0,visible:o.PopupShowGallery,"onUpdate:visible":n[4]||(n[4]=e=>o.PopupShowGallery=e),"drag-enabled":!1,"close-on-outside-click":!0,"show-title":!1,position:"center",width:"calc(100vw - 128px)",height:"calc(100vh - 96px)",class:"popup-no-padding"},{content:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,{item:o.tmpImg,onHiddenPopup:i.hiddenPopup},null,8,["item","onHiddenPopup"])]),_:1},8,["visible"])):Object(a["createCommentVNode"])("",!0)],64)}t("88a7"),t("271a"),t("5494");var D=t("9fc8"),f=t("d303"),v=t("95af"),k={components:{DxButton:D["DxButton"],ZoomImagesVue:f["a"],DxGallery:D["DxGallery"],DxPopup:D["DxPopup"],ThongTinTraKhachVue:v["default"]},props:{},data(){return{DanhSachAnhXeVaoRaBen:[],ifPopupShowGallery:!1,PopupShowGallery:!1,tmpImg:null,DangMoCamera:!1}},computed:{ThongTinXeDangChon(){return this.$store.state.ThongTinDieuDo.ThongTinXeDangChon},ThongTinCapPhepLenNotVaThanhToan:{get(){return this.$store.state.ThongTinDieuDo.ThongTinCapPhepLenNotVaThanhToan},set(e){this.$store.commit("ThongTinDieuDo/Set",{key:"ThongTinCapPhepLenNotVaThanhToan",data:e})}},DangMoPopup:{get(){return this.$store.state.ThongTinDieuDo.DangMoPopup},set(e){this.$store.commit("ThongTinDieuDo/Set",{key:"DangMoPopup",data:e})}},DangMoPopupThongBaoChung(){return this.$store.state.ThongTinChung.DangMoPopupThongBaoChung}},methods:{showPopup(e){this.DangMoPopup=!0,this["if"+e]=!0,this[e]=!0},onHiddenPopup(e){this.DangMoPopup=!1,this["if"+e]=!1},hiddenPopup(e){"ZoomImages"!=e?this[e]=!1:this.PopupShowGallery=!1},async LayDanhSachAnhXeVaoRaBen(){try{if(this.ThongTinXeDangChon.AnhVaoBienSo){let e=await this.$Helper.LayAnhKemMaBenXe(this.ThongTinXeDangChon.AnhVaoBienSo,this.ThongTinXeDangChon.IdBenXeSuDung);this.DanhSachAnhXeVaoRaBen=[...this.DanhSachAnhXeVaoRaBen,e]}if(this.ThongTinXeDangChon.AnhVaoToanCanh){let e=await this.$Helper.LayAnhKemMaBenXe(this.ThongTinXeDangChon.AnhVaoToanCanh,this.ThongTinXeDangChon.IdBenXeSuDung);this.DanhSachAnhXeVaoRaBen=[...this.DanhSachAnhXeVaoRaBen,e]}}catch(e){console.log("🚀 ~ error:",e)}},showAnh(e){this.showPopup("PopupShowGallery"),this.tmpImg=e.itemData.src},KhoiTaoMayAnh(){try{let e=this;this.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan=null,this.ThongTinCapPhepLenNotVaThanhToan.FileAnhChupNguoiThanhToan=null,this.$startLoading;const n=window.constraints={audio:!1,video:!0};navigator.mediaDevices.getUserMedia(n).then(n=>{e.DangMoCamera=!0,e.$stopLoading,e.$refs.camera.srcObject=n}).catch(n=>{e.DangMoCamera=!1,console.log("🚀 ~ error:",n),e.$stopLoading,e.$Helper.ThongBaoToast("warning","Không tìm thấy Camera hoặc có một số lỗi.")})}catch(e){console.log("🚀 ~ error:",e),this.$stopLoading,this.$Helper.ThongBaoToast("warning","Không tìm thấy Camera hoặc có một số lỗi.")}},async ChupAnh(){let e=document.createElement("canvas");e.width=this.$refs.camera.videoWidth,e.height=this.$refs.camera.videoHeight;const n=e.getContext("2d");n.drawImage(this.$refs.camera,0,0,e.width,e.height);let t=await new Promise(n=>e.toBlob(n,"image/jpeg")),a=new File([t],"Anh Chup Thanh Toan.jpg");const h=URL.createObjectURL(t);this.ThongTinCapPhepLenNotVaThanhToan.AnhChupNguoiThanhToan=h,this.ThongTinCapPhepLenNotVaThanhToan.FileAnhChupNguoiThanhToan=a,this.DangMoCamera=!1},XemLenhVanChuyen(e){this.$emit("XemLenhVanChuyen",e)},windowKeydown(e){this.DangMoPopup||this.DangMoPopupThongBaoChung||(e.keyCode==parseInt(this.$t("keyCode.F6"))&&this.DangMoCamera&&(this.DangMoCamera&&this.ChupAnh(),e.preventDefault()),e.keyCode==parseInt(this.$t("keyCode.F5"))&&(this.DangMoCamera||this.KhoiTaoMayAnh(),e.preventDefault()))}},created(){this.LayDanhSachAnhXeVaoRaBen()},mounted(){setTimeout(()=>{this.KhoiTaoMayAnh()},300),window.addEventListener("keydown",this.windowKeydown,!1)},beforeUnmount(){var e;window.removeEventListener("keydown",this.windowKeydown,!1);let n=(null===(e=this.$refs.camera.srcObject)||void 0===e?void 0:e.getTracks())||[];n.forEach(e=>{e.stop()})}},w=(t("17eb"),t("6b0d")),L=t.n(w);const K=L()(k,[["render",V],["__scopeId","data-v-331e0c8b"]]);n["default"]=K},"56bd":function(e,n,t){"use strict";t.r(n);var a=t("7a23");const h=e=>(Object(a["pushScopeId"])("data-v-6e398606"),e=e(),Object(a["popScopeId"])(),e),o=h(()=>Object(a["createElementVNode"])("div",{class:"row justify-center font-20 font-medium mb-3 align-center"}," Cấp lệnh xuất bến cho xe ",-1)),i={class:"row fill-height",style:{height:"calc(100% - 96px)"}},c={class:"ban-the-hien"},l={class:"frame-gallery"},r={key:0,class:"row align-center justify-center",style:{height:"100%"}},s={class:"row fil-height align-center"},d=["src"],u=["src"],p=["src"],T={class:"row align-center justify-center",style:{"margin-top":"2px"}},m={class:"row justify-end mt-4"};function g(e,n,t,h,g,y){var b,C,j,O,V,D,f,v,k,w,L,K;const x=Object(a["resolveComponent"])("DxGallery"),B=Object(a["resolveComponent"])("DxButton"),N=Object(a["resolveComponent"])("PopupChupAnhLenhGiayVue"),S=Object(a["resolveComponent"])("DxScrollView"),P=Object(a["resolveComponent"])("DxPopup"),A=Object(a["resolveComponent"])("ShowGalleryVue");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[o,Object(a["createElementVNode"])("div",i,[Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("div",l,[null!==(b=y.ThongTinTraKhach.LenhVanChuyenTraKhach)&&void 0!==b&&b.LinkBanTheHienPdf||0!=(null===(C=y.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===C?void 0:C.length)?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",r," Không có bản thể hiện ")),"00000000-0000-0000-0000-000000000000"==(null===(j=y.ThongTinTraKhach.LenhVanChuyenTraKhach)||void 0===j?void 0:j.IdLenh)?(Object(a["openBlock"])(),Object(a["createBlock"])(x,{key:1,ref:"listGallery",id:"gallery",elementAttr:{class:"anh-lenh-giay"},"data-source":y.ThongTinTraKhach.DanhSachLenhGiayTraKhach||[],height:"100%",width:"100%",loop:!1,"show-nav-buttons":!0,"show-indicator":!0,selectedItem:g.selectedItemAnhChup,"onUpdate:selectedItem":n[0]||(n[0]=e=>g.selectedItemAnhChup=e)},{item:Object(a["withCtx"])(({data:e})=>[Object(a["createElementVNode"])("div",s,["pdf"==e.type?(Object(a["openBlock"])(),Object(a["createElementBlock"])("embed",{key:0,src:e.url+"#view=Fit",alt:"",style:{width:"100%",height:"100%"}},null,8,d)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:1,src:e.url,alt:"",style:{width:"100%",height:"auto"}},null,8,u))])]),_:1},8,["data-source","selectedItem"])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("embed",{key:2,src:null===(O=y.ThongTinTraKhach.LenhVanChuyenTraKhach)||void 0===O?void 0:O.LinkBanTheHienPdf,width:"100%",height:"100%"},null,8,p))]),Object(a["createElementVNode"])("div",T,[Object(a["createElementVNode"])("input",{type:"file",accept:".jpg, .png, .jpeg, .pdf",class:"input-file",id:"input-file",ref:"input-file",multiple:"",onChange:n[1]||(n[1]=(...e)=>y.ThemAnh&&y.ThemAnh(...e)),style:{display:"none"}},null,544),Object(a["createVNode"])(B,{key:"mdi-magnify-plus-outline",type:"default","styling-mode":"text",icon:"mdi mdi-magnify-plus-outline",hint:"Phóng to",disabled:!(null!==(V=y.ThongTinTraKhach.LenhVanChuyenTraKhach)&&void 0!==V&&V.LinkBanTheHienPdf)&&0==(null===(D=y.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===D?void 0:D.length),onClick:y.PhongToAnh},null,8,["disabled","onClick"]),"00000000-0000-0000-0000-000000000000"==(null===(f=y.ThongTinTraKhach.LenhVanChuyenTraKhach)||void 0===f?void 0:f.IdLenh)?(Object(a["openBlock"])(),Object(a["createBlock"])(B,{key:"mdi-file-image-plus",type:"default","styling-mode":"text",icon:"mdi mdi-file-image-plus",class:"ml-2",hint:"Thêm ảnh chụp lệnh giấy",disabled:2==(null===(v=y.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===v?void 0:v.length),onClick:n[2]||(n[2]=n=>e.$refs["input-file"].click())},null,8,["disabled"])):Object(a["createCommentVNode"])("",!0),"00000000-0000-0000-0000-000000000000"==(null===(k=y.ThongTinTraKhach.LenhVanChuyenTraKhach)||void 0===k?void 0:k.IdLenh)?(Object(a["openBlock"])(),Object(a["createBlock"])(B,{key:"mdi-camera-enhance",type:"default","styling-mode":"text",icon:"mdi mdi-camera-enhance",class:"ml-2",hint:"Chụp ảnh lệnh giấy",disabled:2==(null===(w=y.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===w?void 0:w.length),onClick:n[3]||(n[3]=e=>y.MoPopupChupAnhLenhGiay())},null,8,["disabled"])):Object(a["createCommentVNode"])("",!0),"00000000-0000-0000-0000-000000000000"==(null===(L=y.ThongTinTraKhach.LenhVanChuyenTraKhach)||void 0===L?void 0:L.IdLenh)?(Object(a["openBlock"])(),Object(a["createBlock"])(B,{key:"mdi-delete",type:"danger","styling-mode":"text",icon:"mdi mdi-delete",class:"ml-2",hint:"Xóa ảnh lệnh giấy",disabled:0==(null===(K=y.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===K?void 0:K.length),onClick:n[4]||(n[4]=e=>y.XoaAnh())},null,8,["disabled"])):Object(a["createCommentVNode"])("",!0)])])]),Object(a["createElementVNode"])("div",m,[Object(a["createVNode"])(B,{text:"Đóng & Cập nhật",key:"mdi-magnify-plus-outline",type:"default","styling-mode":"contained",onClick:n[5]||(n[5]=e=>y.DongPopup())})]),g.ifPopupChupAnhLenhGiay?(Object(a["openBlock"])(),Object(a["createBlock"])(P,{key:0,visible:g.PopupChupAnhLenhGiay,"onUpdate:visible":n[7]||(n[7]=e=>g.PopupChupAnhLenhGiay=e),"drag-enabled":!1,"close-on-outside-click":!1,"show-title":!1,position:"center",width:"588px",height:"auto",onHidden:n[8]||(n[8]=e=>y.onHiddenPopup("PopupChupAnhLenhGiay"))},{content:Object(a["withCtx"])(()=>[Object(a["createVNode"])(S,{width:"100%",height:"100%"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(N,{HinhAnhChup:g.HinhAnhChup,"onUpdate:HinhAnhChup":n[6]||(n[6]=e=>g.HinhAnhChup=e),onHiddenPopup:y.hiddenPopup,onLuuHinhAnh:y.LuuHinhAnh},null,8,["HinhAnhChup","onHiddenPopup","onLuuHinhAnh"])]),_:1})]),_:1},8,["visible"])):Object(a["createCommentVNode"])("",!0),g.ifPopupShowGallery?(Object(a["openBlock"])(),Object(a["createBlock"])(P,{key:1,visible:g.PopupShowGallery,"onUpdate:visible":n[9]||(n[9]=e=>g.PopupShowGallery=e),"drag-enabled":!1,"close-on-outside-click":!0,"show-title":!1,position:g.position,width:y.isMobile?"calc(100vw - 32px)":"1200px",height:"calc(100vh - 96px)",class:"popup-no-padding",onHidden:n[10]||(n[10]=e=>y.onHiddenPopup("PopupShowGallery"))},{content:Object(a["withCtx"])(()=>[Object(a["createVNode"])(A,{itemGallery:g.itemGallery,width:"100%",height:"calc(100vh - 164px)",onHiddenPopup:y.hiddenPopupShowGallery},null,8,["itemGallery","onHiddenPopup"])]),_:1},8,["visible","position","width"])):Object(a["createCommentVNode"])("",!0)],64)}t("88a7"),t("271a"),t("5494");var y=t("9fc8"),b=t("cd5a"),C=t("dd74"),j={components:{DxGallery:y["DxGallery"],DxButton:y["DxButton"],DxPopup:y["DxPopup"],DxScrollView:y["DxScrollView"],PopupChupAnhLenhGiayVue:b["default"],ShowGalleryVue:C["a"]},props:{},data(){return{listGallery:[],position:"center",selectedItemAnhChup:null,ifPopupChupAnhLenhGiay:!1,PopupChupAnhLenhGiay:!1,ifPopupShowGallery:!1,PopupShowGallery:!1,HinhAnhChup:{},itemGallery:null}},computed:{ThongTinTraKhach:{get(){return this.$store.state.ThongTinDieuDo.ThongTinTraKhach},set(e){this.$store.commit("ThongTinDieuDo/Set",{key:"ThongTinTraKhach",data:e})}},isMobile(){return this.$store.state.ManHinh.isMobile}},methods:{hiddenPopup(e){this[e]=!1},onHiddenPopup(e){this["if"+e]=!1},hiddenPopupShowGallery(){this.PopupShowGallery=!1},DongPopup(){this.$emit("hiddenPopup","PopupLenhTraKhach")},MoPopupChupAnhLenhGiay(){var e;if(2==(null===(e=this.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===e?void 0:e.length))return this.$Helper.ThongBaoToast("warning","Chỉ được phép tải lên tối đa 2 ảnh!");this.ifPopupChupAnhLenhGiay=!0,this.PopupChupAnhLenhGiay=!0},LuuHinhAnh(){this.ThongTinTraKhach.DanhSachLenhGiayTraKhach=[...this.ThongTinTraKhach.DanhSachLenhGiayTraKhach,this.HinhAnhChup],this.HinhAnhChup={}},PhongToAnh(){"00000000-0000-0000-0000-000000000000"==this.ThongTinTraKhach.LenhVanChuyenTraKhach.IdLenh?this.itemGallery=this.selectedItemAnhChup.url:this.itemGallery=this.ThongTinTraKhach.LenhVanChuyenTraKhach.LinkBanTheHienPdf+"#view=Fit",this.ifPopupShowGallery=!0,this.PopupShowGallery=!0},ThemAnh(e){var n,t=this,a=Array.from(e.target.files||[]),h=document.getElementById("input-file"),o=/(\.jpg|\.jpeg|\.png|\.pdf)$/i,i=!1;if(a.forEach(e=>{if(!o.exec(e.name))return i=!0}),1==i)return this.$Helper.ThongBaoToast("error","Chỉ chọn tệp có định dạng: .jpeg/.jpg/.png!"),h.value="",!1;(null===(n=this.ThongTinTraKhach.DanhSachLenhGiayTraKhach)||void 0===n?void 0:n.length)+a.length<3?a.forEach((function(e){if(e.size<4194304){var n=new FileReader;n.onload=async function(){if(FileReader.DONE==this.readyState){let o=e.type.indexOf("pdf"),i=e.type.indexOf("png");var n=this.result,a=new Blob([n],{type:e.type});let c=URL.createObjectURL(a);if(-1!=i){let n=document.createElement("canvas"),a=document.createElement("img");a.src=c,await setTimeout(async()=>{n.width=a.width,n.height=a.height;let h=n.getContext("2d");h.drawImage(a,0,0,n.width,n.height);let i=await new Promise(e=>n.toBlob(e,"image/jpeg"));const c=URL.createObjectURL(i);let l=new File([i],e.name,{type:"image/jpeg"});t.ThongTinTraKhach.DanhSachLenhGiayTraKhach=[...t.ThongTinTraKhach.DanhSachLenhGiayTraKhach,{url:c,file:l,type:-1==o?"image":"pdf",id:"00000000-0000-0000-0000-000000000000"}]},100)}else t.ThongTinTraKhach.DanhSachLenhGiayTraKhach=[...t.ThongTinTraKhach.DanhSachLenhGiayTraKhach,{url:c,file:a,type:-1==o?"image":"pdf",id:"00000000-0000-0000-0000-000000000000"}];setTimeout(()=>{t.$refs.listGallery.instance.repaint(),h.value=""},200)}};n.readAsArrayBuffer(e)}else alert("Vui lòng chỉ chọn ảnh nhỏ hơn 4MB!")})):(this.$Helper.ThongBaoToast("warning","Chỉ được phép tải lên tối đa 2 ảnh!"),h.value="")},XoaAnh(){this.ThongTinTraKhach.DanhSachLenhGiayTraKhach=this.ThongTinTraKhach.DanhSachLenhGiayTraKhach.filter(e=>e.url!=this.selectedItemAnhChup.url),setTimeout(()=>{this.$refs.listGallery.instance.repaint()},100)}},created(){},mounted(){}},O=(t("b7df"),t("6b0d")),V=t.n(O);const D=V()(j,[["render",g],["__scopeId","data-v-6e398606"]]);n["default"]=D},"58fb":function(e,n,t){},"7f09":function(e,n,t){e.exports=t.p+"img/LOGO_SONPHAT-New.26658178.png"},"95af":function(e,n,t){"use strict";t.r(n);var a=t("7a23");const h=e=>(Object(a["pushScopeId"])("data-v-ae0ca6ac"),e=e(),Object(a["popScopeId"])(),e),o={class:"row align-center mb-3"},i=h(()=>Object(a["createElementVNode"])("span",{class:"mr-2 item-title"},"Thông tin xe trả khách",-1)),c={class:"row mb-5"},l={class:"xs12"},r={key:0,class:"title-select"},s=h(()=>Object(a["createElementVNode"])("div",{class:"item-title"},"Giờ xuất bến kế hoạch",-1)),d=h(()=>Object(a["createElementVNode"])("div",{class:"item-title"},"Giờ xuất bến thực tế",-1)),u=h(()=>Object(a["createElementVNode"])("div",{class:"item-title"},"Mã nhật trình",-1)),p=[s,d,u],T=["title"],m=["title"],g=["title"],y={class:"row mb-5"},b={class:"xs12"},C={class:"row align-center mb-5"},j={class:"xs12"},O={class:"row"},V={class:"xs12"};function D(e,n,t,h,s,d){const u=Object(a["resolveComponent"])("DxCheckBox"),D=Object(a["resolveComponent"])("DxSelectBox"),f=Object(a["resolveComponent"])("DxRequiredRule"),v=Object(a["resolveComponent"])("DxValidator"),k=Object(a["resolveComponent"])("DxNumberBox"),w=Object(a["resolveComponent"])("DxButton"),L=Object(a["resolveComponent"])("DxTextArea"),K=Object(a["resolveComponent"])("DxValidationGroup"),x=Object(a["resolveComponent"])("PopupLenhTraKhachVue"),B=Object(a["resolveComponent"])("DxPopup");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",o,[i,Object(a["createVNode"])(u,{modelValue:d.ThongTinTraKhach.ThucHienTraKhach,"onUpdate:modelValue":n[0]||(n[0]=e=>d.ThongTinTraKhach.ThucHienTraKhach=e),text:"Thực hiện trả khách"},null,8,["modelValue"])]),Object(a["createVNode"])(K,{ref:"formValidationTraKhach"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(D,{modelValue:d.ThongTinTraKhach.NhatTrinhXe,"onUpdate:modelValue":n[1]||(n[1]=e=>d.ThongTinTraKhach.NhatTrinhXe=e),dataSource:{store:d.DanhSachNhatTrinhXe,paginate:!0},"display-expr":n=>n?`KH: ${e.$Core.Helper.formatDateTime(n.GioXuatBenTheoBieuDo)} - TT: ${e.$Core.Helper.formatDateTime(n.GioXuatBenThucTe)} (Mã: ${n.MaNhatTrinh})`:"","value-expr":e=>e,"search-enabled":!0,"styling-mode":"outlined",placeholder:"Tìm kiếm",validationMessageMode:"always","item-template":"item",label:"Chọn nhật trình",labelMode:"floating",disabled:!d.ThongTinTraKhach.ThucHienTraKhach},{item:Object(a["withCtx"])(({data:n,index:t})=>[Object(a["createElementVNode"])("div",null,[0==t?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",r,p)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{class:"item-select",style:Object(a["normalizeStyle"])(0==t?"margin-top: 48px":"")},[Object(a["createElementVNode"])("div",{class:"item-item",title:e.$Core.Helper.formatDateTime(n.GioXuatBenTheoBieuDo)},Object(a["toDisplayString"])(e.$Core.Helper.formatDateTime(n.GioXuatBenTheoBieuDo)),9,T),Object(a["createElementVNode"])("div",{class:"item-item",title:e.$Core.Helper.formatDateTime(n.GioXuatBenThucTe)},Object(a["toDisplayString"])(e.$Core.Helper.formatDateTime(n.GioXuatBenThucTe)),9,m),Object(a["createElementVNode"])("div",{class:"item-item",title:n.MaNhatTrinh},Object(a["toDisplayString"])(n.MaNhatTrinh),9,g)],4)])]),_:1},8,["modelValue","dataSource","display-expr","value-expr","disabled"])])]),Object(a["createElementVNode"])("div",y,[Object(a["createElementVNode"])("div",b,[Object(a["createVNode"])(k,{modelValue:d.ThongTinTraKhach.SoKhach,"onUpdate:modelValue":n[2]||(n[2]=e=>d.ThongTinTraKhach.SoKhach=e),"show-spin-buttons":!0,"styling-mode":"outlined",min:0,max:100,format:"#0",disabled:!d.ThongTinTraKhach.ThucHienTraKhach,validationMessageMode:"always",label:"Số khách đến bến (*)",labelMode:"floating"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,null,{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{message:"Số khách đến bến không được bỏ trống!"})]),_:1})]),_:1},8,["modelValue","disabled"])])]),Object(a["createElementVNode"])("div",C,[Object(a["createElementVNode"])("div",j,[Object(a["createVNode"])(D,{ref:"LenhVanChuyenTraKhach",acceptCustomValue:!0,modelValue:d.ThongTinTraKhach.LenhVanChuyenTraKhach,"onUpdate:modelValue":n[5]||(n[5]=e=>d.ThongTinTraKhach.LenhVanChuyenTraKhach=e),dataSource:{store:d.DanhSachLenhVanChuyenTraKhach,paginate:!0},"display-expr":n=>n&&n.ThoiGianXuatBen?"Lệnh XB lúc: "+e.$Helper.Common.formatDateTime(n.ThoiGianXuatBen):(null===n||void 0===n?void 0:n.HienThi)||"","search-enabled":!0,"styling-mode":"outlined",placeholder:"Tìm kiếm",validationMessageMode:"always",disabled:!d.ThongTinTraKhach.ThucHienTraKhach,onItemClick:e.onItemClickLenhXuatBen,label:"Lệnh vận chuyển (*)",labelMode:"floating",onCustomItemCreating:d.customItemCreatingLenhTraKhach,dropDownButtonTemplate:"customIcon"},{customIcon:Object(a["withCtx"])(({})=>[Object(a["createVNode"])(w,{icon:"mdi mdi-menu-down",activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1}),d.ThongTinTraKhach.LenhVanChuyenTraKhach?(Object(a["openBlock"])(),Object(a["createBlock"])(w,{key:0,"styling-mode":"text",type:"normal",hint:"Xem chi tiết",icon:"mdi mdi-eye",onClick:n[3]||(n[3]=e=>d.XemLenhVanChuyen())})):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(w,{"styling-mode":"text",type:"normal",hint:"Cập nhật danh sách lệnh",icon:"mdi mdi-update",onClick:n[4]||(n[4]=e=>d.TaiLaiLenh())})]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,null,{default:Object(a["withCtx"])(()=>[d.ThongTinTraKhach.ThucHienTraKhach?(Object(a["openBlock"])(),Object(a["createBlock"])(f,{key:0,message:"Lệnh vận chuyển không được bỏ trống!"})):Object(a["createCommentVNode"])("",!0)]),_:1})]),_:1},8,["modelValue","dataSource","display-expr","disabled","onItemClick","onCustomItemCreating"])])]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("div",V,[Object(a["createVNode"])(D,{modelValue:d.ThongTinTraKhach.TuyenVanChuyenTraKhach,"onUpdate:modelValue":n[6]||(n[6]=e=>d.ThongTinTraKhach.TuyenVanChuyenTraKhach=e),dataSource:{store:d.DanhSachTuyenVanChuyenTraKhach,paginate:!0},"display-expr":e=>e?`${e.TenTuyen} (${e.MaTuyen})`:"","value-expr":e=>e,"search-enabled":!0,"styling-mode":"outlined",placeholder:"Tìm kiếm",disabled:!d.ThongTinTraKhach.ThucHienTraKhach,validationMessageMode:"always",label:"Tuyến vận chuyển (*)",labelMode:"floating",fieldTemplate:"fieldTemplate"},{fieldTemplate:Object(a["withCtx"])(({data:e})=>[Object(a["createVNode"])(L,{value:e?`${e.TenTuyen} (${e.MaTuyen}) (${e.CuLy} Km)`:"",height:82},null,8,["value"])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,null,{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{message:"Tuyến vận chuyển không được bỏ trống!"})]),_:1})]),_:1},8,["modelValue","dataSource","display-expr","value-expr","disabled"])])])]),_:1},512),s.ifPopupLenhTraKhach?(Object(a["openBlock"])(),Object(a["createBlock"])(B,{key:0,visible:s.PopupLenhTraKhach,"onUpdate:visible":n[7]||(n[7]=e=>s.PopupLenhTraKhach=e),"drag-enabled":!1,"close-on-outside-click":!1,"show-title":!1,position:"center",width:"712px",height:"calc(100vh - 96px)",onHidden:n[8]||(n[8]=e=>d.onHidden("PopupLenhTraKhach"))},{content:Object(a["withCtx"])(()=>[Object(a["createVNode"])(x,{ref:"PopupLenhTraKhachVue",onHiddenPopup:d.hiddenPopup},null,8,["onHiddenPopup"])]),_:1},8,["visible"])):Object(a["createCommentVNode"])("",!0)],64)}t("14d9");var f=t("bbb2"),v=t("9fc8"),k=t("d30a"),w=t("c1df"),L=t.n(w),K=t("56bd"),x={components:{DxValidationGroup:f["DxValidationGroup"],DxCheckBox:v["DxCheckBox"],DxSelectBox:v["DxSelectBox"],DxNumberBox:v["DxNumberBox"],DxValidator:v["DxValidator"],DxButton:v["DxButton"],DxRequiredRule:k["DxRequiredRule"],DxTextArea:v["DxTextArea"],PopupLenhTraKhachVue:K["default"],DxPopup:v["DxPopup"]},props:{},data(){return{IsButtonCustomOnClick:null,ifPopupLenhTraKhach:!1,PopupLenhTraKhach:!1}},computed:{DanhSachNhatTrinhXe(){return this.$store.state.ThongTinDieuDo.DanhSachNhatTrinhXe},DanhSachTuyenVanChuyenTraKhach(){return this.$store.state.TuyenVanChuyen.DanhSachTuyenVanChuyenTraKhach},ThongTinXeDangChon(){return this.$store.state.ThongTinDieuDo.ThongTinXeDangChon},ThongTinTraKhach:{get(){return this.$store.state.ThongTinDieuDo.ThongTinTraKhach},set(e){this.$store.commit("ThongTinDieuDo/Set",{key:"ThongTinTraKhach",data:e})}},DanhSachLenhVanChuyenTraKhach:{get(){return this.$store.state.LenhVanChuyen.DanhSachLenhVanChuyenTraKhach},set(e){this.$store.commit("LenhVanChuyen/Set",{key:"DanhSachLenhVanChuyenTraKhach",data:e})}},DangMoPopup:{get(){return this.$store.state.ThongTinDieuDo.DangMoPopup},set(e){this.$store.commit("ThongTinDieuDo/Set",{key:"DangMoPopup",data:e})}}},watch:{"ThongTinTraKhach.ThucHienTraKhach":{immediate:!0,deep:!0,handler:function(){this.ThongTinTraKhach.ThucHienTraKhach&&(this.LayDanhSachNhatTrinh(),this.LayDanhSachTuyenVanChuyenTraKhach(),this.LayDanhSachLenhVanChuyenTraKhach())}}},methods:{hiddenPopup(e){this[e]=!1},onHidden(e){this.DangMoPopup=!1,this["if"+e]=!1},showPopup(e){this.DangMoPopup=!0,this["if"+e]=!0,this[e]=!0},LayDanhSachNhatTrinh(){this.$store.dispatch("ThongTinDieuDo/LayDanhSachNhatTrinh")},async LayDanhSachTuyenVanChuyenTraKhach(){await this.$store.dispatch("TuyenVanChuyen/LayDanhSachTuyenVanChuyenTraKhach"),this.DanhSachTuyenVanChuyenTraKhach.length>0&&(this.ThongTinTraKhach.TuyenVanChuyenTraKhach=this.DanhSachTuyenVanChuyenTraKhach[0])},async LayDanhSachLenhVanChuyenTraKhach(){var e;await this.$store.dispatch("LenhVanChuyen/LayDanhSachLenhVanChuyenTraKhach"),this.DanhSachLenhVanChuyenTraKhach=null===(e=this.DanhSachLenhVanChuyenTraKhach)||void 0===e?void 0:e.map(e=>(e.HienThi=`${e.MaLenh} (${L()(e.ThoiGianXuatBen).format("HH:mm DD/MM/yyyy")})`,e)),this.DanhSachLenhVanChuyenTraKhach.length>0&&(this.ThongTinTraKhach.LenhVanChuyenTraKhach=this.DanhSachLenhVanChuyenTraKhach[0])},XemLenhVanChuyen(){setTimeout(()=>{this.showPopup("PopupLenhTraKhach"),setTimeout(()=>{this.$refs.LenhVanChuyenTraKhach.instance.close()},0)},100)},async TaiLaiLenh(){try{setTimeout(()=>{this.$refs.LenhVanChuyenTraKhach.instance.close()},0),this.DanhSachLenhVanChuyenTraKhach=[],this.ThongTinTraKhach.LenhVanChuyenTraKhach=null;let e=await this.$store.dispatch("LenhVanChuyen/TaiLaiLenhDienTu",{});"Success"==e.State&&this.LayDanhSachLenhVanChuyenTraKhach()}catch(e){console.log("🚀 ",e)}},customItemCreatingLenhTraKhach(e){if(!e.text)return void(e.customItem=null);if(e.text.length>30)return e.customItem=this.DanhSachLenhVanChuyenTraKhach.find(e=>e.MaLenh==this.ThongTinTraKhach.LenhVanChuyenTraKhach),e.customItem=null,this.$Helper.ThongBaoToast("warning","Mã lệnh không được vượt quá 30 ký tự!");this.DanhSachLenhVanChuyenTraKhach=this.DanhSachLenhVanChuyenTraKhach.filter(e=>"00000000-0000-0000-0000-000000000000"!=e.IdLenh);let n={MaLenh:e.text,IdLenh:"00000000-0000-0000-0000-000000000000",LinkBanTheHienPdf:null,LinkTaiXml:null,HienThi:e.text};this.DanhSachLenhVanChuyenTraKhach.push(n),e.customItem=n}},created(){},mounted(){}},B=(t("9de7"),t("6b0d")),N=t.n(B);const S=N()(x,[["render",D],["__scopeId","data-v-ae0ca6ac"]]);n["default"]=S},"9de7":function(e,n,t){"use strict";t("aa48")},aa48:function(e,n,t){},b7df:function(e,n,t){"use strict";t("eaa5")},cd5a:function(e,n,t){"use strict";t.r(n);var a=t("7a23");const h=Object(a["createElementVNode"])("div",{class:"row mb-3 justify-center font-20 font-bold"},"Chụp ảnh lệnh giấy",-1),o={class:"row mb-4",style:{border:"1px solid #dadce0",height:"auto","max-height":"calc(100vh - 244px)"}},i={ref:"camera",autoplay:"",style:{width:"100%",height:"auto","max-height":"100%"}},c=["src"],l={class:"row justify-space-between"};function r(e,n,t,r,s,d){const u=Object(a["resolveComponent"])("DxButton");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[h,Object(a["createElementVNode"])("div",o,[Object(a["withDirectives"])(Object(a["createElementVNode"])("video",i,null,512),[[a["vShow"],!d.ThongTinHinhAnh.url]]),d.ThongTinHinhAnh.url?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,style:{width:"100%",height:"auto","max-height":"100%"},src:d.ThongTinHinhAnh.url},null,8,c)):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(u,{text:"Hủy",type:"danger","styling-mode":"text",onClick:d.hiddenPopup},null,8,["onClick"]),d.ThongTinHinhAnh.url?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:1,text:"Chụp lại ảnh",type:"default","styling-mode":"outlined",icon:"mdi mdi-reload",onClick:n[1]||(n[1]=e=>d.KhoiTaoMayAnh())})):(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:0,text:"Chụp ảnh",type:"default","styling-mode":"outlined",icon:"mdi mdi-camera",onClick:n[0]||(n[0]=e=>d.ChupAnh())})),Object(a["createVNode"])(u,{text:"Lưu hình ảnh",type:"default","styling-mode":"contained",disabled:!d.ThongTinHinhAnh.url,onClick:d.LuuHinhAnh},null,8,["disabled","onClick"])])],64)}t("88a7"),t("271a"),t("5494");var s=t("9fc8"),d={components:{DxButton:s["DxButton"]},props:{HinhAnhChup:{type:Object,default:{}}},data(){return{}},computed:{ThongTinHinhAnh:{get(){return this.HinhAnhChup},set(e){this.$emit("update:HinhAnhChup",{...e,url:e.url,file:e.file})}}},methods:{hiddenPopup(){this.$emit("hiddenPopup","PopupChupAnhLenhGiay")},KhoiTaoMayAnh(){try{let e=this;this.$startLoading,this.ThongTinHinhAnh={};const n=window.constraints={audio:!1,video:!0};navigator.mediaDevices.getUserMedia(n).then(n=>{e.$stopLoading,e.$refs.camera.srcObject=n}).catch(n=>{console.log("🚀 ~ error:",n),e.$stopLoading,e.$Helper.ThongBaoToast("warning","Không tìm thấy Camera hoặc có một số lỗi.")})}catch(e){console.log("🚀 ~ error:",e),this.$stopLoading,this.$Helper.ThongBaoToast("warning","Không tìm thấy Camera hoặc có một số lỗi.")}},async ChupAnh(){let e=document.createElement("canvas");e.width=this.$refs.camera.videoWidth,e.height=this.$refs.camera.videoHeight;const n=e.getContext("2d");n.drawImage(this.$refs.camera,0,0,e.width,e.height);let t=await new Promise(n=>e.toBlob(n,"image/jpeg")),a=new File([t],"Anh Chup Thanh Toan.jpg",{type:"image/jpeg"});const h=URL.createObjectURL(t);this.ThongTinHinhAnh={url:h,file:a,type:"image",id:"00000000-0000-0000-0000-000000000000"}},LuuHinhAnh(){this.$emit("LuuHinhAnh"),this.hiddenPopup()}},created(){},mounted(){setTimeout(()=>{this.KhoiTaoMayAnh()},100)},beforeUnmount(){var e;let n=(null===(e=this.$refs.camera.srcObject)||void 0===e?void 0:e.getTracks())||[];n.forEach(e=>{e.stop()})}},u=t("6b0d"),p=t.n(u);const T=p()(d,[["render",r]]);n["default"]=T},d303:function(e,n,t){"use strict";var a=t("7a23");const h={style:{"min-width":"350px","min-height":"350px",position:"relative, background-color: #DADCE0"}},o={class:"btn-close-popup"},i={class:"row align-center justify-center",style:{width:"100%",height:"100%"}},c=["src"];function l(e,n,t,l,r,s){const d=Object(a["resolveComponent"])("DxButton");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",h,[Object(a["createElementVNode"])("div",o,[Object(a["createVNode"])(d,{key:"mdi-close",type:"danger","styling-mode":"contained",icon:"mdi mdi-close",hint:"Đóng",onClick:s.hiddenPopup},null,8,["onClick"])]),Object(a["createElementVNode"])("div",i,[Object(a["createElementVNode"])("img",{src:t.item},null,8,c)])])}var r=t("9fc8"),s={components:{DxButton:r["DxButton"]},props:{item:{type:String,default:null}},methods:{hiddenPopup(){this.$emit("hiddenPopup","ZoomImages")}}},d=t("6b0d"),u=t.n(d);const p=u()(s,[["render",l]]);n["a"]=p},dd74:function(e,n,t){"use strict";var a=t("7a23");const h={class:"btn-close-popup"},o={key:0,class:"row align-center justify-center",style:{height:"100%"}},i={key:1,class:"row align-center justify-center",style:{width:"100%",height:"100%"}},c=["src"];function l(e,n,t,l,r,s){const d=Object(a["resolveComponent"])("DxButton");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{style:Object(a["normalizeStyle"])([{height:"calc(100vh - 144px)",position:"relative","background-color":"#dadce0"},(s.isMobile?"min-width: 100%;":"min-width: 500px;")+(t.itemGallery?"":"height: 100%; width: 700px")])},[Object(a["createElementVNode"])("div",h,[Object(a["createVNode"])(d,{key:"mdi-close",type:"normal","styling-mode":"text",icon:"mdi mdi-close",hint:"Đóng",onClick:s.hiddenPopup},null,8,["onClick"])]),t.itemGallery&&"undefined"!=t.itemGallery&&void 0!=t.itemGallery?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",i,[Object(a["createElementVNode"])("embed",{src:t.itemGallery+"#view=Fit",style:Object(a["normalizeStyle"])(`width: ${t.width}; height: ${t.height}`)},null,12,c)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",o," Không có bản thể hiện "))],4)}var r=t("6191"),s=t.n(r),d={components:{DxButton:s.a},props:{itemGallery:{type:String,default:null},width:{type:String,default:"auto"},height:{type:String,default:"auto"}},computed:{isMobile(){return this.$store.state.ManHinh.isMobile}},methods:{hiddenPopup(){this.$emit("hiddenPopup","ShowGallery")}},mounted(){}},u=(t("3b54"),t("6b0d")),p=t.n(u);const T=p()(d,[["render",l],["__scopeId","data-v-39efe20e"]]);n["a"]=T},eaa5:function(e,n,t){}}]);