| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d1ee2580"],{"4b80":function(e,t,i){"use strict";i("a95d")},a72f:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"shop-list"},[t("x-crud",{on:{load:e.onLoad},scopedSlots:e._u([{key:"slot-date-select",fn:function(){return[t("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":e.pickerOptions,size:"mini"},on:{change:e.getDate},model:{value:e.currentDateList,callback:function(t){e.currentDateList=t},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[t("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.exportData()}}},[e._v("导出数据")])]},proxy:!0}])})],1)},a=[],o=i("5880"),r={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(e){const t=new Date,i=new Date;i.setTime(i.getTime()-6048e5),e.$emit("pick",[i,t])}},{text:"最近一个月",onClick(e){const t=new Date,i=new Date;i.setTime(i.getTime()-2592e6),e.$emit("pick",[i,t])}},{text:"最近三个月",onClick(e){const t=new Date,i=new Date;i.setTime(i.getTime()-7776e6),e.$emit("pick",[i,t])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0}},computed:{...Object(o["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.stat.getIncomeOutItem({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(e=>{e.file&&(window.location.href=e.file)})},onLoad({ctx:e,app:t}){this.app=t,e.service({page:()=>this.$service.stat.getIncomeOutItem({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(e=>{let t=[...e.list,{name:"物流打包费",income:0,expend:e.packFreight,profit:-e.packFreight,inNum:0,outNum:0},{name:"采购仅退款",income:e.onlyRefundCg,expend:0,profit:e.onlyRefundCg,inNum:0,outNum:0},{name:"销售仅退款",income:0,expend:e.onlyRefund,profit:-e.onlyRefund,inNum:0,outNum:0},{name:"附加人工费",income:e.totalLabourCost,expend:0,profit:e.totalLabourCost,inNum:0,outNum:0},{name:"优惠金额",income:-e.totalDiscountAmount,expend:0,profit:-e.totalDiscountAmount,inNum:0,outNum:0},{name:"【汇总金额】",income:e.totalIncome,expend:e.totalExpend,profit:e.totalProfit,inNum:0,outNum:0}];return{list:t}})}).set("table",{columns:[{label:"名称",prop:"name",align:"center"},{label:"销售收入",prop:"income",align:"center"},{label:"销售数量",prop:"inNum",align:"center"},{label:"采购成本",prop:"expend",align:"center"},{label:"采购数量",prop:"outNum",align:"center"},{label:"花材利润",prop:"profit",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"],["flex1"]]).done(),t.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})}}},s=r,c=(i("4b80"),i("1805")),l=Object(c["a"])(s,n,a,!1,null,"6ca64a5f",null);t["default"]=l.exports},a95d:function(e,t,i){}}]);
|