1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-30440f0f"],{"0d15":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),t._v(" "),a("div",{staticStyle:{"margin-bottom":"20px"}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss",clearable:!1},model:{value:t.rangeTime,callback:function(e){t.rangeTime=e},expression:"rangeTime"}}),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("\n 查询\n ")])],1),t._v(" "),a("div",{staticClass:"title"},[t._v("库存出入库统计")]),t._v(" "),a("div",{ref:"style_num_echart",style:{height:t.height,width:t.width}})])},n=[],r=a("c7eb"),s=(a("96cf"),a("1da1")),c=(a("ac6a"),a("28a5"),a("a481"),a("313e")),o=a("2cc9"),l={props:{width:{type:String,default:"600px"},height:{type:String,default:"600px"}},data:function(){return{chart:null,timeLineMap:[],dataMap:{},lengedMap:["出库","入库"],cycle:"3",dateYf:[],dataYs:[],rangeTime:"",startTime:"",endTime:"",chukuList:"",rukuList:"",proTime:"",search_content:"",time:"",loadingFull:!1}},created:function(){console.log("999999");var t=new Date,e=t.toLocaleDateString(),a=e.replace(/\//g,"-"),i=t.toLocaleTimeString(),n=i.split("午"),r=n[1],s=a+" "+r;this.time=s,this.startTime=s,this.endTime=s,this.rangeTime=s+"至"+s,console.log(this.startTime,"this.startTime"),this.stockeStatistical()},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{search:function(){this.startTime=this.rangeTime[0],this.endTime=this.rangeTime[1],console.log(this.startTime,"rangeTime"),console.log(this.endTime,"rangeTime"),this.stockeStatistical()},createObjectByArray:function(t,e){var a={};return t.forEach((function(t){a[t]=e?[]:{}})),a},stockeStatistical:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(){var e,a=this;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.loadingFull=!0,e={start_time:this.startTime,end_time:this.endTime},Object(o["f"])(e).then((function(t){if(console.log(t,"res,data"),a.statisticalList=t.data,200===t.code){for(var e=[],i=[],n=[],r=0,s=t.data.length;r<s;r++)e.push(t.data[r].date),i.push(t.data[r].out_num),n.push(t.data[r].put_num);a.dateYf=i,a.dateYs=n,a.timeLineMap=e,console.log(a.timeLineMap,"xAxis"),a.initChart()}else alert(t.message);a.loadingFull=!1})).catch((function(t){console.log(t,"error"),a.loadingFull=!1}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getOrderAccount:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),initChart:function(){var t=this;this.$nextTick((function(){t.chart=c["init"](t.$refs.style_num_echart),t.chart.clear(),t.chart.setOption({title:{},tooltip:{trigger:"axis"},legend:{data:t.lengedMap},xAxis:{type:"category",data:t.timeLineMap},yAxis:{type:"value"},dataZoom:[{type:"slider"},{type:"inside"}],color:["#63b2ee","#f19272 ","#76da91"],series:[{name:"出库",type:"line",data:t.dateYf},{name:"入库",type:"line",data:t.dateYs}]}),window.onresize=t.chart.resize}))}}},u=l,d=(a("ab29"),a("2877")),h=Object(d["a"])(u,i,n,!1,null,"df36d780",null);e["default"]=h.exports},"2cc9":function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return c})),a.d(e,"a",(function(){return o})),a.d(e,"f",(function(){return l}));var i=a("b775");function n(t){return Object(i["a"])({url:"/storage/GetStorageDetailDate",method:"Get",params:t})}function r(t){return Object(i["a"])({url:"/storage/GetUserStorageDateDetail",method:"Get",params:t})}function s(t){return Object(i["a"])({url:"/storage/StorageOutStatistical",method:"Get",params:t})}function c(t){return Object(i["a"])({url:"/storage/StoragePutStatistical",method:"Get",params:t})}function o(t){return Object(i["a"])({url:"/storage/ExportOutPutRecord",method:"Get",params:t})}function l(t){return Object(i["a"])({url:"/storage/StorageStatistical",method:"Get",params:t})}},ab29:function(t,e,a){"use strict";a("b552")},b552:function(t,e,a){}}]);
|