1"use strict";(self["webpackChunkpackhai_wms_management"]=self["webpackChunkpackhai_wms_management"]||[]).push([[2252],{41921(t,e,a){a.r(e),a.d(e,{default:()=>P});var s=a.cw(function(t,e){const s=a.p+"img/Google-drive-logo-on-transparent-background-PNG.72a6bcec.png";t.exports=s}),i=a(97678),n=a(94112),r=a(33740),o=a(3698),l=a(52938),c=a(36092),h=a(13180),d=a(54414),u=a(69310),p=a(99991),m=a(59483),f=a(71027),g=a(70174),v=a(36930),b=a(3397),k=a(83675),A=a(2756),S=a(24312),_=a(41034),y=a(63e3),w=a(79549),C=function(){var t=this,e=t._self._c;return t.page_loading?e("div",[e("loading",{attrs:{page_loading:t.page_loading}})],1):e("div",[e("loading",{attrs:{loading:t.loading}}),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"0"}},[e(l.ri,{staticClass:"body-1"},[t._v(" à¸à¸±à¹à¸à¸à¹à¸² "),e(v.A,[t._v("mdi-chevron-right")]),t._v(" à¸à¸±à¹à¸à¸à¹à¸²à¸à¸±à¹à¸§à¹à¸ ")],1)],1),e(p.A,{attrs:{"max-width":"500"},model:{value:t.ShowPhoto,callback:function(e){t.ShowPhoto=e},expression:"ShowPhoto"}},[e(o.A,{staticClass:"ma-0"},[e(l.OQ,[e(A.A,{attrs:{align:"center"}},[e(d.A,{staticClass:"text-center",attrs:{cols:"12"}},[e("img",{staticClass:"hidden-md-and-up",attrs:{src:t.ShowPhotoLink,width:"300"}}),e("img",{staticClass:"hidden-sm-and-down",attrs:{src:t.ShowPhotoLink,width:"450"}})])],1)],1),e(m.A),e(l.SL,[e(r.A,{attrs:{text:"",color:"#1976d2"},on:{click:function(e){return t.Opentap(t.ShowPhotoLink)}}},[t._v("à¹à¸à¸´à¸à¹à¸à¸à¹à¸«à¸¡à¹")]),e(_.A),e(r.A,{attrs:{text:"",color:"#1976d2"},on:{click:function(e){t.ShowPhoto=!1}}},[t._v("à¸à¸´à¸")])],1)],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[e(v.A,{attrs:{size:"22",color:"teal darken-3"}},[t._v("fa-address-card")]),e("span",{staticClass:"ml-3"},[t._v("à¸à¹à¸à¸¡à¸¹à¸¥à¸ªà¸²à¸à¸²")]),e(_.A),e(r.A,{staticClass:"pa-2",attrs:{disabled:t.branch.isUpdate,elevation:1,color:"primary"},on:{click:function(e){t.branch.isUpdate=!0}}},[e(v.A,{staticClass:"pr-1",attrs:{size:"16"}},[t._v("fa-edit")]),t._v(" à¹à¸à¹à¹à¸ ")],1)],1),e(m.A),e(l.OQ,[e(g.A,{ref:"formBranch",attrs:{"lazy-validation":""}},[e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("à¸à¸·à¹à¸à¸ªà¸²à¸à¸² :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branch.isUpdate?e(w.A,{ref:"branchname",attrs:{value:t.branch.name,rules:[e=>t.Trim_rules(e)||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branch.name=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.branchsenderName.focus()}}}):e("span",[t._v(t._s(t.branch.name))])],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("à¸à¸·à¹à¸à¸à¸µà¹à¹à¸à¹à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸² :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branch.isUpdate?e(w.A,{ref:"branchsenderName",attrs:{value:t.branch.senderName,rules:[e=>t.Trim_rules(e)||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branch.senderName=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.branchphoneNumber.focus()}}}):e("span",[t._v(t._s(t.branch.senderName))])],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("à¹à¸à¸à¸£à¹à¹à¸à¸£ :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branch.isUpdate?e(w.A,{ref:"branchphoneNumber",attrs:{value:t.branch.phoneNumber,rules:[e=>t.Trim_rules(e)||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",outlined:"",dense:"","hide-details":"",maxlength:"10"},on:{change:e=>t.branch.phoneNumber=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.branchemail.focus()}
1,keypress:function(e){return t.isNumberWNoDot(e)}}}):e("span",[t._v(t._s(t.branch.phoneNumber))])],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("à¸à¸µà¹à¸¡à¸¥ :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branch.isUpdate?e(w.A,{ref:"branchemail",attrs:{value:t.branch.email,rules:[e=>t.Trim_rules(e)||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branch.email=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.branchaddress.focus()}}}):e("span",[t._v(t._s(t.branch.email))])],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("à¸à¸µà¹à¸à¸¢à¸¹à¹ :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branch.isUpdate?e(w.A,{ref:"branchaddress",attrs:{value:t.branch.address,rules:[e=>t.Trim_rules(e)||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branch.address=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.branchpostcodeMapping.focus()}}}):e("span",[t._v(t._s(t.branch.fullAddress))])],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1),t.branch.isUpdate?e(A.A,[e(d.A,{attrs:{cols:"12",md:"6"}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"4"}},[e("h3",{staticClass:"fn-14"},[t._v("รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ :")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[e(i.A,{ref:"branchpostcodeMapping",attrs:{label:"รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ / à¸à¸±à¸à¸«à¸§à¸±à¸ / (à¹à¸à¸/à¸à¸³à¹à¸ à¸) / (à¹à¸à¸§à¸/à¸à¸³à¸à¸¥)",items:t.postcode_mapping,"item-text":t=>t.postcode+" "+t.province+" "+t.district+" "+t.subDistrict,outlined:"",rules:[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],autocomplete:"off",required:"","return-object":"",dense:"","hide-details":""},model:{value:t.branch.postcodeMapping,callback:function(e){t.$set(t.branch,"postcodeMapping",e)},expression:"branch.postcodeMapping"}})],1)],1)],1),e(d.A,{attrs:{cols:"12",md:"6"}})],1):t._e()],1),t.branch.isUpdate?e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12"}},[e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.UpdateBranch()}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"20"}},[t._v("mdi-content-save")]),e("span",{staticClass:"fn-14"},[e("b",[t._v(" à¸à¸±à¸à¸à¸¶à¸ ")])])],1)],1)],1):t._e()],1)],1),e(p.A,{attrs:{scrollable:"","max-width":"50%",persistent:"",fullscreen:t.$vuetify.breakpoint.xsOnly},model:{value:t.invoice.dialog,callback:function(e){t.$set(t.invoice,"dialog",e)},expression:"invoice.dialog"}},[e(o.A,{staticClass:"ma-0",attrs:{elevation:"1"}},[e(l.ri,[e(v.A,{attrs:{size:"22",color:"red darken-3"}},[t._v("fa-map-marked-alt")]),t.invoice.isUpdate?e("span",{staticClass:"ml-3"},[t._v("à¹à¸à¹à¹à¸à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸à¸³à¸à¸±à¸à¸ าษี")]):e("span",{staticClass:"ml-3"},[t._v("à¹à¸à¸´à¹à¸¡à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸à¸³à¸à¸±à¸à¸ าษี")]),e(_.A),e(r.A,{attrs:{icon:""},on:{click:function(e){return t.InvoiceCloseDialog()}}},[e(v.A,{attrs:{color:"danger"}},[t._v("mdi-close")])],1)],1),e(m.A),e(l.OQ,[e(g.A,{ref:"formInvoice",attrs:{"lazy-validation":""}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¹à¸¥à¹à¸à¹ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e("span",[e(r.A,{staticClass:"btn-inputfile ma-0",attrs:{elevation:0,color:"orange darken-2"},on:{click:function(e){return t.$refs.inputfile.click()}}},[e("span",[t._v("à¸à¸±à¸à¹à¸«à¸¥à¸à¸£à¸¹à¸à¸ าà¸")])]),t._v(" "+t._s(t.files.filename)+" ")],1),e("input",{ref:"inputfile",staticClass:"display-none d-none",attrs:{accept:"image/*",type:"file"},on:{change:function(e){return t.previewpicture(e)}}}
1)])],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸·à¹à¸à¸à¸¸à¸à¸à¸¥/à¸à¸´à¸à¸´à¸à¸¸à¸à¸à¸¥ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"invoicename",attrs:{value:t.invoice.name,rules:t.invoice.rulesName,autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.invoice.name=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.invoicephone.focus()}}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¹à¸à¸à¸£à¹à¹à¸à¸£ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"invoicephone",attrs:{value:t.invoice.phone,rules:t.invoice.rulesPhone,autocomplete:"off",outlined:"",dense:"","hide-details":"",maxlength:"10"},on:{change:e=>t.invoice.phone=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.invoiceidcardNumber.focus()},keypress:function(e){return t.isNumberWNoDot(e)}}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¹à¸¥à¸à¸à¸¹à¹à¹à¸ªà¸µà¸¢à¸ าษี : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"invoiceidcardNumber",attrs:{value:t.invoice.idcardNumber,rules:t.invoice.rulesIdCardNumber,autocomplete:"off",outlined:"",dense:"","hide-details":"",maxlength:"13"},on:{change:e=>t.invoice.idcardNumber=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.invoiceaddress.focus()},keypress:function(e){return t.isNumberWNoDot(e)}}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸µà¹à¸à¸¢à¸¹à¹ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"invoiceaddress",attrs:{value:t.invoice.address,rules:t.invoice.rulesAddress,autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.invoice.address=t.Trim_value(e),keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.invoivepostcodeMapping.focus()}}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(i.A,{ref:"invoivepostcodeMapping",attrs:{label:"รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ / à¸à¸±à¸à¸«à¸§à¸±à¸ / (à¹à¸à¸/à¸à¸³à¹à¸ à¸) / (à¹à¸à¸§à¸/à¸à¸³à¸à¸¥)",items:t.postcode_mapping,"item-text":t=>t.postcode+" "+t.province+" "+t.district+" "+t.subDistrict,outlined:"",rules:t.invoice.rulesPostcodeMapping,autocomplete:"off",required:"","return-object":"",dense:"","hide-details":""},model:{value:t.invoice.postcodeMapping,callback:function(e){t.$set(t.invoice,"postcodeMapping",e)},expression:"invoice.postcodeMapping"}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸±à¹à¸à¹à¸à¹à¸à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"1"}},[e(c.A,{attrs:{readonly:t.invoice.isReadonly,color:"info"},model:{value:t.invoice.isDefault,callback:function(e){t.$set(t.invoice,"isDefault",e)},expression:"invoice.isDefault"}})],1),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.invoice.isReadonly&&t.invoice.isUpdate?e("span",{staticClass:"text-danger"},[t._v("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¹à¸à¹à¸à¹ !!")]):t._e()])],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12"}},[e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.UpdateInvoice()}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"20"}},[t._v("mdi-content-save")]),e("span",{staticClass:"fn-14"},[e("b",[t._v(" à¸à¸±à¸à¸à¸¶à¸ ")])])],1)],1)],1)],1)],1)],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"}
1,[e(v.A,{attrs:{size:"22",color:"red darken-3"}},[t._v("fa-map-marked-alt")]),e("span",{staticClass:"ml-3"},[t._v("à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸à¸³à¸à¸±à¸à¸ าษี")]),e(_.A),e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.OPPInvoice(!1,null)}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"22"}},[t._v("mdi-plus")]),t._v(" à¹à¸à¸´à¹à¸¡à¸à¸µà¹à¸à¸¢à¸¹à¹ ")],1)],1),e(m.A),e(l.OQ,{staticClass:"overflow-y-auto packhai-max500-min100"},[e(u.A,{staticClass:"packhai-border-table",attrs:{headers:t.headerInvoice,items:t.dataInvoice,"items-per-page":9999999999,"hide-default-footer":""},scopedSlots:t._u([{key:"item.delete",fn:function({item:a}){return[a.isDefault?e(v.A,{attrs:{size:"16"}},[t._v("fa-trash-alt")]):e("a",{on:{click:function(e){return t.DeleteInvoice(a)}}},[e(v.A,{attrs:{size:"16",color:"red darken-3"}},[t._v("fa-trash-alt")])],1)]}},{key:"item.edit",fn:function({item:a}){return[e("a",{on:{click:function(e){return t.OPPInvoice(!0,a)}}},[e(v.A,{attrs:{size:"16",color:"orange darken-3"}},[t._v("fa-edit")])],1)]}},{key:"item.address",fn:function({item:a}){return[null!=a.logo?e("a",{on:{click:function(e){return t.OpenPhoto(a.logo)}}},[e(n.A,{staticClass:"mr-2",attrs:{size:"25px"}},[e("img",{attrs:{src:a.logo}})])],1):t._e(),t._v(" "+t._s((null!=a.name?a.name+" ":"")+(null!=a.phone?a.phone+" ":"")+(null!=a.idcardNumber?a.idcardNumber+" ":"")+(null!=a.address?a.address+" ":""))+" "),null!=a.postcodeMappingId?e("span",[t._v(" "+t._s(a.postcodeMapping.subDistrict+" "+a.postcodeMapping.district+" "+a.postcodeMapping.province+" "+a.postcodeMapping.postcode)+" ")]):t._e(),a.isDefault?e(h.A,{staticClass:"chip-set-13",attrs:{color:"teal",dark:""}},[t._v(" à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸ ")]):t._e()]}}])})],1)],1),e(p.A,{attrs:{fullscreen:t.$vuetify.breakpoint.xsOnly,"max-width":"50%",scrollable:"",persistent:""},model:{value:t.dialog_Stamped,callback:function(e){t.dialog_Stamped=e},expression:"dialog_Stamped"}},[e(o.A,[e(l.ri,[0==t.updateStamped.isEdit?e("span",[t._v("à¹à¸à¸´à¹à¸¡à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸")]):1==t.updateStamped.isEdit?e("span",[t._v("à¹à¸à¹à¹à¸à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸")]):t._e(),e(_.A),e(r.A,{attrs:{icon:""},on:{click:function(e){return t.closeDialogStamped()}}},[e(v.A,{attrs:{color:"danger"}},[t._v("mdi-close")])],1)],1),e(m.A),e(l.OQ,[e("div",[e(A.A,[e(d.A,{staticClass:"py-1",attrs:{cols:"3"}},[e("h3",{staticClass:"fn-14"},[t._v(" ลายà¹à¸à¹à¸à¸à¹ : ")])]),e(d.A,{staticClass:"py-1",attrs:{cols:"8"}},[null!=t.updateStamped.signature?e("div",[e(n.A,{staticClass:"sshoverpicture",attrs:{size:"90",tile:""}},[e("img",{attrs:{src:t.updateStamped.signature}})]),e("a",{staticClass:"pl-3",on:{click:function(e){t.updateStamped.signature=null}}},[e(v.A,{attrs:{size:"16",color:"red darken-3"}},[t._v("fa-trash")])],1)],1):e(f.A,{attrs:{label:"à¹à¸¥à¸·à¸à¸à¸ าà¸","append-icon":"mdi-camera"},on:{change:t.handleFileSignature},model:{value:t.fileSignature,callback:function(e){t.fileSignature=e},expression:"fileSignature"}})],1)],1),e(A.A,[e(d.A,{staticClass:"py-1",attrs:{cols:"3"}},[e("h3",{staticClass:"fn-14"},[t._v(" à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸ : ")])]),e(d.A,{staticClass:"py-1",attrs:{cols:"8"}},[null!=t.updateStamped.seal?e("div",[e(n.A,{staticClass:"sshoverpicture",attrs:{size:"90",tile:""}},[e("img",{attrs:{src:t.updateStamped.seal}})]),e("a",{staticClass:"pl-3",on:{click:function(e){t.updateStamped.seal=null}}},[e(v.A,{attrs:{size:"16",color:"red darken-3"}},[t._v("fa-trash")])],1)],1):e(f.A,{attrs:{label:"à¹à¸¥à¸·à¸à¸à¸ าà¸","append-icon":"mdi-camera"},on:{change:t.handleFileSeal},model:{value:t.fileSeal,callback:function(e){t.fileSeal=e},expression:"fileSeal"}})],1)],1)],1)]),e(m.A),e(l.SL,[e(A.A,[e(d.A,{staticClass:"text-right",attrs:{cols:"12"}},[e(r.A,{staticClass:"mr-1",attrs:{dark:"",color:"primary"},on:{click:function(e){return t.btnUpdateStamped()}}},[e(v.A,{attrs:{left:""}},[t._v("mdi-content-save")]),t._v(" à¸à¸±à¸à¸à¸¶à¸ ")],1)],1)],1)],1)],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,[e(v.A,{attrs:{size:"24",color:"info darken-3"}},[t._v("mdi-stamper")]),e("span",{staticClass:"ml-3"},[t._v("à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸")]),e(_.A),0==t.stampedList.length?e(r.A,{attrs:{dark:"",color:"primary"},on:{click:function(e){return t.openDialogStamped(!1)}}},[e(v.A,{attrs:{left:""}},[t._v("mdi-plus")]),t._v(" à¹à¸à¸´à¹à¸¡à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸ ")],1):t._e()],1),e(m.A),e(l.OQ,[e(A.A,{attrs:{row:""}},[e(d.A,{attrs:{cols:"12",md:"12"}},[e("div",{staticClass:"overflow-y-auto",staticStyle:{"max-height":"500px"}},[e(u.A,{staticClass:"elevation-0 packhai-border-table",attrs:{headers:t.headersStamped,items:t.stampedList,"hide-default-footer":"","items-per-page":1e4},scopedSlots:t._u([{key:"item.signature",fn:function({item:a}){return[null!=a.signature?e("a",{on:{click:function(e){return t.OpenPhoto(a.signature)}}},[e("img",{staticClass:"mt-1",attrs:{src:a.signature,width:"80"}})]):t._e()]}},{key:"item.seal",fn:function({item:a}){return[null!=a.seal?e("a",{on:{click:function(e){return t.OpenPhoto(a.seal)}}},[e("img",{staticClass:"mt-1",attrs:{src:a.seal,width:"80"}})]):t._e()]}},{key:"item.edit",fn:function({item:a}){return[e("a",{on:{click:function(e){return t.openDialogStamped(!0,a)}}},[e(v.A,{attrs:{size:"16",color:"orange darken-3"}},[t._v("fa-edit")])],1)]}}])})],1)])],1)],1)],1),e(p.A,{attrs:{scrollable:"","max-width":"50%",persistent:"",fullscreen:t.$vuetify.breakpoint.xsOnly},model:{value:t.dialogBank,callback:function(e){t.dialogBank=e},expression:"dialogBank"}},[e(o.A,{staticClass:"ma-0",attrs:{elevation:"1"}},[e(l.ri,[e(v.A,{attrs:{size:"22",color:"orange darken-3"}},[t._v("fa-money-check-alt")]),t.branchBank.isUpdate?e("span",{staticClass:"ml-3"},[t._v("à¹à¸à¹à¹à¸à¸à¸±à¸à¸à¸µà¸à¸à¸²à¸à¸²à¸£")]):e("span",{staticClass:"ml-3"},[t._v("à¹à¸à¸´à¹à¸¡à¸à¸±à¸à¸à¸µà¸à¸à¸²à¸à¸²à¸£")]),e(_.A),e(r.A,{attrs:{icon:""},on:{click:function(e){t.dialogBank=!1}}},[e(v.A,{attrs:{color:"danger"}},[t._v("mdi-close")])],1)],1),e(m.A),e(l.OQ,[e(g.A,{ref:"formBranchBank",attrs:{"lazy-vali
1dation":""}},[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" หà¸à¹à¸²à¸à¸±à¸à¸à¸µ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e("span",[e(r.A,{staticClass:"btn-inputfile ma-0",attrs:{elevation:0,color:"orange darken-2"},on:{click:function(e){return t.$refs.inputfile.click()}}},[e("span",[t._v("à¸à¸±à¸à¹à¸«à¸¥à¸à¸£à¸¹à¸à¸ าà¸")])]),t._v(" "+t._s(t.files.filename)+" ")],1),e("input",{ref:"inputfile",staticClass:"display-none d-none",attrs:{accept:"image/*",type:"file"},on:{change:function(e){return t.previewpicture(e)}}})])],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸·à¹à¸à¸à¸à¸²à¸à¸²à¸£ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(S.A,{ref:"branchBankbank",attrs:{items:t.branchBank.bankList,"item-text":"nameThai","item-value":"id",rules:t.branchBank.rulesBankName,"persistent-hint":"","return-object":"",dense:"","hide-details":"",outlined:"","single-line":""},scopedSlots:t._u([{key:"selection",fn:function(a){return[null!=a.item.logo?e(n.A,{staticClass:"mr-2",attrs:{size:"25px"}},[e("img",{attrs:{src:a.item.logo}})]):t._e(),t._v(" "+t._s(a.item.nameThai)+" ")]}},{key:"item",fn:function(a){return[null!=a.item.logo?e(n.A,{staticClass:"mr-2",attrs:{size:"25px"}},[e("img",{attrs:{src:a.item.logo}})]):t._e(),t._v(" "+t._s(a.item.nameThai)+" ")]}}]),model:{value:t.branchBank.bank,callback:function(e){t.$set(t.branchBank,"bank",e)},expression:"branchBank.bank"}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸·à¹à¸à¸à¸±à¸à¸à¸µ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"branchBankaccountName",attrs:{value:t.branchBank.accountName,rules:t.branchBank.rulesAccountName,autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branchBank.accountName=t.Trim_value(e)}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¹à¸¥à¸à¸à¸±à¸à¸à¸µ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"branchBankaccountNumber",attrs:{value:t.branchBank.accountNumber,rules:t.branchBank.rulesAccountNumber,autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{change:e=>t.branchBank.accountNumber=t.Trim_valueInt(e),keypress:function(e){return t.isNumberWNoDot(e)}}})],1)],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" สà¸à¸²à¸à¸° : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"1"}},[e(y.A,{staticClass:"mx-2",attrs:{readonly:t.branchBank.isReadonly,color:"success"},model:{value:t.branchBank.isActive,callback:function(e){t.$set(t.branchBank,"isActive",e)},expression:"branchBank.isActive"}})],1),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branchBank.isActive?e("span",[t._v("à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸")]):e("span",[t._v("à¹à¸¡à¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸")])])],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"3"}},[e("span",{staticClass:"fn-14"},[t._v(" à¸à¸±à¹à¸à¹à¸à¹à¸à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸ : ")])]),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"1"}},[e(c.A,{attrs:{readonly:t.branchBank.isReadonly,color:"info"},model:{value:t.branchBank.isDefault,callback:function(e){t.$set(t.branchBank,"isDefault",e)},expression:"branchBank.isDefault"}})],1),e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",md:"8"}},[t.branchBank.isReadonly&&t.branchBank.isUpdate?e("span",{staticClass:"text-danger"},[t._v("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¹à¸à¹à¸à¹ !!")]):t._e()])],1),e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12"}},[e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.UpdateBranchBank()}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"20"}},[t._v("mdi-content-save")]),e("span",{staticClass:"fn-14"},[e("b",[t._v(" à¸à¸±à¸à¸à¸¶à¸ ")])])],1)],1)],1)],1)],1)],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[e(v.A,{attrs:{size:"22",color:"orange darken-3"}},[t._v("fa-money-check-alt")]),e("span",{staticClass:"ml-3"},[t._v("à¸à¸±à¸à¸à¸µà¸à¸à¸²à¸à¸²à¸£")]),e(_.A),e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.OPPBranchBank(!1,null)}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"22"}},[t._v("mdi-plus")]),t._v(" à¹à¸à¸´à¹à¸¡à¸à¸±à¸à¸à¸µ ")],1)],1),e(m.A),e(l.OQ,{staticClass:"overflow-y-auto packhai-max500-min100"},[e(u.A,{staticClass:"packhai-table packhai-border-table",attrs:{headers:t.headerBranchBank,items:t.dataBranchBank,"items-per-page":9999999999,"hide-default-footer":""},scopedSlots:t._u([{key:"item.fileURL",fn:function({item:a}){return[null!=a.fileURL?e("a",{on:{click:function(e){return t.OpenPhoto(a.fileURL)}}},[e("img",{staticClass:"mt-1",attrs:{src:a.fileURL,width:"60"}})]):t._e()]}},{key:"item.delete",fn:function({item:a}){return[a.isDefault?e(v.A,{attrs:{size:"16"}}):e("a",{on:{click:function(e){return t.DeleteBranchBank(a)}}}
1,[e(v.A,{attrs:{size:"16",color:"red darken-3"}},[t._v("fa-trash-alt")])],1)]}},{key:"item.edit",fn:function({item:a}){return[e("a",{on:{click:function(e){return t.OPPBranchBank(!0,a)}}},[e(v.A,{attrs:{size:"16",color:"orange darken-3"}},[t._v("fa-edit")])],1)]}},{key:"item.isActive",fn:function({item:a}){return[e(A.A,[e(d.A,{staticClass:"text-left",attrs:{cols:"12"}},[a.isActive?e("span",[e(v.A,{attrs:{size:"10",color:"success"}},[t._v("mdi-checkbox-blank-circle")]),t._v(" à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸")],1):e("span",[e(v.A,{attrs:{size:"10",color:"danger"}},[t._v("mdi-checkbox-blank-circle")]),t._v(" à¹à¸¡à¹à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸")],1)])],1)]}},{key:"item.bankName",fn:function({item:a}){return[null!=a.logo?e("a",{on:{click:function(e){return t.OpenPhoto(a.logo)}}},[e(n.A,{staticClass:"mr-2",attrs:{size:"25px"}},[e("img",{attrs:{src:a.logo}})])],1):t._e(),t._v(" "+t._s(a.bankName+" "+a.accountNumber+" "+a.accountName)+" "),a.isDefault?e(h.A,{staticClass:"chip-set-13",attrs:{color:"teal",dark:""}},[t._v(" à¸à¹à¸²à¹à¸£à¸´à¹à¸¡à¸à¹à¸ ")]):t._e()]}}])})],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[e(v.A,{attrs:{size:"22",color:"success darken-3"}},[t._v("fa-warehouse")]),e("span",{staticClass:"ml-3"},[t._v("à¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²")]),e(_.A),e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.EditWarehouse(null)}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"22"}},[t._v("mdi-plus")]),t._v(" à¹à¸à¸´à¹à¸¡à¸à¸¥à¸±à¸ ")],1)],1),e(m.A),e(l.OQ,[e(u.A,{staticClass:"packhai-table packhai-border-table",attrs:{headers:t.warehouse_header,items:t.warehouse_data,"items-per-page":9999999999,"hide-default-footer":""},scopedSlots:t._u([{key:"item.no",fn:function({item:e}){return[t._v(" "+t._s(t.formatMoney(t.warehouse_data.indexOf(e)+1))+" ")]}},{key:"item.address",fn:function({item:a}){return[null!=a.postcodemappingID?e("span",[t._v(" "+t._s(a.fullAddress)+" ")]):e("span",[t._v(" "+t._s(a.address)+" ")])]}},{key:"item.edit",fn:function({item:a}){return[e("a",{on:{click:function(e){return t.EditWarehouse(a)}}},[e(v.A,{attrs:{size:"18",color:"orange darken-3"}},[t._v("fa-edit")])],1)]}},{key:"item.delete",fn:function({item:a}){return[0!=t.warehouse_data.indexOf(a)?e("a",{on:{click:function(e){return t.DeleteWarehouse(a)}}},[e(v.A,{attrs:{size:"18",color:"red"}},[t._v("fa-trash-alt")])],1):t._e()]}}])})],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[e("img",{attrs:{src:s(),width:"30"}}),e("span",{staticClass:"ml-3"},[t._v("à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸ Google Drive")]),e(_.A),e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.LoginGoogle()}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"22"}},[t._v("mdi-plus")]),t._v(" à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸ Google Drive ")],1)],1),e(m.A),e(l.OQ,{staticClass:"overflow-y-auto packhai-max500-min100"},[e(u.A,{staticClass:"packhai-table packhai-border-table",attrs:{headers:t.GoogleDrive.header,items:t.GoogleDrive.dataset,"hide-default-footer":""},scopedSlots:t._u([{key:"item.delete",fn:function({item:a}){return[e(v.A,{attrs:{size:"16",color:"red"},on:{click:function(e){return t.DeleteGoogleDrive(a)}}},[t._v("fa-trash-alt")])]}},{key:"item.ID",fn:function({item:a}){return[e("span",[e(v.A,{attrs:{size:"10",color:"success"}},[t._v("mdi-checkbox-blank-circle")]),t._v(" à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸ ")],1)]}},{key:"item.created",fn:function({item:e}){return[t._v(" "+t._s(null==e.created?"":t.formatDatetime(e.created))+" ")]}}])})],1)],1),e(o.A,{staticClass:"v-card-bottom-30",attrs:{elevation:"1"}},[e(l.ri,[e(v.A,{attrs:{size:"22",color:"blue darken-3"}},[t._v("mdi-volume-high")]),e("span",{staticClass:"ml-3"},[t._v("à¹à¸ªà¸µà¸¢à¸à¹à¸à¹à¸à¹à¸à¸·à¸à¸")]),e(_.A),e(r.A,{attrs:{dark:"",color:"primary"},on:{click:t.btnSaveAlertSound}},[e(v.A,{attrs:{left:""}},[t._v("mdi-content-save")]),t._v(" à¸à¸±à¸à¸à¸¶à¸ ")],1)],1),e(m.A),e(l.OQ,[t._l(t.alertSoundRows,function(a){return e(A.A,{key:a.key,staticClass:"align-center mb-4"},[e(d.A,{attrs:{cols:"12",md:"3"}},[e("b",[t._v(t._s(a.label))])]),e(d.A,{attrs:{cols:"12",md:"5"}},[e(w.A,{attrs:{placeholder:"à¸à¸±à¸à¹à¸«à¸¥à¸à¹à¸à¸¥à¹ หรืภวาภURL",outlined:"",dense:"","hide-details":"",clearable:""}
1,model:{value:t.alertSound[a.key],callback:function(e){t.$set(t.alertSound,a.key,e)},expression:"alertSound[s.key]"}})],1),e(d.A,{attrs:{cols:"12",md:"4"}},[e("input",{ref:"soundFile_"+a.key,refInFor:!0,staticStyle:{display:"none"},attrs:{type:"file",accept:"audio/*"},on:{change:function(e){return t.onSoundFileChange(e,a.key)}}}),e(r.A,{staticClass:"mr-2",attrs:{small:"",outlined:"",color:"blue darken-3",loading:t.soundUploading===a.key},on:{click:function(e){return t.triggerSoundUpload(a.key)}}},[e(v.A,{attrs:{left:"",small:""}},[t._v("mdi-upload")]),t._v(" à¸à¸±à¸à¹à¸«à¸¥à¸ ")],1),e(r.A,{attrs:{small:"",outlined:"",color:"green darken-2",disabled:!t.alertSound[a.key]},on:{click:function(e){return t.playAlertSound(a.key)}}},[e(v.A,{attrs:{left:"",small:""}},[t._v("mdi-play")]),t._v(" à¸à¸à¸ªà¸à¸ ")],1)],1)],1)}),e("div",{staticClass:"mt-2 grey--text",staticStyle:{"font-size":"12px"}},[t._v("* à¸à¹à¸²à¹à¸§à¹à¸à¸§à¹à¸²à¸à¸à¸°à¹à¸à¹à¹à¸ªà¸µà¸¢à¸à¹à¸£à¸´à¹à¸¡à¸à¹à¸à¸à¸à¸à¸£à¸°à¸à¸")]),e("div",{staticClass:"grey--text",staticStyle:{"font-size":"12px"}},[t._v("* หลัà¸à¸à¸±à¸à¸à¸¶à¸ à¸à¸£à¸¸à¸à¸² Logout à¹à¸¥à¹à¸§ Login à¹à¸«à¸¡à¹à¸à¸µà¸à¸à¸£à¸±à¹à¸")])],2)],1),e(p.A,{attrs:{scrollable:"","max-width":"45%",persistent:"",fullscreen:t.$vuetify.breakpoint.xsOnly},model:{value:t.warehouse_dialog,callback:function(e){t.warehouse_dialog=e},expression:"warehouse_dialog"}},[e(o.A,{attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[0==t.warehouse_edit.id?e("span",[t._v("à¹à¸à¸´à¹à¸¡à¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²")]):e("span",[t._v("à¹à¸à¹à¹à¸à¸à¸¥à¸±à¸à¸ªà¸´à¸à¸à¹à¸²")]),e(_.A),e(r.A,{attrs:{icon:""},on:{click:function(e){t.warehouse_dialog=!1}}},[e(v.A,{attrs:{color:"danger"}},[t._v("mdi-close")])],1)],1),e(m.A),e(l.OQ,{staticClass:"overflow-x-auto"},[e(g.A,{ref:"addWarehouseForm",attrs:{"lazy-validation":""}},[e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" à¸à¸·à¹à¸à¸à¸¥à¸±à¸ : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"warehousename",attrs:{value:t.warehouse_edit.name,autocomplete:"off",rules:t.rulesname,outlined:"",dense:""},on:{change:e=>t.warehouse_edit.name=t.Trim_value(e)}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" à¸à¸·à¹à¸à¸à¸¹à¹à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸² : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"warehousename",attrs:{value:t.warehouse_edit.senderName,autocomplete:"off",rules:t.rulessenderName,outlined:"",dense:""},on:{change:e=>t.warehouse_edit.senderName=t.Trim_value(e)}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" à¹à¸à¸à¸£à¹à¹à¸à¸£ : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"warehousename",attrs:{value:t.warehouse_edit.phone,autocomplete:"off",rules:t.rulesphone,outlined:"",dense:""},on:{change:e=>t.warehouse_edit.phone=t.Trim_value(e),keypress:function(e){return t.isNumberWNoDot(e)}}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" รหัสà¸à¸¥à¸±à¸ : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"warehousewarehouseCode",attrs:{value:t.warehouse_edit.warehouseCode,autocomplete:"off",outlined:"",dense:""},on:{change:e=>t.warehouse_edit.warehouseCode=t.Trim_value(e)}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" à¸à¸µà¹à¸à¸¢à¸¹à¹ : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(w.A,{ref:"warehouseaddress",attrs:{value:t.warehouse_edit.address,autocomplete:"off",outlined:"",dense:""},on:{change:e=>t.warehouse_edit.address=t.Trim_value(e)}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"3"}},[t._v(" รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ : ")]),e(d.A,{attrs:{cols:"12",md:"9"}},[e(i.A,{ref:"warehousepostcodeMapping",attrs:{placeholder:"รหัสà¹à¸à¸£à¸©à¸à¸µà¸¢à¹ / à¸à¸±à¸à¸«à¸§à¸±à¸ / (à¹à¸à¸/à¸à¸³à¹à¸ à¸) / (à¹à¸à¸§à¸/à¸à¸³à¸à¸¥)",items:t.postcode_mapping,"item-text":t=>t.postcode+" "+t.province+" "+t.district+" "+t.subDistrict,outlined:"",required:"","return-object":"",dense:""},model:{value:t.warehouse_edit.postcodeMapping,callback:function(e){t.$set(t.warehouse_edit,"postcodeMapping",e)},expression:"warehouse_edit.postcodeMapping"}})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",md:"9"}},[e(r.A,{attrs:{elevation:1,color:"primary",outlined:""},on:{click:function(e){return t.addShopinWarehouse(t.warehouse_edit)}}},[e(v.A,{attrs:{size:"20"}},[t._v("mdi-plus")]),e("span",[e("b",[t._v("à¹à¸à¸´à¹à¸¡à¸£à¹à¸²à¸à¸à¹à¸² ")])])],1)],1)],1),e(A.A,{staticClass:"pt-5 pb-5"},[e(d.A,{attrs:{cols:"12"}},[e(u.A,{staticClass:"packhai-border-table",attrs:{headers:t.addSh
1op.headerShopSelect,items:t.addShop.shopTable,"items-per-page":9999999999,"mobile-breakpoint":0,"hide-default-footer":""},scopedSlots:t._u([{key:"item.Delete",fn:function({item:a}){return[e("a",{on:{click:function(e){return t.handleDeleteShopInWarehouseClick(a)}}},[e(v.A,{attrs:{size:"18",color:"red"}},[t._v("fa-trash-alt")])],1)]}},{key:"item.No",fn:function({item:e}){return[t._v(" "+t._s(t.formatMoney(null!=t.addShop.shopTable?t.addShop.shopTable.length-t.addShop.shopTable.indexOf(e):0))+" ")]}},{key:"item.openOrder",fn:function({item:a}){return[e(A.A,{attrs:{justify:"center"}},[e(k.A,{staticClass:"mb-2 is-cod-selector",attrs:{row:"",required:"",dense:"","hide-details":""},model:{value:a.IsAllowAddOrderWhenStockShortage,callback:function(e){t.$set(a,"IsAllowAddOrderWhenStockShortage",e)},expression:"item.IsAllowAddOrderWhenStockShortage"}},[e(b.A,{attrs:{value:!0},scopedSlots:t._u([{key:"label",fn:function(){return[e("span",[t._v(" à¹à¸à¸´à¸ ")])]},proxy:!0}],null,!0)}),e(b.A,{attrs:{value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[e("span",[t._v("à¸à¸´à¸")])]},proxy:!0}],null,!0)})],1)],1)]}},{key:"item.adjustStock",fn:function({item:a}){return[e(A.A,{attrs:{justify:"center"}},[e(k.A,{staticClass:"mb-2",attrs:{row:"",required:"",dense:"","hide-details":""},model:{value:a.isAdjustStockWhenChangeOrderStatus,callback:function(e){t.$set(a,"isAdjustStockWhenChangeOrderStatus",e)},expression:"item.isAdjustStockWhenChangeOrderStatus"}},[e(b.A,{attrs:{value:!0},scopedSlots:t._u([{key:"label",fn:function(){return[e("span",[t._v(" à¹à¸à¸´à¸à¹à¸à¹ ")])]},proxy:!0}],null,!0)}),e(b.A,{attrs:{value:!1},scopedSlots:t._u([{key:"label",fn:function(){return[e("span",[t._v("à¹à¸¡à¹à¹à¸à¸´à¸à¹à¸à¹")])]},proxy:!0}],null,!0)})],1)],1)]}}])})],1)],1),e(A.A,[e(d.A,{attrs:{cols:"12",align:"right"}},[e(r.A,{attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.UpdateWarehouse()}}},[e(v.A,{attrs:{size:"20"}},[t._v("mdi-content-save")]),e("span",{staticClass:"fn-14"},[e("b",[t._v("à¸à¸±à¸à¸à¸¶à¸ ")])])],1)],1)],1)],1)],1)],1)],1),e(p.A,{attrs:{scrollable:"","max-width":"35%",persistent:"",fullscreen:t.$vuetify.breakpoint.xsOnly},model:{value:t.editshop_dialog,callback:function(e){t.editshop_dialog=e},expression:"editshop_dialog"}},[e(o.A,{attrs:{elevation:"1"}},[e(l.ri,{staticClass:"height-57"},[e("span",[t._v("à¹à¸à¸´à¹à¸¡à¸£à¹à¸²à¸à¹à¸à¸à¸¥à¸±à¸")]),e(_.A),e(r.A,{attrs:{icon:""},on:{click:function(e){t.editshop_dialog=!1}}},[e(v.A,{attrs:{color:"danger"}},[t._v("mdi-close")])],1)],1),e(m.A),e(l.OQ,{staticClass:"overflow-x-auto"},[e(A.A,{staticClass:"pb-5 py2"},[e(d.A,{attrs:{cols:"12",lg:"9"}},[e(w.A,{attrs:{placeholder:"à¹à¸ªà¹à¸à¸·à¹à¸à¸£à¹à¸²à¸à¸à¹à¸²à¸à¸µà¹à¸à¹à¸à¸à¸à¸²à¸£",autocomplete:"off",outlined:"",dense:"","hide-details":""},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.SearchShop()}},model:{value:t.addShop.dataSearch,callback:function(e){t.$set(t.addShop,"dataSearch",e)},expression:"addShop.dataSearch"}})],1),e(d.A,{attrs:{cols:"12",lg:"2",align:"left"}},[e(r.A,{attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.SearchShop()}}},[e("span",{staticClass:"fn-14"},[e("b",[t._v("à¸à¹à¸à¸«à¸² ")])])])],1)],1),e(A.A,[e(u.A,{staticClass:"packhai-border-table",attrs:{headers:t.addShop.header,items:t.addShop.data2,"items-per-page":9999999999,"mobile-breakpoint":0,"hide-default-footer":"","show-select":""},scopedSlots:t._u([{key:"item.No",fn:function({item:e}){return[t._v(" "+t._s(t.formatMoney(t.addShop.data2.indexOf(e)+1))+" ")]}}]),model:{value:t.addShop.showSelect,callback:function(e){t.$set(t.addShop,"showSelect",e)},expression:"addShop.showSelect"}})],1)],1),e(m.A),e(l.SL,[e(A.A,[e(d.A,{staticClass:"pt-1 pb-2",attrs:{cols:"12",align:"right"}},[e(r.A,{staticClass:"px-2",attrs:{elevation:1,color:"primary"},on:{click:function(e){return t.handleAddShopInWarehouseClick()}}},[e(v.A,{staticClass:"mr-1",attrs:{size:"20"}},[t._v("mdi-plus")]),e("span",{staticClass:"fn-14"},[e("b",[t._v(" à¹à¸à¸´à¹à¸¡ ")])])],1)],1)],1)],1)],1)],1)],1)},I=[],B=(a(74423),a(44114),a(18111),a(22489),a(20116),a(61701),a(13579),a(14603),a(47566),a(98721),a(97819)),x=a(78465),D=a.n(x),N=a(4213),$=a(50226),L=a(26703),O=a(43985);const T={components:{Loading:N.A},data:()=>({header_token:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.getItem("authorization_token")},page_loading:!0,loading:!1,postcode_mapping:null,BranchID:parseInt(localStorage.getItem("Branch_BranchID")),soundUploading:null,alertS
1ound:{errorUrl:"",successUrl:"",warningUrl:""},alertSoundRows:[{key:"errorUrl",label:"à¹à¸ªà¸µà¸¢à¸ Error (à¸à¸´à¸à¸à¸¥à¸²à¸)"},{key:"successUrl",label:"à¹à¸ªà¸µà¸¢à¸ Success (สำà¹à¸£à¹à¸)"},{key:"warningUrl",label:"à¹à¸ªà¸µà¸¢à¸ Warning (à¹à¸à¸·à¸à¸)"}],ShowPhoto:!1,ShowPhotoLink:"",warehouse_header:[{text:"No",align:"center",sortable:!1,value:"no",width:"60px"},{text:"รหัสà¸à¸¥à¸±à¸",align:"center",value:"warehouseCode",sortable:!1,width:"150px"},{text:"à¸à¸·à¹à¸",align:"left",value:"name",sortable:!1,width:"150px"},{text:"à¸à¸·à¹à¸à¸à¸¹à¹à¸ªà¹à¸à¸ªà¸´à¸à¸à¹à¸²",align:"left",value:"senderName",sortable:!1,width:"150px"},{text:"à¹à¸à¸à¸£à¹à¹à¸à¸£",align:"center",value:"phone",sortable:!1,width:"150px"},{text:"à¸à¸µà¹à¸à¸¢à¸¹à¹",align:"left",value:"fullAddress",sortable:!1,width:"250px"},{text:"à¹à¸à¹à¹à¸",align:"center",value:"edit",sortable:!1,width:"90px"},{text:"ลà¸",align:"center",value:"delete",sortable:!1,width:"90px"}],warehouse_dialog:!1,editshop_dialog:!1,addShop:{warehouseName:null,headerShopSelect:[{align:"center",text:"ลà¸",value:"Delete",sortable:!1,width:"50px"},{align:"left",text:"NO",value:"No",sortable:!1,width:"50px"},{align:"left",text:"à¸à¸·à¹à¸à¸£à¹à¸²à¸à¸à¹à¸²",value:"name",sortable:!1},{align:"center",text:"à¹à¸à¸´à¸à¸à¸à¹à¸à¸à¸£à¹à¹à¸à¹à¸«à¸²à¸à¸ªà¸à¹à¸à¸à¹à¸¡à¹à¹à¸à¸µà¸¢à¸à¸à¸",value:"openOrder",sortable:!1,width:"250px"}],header:[{align:"left",text:"NO",value:"No",sortable:!1},{align:"left",text:"à¸à¸·à¹à¸à¸£à¹à¸²à¸à¸à¹à¸²",value:"name",sortable:!1,width:"430px"}],data:[],data2:[],selectShop:[],dataSearch:null,shopTable:[],DeleteDataShop:[],showSelect:[]},warehouse_data:[],warehouse_edit:{id:0,name:null,senderName:null,phone:null,branchId:localStorage.getItem("Branch_BranchID"),shopId:null,warehouseCode:null,address:null,postcodeMapping:null,postcodemappingId:null,created:null,createdBy:localStorage.getItem("staff_id"),isPackhaiWarehouse:!0,isDeleted:!1,isAllowAddOrderWhenStockShortage:!1,isAdjustStockWhenChangeOrderStatus:!1},branch:{isUpdate:!1,id:0,name:null,senderName:null,phoneNumber:null,email:null,address:null,fullAddress:null,postcodeMappingId:0,postcodeMapping:{}},rulesname:[],rulesphone:[],rulessenderName:[],rulesaddress:[],rulespostcodeMapping:[],invoice:{dialog:!1,isReadonly:!1,postcodeMapping:{},isUpdate:!1,rulesName:[],rulesPhone:[],rulesIdCardNumber:[],rulesAddress:[],rulesPostcodeMapping:[],id:0,branchId:localStorage.getItem("Branch_BranchID"),name:null,idcardNumber:null,phone:null,address:null,postcodeMappingId:0,logo:null,isDefault:!1},dataInvoice:[],headerInvoice:[{align:"left",text:"à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸à¸³à¸à¸±à¸à¸ าษี",value:"address",sortable:!1},{align:"center",text:"à¹à¸à¹à¹à¸",value:"edit",sortable:!1,width:"80px"},{align:"center",text:"ลà¸",value:"delete",sortable:!1,width:"80px"}],dialogBank:!1,branchBank:{isReadonly:!1,isUpdate:!1,bankList:[],bank:null,rulesBankName:[],rulesAccountName:[],rulesAccountNumber:[],id:0,bankID:0,branchID:localStorage.getItem("Branch_BranchID"),bankName:null,accountNumber:null,accountName:null,isActive:!0,isDefault:!1,fileURL:null},dataBranchBank:[],headerBranchBank:[{align:"center",text:"หà¸à¹à¸²à¸à¸±à¸à¸à¸µ",value:"fileURL",sortable:!1,width:"100px"},{align:"left",text:"à¸à¸±à¸à¸à¸µà¸à¸à¸²à¸à¸²à¸£",value:"bankName",sortable:!1},{align:"center",text:"สà¸à¸²à¸à¸°",value:"isActive",sortable:!1,width:"150px"},{align:"center",text:"à¹à¸à¹à¹à¸",value:"edit",sortable:!1,width:"80px"},{align:"center",text:"ลà¸",value:"delete",sortable:!1,width:"80px"}],files:{bucket:null,part:null,filename:null,filebase64:null,url:null},GoogleDrive:{pickerApiLoaded:!1,developerKey:"AIzaSyCCUDryNUdiqImwUSdga-7lzjnDA79yQe0",clientId:"73555754893-5sjbfn01j3lhjijla4jgtmd361dq4k6h.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive",oauthToken:null,dataset:[],header:[{text:"วัà¸à¸à¸µà¹à¸ªà¸£à¹à¸²à¸",align:"center",value:"created",sortable:!1},{text:"folderName",align:"left",value:"folderName",sortable:!1},{text:"folderID",align:"left",value:"folderID",sortable:!1},{text:"สà¸à¸²à¸à¸°",align:"left",value:"ID",sortable:!1},{text:"ลà¸",align:"center",value:"delete",sortable:!1,width:"90px"}]},stampedList:[],headersStamped:[{text:"ลายà¹à¸à¹à¸à¸à¹",align:"center",value:"signature",sortable:!1,width:"100px"},{text:"à¸à¸£à¸²à¸à¸£à¸°à¸à¸±à¸",align:"center",value:"seal",sortable:!1,width:"100px"},{text:"à¹à¸à¹à¹à¸",align:"center",value:"edit",sortable:!1,width:"100px"}],updateStamped:{branchID:parseInt(localStorage.getItem("Branch_BranchID")),signature:null,inputSignature:null,seal:null,inputSeal:null,isEdit:null},dialog_Stamped:!1,fileSignature:null,previewUrl:null,fileSeal:null}),computed:{},watch:{async fileSignature(){var t=null;if(null!=this.fileSignature){let e=null;const a=t=>new Promise((e,a)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e(s.result),s.onerror=t=>a(t)});e=await a(this.fileSignature),t=e}this.updateStamped.inputSignature=t},async fileSeal(){var t=null;if(null!=this.fileSeal){let e=null;const a=t=>new Promise((e,a)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e(s.result),s.onerror=t=>a(t)});e=await a(this.fileSeal),t=e}this.updateStamped.inputSeal=t}},async created(){document.title=this.$router.history.current.meta.title,this.postcode_mapping=await this.getPostcodeMapping();let t=[547,586,684,684,639,692];t.includes(this.BranchID)&&this.addShop.headerShopSelect.push({align:"center",text:"à¸à¸±à¸à¸ªà¸à¹à¸à¸à¹à¸¡à¸·à¹à¸à¸ªà¸à¸²à¸à¸°à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¹à¸à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸ªà¹à¸",value:"adjustStock",sortable:!1,width:"250px"}),this.GetBranch(),this.GetInvoice(),this.GetWarehouse(),this.GetStamped(),this.page_loading=!1,await this.GetBank(),this.GetBranchBank(),await this.Getgoogle(),this.loadAlertSound()},methods:{async loadAlertSound(){try{let t=await B.A.post($.Lk+"StaffAuthentication/get-alert-sound",{BranchID:parseInt(localStorage.getItem("Branch_BranchID"))},{headers:this.header_token});t.data&&t.data.status&&(this.alertSound={errorUrl:t.data.errorUrl||"",successUrl:t.data.successUrl||"",warningUrl:t.data.warningUrl||""})}catch(t){}},playAlertSound(t){const e=this.alertSound[t];if(e)try{new Audio(e).play()}catch(a){}},triggerSoundUpload(t){const e=this.$refs["soundFile_"+t],a=Array.isArray(e)?e[0]:e;a&&a.click()},async onSoundFileChange(t,e){const a=t.target.files&&t.target.files[0];if(a){this.soundUploading=e;try{const t=new FormData;t.append("file",a),t.append("bucket","sound");let s=await B.A.post($.BS+"Picture/upload-file-with-bucket",t,{headers:{Authorization:this.header_token.Authorization}});s.data&&s.data.file_path?this.$set(this.alertSound,e,s.data.file_path):this.AlertError()}catch(s){this.AlertError()}finally{this.soundUploading=null,t.target.value=""}}},async btnSaveAlertSound(){try{let t=await B.A.post($.Lk+"StaffAuthentication/save-alert-sound",{BranchID:parseInt(localStorage.getItem("Branch_BranchID")),ErrorUrl:this.alertSound.errorUrl,SuccessUrl:this.alertSound.successUrl,WarningUrl:this.alertSound.warningUrl},{headers:this.header_token});t.data&&t.data.status?(localStorage.setItem("alert_error_url",this.alertSound.errorUrl||""),localStorage.setItem("alert_success_url",this.alertSound.successUrl||""),localStorage.setItem("alert_warning_url",this.alertSound.warningUrl||""),this.AlertSuccess()):this.AlertError()}catch(t){this.AlertError()}},async handleFileSignature(t){if(!t)return;const e=await this.convertToJPG(t);this.fileSignature=e,this.previewUrl=URL.createObjectURL(e)},async handleFileSeal(t){if(!t)return;const e=await this.convertToJPG(t);this.fileSeal=e},async convertToJPG(t){return new Promise(e=>{const a=new Image,s=new FileReader;s.onload=t=>{a.src=t.target.result},a.onload=()=>{const t=document.createElement("canvas");t.width=a.width,t.height=a.height;const s=t.getContext("2d");s.fillStyle="#fff",s.fillRect(0,0,t.width,t.height),s.drawImage(a,0,0),t.toBlob(t=>{const a=new File([t],"signature.jpg",{type:"image/jpeg"});e(a)},"image/jpeg",.9)},s.readAsDataURL(t)})},async GetStamped(){let t=await B.A.post($.jk+"Branch/get-signature-and-seal",{branchID:localStorage.getItem("Branch_BranchID")},{headers:this.header_token});this.stampedList.push(t.data)},async btnUpdateStamped(){this.loading=!0;var t=this.updateStamped;let e=await B.A.post($.jk+"Branch/update-signature-and-seal",{branchID:t.branchID,signature:t.signature,signature64:t.inputSignature,seal:t.seal,seal64:t.inputSeal},{headers:this.header_token});200==e.status&&(this.stampedList=[],null==e.data.signature&&null==e.data.seal||this.stampedList.push(e.data),this.closeDialogStamped()),this.loading=!1},openDialogStamped(t,e){this.dialog_Stamped=!0,1==t&&(this.updateStamped.branchID=e.branchID,this.updateStamped.signature=e.signature,this.updateStamped.seal=e.seal),this.updateStamped.isEdit=t},closeDialogStamped(){this.dialog_Stamped=!1,this.updateStamped={branchID:parseInt(localStorage.getItem("Branch_BranchID")),signature:null,inputSignature:null,seal:null,inputSeal:null,isEdit:null}},async GetBranch(){let t=await B.A.post($.jk+"Branch/get-branch-single",{branchId:localStorage.getItem("Branch_BranchID")},{headers:this.header_token});if(200==t.status){var e=t.data.branch;this.branch.id=e.id,this.branch.name=e.name,this.branch.senderName=e.senderName,this.branch.phoneNumber=e.phoneNumber,this.branch.email=e.email,this.branch.address=e.address,this.branch.postcodeMappingId=e.postcodeMappingId;var a=this.SearchPostcodeMapping(this.branch.postcodeMappingId);this.branch.postcodeMapping=a;var s="";null!=a&&(s=a.subDistrict+" "+a.district+" "+a.province+" "+a.postcode),this.branch.fullAddress=this.branch.address+" "+s}},async GetWarehouse(){let t=await B.A.get($.jk+"Branch/get-warehouse-list?BranchID="+this.BranchID,{headers:this.header_token});if(200==t.status&&"success"==t.data.status)for(var e in this.warehouse_data=t.data.warehouseList,this.warehouse_data)null!=this.warehouse_data[e].postcodemappingID&&(this.warehouse_data[e].fullAddress=(null==this.warehouse_data[e].address?"":this.warehouse_data[e].address+" ")+this.warehouse_data[e].subDistrict+" "+this.warehouse_data[e].district+" "+this.warehouse_data[e].province+" "+this.warehouse_data[e].postcode);else this.$swal({type:"warning",text:"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹ à¸à¸£à¸¸à¸à¸²à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸µà¸à¸à¸£à¸±à¹à¸"})},async EditWarehouse(t){if(this.addShop.shopTable=[],this.addShop.DeleteDataShop=[],await this.get
1ShopList(),await this.getShopinWarehouseAccessList(t?.id??0),null!=t){var e=null;if(null!=t.postcodemappingID)for(var a in this.postcode_mapping)if(t.postcodemappingID==this.postcode_mapping[a].id){e=this.postcode_mapping[a];break}t.postcodeMapping=e,t.postcodemappingId=t.postcodemappingID,this.warehouse_edit=t}else this.addShop.shopTable=[],this.warehouse_edit={id:0,name:null,senderName:null,phone:null,branchId:this.BranchID,shopId:null,warehouseCode:null,address:null,postcodeMapping:null,postcodemappingId:null,created:null,createdBy:localStorage.getItem("staff_id"),isPackhaiWarehouse:!0,isDeleted:!1,isAllowAddOrderWhenStockShortage:!1,isAdjustStockWhenChangeOrderStatus:!1};this.rulesname=[],this.rulessenderName=[],this.rulesphone=[],this.rulesaddress=[],this.rulespostcodeMapping=[],this.warehouse_dialog=!0},async addShopinWarehouse(t){this.addShop.warehouseName=t.name,this.addShop.dataSearch=null,this.addShop.showSelect=[],this.addShop.data2=this.addShop.data.filter(t=>!this.addShop.shopTable.map(t=>t.id).includes(t.id)),this.editshop_dialog=!0},async getShopList(t){this.addShop.data=[];let e=await B.A.post($.Lk+"Shop/get-shop-list",{branchId:localStorage.getItem("Branch_BranchID"),dataSearch:t},{headers:this.header_token});if(200==e.status&&e.data.result.length>0)for(var a in e.data.result)this.addShop.data.push(e.data.result[a].shop)},async getShopinWarehouseAccessList(t){this.loading=!0;let e=await B.A.get($.jk+"Branch/get-warehouseAccess?WarehouseID="+t,{headers:this.header_token});if(e.data.status){for(var a of(this.addShop.data=this.addShop.data.map(t=>({...t,selectShop:e.data.warehouseAccessList.map(t=>t.shopId).includes(t.id),IsAllowAddOrderWhenStockShortage:e.data.warehouseAccessList.find(e=>e.shopId===t.id)?.isAllowAddOrderWhenStockShortage??!1,isAdjustStockWhenChangeOrderStatus:e.data.warehouseAccessList.find(e=>e.shopId===t.id)?.isAdjustStockWhenChangeOrderStatus??!1,accessID:e.data.warehouseAccessList.find(e=>e.shopId===t.id)?.id??0})),this.addShop.selectShop=[],this.addShop.data))if(a.selectShop){const t=this.addShop.shopTable.some(t=>t.id===a.id);t||this.addShop.shopTable.unshift(a)}this.loading=!1}},async SearchShop(){var t={name:this.addShop.dataSearch,condition:0};
1await this.getShopList(t)},async handleAddShopinWarehouseAccess(t){let e=this.addShop.shopTable.map(e=>({ShopID:e.id,isAllowAddOrderWhenStockShortage:e.IsAllowAddOrderWhenStockShortage,isAdjustStockWhenChangeOrderStatus:e.isAdjustStockWhenChangeOrderStatus,WarehouseID:t,id:e.accessID})),a=await B.A.post($.jk+"Branch/update-warehouseAccess",{shopInWarehouseAccess:e,shopDelete:this.addShop.DeleteDataShop},{headers:this.header_token});a.data.status||this.$swal({type:"warning",text:"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹ à¸à¸£à¸¸à¸à¸²à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸µà¸à¸à¸£à¸±à¹à¸"})},async handleAddShopInWarehouseClick(){this.addShop.shopTable.push(...this.addShop.showSelect),this.editshop_dialog=!1},async handleDeleteShopInWarehouseClick(t){this.addShop.DeleteDataShop.push(t.accessID);const e=this.addShop.shopTable.indexOf(t);e>-1&&this.addShop.shopTable.splice(e,1)},HandleUpdateLabels(t){var e="à¸à¸´à¸";return t&&(e="à¹à¸à¸´à¸"),e},async DeleteWarehouse(t){D().fire({icon:"question",text:"à¸à¸¥à¸±à¸: "+t.name+" à¸à¹à¸à¸à¸à¸²à¸£à¸¥à¸à¹à¸à¹à¸«à¸£à¸·à¸à¹à¸¡à¹",confirmButtonText:"ยืà¸à¸¢à¸±à¸",cancelButtonText:"ยà¸à¹à¸¥à¸´à¸",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",allowOutsideClick:!1}).then(async e=>{if(e.value){this.loading=!0;let e=await B.A.get($.jk+"Branch/delete-warehouse?WarehouseID="+t.id,{headers:this.header_token});200==e.status?(this.loading=!1,this.GetWarehouse(),D().fire({toast:!0,timer:1500,showConfirmButton:!1,position:"top",type:"success",title:"Success"})):(this.loading=!1,this.$swal({type:"error",text:"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹"}))}})},async rulesAddWarehouseCheck(){this.rulesname=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"]},async UpdateWarehouse(){if(await this.rulesAddWarehouseCheck(),this.$refs.addWarehouseForm.validate()){this.loading=!0,null!=this.warehouse_edit.postcodeMapping&&(this.warehouse_edit.postcodemappingId=this.warehouse_edit.postcodeMapping.id),""==this.warehouse_edit.warehouseCode&&(this.warehouse_edit.warehouseCode=null),""==this.warehouse_edit.phone&&(this.warehouse_edit.phone=null);let t=await B.A.post($.jk+"Branch/update-warehouse",this.warehouse_edit,{headers:this.header_token});200==t.status?(this.loading=!1,this.warehouse_dialog=!1,await this.handleAddShopinWarehouseAccess(t.data.id),D().fire({toast:!0,timer:1500,showConfirmButton:!1,position:"top",icon:"success",title:"à¸à¸±à¸à¸à¸µà¸à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢"}),this.GetWarehouse()):(this.loading=!1,this.$swal({icon:"error",text:"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹"}))}},async UpdateBranch(){if(this.$refs.formBranch.validate()){this.loading=!0,this.branch.postcodeMappingId=this.branch.postcodeMapping.id;let a=await B.A.post($.jk+"Branch/update-branch",{id:this.branch.id,name:this.branch.name,senderName:this.branch.senderName,phoneNumber:this.branch.phoneNumber,email:this.branch.email,address:this.branch.address,postcodeMappingId:this.branch.postcodeMappingId},{headers:this.header_token});if(200==a.status){this.loading=!1;var t="",e=this.branch.postcodeMapping;null!=e&&(t=e.SubDistrict+" "+e.District+" "+e.Province+" "+e.Postcode),this.branch.fullAddress=this.branch.address+" "+t,this.branch.isUpdate=!1,this.AlertSuccess()}else this.loading=!1,this.AlertError()}},async GetInvoice(){let t=await B.A.post($.jk+"Branch/get-branch-addressinvoice-list",{branchId:localStorage.getItem("Branch_BranchID")},{headers:this.header_token});if(200==t.status)for(var e in this.dataInvoice=t.data,this.dataInvoice)this.dataInvoice[e].postcodeMapping=null,null!=this.dataInvoice[e].postcodeMappingId&&(this.dataInvoice[e].postcodeMapping=this.SearchPostcodeMapping(this.dataInvoice[e].postcodeMappingId))},async OPPInvoice(t,e){if(await this.rulesInvoice(),this.clearFile(),t){if(this.invoice.id=e.id,this.invoice.name=e.name,this.invoice.idcardNumber=e.idcardNumber,this.invoice.phone=e.phone,this.invoice.address=e.address,this.invoice.postcodeMappingId=e.postcodeMappingId,this.invoice.postcodeMapping=e.postcodeMapping,this.invoice.logo=e.logo,this.invoice.isDefault=e.isDefault,this.invoice.isReadonly=!!e.isDefault,null!=e.logo&&""!=e.logo){var a=e.logo.split("/");this.files.filename=a[parseInt(a.length)-1]}}else{this.invoice.id=0,this.invoice.name=null,this.invoice.idcardNumber=null,this.invoice.phone=null,this.invoice.address=null,this.invoice.postcodeMappingId=0,this.invoice.postcodeMapping=null,this.invoice.logo=null,this.invoice.isDefault=!1,this.invoice.isReadonly=!1;var s=!1;for(var i in this.dataInvoice)if(this.dataInvoice[i].isDefault){s=!0;break}this.invoice.isDefault=!s}this.invoice.isUpdate=t,this.invoice.dialog=!0},async UpdateInvoice(){if(await this.rulesInvoiceCheck(),this.$refs.formInvoice.validate()){this.loading=!0,this.invoice.postcodeMappingId=this.invoice.postcodeMapping.id;var t={bucket:this.files.bucket,part:this.files.part,filename:null,filebase64:this.files.filebase64,url:null};let e=await B.A.post($.jk+"Branch/update-branch-addressinvoice",{branchId:this.invoice.branchId,id:this.invoice.id,name:this.invoice.name,phone:this.invoice.phone,idcardNumber:this.invoice.idcardNumber,address:this.invoice.address,postcodeMappingId:this.invoice.postcodeMappingId,isDefault:this.invoice.isDefault,logo:this.invoice.logo,files:t},{headers:this.header_token});200==e.status?(this.GetInvoice(),this.loading=!1,this.invoice.dialog=!1,this.AlertSuccess()):(this.loading=!1,this.AlertError())}},async DeleteInvoice(t){D().fire({position:"top",icon:"warning",text:t.name+" ลภà¹à¸à¹ หรืภà¹à¸¡à¹",confirmButtonText:"ยืà¸à¸¢à¸±à¸",cancelButtonText:"ยà¸à¹à¸¥à¸´à¸",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",allowOutsideClick:!1}).then(async e=>{if(e.value){this.loading=!0;let e=await B.A.post($.jk+"Branch/delete-branch-addressinvoice",{branchAddressInvoiceId:t.id},{headers:this.header_token});this.loading=!1,200==e.status?(this.dataInvoice.splice(this.dataInvoice.indexOf(t),1),this.AlertSuccess()):this.AlertError()}})},async InvoiceCloseDialog(){this.invoice.dialog=!1},rulesInvoiceCheck(){this.invoice.rulesName=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.invoice.rulesPhone=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.invoice.rulesIdCardNumber=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.invoice.rulesAddress=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.invoice.rulesPostcodeMapping=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"]},rulesInvoice(){this.invoice.rulesName=[],this.invoice.rulesPhone=[],this.invoice.rulesIdCardNumber=[],this.invoice.rulesAddress=[],this.invoice.rulesPostcodeMapping=[]},async GetBank(){let t=await B.A.post($.jk+"Branch/get-all-bank-list",{},{headers:this.header_token});200==t.status&&(this.branchBank.bankList=t.data,this.branchBank.bankList.splice(0,0,{id:0,nameThai:"--à¹à¸¥à¸·à¸à¸à¸à¸à¸²à¸à¸²à¸£
1--"}),this.branchBank.bank={id:0,nameThai:"--à¹à¸¥à¸·à¸à¸à¸à¸à¸²à¸à¸²à¸£--"})},async GetBranchBank(){let t=await B.A.post($.jk+"Branch/get-branchbankaccount-list",{branchId:localStorage.getItem("Branch_BranchID")},{headers:this.header_token});if(200==t.status)for(var e in this.dataBranchBank=t.data,this.dataBranchBank)for(var a in this.dataBranchBank[e].logo=null,this.branchBank.bankList)if(this.branchBank.bankList[a].id==this.dataBranchBank[e].bankID){this.dataBranchBank[e].logo=this.branchBank.bankList[a].logo;break}},async OPPBranchBank(t,e){if(await this.rulesBranchBank(),this.clearFile(),t){for(var a in this.branchBank.id=e.id,this.branchBank.bankID=e.bankID,this.branchBank.bankName=e.bankName,this.branchBank.accountNumber=e.accountNumber,this.branchBank.accountName=e.accountName,this.branchBank.isActive=e.isActive,this.branchBank.isDefault=e.isDefault,this.branchBank.isReadonly=!!e.isDefault,this.branchBank.fileURL=e.fileURL,this.branchBank.bankList)if(this.branchBank.bankList[a].id==this.branchBank.bankID){this.branchBank.bank=this.branchBank.bankList[a];break}
1if(null!=e.fileURL&&""!=e.fileURL){var s=e.fileURL.split("/");this.files.filename=s[parseInt(s.length)-1]}}else{this.branchBank.id=0,this.branchBank.bankID=0,this.branchBank.bankName=null,this.branchBank.accountNumber=null,this.branchBank.accountName=null,this.branchBank.isActive=!0,this.branchBank.isDefault=!1,this.branchBank.isReadonly=!1,this.branchBank.bank=this.branchBank.bankList[0],this.branchBank.fileURL=null;var i=!1;for(var n in this.dataBranchBank)if(this.dataBranchBank[n].isDefault){i=!0;break}this.branchBank.isDefault=!i}this.branchBank.isUpdate=t,this.dialogBank=!0},async UpdateBranchBank(){if(await this.rulesBranchBankCheck(),this.$refs.formBranchBank.validate()){this.loading=!0,this.branchBank.bankID=this.branchBank.bank.id,this.branchBank.bankName=this.branchBank.bank.nameThai,this.branchBank.isDefault&&(this.branchBank.isActive=this.branchBank.isDefault);var t={bucket:this.files.bucket,part:this.files.part,filename:null,filebase64:this.files.filebase64,url:null};let e=await B.A.post($.jk+"Branch/update-branchbankaccount",{branchBankAccount:this.branchBank,files:t},{headers:this.header_token});200==e.status?(this.GetBranchBank(),this.loading=!1,this.dialogBank=!1,this.AlertSuccess()):(this.loading=!1,this.AlertError())}},async DeleteBranchBank(t){D().fire({position:"top",icon:"warning",text:t.bankName+" "+t.accountNumber+" ลภà¹à¸à¹ หรืภà¹à¸¡à¹",confirmButtonText:"ยืà¸à¸¢à¸±à¸",cancelButtonText:"ยà¸à¹à¸¥à¸´à¸",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",allowOutsideClick:!1}).then(async e=>{if(e.value){this.loading=!0;let e=await B.A.post($.jk+"Branch/delete-branchbankaccount",{branchBankAccountId:t.id},{headers:this.header_token});this.loading=!1,200==e.status?(this.dataBranchBank.splice(this.dataBranchBank.indexOf(t),1),this.AlertSuccess()):this.AlertError()}})},rulesBranchBankCheck(){this.branchBank.rulesBankName=[t=>0!=t.id||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.branchBank.rulesAccountName=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"],this.branchBank.rulesAccountNumber=[t=>!!t||"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸"]},rulesBranchBank(){this.branchBank.rulesBankName=[],this.branchBank.rulesAccountName=[],this.branchBank.rulesAccountNumber=[]},clearFile(){this.files.bucket=null,this.files.part=null,this.files.filename=null,this.files.filebase64=null,this.files.url=null},async previewpicture(t){var e=this.invoice.dialog?"Branch/AddressInvoice":this.dialogBank?"Branch/BankAccount":null,a=t.target.files[0];void 0!=a&&null!=e&&(this.files.bucket="packhaistorage",this.files.part=e,this.files.filename=a.name,this.files.filebase64=await this.SetFileBase64(a))},SearchPostcodeMapping(t){for(var e in this.postcode_mapping)if(parseInt(this.postcode_mapping[e].id)==parseInt(t))return this.postcode_mapping[e];return null},OpenPhoto(t){this.ShowPhotoLink=t,this.ShowPhoto=!0},Opentap(t){window.open(t)},CheckDropdown(t){var e=[{title:"à¹à¸à¹à¹à¸"}];return t||e.push({title:"ลà¸"}),e},LoginGoogle(){var t="https://accounts.google.com/o/oauth2/v2/auth",e=document.createElement("form");e.setAttribute("method","GET"),e.setAttribute("action",t);var a={client_id:"73555754893-5sjbfn01j3lhjijla4jgtmd361dq4k6h.apps.googleusercontent.com",redirect_uri:"https://warehouse.packhai.com/connectGoogleDrive",response_type:"token code",scope:"https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata openid email profile",include_granted_scopes:"true",access_type:"offline",state:"state_parameter_passthrough_value&",prompt:"consent",enable_granular_consent:"true","include_granted_scopes:":"Enables "};for(var s in a){var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",s),i.setAttribute("value",a[s]),e.appendChild(i)}document.body.appendChild(e),e.submit()},async Getgoogle(){return await B.A.post($.BS+"GoogleDrive/get-branch-google-drive",{branchID:localStorage.getItem("Branch_BranchID")},{headers:this.header_token}).then(async t=>(this.GoogleDrive.dataset=await t.data.item,t.data.item)).catch(t=>(this.loading=!1,this.AlertError(),!1))},async DeleteGoogleDrive(t){D().fire({icon:"question",text:"ลà¸à¸à¸²à¸£à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸",confirmButtonText:"à¹à¸à¹",cancelButtonText:"à¹à¸¡à¹à¹à¸à¹",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",allowOutsideClick:!1}).then(async e=>{e.value&&await B.A.post($.BS+"GoogleDrive/delete-branch-google-drive",{branchID:localStorage.getItem("Branch_BranchID"),id:t.id},{headers:this.header_token}).then(async t=>{"success"==t.data.status&&(this.AlertSuccess(),location.reload())}).catch(t=>(this.loading=!1,this.AlertError(),!1))})},Trim_value:O.$c,Trim_rules:O.tY,DateNowNotNull:O.Jm,formatMoney:O.up,isNumberWN
1oDot:O.L9,isNumberWithDot:O.Bd,isNumberWitMark:O.V2,Trim_valueInt:O.qY,SetFileBase64:O.G5,AlertSuccess:L.k$,AlertError:L.PL,formatDatetime:O.Rt,getPostcodeMapping:O.sK}},z=T;var M=a(81656),U=(0,M.A)(z,C,I,!1,null,null,null);const P=U.exports},97678(t,e,a){a(74423),a(18111),a(22489),a(20116),a(61701),a(13579),a(29);var s=a(24312),i=a(79549),n=a(18041),r=a(4152);const o={...s.v,offsetY:!0,offsetOverflow:!0,transition:!1},l=s.A.extend({name:"v-autocomplete",props:{autoSelectFirst:{type:Boolean,default:!1},filter:{type:Function,default:(t,e,a)=>a.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1},hideNoData:Boolean,menuProps:{type:s.A.options.props.menuProps.type,default:()=>o},noFilter:Boolean,searchInput:{type:String}},data(){return{lazySearch:this.searchInput}},computed:{classes(){return{...s.A.options.computed.classes.call(this),"v-autocomplete":!0,"v-autocomplete--is-selecting-index":this.selectedIndex>-1}},computedItems(){return this.filteredItems},selectedValues(){return this.selectedItems.map(t=>this.getValue(t))},hasDisplayedItems(){return this.hideSelected?this.filteredItems.some(t=>!this.hasItem(t)):this.filteredItems.length>0},currentRange(){return null==this.selectedItem?0:String(this.getText(this.selectedItem)).length},filteredItems(){return!this.isSearching||this.noFilter||null==this.internalSearch?this.allItems:this.allItems.filter(t=>{const e=(0,r.TD)(t,this.itemText),a=null!=e?String(e):"";return this.filter(t,String(this.internalSearch),a)})},internalSearch:{get(){return this.lazySearch},set(t){this.lazySearch!==t&&(this.lazySearch=t,this.$emit("update:search-input",t))}},isAnyValueAllowed(){return!1},isDirty(){return this.searchIsDirty||this.selectedItems.length>0},isSearching(){return this.multiple&&this.searchIsDirty||this.searchIsDirty&&this.internalSearch!==this.getText(this.selectedItem)},menuCanShow(){return!!this.isFocused&&(this.hasDisplayedItems||!this.hideNoData)},$_menuProps(){const t=s.A.options.computed.$_menuProps.call(this);return t.contentClass=`v-autocomplete__content ${t.contentClass||""}`.trim(),{...o,...t}},searchIsDirty(){return null!=this.internalSearch&&""!==this.internalSearch},selectedItem(){return this.multiple?null:this.selectedItems.find(t=>this.valueComparator(this.getValue(t),this.getValue(this.internalValue)))},listData(){const t=s.A.options.computed.listData.call(this);return t.props={...t.props,items:this.virtualizedItems,noFilter:this.noFilter||!this.isSearching||!this.filteredItems.length,searchInput:this.internalSearch},t}},watch:{filteredItems:"onFilteredItemsChanged",internalValue:"setSearch",isFocused(t){t?(document.addEventListener("copy",this.onCopy),this.$refs.input&&this.$refs.input.select()):(document.removeEventListener("copy",this.onCopy),this.blur(),this.updateSelf())},isMenuActive(t){!t&&this.hasSlot&&(this.lazySearch=null)},items(t,e){e&&e.length||!this.hideNoData||!this.isFocused||this.isMenuActive||!t.length||this.activateMenu()},searchInput(t){this.lazySearch=t},internalSearch:"onInternalSearchChanged",itemText:"updateSelf"},created(){this.setSearch()},destroyed(){document.removeEventListener("copy",this.onCopy)},methods:{onFilteredItemsChanged(t,e){if(t!==e){if(!this.autoSelectFirst){const a=e[this.$refs.menu.listIndex];a?this.setMenuIndex(t.findIndex(t=>t===a)):this.setMenuIndex(-1),this.$emit("update:list-index",this.$refs.menu.listIndex)}this.$nextTick(()=>{this.internalSearch&&(1===t.length||this.autoSelectFirst)&&(this.$refs.menu.getTiles(),this.autoSelectFirst&&t.length&&(this.setMenuIndex(0),this.$emit("update:list-index",this.$refs.menu.listIndex)))})}},onInternalSearchChanged(){this.updateMenuDimensions()},updateMenuDimensions(){this.isMenuActive&&this.$refs.menu&&this.$refs.menu.updateDimensions()},changeSelectedIndex(t){this.searchIsDirty||(this.multiple&&t===r.uP.left?-1===this.selectedIndex?this.selectedIndex=this.selectedItems.length-1:this.selectedIndex--:this.multiple&&t===r.uP.right?this.selectedIndex>=this.selectedItems.length-1?this.selectedIndex=-1:this.selectedIndex++:t!==r.uP.backspace&&t!==r.uP.delete||this.deleteCurrentItem())},deleteCurrentItem(){const t=this.selectedIndex,e=this.selectedItems[t];if(!this.isInteractive||this.getDisabled(e))return;const a=this.selectedItems.length-1;if(-1===this.selectedIndex&&0!==a)return void(this.selectedIndex=a);const s=this.selectedItems.length,i=t!==s-1?t:t-1,n=this.selectedItems[i];n?this.selectItem(e):this.setValue(this.multiple?[]:null),this.selectedIndex=i},clearableCallback(){this.internalSearch=null,s.A.options.methods.clearableCallback.call(this)},genInput(){const t=i.A.options.methods.genInput.call(this);return t.data=(0,n.Ay)(t.data,{attrs:{"aria-activedescendant":(0,r.no)(this.$refs.menu,"activeTile.id"),autocomplete:(0,r.no)(t.data,"attrs.autocomplete","off")},domProps:{value:this.internalSearch}}),t},genInputSlot(){const t=s.A.options.methods.genInputSlot.call(this);return t.data.attrs.role="combobox",t},genSelections(){return this.hasSlot||this.multiple?s.A.options.methods.genSelections.call(this):[]},onClick(t){this.isInteractive&&(this.selectedIndex>-1?this.selectedIndex=-1:this.onFocus(),this.isAppendInner(t.target)||this.activateMenu())},onInput(t){if(this.selectedIndex>-1||!t.target)return;const e=t.target,a=e.value;e.value&&this.activateMenu(),this.multiple||""!==a||this.deleteCurrentItem(),this.internalSearch=a,this.badInput=e.validity&&e.validity.badInput},onKeyDown(t){const e=t.keyCode;!t.ctrlKey&&[r.uP.home,r.uP.end].includes(e)||s.A.options.methods.onKeyDown.call(this,t),this.changeSelectedIndex(e)},onSpaceDown(t){},onTabDown(t){s.A.options.methods.onTabDown.call(this,t),this.updateSelf()},onUpDown(t){t.preventDefault(),this.activateMenu()},selectItem(t){s.A.options.methods.selectItem.call(this,t),this.setSearch()},setSelectedItems(){s.A.options.methods.setSelectedItems.call(this),this.isFocused||this.setSearch()},setSearch(){this.$nextTick(()=>{this.multiple&&this.internalSearch&&this.isMenuActive||(this.internalSearch=!this.selectedItems.length||this.multiple||this.hasSlot?null:this.getText(this.selectedItem))})},updateSelf(){(this.searchIsDirty||this.internalValue)&&(this.multiple||this.valueComparator(this.internalSearch,this.getValue(this.internalValue))||this.setSearch())},hasItem(t){return this.selectedValues.indexOf(this.getValue(t))>-1},onCopy(t){var e,a;if(-1===this.selectedIndex)return;const s=this.selectedItems[this.selectedIndex],i=this.getText(s);null===(e=t.clipboardData)||void 0===e||e.setData("text/plain",i),null===(a=t.clipboardData)||void 0===a||a.setData("text/vnd.vuetify.autocomplete.item+plain",i),t.preventDefault()}}});a.d(e,["A",0,l])},94112(t,e,a){a.d(e,{A:()=>l});var s=a(58743),i=a(34901),n=a(29272),r=a(4152),o=a(95803);const l=(0,o.A)(s.A,i.A,n.A).extend({name:"v-avatar",props:{left:Boolean,right:Boolean,size:{type:[Number,String],default:48}},computed:{classes(){return{"v-avatar--left":this.left,"v-avatar--right":this.right,...this.roundedClasse
1s}},styles(){return{height:(0,r.Dg)(this.size),minWidth:(0,r.Dg)(this.size),width:(0,r.Dg)(this.size),...this.measurableStyles}}},render(t){const e={staticClass:"v-avatar",class:this.classes,style:this.styles,on:this.$listeners};return t("div",this.setBackgroundColor(this.color,e),(0,r.$c)(this))}})},36092(t,e,a){a.d(e,{A:()=>r});a(15601);var s=a(90569),i=a(26993),n=a(8944);const r=n.A.extend({name:"v-checkbox",props:{indeterminate:Boolean,indeterminateIcon:{type:String,default:"$checkboxIndeterminate"},offIcon:{type:String,default:"$checkboxOff"},onIcon:{type:String,default:"$checkboxOn"}},data(){return{inputIndeterminate:this.indeterminate}},computed:{classes(){return{...i.A.options.computed.classes.call(this),"v-input--selection-controls":!0,"v-input--checkbox":!0,"v-input--indeterminate":this.inputIndeterminate}},computedIcon(){return this.inputIndeterminate?this.indeterminateIcon:this.isActive?this.onIcon:this.offIcon},validationState(){if(!this.isDisabled||this.inputIndeterminate)return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":null!==this.hasColor?this.computedColor:void 0}},watch:{indeterminate(t){this.$nextTick(()=>this.inputIndeterminate=t)},inputIndeterminate(t){this.$emit("update:indeterminate",t)},isActive(){this.indeterminate&&(this.inputIndeterminate=!1)}},methods:{genCheckbox(){const{title:t,...e}=this.attrs$;return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.$createElement(s.A,this.setTextColor(this.validationState,{props:{dense:this.dense,dark:this.dark,light:this.light}}),this.computedIcon),this.genInput("checkbox",{...e,"aria-checked":this.inputIndeterminate?"mixed":this.isActive.toString()}),this.genRipple(this.setTextColor(this.rippleState))])},genDefaultSlot(){return[this.genCheckbox(),this.genLabel()]}}})},71027(t,e,a){a.d(e,{A:()=>c});a(74423),a(44114),a(18111),a(81148),a(7588),a(61701),a(18237);var s=a(79549);const i=s.A;var n=a(13180),r=a(4152),o=a(86988),l=a(18041);const c=i.extend({name:"v-file-input",model:{prop:"value",event:"change"},props:{chips:Boolean,clearable:{type:Boolean,default:!0},counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,placeholder:String,prependIcon:{type:String,default:"$file"},readonly:{type:Boolean,default:!1},showSize:{type:[Boolean,Number],default:!1,validator:t=>"boolean"===typeof t||[1e3,1024].includes(t)},smallChips:Boolean,truncateLength:{type:[Number,String],default:22},type:{type:String,default:"file"},value:{default:void 0,validator:t=>(0,r.BN)(t).every(t=>null!=t&&"object"===typeof t)}},computed:{classes(){return{...i.options.computed.classes.call(this),"v-file-input":!0}},computedCounterValue(){const t=this.multiple&&this.lazyValue?this.lazyValue.length:this.lazyValue instanceof File?1:0;if(!this.showSize)return this.$vuetify.lang.t(this.counterString,t);const e=this.internalArrayValue.reduce((t,{size:e=0})=>t+e,0);return this.$vuetify.lang.t(this.counterSizeString,t,(0,r.hA)(e,1024===this.base))},internalArrayValue(){return(0,r.BN)(this.internalValue)},internalValue:{get(){return this.lazyValue},set(t){this.lazyValue=t,this.$emit("change",this.lazyValue)}},isDirty(){return this.internalArrayValue.length>0},isLabelActive(){return this.isDirty},text(){return this.isDirty||!this.persistentPlaceholder&&!this.isFocused&&this.hasLabel?this.internalArrayValue.map(t=>{const{name:e="",size:a=0}=t,s=this.truncateText(e);return this.showSize?`${s} (${(0,r.hA)(a,1024===this.base)})`:s}):[this.placeholder]},base(){return"boolean"!==typeof this.showSize?this.showSize:void 0},hasChips(){return this.chips||this.smallChips}},watch:{readonly:{handler(t){!0===t&&(0,o.yA)("readonly is not supported on <v-file-input>",this)},immediate:!0},value(t){const e=this.multiple?t:t?[t]:[];(0,r.bD)(e,this.$refs.input.files)||(this.$refs.input.value="")}},methods:{clearableCallback(){this.internalValue=this.multiple?[]:null,this.$refs.input.value=""},genChips(){return this.isDirty?this.text.map((t,e)=>this.$createElement(n.A,{props:{small:this.smallChips},on:{"click:close":()=>{const t=this.internalValue;t.splice(e,1),this.internalValue=t}}},[t])):[]},genControl(){const t=i.options.methods.genControl.call(this);return this.hideInput&&(t.data.style=(0,l.Zq)(t.data.style,{display:"none"})),t},genInput(){const t=i.options.methods.genInput.call(this);return t.data.attrs.multiple=this.multiple,delete t.data.domProps.value,delete t.data.on.input,t.data.on.change=this.onInput,[this.genSelections(),t]},genPrependSlot(){if(!this.prependIcon)return null;const t=this.genIcon("prepend",()=>{this.$refs.input.click()});return this.genSlot("prepend","outer",[t])},genSelectionText(){const t=this.text.length;return t<2?this.text:this.showSize&&!this.counter?[this.computedCounterValue]:[this.$vuetify.lang.t(this.counterString,t)]},genSelections(){const t=[];return this.isDirty&&this.$scopedSlots.selection?this.internalArrayValue.forEach((e,a)=>{this.$scopedSlots.selection&&t.push(this.$scopedSlots.selection({text:this.text[a],file:e,index:a}))}):t.push(this.hasChips&&this.isDirty?this.genChips():this.genSelectionText()),this.$createElement("div",{staticClass:"v-file-input__text",class:{"v-file-input__text--placeholder":this.placeholder&&!this.isDirty,"v-file-input__text--chips":this.hasChips&&!this.$scopedSlots.selection}},t)},genTextFieldSlot(){const t=i.options.methods.genTextFieldSlot.call(this);return t.data.on={...t.data.on||{},click:t=>{t.target&&"LABEL"===t.target.nodeName||this.$refs.input.click()}},t},onInput(t){const e=[...t.target.files||[]];this.internalValue=this.multiple?e:e[0],this.initialValue=this.internalValue},onKeyDown(t){this.$emit("keydown",t)},truncateText(t){if(t.length<Number(this.truncateLength))return t;const e=Math.floor((Number(this.truncateLength)-1)/2);return`${t.slice(0,e)}â¦${t.slice(t.length-e)}`}}})},70174(t,e,a){a(74423),a(44114),a(18111),a(22489),a(20116),a(7588);var s=a(95803),i=a(17717),n=a(87540),r=a(4152);const o=(0,s.A)(i.A,(0,n.G)("form")).extend({name:"v-form",provide(){return{form:this}},inheritAttrs:!1,props:{disabled:Boolean,lazyValidation:Boolean,readonly:Boolean,value:Boolean},data:()=>({inputs:[],watchers:[],errorBag:{}}),watch:{errorBag:{handler(t){const e=Object.values(t).includes(!0);this.$emit("input",!e)},deep:!0,immediate:!0}},methods:{watchInput(t){const e=t=>t.$watch("hasError",e=>{this.$set(this.errorBag,t._uid,e)},{immediate:!0}),a={_uid:t._uid,valid:()=>{},shouldValidate:()=>{}};return this.lazyValidation?a.shouldValidate=t.$watch("shouldValidate",s=>{s&&(this.errorBag.hasOwnProperty(t._uid)||(a.valid=e(t)))}):a.valid=e(t),a}
1,validate(){return 0===this.inputs.filter(t=>!t.validate(!0)).length},reset(){this.inputs.forEach(t=>t.reset()),this.resetErrorBag()},resetErrorBag(){this.lazyValidation&&setTimeout(()=>{this.errorBag={}},0)},resetValidation(){this.inputs.forEach(t=>t.resetValidation()),this.resetErrorBag()},register(t){this.inputs.push(t),this.watchers.push(this.watchInput(t))},unregister(t){const e=this.inputs.find(e=>e._uid===t._uid);if(!e)return;const a=this.watchers.find(t=>t._uid===e._uid);a&&(a.valid(),a.shouldValidate()),this.watchers=this.watchers.filter(t=>t._uid!==e._uid),this.inputs=this.inputs.filter(t=>t._uid!==e._uid),this.$delete(this.errorBag,e._uid)}},render(t){return t("form",{staticClass:"v-form",attrs:{novalidate:!0,...this.attrs$},on:{submit:t=>this.$emit("submit",t)}},(0,r.$c)(this))}});a.d(e,["A",0,o])},54414(t,e,a){a(74423),a(44114),a(18111),a(7588),a(13579),a(45367),a(92731),a(40125);var s=a(85471),i=a(18041),n=a(4152);const r=["sm","md","lg","xl"],o=(()=>r.reduce((t,e)=>(t[e]={type:[Boolean,String,Number],default:!1},t),{}))(),l=(()=>r.reduce((t,e)=>(t["offset"+(0,n.Zb)(e)]={type:[String,Number],default:null},t),{}))(),c=(()=>r.reduce((t,e)=>(t["order"+(0,n.Zb)(e)]={type:[String,Number],default:null},t),{}))(),h={col:Object.keys(o),offset:Object.keys(l),order:Object.keys(c)};function d(t,e,a){let s=t;if(null!=a&&!1!==a){if(e){const a=e.replace(t,"");s+=`-${a}`}return"col"!==t||""!==a&&!0!==a?(s+=`-${a}`,s.toLowerCase()):s.toLowerCase()}}const u=new Map,p=s.Ay.extend({name:"v-col",functional:!0,props:{cols:{type:[Boolean,String,Number],default:!1},...o,offset:{type:[String,Number],default:null},...l,order:{type:[String,Number],default:null},...c,alignSelf:{type:String,default:null,validator:t=>["auto","start","end","center","baseline","stretch"].includes(t)},tag:{type:String,default:"div"}},render(t,{props:e,data:a,children:s,parent:n}){let r="";for(const i in e)r+=String(e[i]);let o=u.get(r);if(!o){let t;for(t in o=[],h)h[t].forEach(a=>{const s=e[a],i=d(t,a,s);i&&o.push(i)});const a=o.some(t=>t.startsWith("col-"));o.push({col:!a||!e.cols,[`col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),u.set(r,o)}return t(e.tag,(0,i.Ay)(a,{class:o}),s)}});a.d(e,["A",0,p])},2756(t,e,a){a(74423),a(44114),a(18111),a(7588),a(45367),a(92731),a(40125);var s=a(85471),i=a(18041),n=a(4152);const r=["sm","md","lg","xl"],o=["start","end","center"];function l(t,e){return r.reduce((a,s)=>(a[t+(0,n.Zb)(s)]=e(),a),{})}const c=t=>[...o,"baseline","stretch"].includes(t),h=l("align",()=>({type:String,default:null,validator:c}
1)),d=t=>[...o,"space-between","space-around"].includes(t),u=l("justify",()=>({type:String,default:null,validator:d})),p=t=>[...o,"space-between","space-around","stretch"].includes(t),m=l("alignContent",()=>({type:String,default:null,validator:p})),f={align:Object.keys(h),justify:Object.keys(u),alignContent:Object.keys(m)},g={align:"align",justify:"justify",alignContent:"align-content"};function v(t,e,a){let s=g[t];if(null!=a){if(e){const a=e.replace(t,"");s+=`-${a}`}return s+=`-${a}`,s.toLowerCase()}}const b=new Map,k=s.Ay.extend({name:"v-row",functional:!0,props:{tag:{type:String,default:"div"},dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:c},...h,justify:{type:String,default:null,validator:d},...u,alignContent:{type:String,default:null,validator:p},...m},render(t,{props:e,data:a,children:s}){let n="";for(const i in e)n+=String(e[i]);let r=b.get(n);if(!r){let t;for(t in r=[],f)f[t].forEach(a=>{const s=e[a],i=v(t,a,s);i&&r.push(i)});r.push({"no-gutters":e.noGutters,"row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),b.set(n,r)}return t(e.tag,(0,i.Ay)(a,{staticClass:"row",class:r}),s)}});a.d(e,["A",0,k])},41034(t,e,a){a(158);var s=a(4152);const i=(0,s.Gn)("spacer","div","v-spacer");a.d(e,["A",0,i])},63e3(t,e,a){a.d(e,{A:()=>c});a(15601);var s=a(8944),i=a(26993),n=a(22699),r=a(45961),o=a(51554),l=a(4152);const c=s.A.extend({name:"v-switch",directives:{Touch:n.A},props:{inset:Boolean,loading:{type:[Boolean,String],default:!1},flat:{type:Boolean,default:!1}},computed:{classes(){return{...i.A.options.computed.classes.call(this),"v-input--selection-controls v-input--switch":!0,"v-input--switch--flat":this.flat,"v-input--switch--inset":this.inset}},attrs(){return{"aria-checked":String(this.isActive),"aria-disabled":String(this.isDisabled),role:"switch"}},validationState(){return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":null!==this.hasColor?this.computedColor:void 0},switchData(){return this.setTextColor(this.loading?void 0:this.validationState,{class:this.themeClasses})}},methods:{genDefaultSlot(){return[this.genSwitch(),this.genLabel()]},genSwitch(){const{title:t,...e}=this.attrs$;return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",{...this.attrs,...e}),this.genRipple(this.setTextColor(this.validationState,{directives:[{name:"touch",value:{left:this.onSwipeLeft,right:this.onSwipeRight}}]})),this.$createElement("div",{staticClass:"v-input--switch__track",...this.switchData}),this.$createElement("div",{staticClass:"v-input--switch__thumb",...this.switchData},[this.genProgress()])])},genProgress(){return this.$createElement(r.Z,{},[!1===this.loading?null:(0,l.$c)(this,"progress")||this.$createElement(o.A,{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,size:16,width:2,indeterminate:!0}})])},onSwipeLeft(){this.isActive&&this.onChange()},onSwipeRight(){this.isActive||this.onChange()},onKeydown(t){(t.keyCode===l.uP.left&&this.isActive||t.keyCode===l.uP.right&&!this.isActive)&&this.onChange()}}})},22699(t,e,a){a(18111),a(7588);var s=a(4152);const i=t=>{const{touchstartX:e,touchendX:a,touchstartY:s,touchendY:i}=t,n=.5,r=16;t.offsetX=a-e,t.offsetY=i-s,Math.abs(t.offsetY)<n*Math.abs(t.offsetX)&&(t.left&&a<e-r&&t.left(t),t.right&&a>e+r&&t.right(t)),Math.abs(t.offsetX)<n*Math.abs(t.offsetY)&&(t.up&&i<s-r&&t.up(t),t.down&&i>s+r&&t.down(t))};function n(t,e){const a=t.changedTouches[0];e.touchstartX=a.clientX,e.touchstartY=a.clientY,e.start&&e.start(Object.assign(t,e))}function r(t,e){const a=t.changedTouches[0];e.touchendX=a.clientX,e.touchendY=a.clientY,e.end&&e.end(Object.assign(t,e)),i(e)}function o(t,e){const a=t.changedTouches[0];e.touchmoveX=a.clientX,e.touchmoveY=a.clientY,e.move&&e.move(Object.assign(t,e))}function l(t){const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:t.left,right:t.right,up:t.up,down:t.down,start:t.start,move:t.move,end:t.end};return{touchstart:t=>n(t,e),touchend:t=>r(t,e),touchmove:t=>o(t,e)}}function c(t,e,a){const i=e.value,n=i.parent?t.parentElement:t,r=i.options||{passive:!0};if(!n)return;const o=l(e.value);n._touchHandlers=Object(n._touchHandlers),n._touchHandlers[a.context._uid]=o,(0,s.HP)(o).forEac
1h(t=>{n.addEventListener(t,o[t],r)})}function h(t,e,a){const i=e.value.parent?t.parentElement:t;if(!i||!i._touchHandlers)return;const n=i._touchHandlers[a.context._uid];(0,s.HP)(n).forEach(t=>{i.removeEventListener(t,n[t])}),delete i._touchHandlers[a.context._uid]}const d={inserted:c,unbind:h},u=d;a.d(e,["A",0,u])},26703(t,e,a){a.d(e,{PL:()=>c,k$:()=>l,pl:()=>h,v8:()=>d});var s=a(97819),i=a(78465),n=a.n(i),r=a(77784),o=a(50226);function l(t){n().fire({toast:!0,timer:1500,position:"top",icon:"success",title:void 0==t&&null==t?"สำà¹à¸£à¹à¸":t,showConfirmButton:!1,confirmButtonText:"Yes!"})}function c(t){n().fire({toast:!0,timer:1500,position:"top",icon:"error",title:void 0==t&&null==t?"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹":t,showConfirmButton:!0,confirmButtonText:"Yes!"})}function h(t){n().fire({toast:!0,position:"top",icon:"warning",title:void 0==t&&null==t?"à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸³à¸£à¸²à¸¢à¸à¸²à¸£à¹à¸à¹":t,showConfirmButton:!0,confirmButtonText:"Yes!"})}async function d(t,e,a,i,n,l,c,h){var d={id:0,platform:void 0==t?null:t,fromPath:void 0==e?null:e,fromApi:void 0==a?null:a,branchId:void 0==i?null:i,shopId:void 0==n?null:n,orderId:void 0==l?null:l,logInfo:void 0==c?null:c,logInfo2:void 0==h?null:h};await s.A.post(o.BS+"Log/insert-log",{applicationLog:d},{headers:r.S})}},29(){},40125(){},158(){},22812(t){var e=TypeError;t.exports=function(t,a){if(t<a)throw new e("Not enough arguments");return t}},14603(t,e,a){var s=a(36840),i=a(79504),n=a(655),r=a(22812),o=URLSearchParams,l=o.prototype,c=i(l.append),h=i(l["delete"]),d=i(l.forEach),u=i([].push),p=new o("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="a=2"&&s(l,"delete",function(t){var e=arguments.length,a=e<2?void 0:arguments[1];if(e&&void 0===a)return h(this,t);var s=[];d(this,function(t,e){u(s,{key:e,value:t})}),r(e,1);var i,o=n(t),l=n(a),p=0,m=s.length;while(p<m)i=s[p],h(this,i.key),p++;p=0;while(p<m)i=s[p++],i.key===o&&i.value===l||c(this,i.key,i.value)},{enumerable:!0,unsafe:!0})},47566(t,e,a){var s=a(36840),i=a(79504),n=a(655),r=a(22812),o=URLSearchParams,l=o.prototype,c=i(l.getAll),h=i(l.has),d=new o("a=1");!d.has("a",2)&&d.has("a",void 0)||s(l,"has",function(t){var e=arguments.length,a=e<2?void 0:arguments[1];if(e&&void 0===a)return h(this,t);var s=c(this,t);r(e,1);var i=n(a),o=0;while(o<s.length)if(s[o++]===i)return!0;return!1},{enumerable:!0,unsafe:!0})},98721(t,e,a){var s=a(43724),i=a(79504),n=a(62106),r=URLSearchParams.prototype,o=i(r.forEach);s&&!("size"in r)&&n(r,"size",{get:function(){var t=0;return o(this,function(){t++}),t},configurable:!0,enumerable:!0})}}]); 2//# sourceMappingURL=2252.fd4cb1cb.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.