42.0eae9667.js 7.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[42],{1805:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[e("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:t.table_list,"row-key":"id",separator:t.separator,loading:t.loading,filter:t.filter,columns:t.columns,"hide-bottom":"",pagination:t.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:t.height},flat:"",bordered:""},on:{"update:pagination":function(e){t.pagination=e}},scopedSlots:t._u([{key:"top",fn:function(){return[e("q-btn-group",{attrs:{push:""}},[e("q-btn",{attrs:{label:t.$t("refresh"),icon:"refresh"},on:{click:function(e){return t.reFresh()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("refresh"))+"\n ")])],1)],1),e("q-space"),e("q-btn-group",{attrs:{push:""}},[e("q-btn",{attrs:{color:"purple",label:t.$t("stock.view_stocklist.daychoice")}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("stock.view_stocklist.daychoicetip"))+"\n ")]),e("q-popup-proxy",{attrs:{"transition-show":"scale","transition-hide":"scale"},on:{"before-show":t.updateProxy}},[e("q-date",{model:{value:t.proxyDate,callback:function(e){t.proxyDate=e},expression:"proxyDate"}},[e("div",{staticClass:"row items-center justify-end q-gutter-sm"},[e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{label:t.$t("index.cancel"),color:"primary",flat:""}}),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{label:t.$t("index.submit"),color:"primary"},on:{click:t.save}})],1)])],1)],1)],1)]},proxy:!0},{key:"body",fn:function(a){return[e("q-tr",{attrs:{props:a}},[e("q-td",{key:"bin_name",attrs:{props:a}},[t._v("\n "+t._s(a.row.bin_name)+"\n ")]),e("q-td",{key:"goods_code",attrs:{props:a}},[t._v("\n "+t._s(a.row.goods_code)+"\n ")]),e("q-td",{key:"goods_qty",attrs:{props:a}},[t._v("\n "+t._s(a.row.goods_qty)+"\n ")]),e("q-td",{key:"physical_inventory",attrs:{props:a}},[t._v("\n "+t._s(a.row.physical_inventory)+"\n ")]),e("q-td",{key:"difference",attrs:{props:a}},[t._v("\n "+t._s(a.row.difference)+"\n ")])],1)]}}])})],1),[e("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[e("div",[t._v(t._s(t.total)+" ")]),e("q-pagination",{attrs:{color:"black",max:t.max,"max-pages":6,"boundary-links":""},on:{click:function(e){return t.getList()}},model:{value:t.current,callback:function(e){t.current=e},expression:"current"}}),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:t.paginationIpt},on:{blur:t.changePageEnter,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePageEnter.apply(null,arguments)},input:function(e){e.target.composing||(t.paginationIpt=e.target.value)}}})])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[e("q-btn",{attrs:{flat:"",push:"",color:"dark",label:t.$t("no_data")}})],1)]],2)},o=[],i=a("bd4c"),s=a("18d6"),r=a("a639"),l=a("3004"),c={name:"cyclyecountrecorder",data(){return{openid:"",login_name:"",authin:"0",pathname:"cyclecount/cyclecountrecorder/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",table_list:[],bin_size_list:[],bin_property_list:[],warehouse_list:[],columns:[{name:"bin_name",required:!0,label:this.$t("warehouse.view_binset.bin_name"),align:"left",field:"bin_name"},{name:"goods_code",label:this.$t("stock.view_stocklist.goods_code"),field:"goods_code",align:"center"},{name:"goods_qty",label:this.$t("stock.view_stocklist.history_inventory"),field:"goods_qty",align:"center"},{name:"physical_inventory",label:this.$t("stock.view_stocklist.physical_inventory"),field:"physical_inventory",align:"center"},{name:"difference",label:this.$t("stock.view_stocklist.difference"),field:"difference",align:"center"}],filter:"",pagination:{page:1,rowsPerPage:"30"},options:[],date:"",proxyDate:"",current:1,max:0,total:0,paginationIpt:1}},methods:{getList(){var t=this;if(s["a"].has("auth")){let e=i["b"].formatDate(t.date,"YYYY-MM-DD"),a=Date.now(),n=i["b"].formatDate(a,"YYYY/MM/DD");t.date===n&&(e=""),Object(l["f"])(t.pathname+"?create_time="+e+"&page="+t.current,{}).then((e=>{t.table_list=e.results,t.total=e.count,0===e.count||1===Math.ceil(e.count/30)?t.max=0:t.max=Math.ceil(e.count/30),t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))}},changePageEnter(t){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.getList()},getListPrevious(){var t=this;s["a"].has("auth")&&Object(l["f"])(t.pathname_previous,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},getListNext(){var t=this;s["a"].has("auth")&&Object(l["f"])(t.pathname_next,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},reFresh(){var t=this;let e=Date.now(),a=i["b"].formatDate(e,"YYYY/MM/DD");t.date=a,console.log(t.date),t.getList()},filterFn(t,e,a){var n=this;t.length<1?a():e((()=>{let e=t.toLowerCase();Object(l["f"])("binset/?bin_name__icontains="+e).then((t=>{var e=[];t.results.forEach((t=>{e.push(t.bin_name)})),r["a"].set("bin_name",e),n.options=r["a"].getItem("bin_name")})).catch((t=>{n.$q.notify({message:t.detail,icon:"close",color:"negative"})}))}))},updateProxy(){var t=this;t.proxyDate=t.date},save(){var t=this;t.date=t.proxyDate,null==t.date?t.$q.notify({message:"err.date",icon:"close",color:"negative"}):t.getList()}},created(){var t=this;if(s["a"].has("openid")?t.openid=s["a"].getItem("openid"):(t.openid="",s["a"].set("openid","")),s["a"].has("login_name")?t.login_name=s["a"].getItem("login_name"):(t.login_name="",s["a"].set("login_name","")),s["a"].has("auth")){t.authin="1";const e=Date.now(),a=i["b"].formatDate(e,"YYYY/MM/DD");t.date=a,t.getList()}else t.authin="0"},mounted(){var t=this;t.$q.platform.is.electron?t.height=String(t.$q.screen.height-290)+"px":t.height=t.$q.screen.height-290+"px"},updated(){},destroyed(){}},p=c,d=a("42e1"),u=a("d3f9"),h=a("eaac"),m=a("e7a9"),g=a("9c40"),f=a("05c0"),_=a("2c91"),b=a("7cbe"),v=a("52ee"),y=a("bd08"),x=a("db86"),w=a("3b16"),k=a("7f67"),q=a("eebe"),D=a.n(q),$=Object(d["a"])(p,n,o,!1,null,null,null);"function"===typeof u["default"]&&Object(u["default"])($);e["default"]=$.exports;D()($,"components",{QTable:h["a"],QBtnGroup:m["a"],QBtn:g["a"],QTooltip:f["a"],QSpace:_["a"],QPopupProxy:b["a"],QDate:v["a"],QTr:y["a"],QTd:x["a"],QPagination:w["a"]}),D()($,"directives",{ClosePopup:k["a"]})},"80db":function(t,e){},d3f9:function(t,e,a){"use strict";var n=a("80db"),o=a.n(n);e["default"]=o.a}}]);