| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[36],{"0983":function(e,t){},"1b14":function(e,t,a){"use strict";var n=a("0983"),i=a.n(n);t["default"]=i.a},"87bd":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[t("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:e.table_list,"row-key":"taskNumber",separator:e.separator,loading:e.loading,columns:e.columns,"hide-bottom":"",pagination:e.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:e.height},flat:"",bordered:""},on:{"update:pagination":function(t){e.pagination=t}},scopedSlots:e._u([{key:"header-cell",fn:function(a){return[t("q-th",{attrs:{props:a},on:{dblclick:function(t){return e.handleHeaderDblClick(a.col)}}},[e._v("\n "+e._s(a.col.label)+"\n ")])]}},{key:"top",fn:function(){return[t("q-btn-group",{attrs:{push:""}},[t("q-btn",{attrs:{label:e.$t("refresh"),icon:"refresh"},on:{click:function(t){return e.reFresh()}}},[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("refreshtip")))])],1)],1),t("q-space"),t("div",{staticClass:"flex items-center"},[t("div",{staticClass:"q-mr-md"},[e._v(e._s(e.$t("download_center.createTime")))]),t("q-input",{attrs:{readonly:"",outlined:"",dense:"",placeholder:e.interval},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{staticClass:"cursor-pointer",attrs:{name:"event"}},[t("q-popup-proxy",{ref:"qDateProxy",attrs:{"transition-show":"scale","transition-hide":"scale"}},[t("q-date",{attrs:{range:""},model:{value:e.createDate1,callback:function(t){e.createDate1=t},expression:"createDate1"}},[t("div",{staticClass:"row items-center justify-end q-gutter-sm"},[t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{label:e.$t("index.cancel"),color:"primary",flat:""}}),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{label:e.$t("index.clear"),color:"primary"},on:{click:function(t){e.createDate2="",e.createDate1=""}}})],1)])],1)],1)]},proxy:!0}]),model:{value:e.createDate2,callback:function(t){e.createDate2=t},expression:"createDate2"}}),t("q-btn-group",{staticClass:"q-ml-md",attrs:{push:""}}),t("q-input",{attrs:{outlined:"",rounded:"",dense:"",debounce:"300",color:"primary",placeholder:e.$t("search")},on:{input:function(t){return e.getSearchList()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getSearchList()}},scopedSlots:e._u([{key:"append",fn:function(){return[t("q-icon",{attrs:{name:"search"},on:{click:function(t){return e.getSearchList()}}})]},proxy:!0}]),model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}}),t("q-select",{staticClass:"q-ml-md",attrs:{dense:"",outlined:"",clearable:"","emit-value":"","map-options":"",options:e.logTypeOptions,placeholder:e.$t("task.log_type")||"日志类型"},on:{"update:model-value":function(t){return e.getSearchList()}},scopedSlots:e._u([{key:"prepend",fn:function(){return[t("q-icon",{attrs:{name:"category"}})]},proxy:!0}]),model:{value:e.logTypeFilter,callback:function(t){e.logTypeFilter=t},expression:"logTypeFilter"}})],1)]},proxy:!0},{key:"body",fn:function(a){return[t("q-tr",{attrs:{props:a}},e._l(e.columns,(function(n){return t("q-td",{key:n.name,attrs:{props:a}},[e._v("\n "+e._s(e.formatCellValue(n,a.row))+"\n ")])})),1)]}}])})],1),[t("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[t("div",[e._v(e._s(e.total))]),t("q-pagination",{attrs:{color:"black",max:e.max,"max-pages":6,"boundary-links":""},on:{click:function(t){e.getSearchList(e.current),e.paginationIpt=e.current}},model:{value:e.current,callback:function(t){e.current=t},expression:"current"}}),t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:e.paginationIpt},on:{blur:e.changePageEnter,keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.changePageEnter.apply(null,arguments)},input:function(t){t.target.composing||(e.paginationIpt=t.target.value)}}})])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[t("q-btn",{attrs:{flat:"",push:"",color:"dark",label:e.$t("no_data")}})],1)]],2)},i=[],r=(a("caad"),a("ddb0"),a("9861"),a("a79d"),a("5319"),a("3004")),l=a("bd4c"),o=a("18d6"),s={name:"WCSLog",data(){return{createDate1:"",createDate2:"",date_range:"",proxyDate:"",date:"",openid:"",login_name:"",authin:"0",searchUrl:"",pathname:"container/wcs/logs/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",table_list:[],columns:[{name:"time",label:"时间",field:"time",align:"center",sortable:!0},{name:"taskNumber",label:"任务号",field:"taskNumber",align:"center",sortable:!0},{name:"container",label:"托盘号",field:"container",align:"center",sortable:!0},{name:"current_location",label:"起始位置",field:"current_location",align:"center"},{name:"target_location",label:"目标位置",field:"target_location",align:"center"},{name:"floor",label:"楼层",field:"floor",align:"center"},{name:"log_type",label:"日志类型",field:"log_type",align:"center"},{name:"is_completed",label:"完成状态",field:"is_completed",align:"center"},{name:"location_group_id",label:"库位组ID",field:"location_group_id",align:"center"},{name:"order_number",label:"优先级(靠里程度)",field:"order_number",align:"center"}],filter:"",logTypeFilter:null,logTypeOptions:[{label:"出库任务",value:"outbound"},{label:"入库任务",value:"inbound"},{label:"抽检任务",value:"check"},{label:"其他",value:"other"}],pagination:{page:1,rowsPerPage:11},current:1,max:0,total:0,paginationIpt:1,filterdata:{},activeSearchField:"",activeSearchLabel:""}},computed:{interval(){return this.$t("download_center.start")+" - "+this.$t("download_center.end")}},methods:{formatCellValue(e,t){const a=e.field?t[e.field]:t[e.name];if("is_completed"===e.name){if(!0===a)return"已完成";if(!1===a)return"进行中"}return"log_type"===e.name?this.resolveLogTypeLabel(a):a||0===a?a:"-"},resolveLogTypeLabel(e){const t=this.logTypeOptions.find((t=>t.value===e));return t?t.label:e||"-"},handleHeaderDblClick(e){["detail","action"].includes(e.name)||(this.activeSearchField=e.field,this.activeSearchLabel=e.label,this.$q.dialog({title:`搜索${e.label}`,message:`请输入${e.label}的搜索条件`,prompt:{model:"",type:"text"},cancel:!0,persistent:!0}).onOk((t=>{this.executeColumnSearch(e.field,t)})).onCancel((()=>{this.activeSearchField="",this.activeSearchLabel=""})))},executeColumnSearch(e,t){const a={[e+"__icontains"]:t};this.filter="",this.date_range="",this.getList({...a,page:1}),this.filterdata=a,this.$q.notify({message:`已搜索 ${this.activeSearchLabel} 含有 "${t}" 的结果`,icon:"search",color:"positive"}),this.activeSearchField="",this.activeSearchLabel=""},getList(e={}){var t=this;t.loading=!0;const a={page:t.current,max_page:t.pagination.rowsPerPage},n=new URLSearchParams({...a,...e});Array.from(n.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||n.delete(e)})),Object(r["e"])(`${t.pathname}?${n}`).then((e=>{t.table_list=e.results||[],t.total=e.count||0,t.max=Math.ceil((e.count||0)/t.pagination.rowsPerPage)||0,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail||e.message||"获取数据失败",icon:"close",color:"negative"})})).finally((()=>{t.loading=!1}))},changePageEnter(){Number(this.paginationIpt)<1?(this.current=1,this.paginationIpt=1):Number(this.paginationIpt)>this.max?(this.current=this.max,this.paginationIpt=this.max):this.current=Number(this.paginationIpt),this.getSearchList(this.current)},getSearchList(e=1){this.current=e,this.paginationIpt=e;const t={};if(this.filter&&(/^\d+$/.test(this.filter)?t.taskNumber=this.filter:t.container__icontains=this.filter),this.date_range){const e=this.date_range.split(",");2===e.length&&(t.send_time__gte=e[0].trim(),t.send_time__lte=e[1].trim())}this.logTypeFilter&&(t.log_type=this.logTypeFilter),this.getList({...t,...this.filterdata})},getListPrevious(){var e=this;o["a"].has("auth")&&Object(r["e"])(e.pathname_previous,{}).then((t=>{e.table_list=t.results||[],e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail||t.message||"获取数据失败",icon:"close",color:"negative"})}))},getListNext(){var e=this;o["a"].has("auth")&&Object(r["e"])(e.pathname_next,{}).then((t=>{e.table_list=t.results||[],e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail||t.message||"获取数据失败",icon:"close",color:"negative"})}))},reFresh(){var e=this;this.filterdata={},this.filter="",this.createDate1="",this.createDate2="",this.date_range="",this.logTypeFilter=null,e.getSearchList()}},created(){var e=this;if(o["a"].has("openid")?e.openid=o["a"].getItem("openid"):(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")){const t=Date.now(),a=l["b"].formatDate(t,"YYYY/MM/DD");e.date=a,e.authin="1",e.getList()}else e.authin="0"},mounted(){var e=this;e.$q.platform.is.electron?e.height=String(e.$q.screen.height-290)+"px":e.height=e.$q.screen.height-290+"px"},updated(){},destroyed(){},watch:{createDate1(e){e?(e.to?(this.createDate2=`${e.from} - ${e.to}`,this.date_range=`${e.from},${e.to} `):(this.createDate2=`${e}`,this.dateArray=e.split("/"),this.searchUrl=this.pathname+"?send_time__year="+this.dateArray[0]+"&send_time__month="+this.dateArray[1]+"&send_time__day="+this.dateArray[2]),this.date_range=this.date_range.replace(/\//g,"-"),this.getSearchList(),this.$refs.qDateProxy.hide()):(this.createDate2="",this.date_range="",this.getSearchList())}}},c=s,p=(a("e7a6"),a("42e1")),d=a("1b14"),u=a("eaac"),h=a("357e"),m=a("e7a9"),g=a("9c40"),f=a("05c0"),b=a("2c91"),_=a("27f9"),v=a("0016"),y=a("7cbe"),x=a("52ee"),k=a("ddd8"),q=a("bd08"),w=a("db86"),S=a("3b16"),$=a("7f67"),D=a("eebe"),L=a.n(D),C=Object(p["a"])(c,n,i,!1,null,"28f69aa6",null);"function"===typeof d["default"]&&Object(d["default"])(C);t["default"]=C.exports;L()(C,"components",{QTable:u["a"],QTh:h["a"],QBtnGroup:m["a"],QBtn:g["a"],QTooltip:f["a"],QSpace:b["a"],QInput:_["a"],QIcon:v["a"],QPopupProxy:y["a"],QDate:x["a"],QSelect:k["a"],QTr:q["a"],QTd:w["a"],QPagination:S["a"]}),L()(C,"directives",{ClosePopup:$["a"]})},d6a3:function(e,t,a){},e7a6:function(e,t,a){"use strict";a("d6a3")}}]);
|