text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[54],{1805:function(e,t,o){"use strict";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[o("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:e.table_list,"row-key":"id",separator:e.separator,loading:e.loading,filter:e.filter,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[o("q-btn-group",{attrs:{push:""}},[o("q-btn",{attrs:{label:e.$t("refresh"),icon:"refresh"},on:{click:function(t){return e.getList()}}},[o("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("\n              "+e._s(e.$t("refresh"))+"\n            ")])],1),o("q-btn",{attrs:{label:e.$t("stock.view_stocklist.downloadcyclecount"),icon:"cloud_download"},on:{click:function(t){return e.downloadData()}}},[o("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("\n              "+e._s(e.$t("stock.view_stocklist.downloadcyclecounttip"))+"\n            ")])],1)],1),o("q-space"),o("q-btn-group",{attrs:{push:""}},[o("q-btn",{attrs:{color:"purple",label:e.$t("stock.view_stocklist.daychoice")},on:{click:function(t){return e.downloadData()}}},[o("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("\n              "+e._s(e.$t("stock.view_stocklist.daychoicetip"))+"\n            ")])],1)],1)]},proxy:!0},{key:"body",fn:function(t){return[o("q-tr",{attrs:{props:t}},[o("q-td",{key:"bin_name",attrs:{props:t}},[e._v("\n            "+e._s(t.row.bin_name)+"\n          ")]),o("q-td",{key:"goods_code",attrs:{props:t}},[e._v("\n            "+e._s(t.row.goods_code)+"\n          ")]),o("q-td",{key:"goods_qty",attrs:{props:t}},[e._v("\n            "+e._s(t.row.goods_qty)+"\n          ")]),o("q-td",{key:"physical_inventory",attrs:{props:t}},[e._v("\n            "+e._s(t.row.physical_inventory)+"\n          ")]),o("q-td",{key:"difference",attrs:{props:t}},[e._v("\n            "+e._s(t.row.difference)+"\n          ")])],1)]}}])})],1),[o("div",{staticClass:"q-pa-lg flex flex-center"},[o("q-btn",{directives:[{name:"show",rawName:"v-show",value:e.pathname_previous,expression:"pathname_previous"}],attrs:{flat:"",push:"",color:"purple",label:e.$t("previous"),icon:"navigate_before"},on:{click:function(t){return e.getListPrevious()}}},[o("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("\n          "+e._s(e.$t("previous"))+"\n        ")])],1),o("q-btn",{directives:[{name:"show",rawName:"v-show",value:e.pathname_next,expression:"pathname_next"}],attrs:{flat:"",push:"",color:"purple",label:e.$t("next"),"icon-right":"navigate_next"},on:{click:function(t){return e.getListNext()}}},[o("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v("\n          "+e._s(e.$t("next"))+"\n        ")])],1),o("q-btn",{directives:[{name:"show",rawName:"v-show",value:!e.pathname_previous&&!e.pathname_next,expression:"!pathname_previous && !pathname_next"}],attrs:{flat:"",push:"",color:"dark",label:e.$t("no_data")}})],1)],o("q-dialog",{model:{value:e.moveForm,callback:function(t){e.moveForm=t},expression:"moveForm"}},[o("q-card",{staticClass:"shadow-24"},[o("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[o("div",[e._v(e._s(e.movedata.goods_code)+" "+e._s(e.$t("frombin"))+" "+e._s(e.movedata.bin_name))]),o("q-space"),o("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[o("q-tooltip",[e._v(e._s(e.$t("index.close")))])],1)],1),o("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[o("q-input",{staticStyle:{"margin-bottom":"5px"},attrs:{dense:"",outlined:"",square:"",debounce:"500",type:"number",label:e.$t("stock.view_stocklist.goods_qty"),rules:[function(e){return e&&e>0||"Please Enter the Qty, It must > 0"}]},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.MoveToBinSubmit()}},scopedSlots:e._u([{key:"before",fn:function(){return[o("q-select",{attrs:{dense:"",outlined:"",square:"","use-input":"","hide-selected":"","fill-input":"",label:e.$t("warehouse.view_binset.bin_name"),options:e.options},on:{filter:e.filterFn,keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.MoveToBinSubmit()}},scopedSlots:e._u([{key:"no-option",fn:function(){return[o("q-item",[o("q-item-section",{staticClass:"text-grey"},[e._v("\n                    No results\n                  ")])],1)]},proxy:!0},e.movedata.move_to_bin?{key:"append",fn:function(){return[o("q-icon",{staticClass:"cursor-pointer",attrs:{name:"cancel"},on:{click:function(t){t.stopPropagation(),e.movedata.move_to_bin=""}}})]},proxy:!0}:null],null,!0),model:{value:e.movedata.move_to_bin,callback:function(t){e.$set(e.movedata,"move_to_bin",t)},expression:"movedata.move_to_bin"}})]},proxy:!0}]),model:{value:e.movedata.move_qty,callback:function(t){e.$set(e.movedata,"move_qty",e._n(t))},expression:"movedata.move_qty"}})],1),o("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[o("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){return e.MoveToBinCancel()}}},[e._v(e._s(e.$t("cancel")))]),o("q-btn",{attrs:{color:"primary"},on:{click:function(t){return e.MoveToBinSubmit()}}},[e._v(e._s(e.$t("submit")))])],1)],1)],1)],2)},n=[],s=o("bd4c"),i=o("a357"),r=o("18d6"),c=o("a639"),l=o("3004"),d={name:"cyclyecount",data(){return{openid:"",login_name:"",authin:"0",pathname:"cyclecount/",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:[],moveForm:!1,movedata:{}}},methods:{getList(){var e=this;r["a"].has("auth")&&Object(l["e"])(e.pathname,{}).then((t=>{var o=[];t.results.forEach((e=>{console.log(e);var t={bin_name:e.bin_name,goods_code:e.goods_code,goods_qty:e.goods_qty,physical_inventory:0,difference:e.goods_qty};o.push(t)})),e.table_list=o,o=[],e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},getSearchList(){var e=this;r["a"].has("auth")&&Object(l["e"])(e.pathname+"?bin_name__icontains="+e.filter,{}).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"})}))},getListPrevious(){var e=this;r["a"].has("auth")&&Object(l["e"])(e.pathname_previous,{}).then((t=>{var o=[];t.results.forEach((e=>{var t={bin_name:e.bin_name,goods_code:e.goods_code,goods_qty:e.goods_qty,physical_inventory:0,difference:e.goods_qty};o.push(t)})),e.table_list=o,o=[],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;r["a"].has("auth")&&Object(l["e"])(e.pathname_next,{}).then((t=>{var o=[];t.results.forEach((e=>{var t={bin_name:e.bin_name,goods_code:e.goods_code,goods_qty:e.goods_qty,physical_inventory:0,difference:e.goods_qty};o.push(t)})),e.table_list=o,o=[],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.getList()},BinMove(e){var t=this;t.moveForm=!0,t.movedata=e},MoveToBinCancel(){var e=this;e.moveForm=!1,e.movedata={}},MoveToBinSubmit(){var e=this;Object(l["h"])(e.pathname+e.movedata.id+"/",e.movedata).then((t=>{e.getList(),e.MoveToBinCancel(),e.$q.notify({message:"Bin Moving Success",icon:"check",color:"green"})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},filterFn(e,t,o){var a=this;e.length<1?o():t((()=>{const t=e.toLowerCase();Object(l["e"])("binset/?bin_name__icontains="+t).then((e=>{var t=[];e.results.forEach((e=>{t.push(e.bin_name)})),c["a"].set("bin_name",t),a.options=c["a"].getItem("bin_name")})).catch((e=>{a.$q.notify({message:e.detail,icon:"close",color:"negative"})}))}))},downloadData(){var e=this;Object(l["f"])("stock/filebinlist/?lang="+r["a"].getItem("lang")).then((t=>{var o=Date.now(),a=s["a"].formatDate(o,"YYYYMMDDHHmmssSSS");const n=Object(i["a"])("stockbinlist_"+a+".csv","\ufeff"+t.data,"text/csv");!0!==n&&e.$q.notify({message:"Browser denied file download...",color:"negative",icon:"warning"})}))}},created(){var e=this;r["a"].has("openid")?e.openid=r["a"].getItem("openid"):(e.openid="",r["a"].set("openid","")),r["a"].has("login_name")?e.login_name=r["a"].getItem("login_name"):(e.login_name="",r["a"].set("login_name","")),r["a"].has("auth")?(e.authin="1",e.getList()):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(){}},p=d,_=o("42e1"),u=o("d3f9"),m=o("eaac"),h=o("e7a9"),v=o("9c40"),f=o("05c0"),b=o("2c91"),g=o("bd08"),y=o("db86"),q=o("24e8"),k=o("f09f"),x=o("d847"),w=o("a370"),$=o("27f9"),S=o("ddd8"),Q=o("66e5"),C=o("4074"),B=o("0016"),O=o("7f67"),L=o("eebe"),M=o.n(L),T=Object(_["a"])(p,a,n,!1,null,null,null);"function"===typeof u["default"]&&Object(u["default"])(T);t["default"]=T.exports;M()(T,"components",{QTable:m["a"],QBtnGroup:h["a"],QBtn:v["a"],QTooltip:f["a"],QSpace:b["a"],QTr:g["a"],QTd:y["a"],QDialog:q["a"],QCard:k["a"],QBar:x["a"],QCardSection:w["a"],QInput:$["a"],QSelect:S["a"],QItem:Q["a"],QItemSection:C["a"],QIcon:B["a"]}),M()(T,"directives",{ClosePopup:O["a"]})},"80db":function(e,t){},d3f9:function(e,t,o){"use strict";var a=o("80db"),n=o.n(a);t["default"]=n.a}}]);