| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-efb50a6c"],{"25f7":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v(t._s(t.totalNum)+" 扎 ¥"+t._s(t.totalAmount)+" 总毛利 "+t._s(t.totalMl))])]},proxy:!0},{key:"table-column-mll",fn:function({scope:i}){return[e("span",[t._v(t._s(i.row.mll)+"%")])]}},{key:"table-column-num",fn:function({scope:i}){return[e("span",[t._v(t._s(i.row.num?parseFloat(i.row.num):0))])]}}])})],1)},a=[],s=i("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-6048e5),t.$emit("pick",[i,e])}},{text:"最近一个月",onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-2592e6),t.$emit("pick",[i,e])}},{text:"最近三个月",onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-7776e6),t.$emit("pick",[i,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,totalNum:0,totalMl:0}},computed:{...Object(s["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{this.totalAmount=t.totalAmount||0,this.totalMl=t.totalMl||0,this.totalNum=t.totalNum||0;let e=[...t.list];return{list:e}})}).set("table",{columns:[{label:"名称",prop:"name",align:"center"},{label:"总数量",prop:"num",align:"center"},{label:"总金额",prop:"amount",align:"center"},{label:"毛利",prop:"gross",align:"center"},{label:"毛利率",prop:"mll",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},r=o,l=(i("ee01"),i("1805")),c=Object(l["a"])(r,n,a,!1,null,"50eabccd",null);e["default"]=c.exports},b569:function(t,e,i){},ee01:function(t,e,i){"use strict";i("b569")}}]);
|