5.79d49a06.js 8.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"008e":function(e,t,a){"use strict";var n=a("4769"),r=a.n(n);t["default"]=r.a},"2fb1":function(e,t,a){},"34e7":function(e,t,a){"use strict";a("2fb1")},4769:function(e,t){},"8e0a":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"margin-top":"42px"}},[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":"id",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:"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"}})],1)]},proxy:!0},{key:"body",fn:function(a){return[t("q-tr",{attrs:{props:a}},[[t("q-td",{key:"goods_code",attrs:{props:a}},[e._v(e._s(a.row.goods_code))])],[t("q-td",{key:"goods_desc",attrs:{props:a}},[e._v(e._s(a.row.goods_desc))])],[t("q-td",{key:"goods_batch",attrs:{props:a}},[e._v(e._s(a.row.batch.bound_number))])],[t("q-td",{key:"container_code",attrs:{props:a}},[e._v(e._s(a.row.container.container_code))])],[t("q-td",{key:"current_location",attrs:{props:a}},[e._v(e._s(a.row.container.current_location))])],[t("q-td",{key:"goods_qty",attrs:{props:a}},[e._v(e._s(a.row.goods_qty))])],[t("q-td",{key:"creater",attrs:{props:a}},[e._v(e._s(a.row.creater))])],[t("q-td",{key:"create_time",attrs:{props:a}},[e._v(e._s(a.row.create_time))])]],2)]}}])})],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)},r=[],o=(a("ddb0"),a("9861"),a("a79d"),a("5319"),a("3004")),i=a("bd4c"),s=(a("a357"),a("18d6")),c={name:"Pageflowlist",data(){return{createDate1:"",createDate2:"",date_range:"",proxyDate:"",date:"",goods_code:"",goods_desc:"",openid:"",login_name:"",authin:"0",searchUrl:"",pathname:"container/detail/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",viewForm:!1,table_list:[],columns:[{name:"goods_code",label:"存货编码",field:"goods_code",align:"center"},{name:"goods_desc",label:"存货名称",field:"goods_desc",align:"center"},{name:"goods_batch",label:"批号",field:"goods_batch",align:"center"},{name:"container_code",label:"所处托盘",field:"container_code",align:"center"},{name:"current_location",label:"当前位置",field:"current_location",align:"center"},{name:"goods_qty",label:"扫描数目",field:"goods_qty",align:"center"},{name:"creater",label:"组盘人",field:"creator",align:"center"},{name:"create_time",label:"创建时间",field:"create_time",align:"center"}],filter:"",pagination:{page:1,rowsPerPage:11},current:1,max:0,total:0,paginationIpt:1,current:1}},computed:{interval(){return this.$t("download_center.start")+" - "+this.$t("download_center.end")}},methods:{getList(e={}){var t=this;t.loading=!0;const a={page:t.current,page_size:t.pagination.rowsPerPage},n=new URLSearchParams({...a,...e});console.log(n),Array.from(n.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||n.delete(e)})),Object(o["e"])(`${t.pathname}?${n}`).then((e=>{t.table_list=e.results,t.total=e.count,t.max=Math.ceil(e.count/t.pagination.rowsPerPage)||0,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,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,this.getList({goods_desc__icontains:this.filter,create_time__range:this.date_range})},getListPrevious(){var e=this;s["a"].has("auth")&&Object(o["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,icon:"close",color:"negative"})}))},getListNext(){var e=this;s["a"].has("auth")&&Object(o["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,icon:"close",color:"negative"})}))},reFresh(){var e=this;e.getSearchList()},updateProxy(){var e=this;e.proxyDate=e.date}},created(){var e=this;if(s["a"].has("openid")?e.openid=s["a"].getItem("openid"):(e.openid="",s["a"].set("openid","")),s["a"].has("login_name")?e.login_name=s["a"].getItem("login_name"):(e.login_name="",s["a"].set("login_name","")),s["a"].has("auth")){const t=Date.now(),a=i["b"].formatDate(t,"YYYY/MM/DD");e.date=a,console.log(e.date),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+"?document_date__year="+this.dateArray[0]+"&document_date__month="+this.dateArray[1]+"&document_date__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())}}},l=c,d=(a("34e7"),a("42e1")),p=a("008e"),u=a("eaac"),h=a("e7a9"),g=a("9c40"),m=a("05c0"),_=a("2c91"),f=a("27f9"),b=a("0016"),v=a("7cbe"),y=a("52ee"),x=a("bd08"),q=a("db86"),w=a("3b16"),k=a("7f67"),D=a("eebe"),$=a.n(D),P=Object(d["a"])(l,n,r,!1,null,"3b1d1346",null);"function"===typeof p["default"]&&Object(p["default"])(P);t["default"]=P.exports;$()(P,"components",{QTable:u["a"],QBtnGroup:h["a"],QBtn:g["a"],QTooltip:m["a"],QSpace:_["a"],QInput:f["a"],QIcon:b["a"],QPopupProxy:v["a"],QDate:y["a"],QTr:x["a"],QTd:q["a"],QPagination:w["a"]}),$()(P,"directives",{ClosePopup:k["a"]})}}]);