webpackJsonp([46],{WCEO:function(e,t,a){(e.exports=a("FZ+f")(!0)).push([e.i,"\n.orderCount[data-v-2ffc7bf2] {\n  padding: 10px;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/orderCount/index.vue"],names:[],mappings:";AACA;EACE,cAAc;CACf",file:"index.vue",sourcesContent:["\n.orderCount[data-v-2ffc7bf2] {\n  padding: 10px;\n}\n"],sourceRoot:""}])},"s7i+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("CCn6"),n={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}},methods:{initPage:function(){var e=this;Object(r._30)({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(r._72)(t).then(function(t){if(t.length>0){var a=t[0];for(var r in e.tableData=t,e.headList=[],a)"cur_date"===r?e.headList.push("时间"):"register_num"===r?e.headList.push("注册数"):"total_money"===r?e.headList.push("总金额"):e.headList.push(r)}})}},defaultTime:function(){var e=new Date,t=e.getFullYear(),a=e.getMonth()+1;a<10&&(a="0"+a);var r=e.getDate();r<10&&(r="0"+r);var n=t+"-"+a+"-01",s=t+"-"+a+"-"+r;this.searchFrom.dateValue=[n,s]}}},s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"orderCount"},[a("el-form",{ref:"searchFrom",attrs:{inline:"",model:e.searchFrom,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"商品"}},[a("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(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"起止日期"}},[a("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.dateValue,callback:function(t){e.$set(e.searchFrom,"dateValue",t)},expression:"searchFrom.dateValue"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.searchPage()}}},[e._v("\n        搜索\n      ")])],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},e._l(e.headList,function(t){return a("el-table-column",{key:t,attrs:{label:t},scopedSlots:e._u([{key:"default",fn:function(r){return["时间"===t?a("span",[e._v("\n        "+e._s(r.row.cur_date)+"\n        ")]):e._e(),e._v(" "),"注册数"===t?a("span",[e._v("\n        "+e._s(r.row.register_num)+"\n        ")]):e._e(),e._v(" "),"总金额"===t?a("span",[e._v("\n        "+e._s(r.row.total_money)+"\n        ")]):e._e(),e._v(" "),"时间"!==t&&"注册数"!==t&&"总金额"!==t?a("span",[e._v("\n        "+e._s(e._f("toFixed2")(r.row[t]))+"\n        ")]):e._e()]}}])})}))],1)};s._withStripped=!0;var i={render:s,staticRenderFns:[]},o=i;var l=!1;var c=a("VU/8")(n,o,!1,function(e){l||a("zAK+")},"data-v-2ffc7bf2",null);c.options.__file="src\\components\\orderCount\\index.vue";t.default=c.exports},"zAK+":function(e,t,a){var r=a("WCEO");"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);a("rjj0")("6ec13f6d",r,!1,{})}});