webpackJsonp([55],{TwBx:function(e,t,r){var a=r("hEe/");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);r("rjj0")("0c5deb9b",a,!1,{})},"hEe/":function(e,t,r){(e.exports=r("FZ+f")(!0)).push([e.i,"\n.orderCount[data-v-608b0498] {\n  padding: 10px;\n}\n","",{version:3,sources:["/Users/lin/workspace/sing/admin/src/components/orderCount/index.vue"],names:[],mappings:";AACA;EACE,cAAc;CACf",file:"index.vue",sourcesContent:["\n.orderCount[data-v-608b0498] {\n  padding: 10px;\n}\n"],sourceRoot:""}])},"s7i+":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("CCn6"),n=r("+TkF"),s={name:"index",data:function(){return{goodsList:[],headList:[],tableData:[],searchFrom:{priceList:[],dateValue:[]}}},mounted:function(){this.defaultTime(),this.initPage()},filters:{toFixed2:function(e){if("number"==typeof e){var t=e.toString().split(".");return t.length>1&&t[1].length>2?Number(e).toFixed(2):e}return e},filterGoods:function(e){return"["+e.id+"]["+n.j[e.goods_type]+"]["+e.current_price/100+"元]"+e.name}},methods:{initPage:function(){var e=this;Object(a._66)({limit:99999}).then(function(t){t.list.forEach(function(t){e.searchFrom.priceList.push(t.id)}),e.goodsList=t.list,e.searchPage()})},searchPage:function(){var e=this;if(this.searchFrom.dateValue.length<2)this.$message.error("请先选择起止日期");else{var t={start_at:this.searchFrom.dateValue[0],end_at:this.searchFrom.dateValue[1],goods_ids:this.searchFrom.priceList.toString()};Object(a._151)(t).then(function(t){if(t.length>0){var r=t[0];for(var a in e.tableData=t,e.headList=[],r)"cur_date"===a?e.headList.push("时间"):"register_num"===a?e.headList.push("注册数"):"total_money"===a?e.headList.push("总金额"):e.headList.push(a)}})}},defaultTime:function(){var e=new Date,t=e.getFullYear(),r=e.getMonth()+1;r<10&&(r="0"+r);var a=e.getDate();a<10&&(a="0"+a);var n=t+"-"+r+"-01",s=t+"-"+r+"-"+a;this.searchFrom.dateValue=[n,s]}}},o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"orderCount"},[r("el-form",{ref:"searchFrom",attrs:{inline:"",model:e.searchFrom,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"商品"}},[r("el-select",{staticStyle:{width:"600px"},attrs:{"collapse-tags":"",multiple:"",filterable:"",placeholder:"请选择"},on:{change:e.searchPage},model:{value:e.searchFrom.priceList,callback:function(t){e.$set(e.searchFrom,"priceList",t)},expression:"searchFrom.priceList"}},e._l(e.goodsList,function(t){return r("el-option",{key:t.id,attrs:{label:e._f("filterGoods")(t),value:t.id}})}))],1),e._v(" "),r("el-form-item",{attrs:{label:"起止日期"}},[r("el-date-picker",{attrs:{"unlink-panels":"",type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.searchPage},model:{value:e.searchFrom.searchFrom,callback:function(t){e.$set(e.searchFrom,"searchFrom",t)},expression:"searchFrom.searchFrom"}})],1),e._v(" "),r("el-form-item",{attrs:{label:""}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.searchPage()}}},[e._v("\n        搜索\n      ")])],1)],1),e._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},e._l(e.headList,function(t){return r("el-table-column",{key:t,attrs:{label:t},scopedSlots:e._u([{key:"default",fn:function(a){return["时间"===t?r("span",[e._v("\n        "+e._s(a.row.cur_date)+"\n        ")]):e._e(),e._v(" "),"注册数"===t?r("span",[e._v("\n        "+e._s(a.row.register_num)+"\n        ")]):e._e(),e._v(" "),"总金额"===t?r("span",[e._v("\n        "+e._s(a.row.total_money)+"\n        ")]):e._e(),e._v(" "),"时间"!==t&&"注册数"!==t&&"总金额"!==t?r("span",[e._v("\n        "+e._s(e._f("toFixed2")(a.row[t]))+"\n        ")]):e._e()]}}])})}))],1)};o._withStripped=!0;var i={render:o,staticRenderFns:[]},l=i;var c=!1;var d=r("VU/8")(s,l,!1,function(e){c||r("TwBx")},"data-v-608b0498",null);d.options.__file="src/components/orderCount/index.vue";t.default=d.exports}});