1 |
- webpackJsonp([35],{Noee:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("Xxa5"),i=a.n(s),r=a("exGp"),n=a.n(r),l=a("gzej"),o=a("McOJ"),c=a("K7TI"),p=a("vieU"),d={mixins:[c.a],components:{datePicker:l.a,selfInput:o.a,TableList:p.a},props:{},data:function(){var t=[this.$getDay(-30,!1),this.$getDay(0,!1)];return{showTrend:!0,uploadParams:{admin_id:this.$cookie.getCookie("admin_id"),ttl:this.$cookie.getCookie("ttl"),sign:this.$cookie.getCookie("sign"),corpid:this.$localSelfStore.getLocal("defaultCorp")&&"undefined"!=this.$localSelfStore.getLocal("defaultCorp")?JSON.parse(this.$localSelfStore.getLocal("defaultCorp")).corpid:""},myChart:null,loading_sum:!1,loading_list:!1,uploadLoading:!1,groupOptions:[],pidOptions:[],orderStatusList:[{value:0,label:"全部状态"},{value:1,label:"已付款"},{value:2,label:"已收货"},{value:3,label:"已结算"},{value:4,label:"已失效"}],dataList:[{key:"tal_order_count",label:"总订单数",value:""},{key:"tal_pay_price",label:"GMV",value:""},{key:"tal_pub_share_pre_fee",label:"预估收入",value:""},{key:"tal_settle_fee",label:"结算收入",value:""},{key:"tal_ref_order_count",label:"总退单数",value:""}],echartsData:{date:[],order_count:[],pay_price:[],pub_share_pre_fee:[],settle_fee:[],ref_order_count:[]},default_time:t,filter:{time:t,sp_group_id:[],pid:[],order_status:"",keyword:""},pagination:{page:1,page_size:20,pages:0,total:0},tableData:[],descolList:[{name:"订单信息",column:"orderInfo",alignSelf:"left",slotFlag:!0,minWidth:"220px"},{name:"订单时间",column:"orderTime",slotFlag:!0,alignSelf:"left",minWidth:"130px"},{name:"订单状态",column:"tk_status",minWidth:"60px",slotFlag:!0},{name:"付款金额",column:"pay_price",minWidth:"60px",slotFlag:!0},{name:"佣金信息",column:"commissionInfo",slotFlag:!0,alignSelf:"left",minWidth:"90px"},{name:"推广信息",column:"promotionInfo",slotFlag:!0,alignSelf:"left",minWidth:"150px"},{name:"商品类目",column:"item_category_name",slotFlag:!0}],chatIds:[],chatList:[]}},created:function(){this.pagination.page=1,this.handleGetSummary(),this.handleGetList(),this.getChatList(),this.handleGetGroupOptions(),this.handleGetPidOptions()},beforeDestroy:function(){this.myChart&&this.myChart.clear()},methods:{getChatList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.chatGroup_groupList,{params:{page:1,page_size:2e3}}).then(function(e){e=e.data;t.loading=!1,e&&0==e.errno?t.chatList=e.rst.data:4002!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.loading=!1})},showTrendChange:function(t){t&&this.initEchartsVal()},copyEvent:function(t){var e=this;this.$copy(t,function(){e.$message.warning("复制成功")})},handleGetGroupOptions:function(){var t=this;return n()(i.a.mark(function e(){var a,s,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$axios.get(t.URL.BASEURL+t.URL.promoteManage_groupListInDialog,{params:{sys_group_id:1==t.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}});case 3:a=e.sent,s=a.data,(r=void 0===s?{}:s)&&0==r.errno?t.groupOptions=r.rst:4002!=r.errno&&(t.groupOptions=[],t.$message.warning(r.err||"操作失败")),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log("error =>",e.t0);case 12:case"end":return e.stop()}},e,t,[[0,9]])}))()},handleGetPidOptions:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.promoteManage_list,{params:{account_id:this.$localSelfStore.getLocal("tbAcId")&&"undefined"!=this.$localSelfStore.getLocal("tbAcId")?JSON.parse(this.$localSelfStore.getLocal("tbAcId")):""}}).then(function(e){(e=e.data)&&0==e.errno?t.pidOptions=e.rst:4002!=e.errno&&t.$message({message:e.err,type:"warning"})})},handleGetSummary:function(){var t=this;return n()(i.a.mark(function e(){var a,s,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading_sum=!0,e.next=4,t.$axios.get(t.URL.BASEURL+t.URL.goods_summaryTrend,{params:{st_time:t.filter.time[0],en_time:t.filter.time[1],sp_group_ids:t.filter.sp_group_id,chat_ids:t.chatIds,pids:t.filter.pid,order_status:t.filter.order_status,keyword:t.filter.keyword}});case 4:a=e.sent,s=a.data,(r=void 0===s?{}:s)&&0==r.errno?(t.dataList.forEach(function(t){t.value=r.rst.summary[t.key]}),t.echartsData.date=[],t.echartsData.order_count=[],t.echartsData.pay_price=[],t.echartsData.pub_share_pre_fee=[],t.echartsData.settle_fee=[],t.echartsData.ref_order_count=[],r.rst.trend.forEach(function(e){t.echartsData.date.push(e.day),t.echartsData.order_count.push(e.order_count),t.echartsData.pay_price.push(e.pay_price),t.echartsData.pub_share_pre_fee.push(e.pub_share_pre_fee),t.echartsData.settle_fee.push(e.settle_fee),t.echartsData.ref_order_count.push(e.ref_order_count)}),t.initEchartsVal()):4002!=r.errno&&(t.dataList.forEach(function(t){t.value=""}),t.echartsData.date=[],t.echartsData.order_count=[],t.echartsData.pay_price=[],t.echartsData.pub_share_pre_fee=[],t.echartsData.settle_fee=[],t.echartsData.ref_order_count=[],t.initEchartsVal(),t.$message.warning(r.err||"操作失败")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("error =>",e.t0);case 13:return e.prev=13,t.loading_sum=!1,e.finish(13);case 16:case"end":return e.stop()}},e,t,[[0,10,13,16]])}))()},turnPage:function(t){this.pagination.page=t,this.handleGetList()},handleGetList:function(){var t=this;return n()(i.a.mark(function e(){var a,s,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading_list=!0,e.next=4,t.$axios.get(t.URL.BASEURL+t.URL.goods_ordersList,{params:{st_time:t.filter.time[0],en_time:t.filter.time[1],sp_group_ids:t.filter.sp_group_id,chat_ids:t.chatIds,pids:t.filter.pid,order_status:t.filter.order_status,keyword:t.filter.keyword,page:t.pagination.page,pageSize:t.pagination.page_size}});case 4:a=e.sent,s=a.data,(r=void 0===s?{}:s)&&0==r.errno?(t.tableData=r.rst.data,t.pagination.pages=r.rst.pageInfo.pages,t.pagination.total=r.rst.pageInfo.total):4002!=r.errno&&(t.tableData=[],t.pagination.pages=0,t.pagination.total=0,t.$message.warning(r.err||"操作失败")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("error =>",e.t0);case 13:return e.prev=13,t.loading_list=!1,e.finish(13);case 16:case"end":return e.stop()}},e,t,[[0,10,13,16]])}))()},initEchartsVal:function(){this.myChart&&this.myChart.clear();var t={legend:{icon:"circle",data:["订单","预估收入","GMV","结算收入","退单"],show:!0,itemGap:22,itemWidth:14,itemHeight:14,left:0},grid:{left:0,right:20,bottom:0,containLabel:!0},xAxis:{type:"category",data:this.echartsData.date,axisTick:{show:!1}},tooltip:{trigger:"axis"},yAxis:{type:"value"},series:[{showSymbol:!1,data:this.echartsData.order_count,type:"line",name:"订单"},{showSymbol:!1,data:this.echartsData.pub_share_pre_fee,type:"line",name:"预估收入"},{showSymbol:!1,data:this.echartsData.pay_price,type:"line",name:"GMV"},{showSymbol:!1,data:this.echartsData.settle_fee,type:"line",name:"结算收入"},{showSymbol:!1,data:this.echartsData.ref_order_count,type:"line",name:"退单"}]};this.myChart=this.myChart?this.myChart:this.$echarts.init(document.getElementById("trend")),this.myChart.setOption(t)},changeToInit:function(t,e){"time"==t&&(this.filter.time=Array.isArray(e)?e:[]),"keyword"==t&&(this.filter.keyword=e),this.pagination.page=1,this.handleGetSummary(),this.handleGetList()},handleAvatarSuccess:function(t,e,a){var s=this;return n()(i.a.mark(function e(){return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.uploadLoading=!1,s.$refs.uploadRef.clearFiles(),0==t.errno?(s.$message.success("上传成功"),s.pagination.page=1,s.handleGetSummary(),s.handleGetList()):s.$message.error("文件上传失败");case 3:case"end":return e.stop()}},e,s)}))()},handleAvatarError:function(t,e,a){this.uploadLoading=!1,this.$message.error("操作失败")},handleExceed:function(){this.$message.error("最多可传一个文件")}}},_={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"order-wrap"},[a("div",{staticClass:"header-wrap"},[a("datePicker",{attrs:{title:"",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:function(e){return t.changeToInit("time",e)}}}),t._v(" "),a("div",{staticClass:"upload-btn"},[a("div",{staticClass:"pageFlex rMar10"},[a("div",{staticClass:"f14"},[t._v("订单曲线:")]),t._v(" "),a("el-switch",{on:{change:t.showTrendChange},model:{value:t.showTrend,callback:function(e){t.showTrend=e},expression:"showTrend"}})],1),t._v(" "),a("el-upload",{ref:"uploadRef",staticClass:"lMar10",attrs:{disabled:t.uploadLoading,action:t.URL.BASEURL+t.URL.goods_ordersImport,data:t.uploadParams,limit:1,accept:".csv","show-file-list":!1,"before-upload":function(){return t.uploadLoading=!0},"on-success":t.handleAvatarSuccess,"on-error":t.handleAvatarError,"on-exceed":t.handleExceed}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.uploadLoading,expression:"uploadLoading"}],attrs:{type:"primary",size:"small"}},[t._v("批量上传订单")])],1)],1)],1),t._v(" "),a("div",{staticClass:"filter-wrap"},[a("div",{staticClass:"filter-item"},[a("span",{staticClass:"filter-label"},[t._v("推广组")]),t._v(" "),a("el-select",{staticClass:"filter-select select-cls select-tag-self",attrs:{size:"mini",placeholder:"请选择","collapse-tags":"",multiple:"",filterable:"",clearable:""},on:{change:t.changeToInit},model:{value:t.filter.sp_group_id,callback:function(e){t.$set(t.filter,"sp_group_id",e)},expression:"filter.sp_group_id"}},t._l(t.groupOptions,function(t,e){return a("el-option",{key:e,attrs:{label:t.group_name,value:t.id}})}),1)],1),t._v(" "),a("div",{staticClass:"filter-item"},[a("span",{staticClass:"filter-label"},[t._v("推广位ID")]),t._v(" "),a("el-select",{staticClass:"filter-select select-cls select-tag-self",attrs:{size:"mini",multiple:"",filterable:"","collapse-tags":"",placeholder:"请选择",clearable:""},on:{change:t.changeToInit},model:{value:t.filter.pid,callback:function(e){t.$set(t.filter,"pid",e)},expression:"filter.pid"}},t._l(t.pidOptions,function(t,e){return a("el-option",{key:e,attrs:{label:t.pid_name+"("+t.pid+")",value:t.pid}})}),1)],1),t._v(" "),a("div",{staticClass:"filter-item"},[a("span",{staticClass:"filter-label"},[t._v("订单状态")]),t._v(" "),a("el-select",{staticClass:"filter-select select-cls",attrs:{size:"mini",filterable:"",placeholder:"请选择",clearable:""},on:{change:t.changeToInit},model:{value:t.filter.order_status,callback:function(e){t.$set(t.filter,"order_status",e)},expression:"filter.order_status"}},t._l(t.orderStatusList,function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),a("div",{staticClass:"filter-item"},[a("span",{staticClass:"filter-label"},[t._v("ID")]),t._v(" "),a("selfInput",{attrs:{iptSize:"mini",hasLabel:!1,label_name:"订单ID或商品ID"},on:{inputChange:function(e){return t.changeToInit("keyword",e)}}})],1),t._v(" "),a("div",{staticClass:"filter-item"},[a("span",{staticClass:"filter-label"},[t._v("推广群")]),t._v(" "),a("el-select",{staticClass:"filter-select select-cls select-tag-self",attrs:{size:"mini",placeholder:"请选择",filterable:"","collapse-tags":"",multiple:"",clearable:""},on:{change:t.changeToInit},model:{value:t.chatIds,callback:function(e){t.chatIds=e},expression:"chatIds"}},t._l(t.chatList,function(t){return a("el-option",{key:t.chat_id,attrs:{label:t.name,value:t.chat_id}})}),1)],1)]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading_sum,expression:"loading_sum"}],staticClass:"content-wrap"},[a("div",{staticClass:"sum-data-wrap"},t._l(t.dataList,function(e){return a("div",{key:e.key,staticClass:"sum-data-item"},[a("span",[t._v(t._s(e.label))]),t._v(" "),a("span",{staticClass:"val fWeight600"},[t._v(t._s(e.value||"-"))])])}),0),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.showTrend,expression:"showTrend"}],staticClass:"chart-wrap"},[a("div",{staticStyle:{width:"100%",height:"250px"},attrs:{id:"trend"}})])]),t._v(" "),a("div",{staticClass:"table_warp"},[a("TableList",{ref:"tableListRef",attrs:{tableHeight:"600px",loading:t.loading_list,tableData:t.tableData,descol:t.descolList,showPagination:!0,currentPageProp:t.pagination.page,total:t.pagination.total},on:{turnPageEvent:function(e){return t.turnPage(e)}},scopedSlots:t._u([{key:"orderInfo",fn:function(e){return[a("div",{staticClass:"orderInfo"},[a("div",[a("img",{attrs:{src:e.row.item_image,alt:""}})]),t._v(" "),a("div",{staticClass:"textBox"},[a("div",{staticClass:"clampOne2 f13",attrs:{title:e.row.item_title}},[t._v(t._s(e.row.item_title||"-"))]),t._v(" "),a("div",{staticClass:"clampOne2 f12 c-999",attrs:{title:e.row.seller_shop_title}},[t._v(t._s(e.row.seller_shop_title||"-"))]),t._v(" "),a("div",{staticClass:"clampOne2 f12"},[a("span",{staticClass:"c-999"},[t._v("商品ID:")]),a("span",{staticClass:"pointer",attrs:{title:e.row.item_id},on:{click:function(a){return t.copyEvent(e.row.item_id)}}},[t._v(t._s(e.row.item_id||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2 f12"},[a("span",{staticClass:"c-999"},[t._v("订单号:")]),a("span",{staticClass:"pointer",attrs:{title:e.row.trade_id},on:{click:function(a){return t.copyEvent(e.row.trade_id)}}},[t._v(t._s(e.row.trade_id||"-"))])])])])]}},{key:"orderTime",fn:function(e){return[a("div",{staticClass:"f13"},[a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("创建:")]),t._v(" "),a("span",{attrs:{title:e.row.tk_create_time}},[t._v(t._s(e.row.tk_create_time||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("点击:")]),t._v(" "),a("span",{attrs:{title:e.row.click_time}},[t._v(t._s(e.row.click_time||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("付款:")]),t._v(" "),a("span",{attrs:{title:e.row.tb_paid_time}},[t._v(t._s(e.row.tb_paid_time||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("结算:")]),t._v(" "),a("span",{attrs:{title:e.row.tk_earning_time}},[t._v(t._s(e.row.tk_earning_time||"-"))])])])]}},{key:"commissionInfo",fn:function(e){return[a("div",{staticClass:" f13"},[a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("提成:")]),t._v(" "),a("span",{attrs:{title:e.row.tk_total_rate}},[t._v(t._s(e.row.tk_total_rate||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("预估佣金:")]),t._v(" "),a("span",{attrs:{title:e.row.pub_share_pre_fee}},[t._v(t._s(e.row.pub_share_pre_fee||"-"))])]),t._v(" "),a("div",{staticClass:"clampOne2"},[a("span",{staticClass:"c-999 f12"},[t._v("结算佣金:")]),t._v(" "),a("span",{attrs:{title:e.row.settle_fee}},[t._v(t._s(e.row.settle_fee||"-"))])])])]}},{key:"promotionInfo",fn:function(e){return[a("div",{staticClass:" f13"},[a("div",{staticClass:"clampTwo"},[a("span",{staticClass:"c-999 f12"},[t._v("推广位ID:")]),t._v(" "),a("span",{staticClass:"pointer",attrs:{title:e.row.pid},on:{click:function(a){return t.copyEvent(e.row.pid)}}},[t._v(t._s(e.row.pid||"-"))])]),t._v(" "),a("div",{staticClass:"clampTwo"},[a("span",{staticClass:"c-999 f12"},[t._v("推广群:")]),t._v(" "),a("span",{staticClass:"pointer",attrs:{title:e.row.chat_name},on:{click:function(a){return t.copyEvent(e.row.chat_name)}}},[t._v(t._s(e.row.chat_name||"-"))])])])]}},{key:"tk_status",fn:function(e){return[a("div",{staticClass:"text-center f13"},[t._v(t._s(e.row.tk_status||"-"))])]}},{key:"pay_price",fn:function(e){return[a("div",{staticClass:"text-center f13"},[t._v(t._s(t.$formatNum(e.row.pay_price)||"-"))])]}},{key:"item_category_name",fn:function(e){return[a("div",{staticClass:"text-center f13"},[t._v(t._s(e.row.item_category_name||"-"))])]}}])})],1)])},staticRenderFns:[]};var u=a("VU/8")(d,_,!1,function(t){a("sg3x"),a("Vzxv")},"data-v-136338de",null);e.default=u.exports},Vzxv:function(t,e){},sg3x:function(t,e){}});
|