zx/public/mer/js/chunk-2bd50936.8ba064af.js

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2bd50936"],{"0b65":function(e,t,a){"use strict";t["a"]={shortcuts:[{text:"今天",onClick:function(e){var t=new Date,a=new Date;a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),e.$emit("pick",[a,t])}},{text:"昨天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.$emit("pick",[a,t])}},{text:"最近7天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-6048e5),e.$emit("pick",[a,t])}},{text:"最近30天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-2592e6),e.$emit("pick",[a,t])}},{text:"本月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),e.$emit("pick",[a,t])}},{text:"本年",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),0,1))),e.$emit("pick",[a,t])}}]}},"889c":function(e,t,a){"use strict";a("8efe")},"8efe":function(e,t,a){},"995d":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("pages-header",{ref:"pageHeader",attrs:{title:"秒杀统计",backUrl:"/marketing/seckill/store_seckill/list"}}),e._v(" "),a("div",{staticClass:"selCard mt14 mb14"},[a("el-form",{ref:"searchForm",attrs:{model:e.tableFrom,inline:"",size:"small","label-width":"85px"},nativeOn:{submit:function(e){e.preventDefault()}}},["order"==e.type?a("el-form-item",{attrs:{label:"订单状态:",prop:"status"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择订单状态",clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.status,callback:function(t){e.$set(e.tableFrom,"status",t)},expression:"tableFrom.status"}},e._l(e.orderStatusList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"搜索:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"product"==e.type?"请输入商品名称/ID":"请输入用户姓名/手机/UID"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}})],1),e._v(" "),"product"!==e.type?a("el-form-item",{attrs:{label:"活动日期:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":e.pickerOptions},on:{change:e.onchangeTime},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1):e._e(),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),e.cardLists.length>0?a("cards-data",{attrs:{"card-lists":e.cardLists,more:!0}}):e._e(),e._v(" "),a("el-card",[a("el-tabs",{on:{"tab-click":function(t){return e.getList(1)}},model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("el-tab-pane",{attrs:{label:"活动参与人",name:"participants"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"活动订单",name:"order"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"活动商品",name:"product"}})],1),e._v(" "),"participants"==e.type?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small"}},[a("el-table-column",{key:"11",attrs:{prop:"nickname",label:"用户姓名","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.uid?a("span",[e._v("["+e._s(t.row.uid)+"]")]):e._e(),e._v(e._s(t.row.nickname)+"\n ")]}}],null,!1,2908637543)}),e._v(" "),a("el-table-column",{key:"10",attrs:{prop:"sum_total_num",label:"购买件数","min-width":"80"}}),e._v(" "),a("el-table-column",{key:"9",attrs:{prop:"order_count",label:"支付订单数","min-width":"90"}}),e._v(" "),a("el-table-column",{key:"8",attrs:{prop:"sum_pay_price",label:"支付金额","min-width":"90"}}),e._v(" "),a("el-table-column",{key:"7",attrs:{prop:"create_time",label:"最近参与时间","min-width":"90"}})],1):e._e(),e._v(" "),"order"==e.type?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small"}},[a("el-table-column",{key:"1",attrs:{prop:"order_sn",label:"订单号","min-width":"100"}}),e._v(" "),a("el-table-column",{key:"2",attrs:{prop:"nickname",label:"用户","min-width":"90"}}),e._v(" "),a("el-table-column",{key:"3",attrs:{prop:"status",label:"订单状态","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.is_del?a("span",[0===t.row.paid?a("span",[e._v("待付款")]):a("span",[0===t.row.order_type||2===t.row.order_type?a("span",[e._v(e._s(e._f("orderStatusFilter")(t.row.status)))]):a("span",[e._v(e._s(e._f("takeOrderStatusFilter")(t.row.status)))])])]):a("span",[e._v("已删除")])]}}],null,!1,3146762916)}),e._v(" "),a("el-table-column",{key:"4",attrs:{prop:"pay_price",label:"订单支付金额","min-width":"90"}}),e._v(" "),a("el-table-column",{key:"5",attrs:{prop:"total_num",label:"订单商品数","min-width":"90"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"下单时间","min-width":"100"}}),e._v(" "),a("el-table-column",{key:"6",attrs:{prop:"pay_time",label:"支付时间","min-width":"100"}})],1):e._e(),e._v(" "),a("el-table",{directives:[{name:"show",rawName:"v-show",value:"product"==e.type,expression:"type=='product'"},{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"tableList",attrs:{"row-key":"product_id",data:e.tableData.data,size:"small","default-expand-all":e.isExpand,"tree-props":{children:"children",hasChildren:"hasChildren"}}},[a("el-table-column",{key:"12",attrs:{prop:"product_id",label:"ID","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.sku?e._e():a("span",[e._v(e._s(t.row.product_id))])]}}])}),e._v(" "),a("el-table-column",{key:"13",attrs:{label:"商品图片","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1)]}}])}),e._v(" "),a("el-table-column",{key:"21",attrs:{label:"商品名称","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-tooltip",{attrs:{placement:"top","open-delay":600}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(t.row.store_name))]),e._v(" "),a("span",{staticClass:"line2"},[e._v(e._s(t.row.store_name))])])]}}])}),e._v(" "),a("el-table-column",{key:"14",attrs:{label:"商品分类","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.storeCategory&&t.row.storeCategory.cate_name||"-"))])]}}])}),e._v(" "),a("el-table-column",{key:"15",attrs:{prop:"mer_name",label:"商户名称","min-width":"80"}}),e._v(" "),a("el-table-column",{key:"16",attrs:{prop:"ot_price",label:"售价","min-width":"80"}}),e._v(" "),a("el-table-column",{key:"17",attrs:{prop:"stock",label:"限量","min-width":"80"}}),e._v(" "),a("el-table-column",{key:"18",attrs:{prop:"price",label:"秒杀价","min-width":"70"}}),e._v(" "),a("el-table-column",{key:"19",attrs:{prop:"sales",label:"秒杀销量","min-width":"70"}}),e._v(" "),a("el-table-column",{key:"20",attrs:{label:"活动场次","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.seckill_time_text_arr,(function(t,l){return a("div",{key:l},[e._v(e._s(t)),a("br")])}))}}])})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)],1)},i=[],n=a("b7be"),s=a("83d6"),r=a("0b65"),o=a("0f56"),c={name:"SeckillStatistics",components:{cardsData:o["a"]},data:function(){return{activity_id:this.$route.params.id,isExpand:!1,cardLists:[],spikeTimeList:[],type:"participants",pickerOptions:r["a"],getSelectSessionApi:[],orderStatusList:[{label:"全部",value:""},{label:"待付款",value:1},{label:"待发货",value:2},{label:"待收货",value:3},{label:"待核销",value:8},{label:"待评价",value:4},{label:"交易完成",value:5},{label:"已退款",value:6}],timeVal:[],roterPre:s["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,status:"",keyword:"",date:""}}},computed:{},mounted:function(){this.getCardList(),this.getSeckillIntervalList(),this.getList("")},methods:{searchReset:function(){this.timeVal=[],this.tableFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},onchangeTime:function(e){this.timeVal=e,this.tableFrom.date=e?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList(1)},getCardList:function(){var e=this;Object(n["eb"])(this.activity_id).then((function(t){e.cardLists=t.data})).catch((function(t){e.$message.error(t.message)}))},getSeckillIntervalList:function(){var e=this;Object(n["gb"])(this.activity_id).then((function(t){e.spikeTimeList=t.data})).catch((function(t){e.$message.error(t.message)}))},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page;var a=this.type;switch(a){case"order":Object(n["hb"])(this.activity_id,this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}));break;case"product":Object(n["kb"])(this.activity_id,this.tableFrom).then((function(e){t.tableData.total=e.data.count,t.getAttrValue(e.data.list),t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}));break;default:Object(n["ib"])(this.activity_id,this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))}},getAttrValue:function(e){var t=this;e.map((function(e){t.$set(e,"mer_name",e.merchant&&e.merchant.mer_name?e.merchant.mer_name:""),t.$set(e,"seckill_time_text_arr",e.seckillActive&&e.seckillActive.seckill_time_text_arr||[]),e.attrValue.map((function(a){t.$set(a,"store_name",a.sku||"默认"),t.$set(a,"image",a.image),t.$set(a,"mer_name",e.mer_name),t.$set(a,"storeCategory",e.storeCategory),t.$set(a,"stock",a.stock||0),t.$set(a,"sales",a.sales||0),t.$set(a,"price",a.price||0),t.$set(a,"product_id",a.value_id||0),t.$set(a,"seckill_time_text_arr",e.seckill_time_text_arr)})),t.$set(e,"children",e.attrValue)})),t.tableData.data=e},pageChange:function(e){this.tableFrom.page=e,this.getList("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList(1)}}},m=c,u=(a("889c"),a("2877")),d=Object(u["a"])(m,l,i,!1,null,"4e15d8fa",null);t["default"]=d.exports}}]);