37.e70b8a57.js 35 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[37],{"5bcd":function(e,t,a){"use strict";a("fbe6")},"713b":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("q-layout",{style:{height:e.$q.screen.height,width:e.$q.screen.width},attrs:{view:"hHh LpR fFf"}},[t("q-header",{staticClass:"bg-primary text-white",attrs:{reveal:"",elevated:""}},[t("q-toolbar",{staticClass:"main-headers text-white shadow-18 rounded-borders"},[t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"menu"},on:{click:function(t){e.drawerleft=!e.drawerleft}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v(e._s(e.drawerleft?e.$t("index.hide_menu"):e.$t("index.open_menu")))])],1)],1),t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-toolbar-title",{staticClass:"text-weight-bold",attrs:{shrink:""},on:{click:function(t){e.$router.push({name:"web_index"}),e.linkChange("")}}},[e._v("\n "+e._s(e.$t("index.title")))])],1),t("q-space"),t("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"save"},on:{click:function(t){return e.save_db()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v(e._s("保存数据库"))])],1),t("q-btn",{staticStyle:{position:"relative"},attrs:{flat:"",round:"",dense:"",icon:"mail"},on:{click:function(t){e.showLocationErrorsDialog=!0}}},[e.locationErrorsCount>0?t("q-badge",{attrs:{color:"red",floating:"",rounded:"",label:e.locationErrorsCount>99?"99+":e.locationErrorsCount}}):e._e(),t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v("\n 位置异常通知 ("+e._s(e.locationErrorsCount)+")\n ")])],1),t("screenfull",{staticClass:"right-menu-item hover-effect",attrs:{id:"screenfull"}}),t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-btn",{staticStyle:{margin:"0 10px 0 10px"},attrs:{square:"",dense:"",flat:"",color:"white",label:e.warehouse_name,icon:"maps_home_work"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.warehouse_switch"))+"\n ")]),t("q-menu",[t("q-list",{staticStyle:{"min-width":"100px"}},e._l(e.warehouseOptions,(function(a,i){return t("q-item",{directives:[{name:"close-popup",rawName:"v-close-popup"}],key:i,attrs:{clickable:""},on:{click:function(t){return e.warehouseChange(i)}}},[t("q-item-section",[e._v(e._s(a.warehouse_name))])],1)})),1)],1)],1)],1),t("q-separator",{attrs:{vertical:""}}),"1"===e.authin?[t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-btn-dropdown",{attrs:{stretch:"",flat:"",color:"white-8",icon:"account_circle"}},[t("div",{staticClass:"q-pa-md"},[t("div",{staticClass:"column items-center"},[t("q-avatar",{attrs:{size:"72px"}},[t("q-img",{attrs:{src:"statics/staff/stafftype.png"}})],1),t("div",{staticClass:"text-subtitle1 q-mt-md q-mb-xs"},[e._v("\n "+e._s(e.login_name)+"\n ")]),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{color:"primary",label:e.$t("index.change_user"),push:"",size:"sm",icon:"face"},on:{click:function(t){e.login=!0}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.change_user")))])],1),t("q-separator"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{color:"primary",label:e.$t("index.logout"),push:"",size:"sm",icon:"img:statics/icons/logout.png"},on:{click:function(t){return e.Logout()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.logout")))])],1)],1)])])],1)]:e._e(),"0"===e.authin?[t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-btn",{staticStyle:{"margin-left":"10px"},attrs:{label:e.$t("index.login"),color:"primary"},on:{click:function(t){e.login=!0}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.login_tip")))])],1)],1),t("transition",{attrs:{appear:"","enter-active-class":"animated zoomIn"}},[t("q-btn",{staticStyle:{"margin-left":"10px"},attrs:{label:e.$t("index.register"),color:"primary"},on:{click:function(t){e.register=!0}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.register_tip")))])],1)],1)]:e._e()],2)],1),t("q-drawer",{attrs:{"show-if-above":"",width:200,breakpoint:500,bordered:"","content-class":"bg-grey-3 shadow-24"},model:{value:e.drawerleft,callback:function(t){e.drawerleft=t},expression:"drawerleft"}},[t("q-scroll-area",{staticClass:"fit",staticStyle:{"overflow-y":"auto"}},[t("q-list",[e.hasPermission("stock")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"stock"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"management"},exact:"",active:"stock"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("stock")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"multiline_chart"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.stock")))])],1):e._e(),t("q-separator"),e.hasPermission("erp")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"erp"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"erpasn"},exact:"",active:"erp"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("erp")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"img:statics/outbound/outbound.png"}})],1),t("q-item-section",[e._v(e._s("ERP任务"))]),e.ERPTasks>0?t("q-badge",{staticClass:"task-badge",class:{"high-priority":e.ERPTasks>20},attrs:{color:"red-5"}},[e._v("\n "+e._s(e.ERPTasks>99?"99+":e.ERPTasks)+"\n ")]):e._e(),e.ERPOutTasks>0?t("q-badge",{staticClass:"outtask-badge",attrs:{color:"blue-5"}},[e._v("\n "+e._s(e.ERPOutTasks>99?"99+":e.ERPOutTasks)+"\n ")]):e._e()],1):e._e(),t("q-separator"),e.hasPermission("inbound")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"inbound"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"asn"},exact:"",active:"inbound"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("inbound")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"speaker_notes"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.inbound")))])],1):e._e(),e.hasPermission("container")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"container"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"containerlist"},exact:"",active:"container"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("container")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"stay_current_landscape"}})],1),t("q-item-section",[e._v("托盘管理")])],1):e._e(),e.hasPermission("outbound")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"outbound"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"container_check"},exact:"",active:"outbound"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("outbound")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"rv_hookup"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.outbound")))]),e.pendingTasks>0?t("q-badge",{staticClass:"task-badge",class:{"high-priority":e.pendingTasks>20},attrs:{color:"red-5"}},[e._v("\n "+e._s(e.pendingTasks>99?"99+":e.pendingTasks)+"\n ")]):e._e()],1):e._e(),t("q-separator"),e.hasPermission("taskpage")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"taskpage"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"task"},exact:"",active:"taskpage"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("taskpage")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"img:statics/outbound/picked.png"}})],1),t("q-item-section",[e._v("任务管理")])],1):e._e(),e.hasPermission("count")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"cyclecount"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"cyclecount_task"},exact:"",active:"cyclecount"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("cyclecount")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"fact_check"}})],1),t("q-item-section",[e._v("盘点任务")])],1):e._e(),e.hasPermission("count")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"count"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"batch"},exact:"",active:"count"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("count")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"img:statics/outbound/count.png"}})],1),t("q-item-section",[e._v("物料盘点")])],1):e._e(),t("q-separator"),e.hasPermission("dashboard")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"flows_statements"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"flows_statements"},exact:"",active:"flows_statements"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("flows_statements")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"auto_graph"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.dashboard")))])],1):e._e(),e.hasPermission("warehouse")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"warehouse"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"department"},exact:"",active:"warehouse"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("warehouse")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"settings"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.warehouse")))])],1):e._e(),e.hasPermission("staff")?t("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],class:{"my-menu-link":"staff"===e.link&&""!==e.link},attrs:{clickable:"",to:{name:"stafflist"},exact:"",active:"staff"===e.link&&""!==e.link},on:{click:function(t){return e.linkChange("staff")}}},[t("q-item-section",{attrs:{avatar:""}},[t("q-icon",{attrs:{name:"assignment_ind"}})],1),t("q-item-section",[e._v(e._s(e.$t("menuItem.staff")))])],1):e._e(),t("q-separator")],1)],1)],1),t("q-page-container",{staticClass:"main-page",style:{height:e.container_height,width:e.$q.screen.width}},[t("router-view")],1),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},model:{value:e.authid,callback:function(t){e.authid=t},expression:"authid"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s(e.$t("index.your_openid")))]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"q-pt-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:"Openid",readonly:"",disable:""},model:{value:e.openid,callback:function(t){e.openid=t},expression:"openid"}})],1)],1)],1),t("q-dialog",{attrs:{"transition-show":"","transition-hide":"",persistent:"","full-width":"","full-height":""},model:{value:e.login,callback:function(t){e.login=t},expression:"login"}},[t("div",{staticClass:"flex flex-center",staticStyle:{height:"100%","background-color":"#f5f5f5",position:"absolute",top:"0",left:"0",right:"0",bottom:"0"}},[t("div",{staticStyle:{"font-size":"55px","letter-spacing":"10px",width:"100%","text-align":"center","margin-top":"10px"}},[e._v("\n "+e._s(e.$t("index.developer"))+"\n ")]),t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("q-tabs",{staticClass:"tabs",model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("q-tab",{attrs:{name:"admin"},on:{click:function(t){e.admin=!0}}},[e._v("\n "+e._s(e.$t("index.user_login"))+"\n "),t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[5,5],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("index.user_login")))])],1)],1),t("q-space")],1),t("q-card-section",{staticClass:"q-pt-md"},[e.admin?[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("index.staff_name"),autofocus:""},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.adminLogin()}},model:{value:e.adminlogin.name,callback:function(t){e.$set(e.adminlogin,"name",t)},expression:"adminlogin.name"}}),t("q-input",{staticStyle:{"margin-top":"5px"},attrs:{dense:"",outlined:"",square:"",label:e.$t("index.password"),type:e.isPwd?"password":"text"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.adminLogin()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{staticClass:"cursor-pointer",attrs:{name:e.isPwd?"visibility_off":"visibility"},on:{click:function(t){e.isPwd=!e.isPwd}}})]},proxy:!0}],null,!1,3635466494),model:{value:e.adminlogin.password,callback:function(t){e.$set(e.adminlogin,"password",t)},expression:"adminlogin.password"}})]:e._e()],2),t("q-card-actions",{staticClass:"text-primary",attrs:{align:"left"}},[t("q-space"),[t("q-btn",{staticStyle:{"font-size":"16px",margin:"0 8px",width:"100%"},attrs:{color:"primary",label:e.$t("index.login")},on:{click:function(t){return e.adminLogin()}}})],t("div",{staticClass:"q-mx-auto"},[t("q-btn",{staticClass:"text-teal-4 q-mt-sm",attrs:{flat:""},on:{click:function(t){e.login=!1,e.register=!0}}},[e._v("\n "+e._s(e.$t("index.register_tip"))+"\n ")])],1)],2)],1),t("lottie-web-cimo",{ref:"lottie_web",staticStyle:{width:"85%","max-width":"95%",height:"12%",margin:"auto"},attrs:{animationName:"welcome"}})],1)]),t("q-dialog",{attrs:{"transition-show":"","transition-hide":"",persistent:"","full-width":"","full-height":""},model:{value:e.register,callback:function(t){e.register=t},expression:"register"}},[t("div",{staticClass:"flex flex-center",staticStyle:{height:"100%","background-color":"#f5f5f5",position:"absolute",top:"0",left:"0",right:"0",bottom:"0"}},[t("div",{staticStyle:{"font-size":"55px","letter-spacing":"10px",width:"100%","text-align":"center","margin-top":"10px"}},[e._v("\n "+e._s(e.$t("index.developer"))+"\n ")]),t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s(e.$t("index.register_tip")))])]),t("q-card-section",{staticClass:"q-pt-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("index.staff_name")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.Register()}},model:{value:e.registerform.name,callback:function(t){e.$set(e.registerform,"name",t)},expression:"registerform.name"}}),t("q-input",{staticStyle:{"margin-top":"5px"},attrs:{dense:"",outlined:"",square:"",label:e.$t("index.password"),type:e.isPwd?"password":"text"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.Register()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{staticClass:"cursor-pointer",attrs:{name:e.isPwd?"visibility_off":"visibility"},on:{click:function(t){e.isPwd=!e.isPwd}}})]},proxy:!0}]),model:{value:e.registerform.password1,callback:function(t){e.$set(e.registerform,"password1",t)},expression:"registerform.password1"}}),t("q-input",{staticStyle:{"margin-top":"5px"},attrs:{dense:"",outlined:"",square:"",label:e.$t("index.confirm_password"),type:e.isPwd2?"password":"text"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.Register()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{staticClass:"cursor-pointer",attrs:{name:e.isPwd2?"visibility_off":"visibility"},on:{click:function(t){e.isPwd2=!e.isPwd2}}})]},proxy:!0}]),model:{value:e.registerform.password2,callback:function(t){e.$set(e.registerform,"password2",t)},expression:"registerform.password2"}})],1),t("q-card-actions",{staticClass:"text-primary q-mx-sm",attrs:{align:"right"}},[t("q-btn",{staticClass:"full-width",attrs:{color:"primary",label:e.$t("index.register")},on:{click:function(t){return e.Register()}}})],1),t("q-card-actions",{staticStyle:{"margin-top":"-8px"},attrs:{align:"center"}},[t("q-btn",{staticClass:"text-teal-4",attrs:{flat:"",label:e.$t("index.return_to_login")},on:{click:function(t){e.login=!0,e.register=!1}}})],1)],1),t("lottie-web-cimo",{ref:"lottie_web",staticStyle:{width:"85%","max-width":"95%",height:"12%",margin:"auto"},attrs:{animationName:"welcome"}})],1)]),t("q-dialog",{model:{value:e.switch_warehouse,callback:function(t){e.switch_warehouse=t},expression:"switch_warehouse"}},[t("q-card",{staticClass:"shadow-24"},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v(e._s(e.$t("index.warehouse_switch")))]),t("q-space")],1),t("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[e._v("\n "+e._s(e.switch_state?e.$t("index.switch_state_on"):e.$t("index.switch_state_off"))+"\n ")])],1)],1),t("q-dialog",{attrs:{maximized:""},model:{value:e.showLocationErrorsDialog,callback:function(t){e.showLocationErrorsDialog=t},expression:"showLocationErrorsDialog"}},[t("q-card",[t("q-card-section",{staticClass:"row items-center q-pb-none"},[t("div",{staticClass:"text-h6"},[e._v("位置异常通知")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{icon:"close",flat:"",round:"",dense:""}})],1),t("q-card-section",[e.locationErrors.length>0?t("q-list",{attrs:{separator:""}},e._l(e.locationErrors,(function(a,i){return t("q-expansion-item",{key:i,attrs:{label:`${a.location_code} - ${a.error_type_display}`,caption:`检测时间: ${e.formatErrorDateTime(a.detected_at)}`,"header-class":"text-primary"}},[t("q-card",[t("q-card-section",[t("div",{staticClass:"row q-mb-md"},[t("div",{staticClass:"col-6"},[t("div",{staticClass:"text-caption text-grey"},[e._v("位置编码")]),t("div",{staticClass:"text-body1"},[e._v(e._s(a.location_code))])]),t("div",{staticClass:"col-3"},[t("div",{staticClass:"text-caption text-grey"},[e._v("层/行/列")]),t("div",{staticClass:"text-body1"},[e._v(e._s(a.layer)+"/"+e._s(a.row)+"/"+e._s(a.col))])]),t("div",{staticClass:"col-3"},[t("div",{staticClass:"text-caption text-grey"},[e._v("当前状态")]),t("div",{staticClass:"text-body1"},[e._v(e._s(a.current_status))])])]),t("q-separator",{staticClass:"q-my-md"}),"occupied_no_container"===a.error_type?t("div",[t("div",{staticClass:"text-subtitle2 q-mb-sm"},[t("q-icon",{staticClass:"q-mr-xs",attrs:{name:"warning",color:"orange"}}),e._v("\n 库位状态为占用,但未绑定托盘\n ")],1),t("div",{staticClass:"q-mb-md"},[t("q-radio",{attrs:{val:"has_container",label:"确认该库位有托盘"},model:{value:a.userAction,callback:function(t){e.$set(a,"userAction",t)},expression:"error.userAction"}}),t("q-radio",{attrs:{val:"no_container",label:"确认该库位没有托盘"},model:{value:a.userAction,callback:function(t){e.$set(a,"userAction",t)},expression:"error.userAction"}})],1),"has_container"===a.userAction?t("div",{staticClass:"q-mb-md"},[t("q-input",{staticClass:"q-mb-sm",attrs:{label:"请输入托盘码",outlined:"",dense:""},model:{value:a.container_code,callback:function(t){e.$set(a,"container_code",t)},expression:"error.container_code"}}),t("q-btn",{attrs:{color:"primary",label:"重新绑定托盘",loading:a.processing},on:{click:function(t){return e.rebindContainer(a)}}})],1):e._e(),"no_container"===a.userAction?t("div",{staticClass:"q-mb-md"},[t("q-btn",{attrs:{color:"primary",label:"修改库位状态为可用",loading:a.processing},on:{click:function(t){return e.updateLocationStatus(a,"available")}}})],1):e._e()]):e._e(),"available_with_container"===a.error_type?t("div",[t("div",{staticClass:"text-subtitle2 q-mb-sm"},[t("q-icon",{staticClass:"q-mr-xs",attrs:{name:"warning",color:"orange"}}),e._v("\n 库位状态为可用,但有托盘绑定\n ")],1),t("div",{staticClass:"q-mb-md"},[t("q-radio",{attrs:{val:"has_container",label:"确认该库位有托盘"},model:{value:a.userAction,callback:function(t){e.$set(a,"userAction",t)},expression:"error.userAction"}}),t("q-radio",{attrs:{val:"no_container",label:"确认该库位没有托盘"},model:{value:a.userAction,callback:function(t){e.$set(a,"userAction",t)},expression:"error.userAction"}})],1),"has_container"===a.userAction?t("div",{staticClass:"q-mb-md"},[t("q-btn",{attrs:{color:"primary",label:"修改库位状态为占用",loading:a.processing},on:{click:function(t){return e.updateLocationStatus(a,"occupied")}}})],1):e._e(),"no_container"===a.userAction?t("div",{staticClass:"q-mb-md"},[t("q-btn",{attrs:{color:"primary",label:"解除托盘绑定关系",loading:a.processing},on:{click:function(t){return e.unbindContainer(a)}}})],1):e._e()]):e._e(),t("q-separator",{staticClass:"q-my-md"}),t("div",{staticClass:"text-subtitle2 q-mb-sm"},[t("q-icon",{staticClass:"q-mr-xs",attrs:{name:"search",color:"primary"}}),e._v("\n 辅助查询 - 该位置的托盘信息\n ")],1),t("q-btn",{staticClass:"q-mb-sm",attrs:{color:"secondary",label:"查询该位置的托盘",loading:a.querying},on:{click:function(t){return e.queryContainersByLocation(a)}}}),a.containers&&a.containers.length>0?t("q-table",{staticClass:"q-mt-sm",attrs:{data:a.containers,columns:e.containerColumns,"row-key":"id",flat:"",bordered:"",dense:""}}):a.containers&&0===a.containers.length?t("div",{staticClass:"text-caption text-grey q-mt-sm"},[e._v("\n 未找到该位置的托盘\n ")]):e._e()],1)],1)],1)})),1):t("div",{staticClass:"text-center q-pa-lg text-grey"},[e._v("\n 暂无位置异常\n ")])],1),t("q-card-actions",{attrs:{align:"right"}},[t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{flat:"",label:"关闭"}}),t("q-btn",{attrs:{flat:"",label:"刷新",color:"primary",loading:e.loadingLocationErrors},on:{click:e.refreshLocationErrors}})],1)],1)],1)],1)},n=[],s=(a("caad"),a("5319"),a("a79d"),a("3004")),o=a("18d6"),r=a("a639"),c=a("b06b"),l=a("bca8"),d=a("3c55"),u=function(){var e=this,t=e._self._c;return t("div",[t("q-btn",{attrs:{icon:e.isFullscreen?"fullscreen_exit":"fullscreen",dense:"",flat:""},on:{click:e.handleClick}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[15,15],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.isFullscreen?"退出全屏":"进入全屏")+"\n ")])],1)],1)},m=[],p=a("93bf"),g=a.n(p),h={name:"Screenfull",data(){return{isFullscreen:!1}},mounted(){this.init()},beforeDestroy(){this.destroy()},methods:{handleClick(){if(!g.a.enabled)return this.$q.notify({message:"您的浏览器不支持全屏功能",type:"warning",position:"top"}),!1;g.a.toggle()},change(){this.isFullscreen=g.a.isFullscreen},init(){g.a.enabled&&g.a.on("change",this.change)},destroy(){g.a.enabled&&g.a.off("change",this.change)}}},_=h,b=a("42e1"),f=a("9c40"),v=a("05c0"),k=a("eebe"),q=a.n(k),w=Object(b["a"])(_,u,m,!1,null,null,null),y=w.exports;q()(w,"components",{QBtn:f["a"],QTooltip:v["a"]});var x={components:{LottieWebCimo:d["a"],Screenfull:y},data(){return{device:o["a"].getItem("device"),device_name:o["a"].getItem("device_name"),lang:"zh-hans",container_height:this.$q.screen.height+"px",warehouse_name:"",warehouseOptions:[],warehouseOptions_openid:[],langOptions:[{value:"zh-hans",label:"中文简体"}],title:this.$t("index.webtitle"),admin:!0,adminlogin:{name:"",password:""},openid:"",appid:"",switch_state:!1,switch_warehouse:!1,isPwd:!0,isPwd2:!0,authin:"0",authid:!1,left:!1,drawerleft:!1,tab:"",login:!1,link:"",login_name:"",login_id:0,check_code:"",register:!1,registerform:{name:"",password1:"",password2:""},needLogin:"",activeTab:"",ERPTasks:0,ERPOutTasks:0,pendingTasks:0,pollInterval:null,timer:null,selectedRole:"",permissions:[],showLocationErrorsDialog:!1,locationErrors:[],locationErrorsCount:0,loadingLocationErrors:!1,containerColumns:[{name:"container_code",label:"托盘码",field:"container_code",align:"left"},{name:"current_location",label:"当前位置",field:"current_location",align:"left"},{name:"target_location",label:"目标位置",field:"target_location",align:"left"}]}},methods:{loadRolePermissions(){this.selectedRole=o["a"].getItem("login_mode")||"",Object(s["e"])(`staff/role-pagePermissions/${this.selectedRole}/`).then((e=>{console.log("加载角色权限成功:",e),this.permissions=e.permissions_group,o["a"].set("pagepermission",this.permissions),console.log("权限数据:",this.permissions)}))},hasPermission(e){if(!this.permissions)return!1;const t=this.permissions.find((t=>t.page===e));return t&&t.enabled},save_db(){var e=this;Object(s["h"])("backup/trigger/").then((t=>{e.$q.notify({message:"数据库备份成功",icon:"check",color:"green"})}))},linkChange(e){var t=this;localStorage.removeItem("menulink"),localStorage.setItem("menulink",e),t.link=e,console.log(t.link)},drawerClick(e){var t=this;t.miniState&&(t.miniState=!1,e.stopPropagation())},brownlink(e){Object(c["a"])(e)},apiLink(){Object(c["a"])(s["a"]+"/api/docs/")},adminLogin(){var e=this;e.adminlogin.name?e.adminlogin.password?(r["a"].set("axios_check","false"),Object(s["g"])("login/",e.adminlogin).then((t=>{"200"===t.code?(e.authin="1",e.login=!1,e.admin=!1,e.openid=t.data.openid,e.appid=t.data.appid,e.login_name=t.data.name,e.login_id=t.data.user_id,e.selectedRole=t.data.staff_type,o["a"].set("auth","1"),o["a"].set("openid",t.data.openid),o["a"].set("appid",t.data.appid),o["a"].set("login_name",e.login_name),o["a"].set("login_id",e.login_id),o["a"].set("login_mode",e.selectedRole),e.$q.notify({message:"Success Login",icon:"check",color:"green"}),e.loadRolePermissions(),localStorage.removeItem("menulink"),e.link="",e.$router.push({name:"web_index"}),window.setTimeout((()=>{location.reload()}),1)):e.$q.notify({message:t.msg,icon:"close",color:"negative"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))):e.$q.notify({message:"请输入密码",icon:"close",color:"negative"}):e.$q.notify({message:"请输入用户名",color:"negative",icon:"close"})},Logout(){var e=this;e.authin="0",e.login_name="",o["a"].remove("auth"),r["a"].remove("axios_check"),o["a"].set("login_name",""),o["a"].set("login_id",""),o["a"].set("appid",""),e.$q.notify({message:"Success Logout",icon:"check",color:"negative"}),localStorage.removeItem("menulink"),e.link="",e.$router.push({name:"web_index"}),window.setTimeout((()=>{location.reload()}),1)},Register(){var e=this;r["a"].set("axios_check","false"),Object(s["g"])("register/",e.registerform).then((t=>{"200"===t.code?(e.register=!1,e.openid=t.data.openid,e.login_name=e.registerform.name,e.login_id=t.data.user_id,e.authin="1",o["a"].set("auth","1"),o["a"].set("appid",t.data.appid),o["a"].set("login_name",t.data.name),o["a"].set("login_id",t.data.user_id),o["a"].set("openid",t.data.openid),o["a"].set("login_mode","Admin"),e.registerform={name:"",password1:"",password2:""},e.$q.notify({message:t.msg,icon:"check",color:"green"}),localStorage.removeItem("menulink"),e.link="",e.$router.push({name:"web_index"}),window.setTimeout((()=>{location.reload()}),1)):e.$q.notify({message:t.msg,icon:"close",color:"negative"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},warehouseOptionsGet(){var e=this;Object(s["d"])("warehouse/multiple/?max_page=30").then((t=>{e.warehouseOptions=t.results,o["a"].has("openid")&&e.warehouseOptions.forEach(((t,a)=>{t.openid===o["a"].getItem("openid")&&e.warehouseOptions_openid.push(t)})),e.warehouse_name=t.results[0].warehouse_name,localStorage.setItem("warehouse_name",t.results[0].warehouse_name),localStorage.setItem("warehouse_code",t.results[0].warehouse_code)})).catch((t=>{console.log(t),e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},warehouseChange(e){var t=this;t.openid=t.warehouseOptions[e].openid,t.openid===o["a"].getItem("openid")?(t.warehouse_name=t.warehouseOptions[e].warehouse_name,localStorage.setItem("warehouse_name",t.warehouseOptions[e].warehouse_name),localStorage.setItem("warehouse_code",t.warehouseOptions[e].warehouse_code),t.switch_state=!0):t.switch_state=!1,t.switch_warehouse=!0},isLoggedIn(){this.$q.localStorage.getItem("openid")?this.login=!0:this.register=!0},handleTimer(){Object(s["e"])("/wms/inboundBills/?bound_status=0").then((e=>{this.ERPTasks=e.count})),Object(s["e"])("/wms/outboundBills/?bound_status=0").then((e=>{this.ERPOutTasks=e.count}))},checkLocationErrors(){const e="/location_statistics/CheckView/",t={};localStorage.getItem("warehouse_code")&&(t.warehouse_code=localStorage.getItem("warehouse_code")),Object(s["h"])(e,t).then((e=>{if(e&&e.data){if(!1===e.data.success)return this.locationErrors=[],void(this.locationErrorsCount=0);const t=e.data.data||e.data;t&&t.details&&t.details.location_errors?(this.locationErrors=t.details.location_errors.map((e=>({...e,userAction:null,container_code:"",processing:!1,querying:!1,containers:null,error_type_display:this.getErrorTypeDisplay(e),error_type:this.determineErrorType(e)}))),this.locationErrorsCount=this.locationErrors.length):(this.locationErrors=[],this.locationErrorsCount=0)}else this.locationErrors=[],this.locationErrorsCount=0})).catch((e=>{console.error("检查位置错误失败",e),this.locationErrors=[],this.locationErrorsCount=0}))},determineErrorType(e){return"occupied"!==e.current_status&&"reserved"!==e.current_status||"available"!==e.expected_status&&e.expected_status?("available"!==e.current_status||"occupied"!==e.expected_status&&"reserved"!==e.expected_status)&&("occupied"===e.current_status||"reserved"===e.current_status)?"occupied_no_container":"available_with_container":"occupied_no_container"},refreshLocationErrors(){this.loadingLocationErrors=!0,this.checkLocationErrors(),setTimeout((()=>{this.loadingLocationErrors=!1}),1e3)},getErrorTypeDisplay(e){const t=this.determineErrorType(e);return"occupied_no_container"===t?"库位占用但未绑定托盘":"available_with_container"===t?"库位可用但有托盘绑定":e.error_type||"未知错误"},formatErrorDateTime(e){return e?"string"===typeof e&&e.includes("T")?e.replace("T"," ").substring(0,19):e:"-"},rebindContainer(e){if(!e.container_code||!e.container_code.trim())return void this.$q.notify({type:"negative",message:"请输入托盘码"});e.processing=!0;const t="/location_statistics/bind-container/",a={location_code:e.location_code,container_code:e.container_code.trim()};Object(s["h"])(t,a).then((e=>{e&&("200"===e.code||e.success)?(this.$q.notify({type:"positive",message:"重新绑定托盘成功"}),this.checkLocationErrors()):this.$q.notify({type:"negative",message:(null===e||void 0===e?void 0:e.msg)||(null===e||void 0===e?void 0:e.message)||"重新绑定托盘失败"})})).catch((e=>{this.$q.notify({type:"negative",message:"重新绑定托盘失败: "+((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.detail)||"未知错误")})})).finally((()=>{e.processing=!1}))},updateLocationStatus(e,t){e.processing=!0;const a="/location_statistics/update-location-status/",i={location_code:e.location_code,status:t};Object(s["h"])(a,i).then((e=>{e&&("200"===e.code||e.success)?(this.$q.notify({type:"positive",message:"更新库位状态成功"}),this.checkLocationErrors()):this.$q.notify({type:"negative",message:(null===e||void 0===e?void 0:e.msg)||(null===e||void 0===e?void 0:e.message)||"更新库位状态失败"})})).catch((e=>{this.$q.notify({type:"negative",message:"更新库位状态失败: "+((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.detail)||"未知错误")})})).finally((()=>{e.processing=!1}))},unbindContainer(e){e.processing=!0;const t="/location_statistics/unbind-container/",a={location_code:e.location_code};Object(s["h"])(t,a).then((e=>{e&&("200"===e.code||e.success)?(this.$q.notify({type:"positive",message:"解除托盘绑定成功"}),this.checkLocationErrors()):this.$q.notify({type:"negative",message:(null===e||void 0===e?void 0:e.msg)||(null===e||void 0===e?void 0:e.message)||"解除托盘绑定失败"})})).catch((e=>{this.$q.notify({type:"negative",message:"解除托盘绑定失败: "+((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.detail)||"未知错误")})})).finally((()=>{e.processing=!1}))},queryContainersByLocation(e){e.querying=!0;const t=`W01-${e.row.toString().padStart(2,"0")}-${e.col.toString().padStart(2,"0")}-${e.layer.toString().padStart(2,"0")}`,a=`/container/list/?current_location__icontains=${t}`;Object(s["e"])(a).then((t=>{t&&t.results?e.containers=t.results:e.containers=[]})).catch((t=>{console.error("查询托盘失败",t),e.containers=[],this.$q.notify({type:"negative",message:"查询托盘失败: "+((null===t||void 0===t?void 0:t.message)||"未知错误")})})).finally((()=>{e.querying=!1}))}},created(){var e=this;e.$i18n.locale="zh-hans",e.loadRolePermissions(),o["a"].has("openid")?(e.openid=o["a"].getItem("openid"),e.activeTab="admin"):(e.openid="",o["a"].set("openid","")),o["a"].has("login_name")?e.login_name=o["a"].getItem("login_name"):(e.login_name="",o["a"].set("login_name","")),o["a"].has("auth")?e.authin="1":(e.authin="0",e.isLoggedIn())},mounted(){var e=this;e.warehouseOptionsGet(),e.handleTimer(),e.link=localStorage.getItem("menulink"),l["a"].$on("needLogin",(t=>{e.isLoggedIn()})),e.loadRolePermissions(),e.checkLocationErrors(),e.timer=setInterval((()=>{e.handleTimer()}),1e6)},updated(){},beforeDestroy(){l["a"].$off("needLogin")},destroyed(){},watch:{login(e){e&&("admin"===this.activeTab?this.admin=!0:this.admin=!1)}}},C=x,$=(a("5bcd"),a("4d5a")),E=a("e359"),S=a("65c6"),P=a("6ac5"),T=a("2c91"),I=a("58a81"),L=a("4e73"),O=a("1c1c"),Q=a("66e5"),R=a("4074"),z=a("eb85"),A=a("f20b"),N=a("cb32"),j=a("068f"),D=a("9404"),B=a("4983"),F=a("0016"),G=a("09e3"),H=a("24e8"),J=a("f09f"),W=a("d847"),M=a("a370"),V=a("27f9"),K=a("429b"),U=a("7460"),X=a("4b7e"),Y=a("3b73"),Z=a("3786"),ee=a("eaac"),te=a("7f67"),ae=a("714f"),ie=Object(b["a"])(C,i,n,!1,null,null,null);t["default"]=ie.exports;q()(ie,"components",{QLayout:$["a"],QHeader:E["a"],QToolbar:S["a"],QBtn:f["a"],QTooltip:v["a"],QToolbarTitle:P["a"],QSpace:T["a"],QBadge:I["a"],QMenu:L["a"],QList:O["a"],QItem:Q["a"],QItemSection:R["a"],QSeparator:z["a"],QBtnDropdown:A["a"],QAvatar:N["a"],QImg:j["a"],QDrawer:D["a"],QScrollArea:B["a"],QIcon:F["a"],QPageContainer:G["a"],QDialog:H["a"],QCard:J["a"],QBar:W["a"],QCardSection:M["a"],QInput:V["a"],QTabs:K["a"],QTab:U["a"],QCardActions:X["a"],QExpansionItem:Y["a"],QRadio:Z["a"],QTable:ee["a"]}),q()(ie,"directives",{ClosePopup:te["a"],Ripple:ae["a"]})},fbe6:function(e,t,a){}}]);