chunk-7a86b21f.29a0ed6d.js 62.1 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7a86b21f"],{"0427":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[t._m(0),a("div",{staticClass:"filter-container"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryParams}},[a("el-form-item",{attrs:{label:"拓客活动"}},[a("el-select",{style:{width:"100%"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入关键词","remote-method":t.remoteMethod,loading:t.tkhdLoading},model:{value:t.queryParams.eventId,callback:function(e){t.$set(t.queryParams,"eventId",e)},expression:"queryParams.eventId"}},t._l(t.eventList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.eventName,value:t.id}})})),1)],1),"employee-statistics"===t.activeTab?a("el-form-item",{attrs:{label:"开始时间"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{type:"date",placeholder:"选择开始时间",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.queryParams.startTime,callback:function(e){t.$set(t.queryParams,"startTime",e)},expression:"queryParams.startTime"}})],1):t._e(),"employee-statistics"===t.activeTab?a("el-form-item",{attrs:{label:"结束时间"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{type:"date",placeholder:"选择结束时间",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.queryParams.endTime,callback:function(e){t.$set(t.queryParams,"endTime",e)},expression:"queryParams.endTime"}})],1):t._e(),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[t._v("查询")]),a("el-button",{on:{click:t.resetQuery}},[t._v("重置")]),a("el-button",{attrs:{type:"success",icon:"el-icon-camera",loading:t.screenshotLoading},on:{click:t.saveScreenshot}},[t._v("\n          保存截图\n        ")])],1)],1)],1),a("div",{staticClass:"tabs-container"},[a("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[a("el-tab-pane",{attrs:{label:"团队数据",name:"team"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.teamLoading,expression:"teamLoading"}],staticClass:"tab-content"},[0===t.teamData.length?a("div",{staticClass:"no-data"},[t._v("\n            暂无数据\n          ")]):a("div",[a("div",{staticClass:"statistics-overview"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-shop"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.teamData.length))]),a("div",{staticClass:"stat-label"},[t._v("参与门店")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-custom"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalTeams()))]),a("div",{staticClass:"stat-label"},[t._v("参与战队")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-custom"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalMembers()))]),a("div",{staticClass:"stat-label"},[t._v("参与人员")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-trophy-1"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalExpansionCount()))]),a("div",{staticClass:"stat-label"},[t._v("总拓客数")])])])])],1)],1),a("div",{staticClass:"waterfall-container"},t._l(t.sortedTeamData,(function(e){return a("div",{key:e.StoreId,staticClass:"store-card-waterfall"},[a("div",{staticClass:"store-header"},[a("div",{staticClass:"store-title-row"},[a("h4",[t._v(t._s(e.StoreName))]),a("div",{staticClass:"store-summary"},[a("span",{staticClass:"summary-text"},[t._v("\n                        目标: "),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getStoreTotalTarget(e)))])]),a("span",{staticClass:"summary-text"},[t._v("\n                        完成: "),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getStoreTotalCompleted(e)))])]),a("span",{staticClass:"summary-text"},[t._v("\n                        完成率: "),a("span",{staticClass:"summary-value",class:t.getStoreCompletionRateClass(e)},[t._v("\n                          "+t._s(t.getStoreCompletionRate(e))+"%\n                        ")])])])])]),a("div",{staticClass:"teams-container"},t._l(e.TeamList,(function(e){return a("div",{key:e.TeamName,staticClass:"team-card"},[a("div",{staticClass:"team-header"},[a("span",{staticClass:"team-name"},[t._v(t._s(e.TeamName))])]),a("div",{staticClass:"team-members"},t._l(e.TeamUserInfo,(function(e){return a("div",{key:e.ExpansionUserId,staticClass:"member-row"},[a("div",{staticClass:"member-info"},[a("span",{staticClass:"member-name"},[t._v(t._s(e.ExpansionUserName))])]),a("div",{staticClass:"member-stats"},[a("span",{staticClass:"target"},[t._v("目标: "+t._s(e.EventTarget))]),a("span",{staticClass:"count"},[t._v("完成: "+t._s(e.ExpansionCount))]),a("span",{staticClass:"rate",class:t.getCompletionRateClass(e.ExpansionCount,e.EventTarget)},[t._v("\n                            完成率: "+t._s(t.getCompletionRate(e.ExpansionCount,e.EventTarget))+"%\n                          ")])])])})),0)])})),0)])})),0)])])]),a("el-tab-pane",{attrs:{label:"排行榜",name:"ranking"}},[a("div",{staticClass:"tab-content"},[a("div",{staticClass:"ranking-section"},[a("h3",{staticClass:"ranking-title"},[a("i",{staticClass:"el-icon-s-shop"}),t._v("\n              门店排行榜\n            ")]),a("div",{staticClass:"ranking-cards"},t._l(t.topStoreData,(function(e,s){return a("div",{key:e.StoreId,staticClass:"ranking-card",class:"rank-"+(s+1)},[a("div",{staticClass:"rank-number"},[t._v(t._s(s+1))]),a("div",{staticClass:"rank-content"},[a("div",{staticClass:"rank-name"},[t._v(t._s(e.StoreName))]),a("div",{staticClass:"rank-stats"},[a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("目标")]),a("span",{staticClass:"stat-value target"},[t._v(t._s(e.TotalTarget))])]),a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("完成")]),a("span",{staticClass:"stat-value completed"},[t._v(t._s(e.CompletedTarget))])]),a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("完成率")]),a("span",{staticClass:"stat-value rate",class:t.getCompletionRateClass(e.CompletedTarget,e.TotalTarget)},[t._v("\n                        "+t._s(e.CompletionRate)+"%\n                      ")])])])]),s<3?a("div",{staticClass:"rank-medal"}):t._e()])})),0)]),a("div",{staticClass:"ranking-section"},[a("h3",{staticClass:"ranking-title"},[a("i",{staticClass:"el-icon-s-custom"}),t._v("\n              个人排行榜\n            ")]),a("div",{staticClass:"ranking-cards"},t._l(t.topPersonData,(function(e,s){return a("div",{key:e.UserId,staticClass:"ranking-card person-card",class:"rank-"+(s+1)},[a("div",{staticClass:"rank-number"},[t._v(t._s(s+1))]),a("div",{staticClass:"rank-content"},[a("div",{staticClass:"rank-name"},[t._v(t._s(e.UserName))]),a("div",{staticClass:"rank-store"},[t._v(t._s(e.StoreName)+" - "+t._s(e.TeamName))]),a("div",{staticClass:"rank-stats"},[a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("目标")]),a("span",{staticClass:"stat-value target"},[t._v(t._s(e.PersonalTarget))])]),a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("完成")]),a("span",{staticClass:"stat-value completed"},[t._v(t._s(e.CompletedTarget))])]),a("div",{staticClass:"stat-row"},[a("span",{staticClass:"stat-label"},[t._v("完成率")]),a("span",{staticClass:"stat-value rate",class:t.getCompletionRateClass(e.CompletedTarget,e.PersonalTarget)},[t._v("\n                        "+t._s(e.CompletionRate)+"%\n                      ")])])])]),s<3?a("div",{staticClass:"rank-medal"}):t._e()])})),0)])])]),a("el-tab-pane",{attrs:{label:"未拓客人员",name:"no-expansion"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.personLoading,expression:"personLoading"}],staticClass:"tab-content"},[0===t.noExpansionData.length?a("div",{staticClass:"no-data"},[t._v("\n            暂无未拓客人员\n          ")]):a("div",[a("div",{staticClass:"no-expansion-summary"},[t._v("\n              未拓客人员总数:"+t._s(t.noExpansionData.length)+"人\n            ")]),a("div",{staticClass:"no-expansion-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.noExpansionData,stripe:""}},[a("el-table-column",{attrs:{prop:"UserName",label:"姓名"}}),a("el-table-column",{attrs:{prop:"StoreName",label:"门店"}}),a("el-table-column",{attrs:{prop:"TeamName",label:"团队"}}),a("el-table-column",{attrs:{prop:"PersonalTarget",label:"个人目标",align:"center"}}),a("el-table-column",{attrs:{prop:"CompletedTarget",label:"完成数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"zero-count"},[t._v(t._s(e.row.CompletedTarget))])]}}])}),a("el-table-column",{attrs:{label:"完成率","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"progress-container"},[a("div",{staticClass:"progress-bar"},[a("div",{staticClass:"progress-fill zero-progress",style:{width:Math.min(e.row.CompletionRate,100)+"%"}})]),a("span",{staticClass:"progress-text"},[t._v(t._s(e.row.CompletionRate)+"%")])])]}}])}),a("el-table-column",{attrs:{label:"最后拓客时间",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                  "+t._s(t.formatTime(e.row.LastExpansionTime))+"\n                ")]}}])})],1)],1)])])]),a("el-tab-pane",{attrs:{label:"门店排行榜",name:"store-ranking"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.storeLoading,expression:"storeLoading"}],staticClass:"tab-content"},[0===t.storeData.length?a("div",{staticClass:"no-data"},[t._v("\n            暂无门店数据\n          ")]):a("div",[a("div",{staticClass:"store-ranking-table"},[a("el-table",{staticStyle:{width:"auto"},attrs:{data:t.sortedStoreData,"show-header":!0}},[a("el-table-column",{attrs:{prop:"StoreName",label:"门店",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:{"total-label":e.row.isTotal}},[t._v(t._s(e.row.StoreName))])]}}])}),a("el-table-column",{attrs:{prop:"TotalTarget",label:"目标张数",width:"85",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:{"total-value":e.row.isTotal}},[t._v(t._s(e.row.TotalTarget))])]}}])}),a("el-table-column",{attrs:{prop:"CompletedTarget",label:"总张数",width:"85",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:{"total-value":e.row.isTotal}},[t._v(t._s(e.row.CompletedTarget))])]}}])}),a("el-table-column",{attrs:{label:"完成率",width:"85",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:{"total-value":e.row.isTotal}},[t._v(t._s(t.formatCompletionRate(e.row.CompletionRate))+"%")])]}}])}),a("el-table-column",{attrs:{label:"排名",width:"70",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.isTotal?a("span"):a("span",{staticClass:"ranking",class:t.getRankingClass(e.$index+1)},[t._v("\n                      "+t._s(e.$index+1)+"\n                    ")])]}}])})],1)],1)])])]),a("el-tab-pane",{attrs:{label:"到店情况",name:"store-visit"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.funnelLoading,expression:"funnelLoading"}],staticClass:"tab-content"},[0===t.funnelData.length?a("div",{staticClass:"no-data"},[t._v("\n            暂无到店情况数据\n          ")]):a("div",[a("div",{staticClass:"store-visit-summary"},[a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("参与门店总数:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.funnelData.length)+"家")])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总拓客数量:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalTkCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总沟通数量:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalYaoyCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总预约数量:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalYyCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总开单数量:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalKdCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总耗卡数量:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalHkCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总耗卡金额:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.formatMoney(t.getTotalHkAmount())))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总开单金额:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.formatMoney(t.getTotalKdAmount())))])])]),a("div",{staticClass:"store-visit-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sortedFunnelData,stripe:""}},[a("el-table-column",{attrs:{prop:"store_name",label:"门店",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"store-name-link",on:{click:function(a){return t.handleStoreClick(e.row)}}},[t._v("\n                      "+t._s(e.row.store_name)+"\n                    ")])]}}])}),a("el-table-column",{attrs:{prop:"tk_count",label:"拓客数量",align:"center",sortable:""}}),a("el-table-column",{attrs:{prop:"yaoy_count",label:"沟通数量",align:"center",sortable:""}}),a("el-table-column",{attrs:{prop:"yy_count",label:"预约数量",align:"center",sortable:""}}),a("el-table-column",{attrs:{prop:"kd_count",label:"开单数量",align:"center",sortable:""}}),a("el-table-column",{attrs:{prop:"hk_count",label:"耗卡数量",align:"center",sortable:""}}),a("el-table-column",{attrs:{prop:"hk_amount",label:"耗卡金额",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(t.formatMoney(e.row.hk_amount))+"\n                  ")]}}])}),a("el-table-column",{attrs:{prop:"kd_amount",label:"开单金额",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(t.formatMoney(e.row.kd_amount))+"\n                  ")]}}])}),a("el-table-column",{attrs:{prop:"visit_rate",label:"到店率",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(e.row.visit_rate?e.row.visit_rate+"%":"0%")+"\n                  ")]}}])}),a("el-table-column",{attrs:{prop:"deal_rate",label:"成交率",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(e.row.deal_rate?e.row.deal_rate+"%":"0%")+"\n                  ")]}}])})],1)],1)])])]),a("el-tab-pane",{attrs:{label:"员工统计",name:"employee-statistics"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.employeeStatisticsLoading,expression:"employeeStatisticsLoading"}],staticClass:"tab-content"},[t.employeeStatisticsData&&0!==t.employeeStatisticsList.length?a("div",[a("div",{staticClass:"store-visit-summary"},[a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("统计周期:")]),a("span",{staticClass:"summary-value"},[t._v("\n                  "+t._s(t.formatDate(t.employeeStatisticsData.startTime||t.employeeStatisticsData.StartTime))+" 至 "+t._s(t.formatDate(t.employeeStatisticsData.endTime||t.employeeStatisticsData.EndTime))+"\n                ")])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("参与员工总数:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.employeeStatisticsList.length)+"人")])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总拓客人数:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalEmployeeExpansionCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总到店人数:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalEmployeeVisitCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总开单人数:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getTotalEmployeeBillingCount()))])]),a("div",{staticClass:"summary-item"},[a("span",{staticClass:"summary-label"},[t._v("总开单金额:")]),a("span",{staticClass:"summary-value"},[t._v(t._s(t.formatMoney(t.getTotalEmployeeBillingAmount())))])])]),a("div",{staticClass:"store-visit-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.employeeStatisticsList,stripe:""}},[a("el-table-column",{attrs:{prop:"employeeName",label:"员工姓名",align:"center"}}),a("el-table-column",{attrs:{prop:"departmentName",label:"部门名称",align:"center"}}),a("el-table-column",{attrs:{prop:"position",label:"岗位",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(e.row.position||"无")+"\n                  ")]}}])}),a("el-table-column",{attrs:{prop:"expansionCount",label:"拓客人数",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"stat-value"},[t._v(t._s(e.row.expansionCount||0))])]}}])}),a("el-table-column",{attrs:{prop:"visitCount",label:"到店人数",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"stat-value"},[t._v(t._s(e.row.visitCount||0))])]}}])}),a("el-table-column",{attrs:{prop:"billingCount",label:"开单人数",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"stat-value"},[t._v(t._s(e.row.billingCount||0))])]}}])}),a("el-table-column",{attrs:{prop:"billingAmount",label:"开单金额",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"stat-value"},[t._v(t._s(t.formatMoney(e.row.billingAmount)))])]}}])}),a("el-table-column",{attrs:{label:"到店率",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(t.getEmployeeVisitRate(e.row))+"%\n                  ")]}}])}),a("el-table-column",{attrs:{label:"开单率",align:"center",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n                    "+t._s(t.getEmployeeBillingRate(e.row))+"%\n                  ")]}}])})],1)],1)]):a("div",{staticClass:"no-data"},[t._v("\n            暂无员工统计数据,请选择时间范围并查询\n          ")])])])],1)],1),a("div",{staticClass:"report-sections-container",staticStyle:{display:"none"}},[a("div",{staticClass:"report-section"},[t._m(1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.teamLoading,expression:"teamLoading"}],staticClass:"report-content"},[0===t.teamData.length?a("div",{staticClass:"no-data"},[t._v("\n        暂无数据\n      ")]):a("div",[a("div",{staticClass:"statistics-overview"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-shop"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.teamData.length))]),a("div",{staticClass:"stat-label"},[t._v("参与门店")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-custom"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalTeams()))]),a("div",{staticClass:"stat-label"},[t._v("参与战队")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-s-custom"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalMembers()))]),a("div",{staticClass:"stat-label"},[t._v("参与人员")])])])]),a("el-col",{attrs:{span:6}},[a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon"},[a("i",{staticClass:"el-icon-trophy-1"})]),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-number"},[t._v(t._s(t.getTotalExpansionCount()))]),a("div",{staticClass:"stat-label"},[t._v("总拓客数")])])])])],1)],1),a("div",{staticClass:"waterfall-container"},t._l(t.teamData,(function(e){return a("div",{key:e.StoreId,staticClass:"store-card-waterfall"},[a("div",{staticClass:"store-header"},[a("div",{staticClass:"store-title-row"},[a("h4",[t._v(t._s(e.StoreName))]),a("div",{staticClass:"store-summary"},[a("span",{staticClass:"summary-text"},[t._v("\n                    目标: "),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getStoreTotalTarget(e)))])]),a("span",{staticClass:"summary-text"},[t._v("\n                    完成: "),a("span",{staticClass:"summary-value"},[t._v(t._s(t.getStoreTotalCompleted(e)))])]),a("span",{staticClass:"summary-text"},[t._v("\n                    完成率: "),a("span",{staticClass:"summary-value",class:t.getStoreCompletionRateClass(e)},[t._v("\n                      "+t._s(t.getStoreCompletionRate(e))+"%\n                    ")])])])])]),a("div",{staticClass:"teams-container"},t._l(e.TeamList,(function(e){return a("div",{key:e.TeamName,staticClass:"team-card"},[a("div",{staticClass:"team-header"},[a("span",{staticClass:"team-name"},[t._v(t._s(e.TeamName))])]),a("div",{staticClass:"team-members"},t._l(e.TeamUserInfo,(function(e){return a("div",{key:e.ExpansionUserId,staticClass:"member-row"},[a("div",{staticClass:"member-info"},[a("span",{staticClass:"member-name"},[t._v(t._s(e.ExpansionUserName))])]),a("div",{staticClass:"member-stats"},[a("span",{staticClass:"target"},[t._v("目标: "+t._s(e.EventTarget))]),a("span",{staticClass:"count"},[t._v("完成: "+t._s(e.ExpansionCount))]),a("span",{staticClass:"rate",class:t.getCompletionRateClass(e.ExpansionCount,e.EventTarget)},[t._v("\n                        完成率: "+t._s(t.getCompletionRate(e.ExpansionCount,e.EventTarget))+"%\n                      ")])])])})),0)])})),0)])})),0)])])]),a("div",{staticClass:"report-section"},[t._m(2),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.storeLoading,expression:"storeLoading"}],staticClass:"report-content"},[0===t.storeData.length?a("div",{staticClass:"no-data"},[t._v("\n        暂无数据\n      ")]):a("div",{staticClass:"store-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.storeData,stripe:""}},[a("el-table-column",{attrs:{prop:"StoreName",label:"门店名称"}}),a("el-table-column",{attrs:{prop:"TotalTarget",label:"目标数据",align:"center"}}),a("el-table-column",{attrs:{prop:"CompletedTarget",label:"完成数量",align:"center"}}),a("el-table-column",{attrs:{label:"完成率","min-width":"180",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"progress-container"},[a("div",{staticClass:"progress-bar"},[a("div",{staticClass:"progress-fill",style:{width:e.row.CompletionRate+"%"}})]),a("span",{staticClass:"progress-text"},[t._v(t._s(e.row.CompletionRate)+"%")])])]}}])}),a("el-table-column",{attrs:{prop:"Ranking",label:"排名",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"ranking",class:t.getRankingClass(e.row.Ranking)},[t._v("\n                 "+t._s(e.row.Ranking)+"\n               ")])]}}])})],1)],1)])]),a("div",{staticClass:"report-section"},[t._m(3),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.personLoading,expression:"personLoading"}],staticClass:"report-content"},[0===t.personData.length?a("div",{staticClass:"no-data"},[t._v("\n        暂无数据\n      ")]):a("div",{staticClass:"person-table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.personData,stripe:""}},[a("el-table-column",{attrs:{prop:"UserName",label:"姓名"}}),a("el-table-column",{attrs:{prop:"StoreName",label:"门店"}}),a("el-table-column",{attrs:{prop:"TeamName",label:"团队"}}),a("el-table-column",{attrs:{prop:"PersonalTarget",label:"个人目标",align:"center"}}),a("el-table-column",{attrs:{prop:"CompletedTarget",label:"完成数量",align:"center"}}),a("el-table-column",{attrs:{label:"完成率","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"progress-container"},[a("div",{staticClass:"progress-bar"},[a("div",{staticClass:"progress-fill",style:{width:Math.min(e.row.CompletionRate,100)+"%"}})]),a("span",{staticClass:"progress-text"},[t._v(t._s(e.row.CompletionRate)+"%")])])]}}])}),a("el-table-column",{attrs:{prop:"Ranking",label:"排名",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"ranking",class:t.getRankingClass(e.row.Ranking)},[t._v("\n                 "+t._s(e.row.Ranking)+"\n               ")])]}}])}),a("el-table-column",{attrs:{label:"最后拓客时间",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n               "+t._s(t.formatTime(e.row.LastExpansionTime))+"\n             ")]}}])})],1)],1)])])]),a("el-dialog",{attrs:{title:"截图预览",visible:t.previewVisible,width:"80%","before-close":t.closePreview,center:""},on:{"update:visible":function(e){t.previewVisible=e}}},[a("div",{staticClass:"screenshot-preview"},[t.screenshotDataUrl?a("img",{staticStyle:{width:"100%","max-height":"70vh","object-fit":"contain"},attrs:{src:t.screenshotDataUrl,alt:"报表截图"}}):t._e()]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.closePreview}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.downloadScreenshot}},[t._v("下载图片")])],1)]),a("el-dialog",{attrs:{title:t.selectedStore?t.selectedStore.store_name+" - 客户详情":"客户详情",visible:t.storeDetailVisible,width:"90%","before-close":t.closeStoreDetail,center:""},on:{"update:visible":function(e){t.storeDetailVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.customerDetailsLoading,expression:"customerDetailsLoading"}],staticClass:"store-detail-content"},[0===t.storeCustomerDetails.length?a("div",{staticClass:"no-data"},[t._v("\n        暂无客户数据\n      ")]):a("div",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.storeCustomerDetails,stripe:""}},[a("el-table-column",{attrs:{prop:"customer_name",label:"客户姓名",align:"center"}}),a("el-table-column",{attrs:{prop:"customer_phone",label:"客户电话",align:"center",width:"120"}}),a("el-table-column",{attrs:{prop:"expansion_user_name",label:"拓客人员",align:"center",width:"120"}}),a("el-table-column",{attrs:{prop:"invitation_status",label:"沟通状态",align:"center"}}),a("el-table-column",{attrs:{prop:"appointment_status",label:"预约状态",align:"center"}}),a("el-table-column",{attrs:{prop:"consume_status",label:"耗卡状态",align:"center"}}),a("el-table-column",{attrs:{prop:"billing_status",label:"开卡状态",align:"center"}}),a("el-table-column",{attrs:{prop:"tk_time",label:"拓客时间",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatCustomerTime(e.row.tk_time))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"yaoy_time",label:"沟通创建时间",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatCustomerTime(e.row.yaoy_time))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"yaoy_appointment_time",label:"沟通预约时间",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatCustomerTime(e.row.yaoy_appointment_time))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"yy_time",label:"预约创建时间",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatCustomerTime(e.row.yy_time))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"appointment_time",label:"预约到店时间",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatCustomerTime(e.row.appointment_time))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"total_consume_amount",label:"耗卡金额",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatMoney(e.row.total_consume_amount))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"consume_count",label:"耗卡次数",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(e.row.consume_count||0)+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"total_billing_amount",label:"开卡金额",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatMoney(e.row.total_billing_amount))+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"billing_count",label:"开卡次数",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(e.row.billing_count||0)+"\n            ")]}}])}),a("el-table-column",{attrs:{prop:"total_debt_amount",label:"欠款金额",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n              "+t._s(t.formatMoney(e.row.total_debt_amount))+"\n            ")]}}])})],1),t.customerDetailsTotal>0?a("div",{staticClass:"pagination-container"},[a("el-pagination",{attrs:{"current-page":t.customerDetailsPageIndex,"page-sizes":[10,20,50,100],"page-size":t.customerDetailsPageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.customerDetailsTotal},on:{"size-change":t.handleCustomerDetailsPageSizeChange,"current-change":t.handleCustomerDetailsPageChange}})],1):t._e()],1)])])],1)},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header"},[a("h2",[t._v("拓客活动报表")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"section-header"},[a("h3",[t._v("团队数据报表")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"section-header"},[a("h3",[t._v("门店数据报表")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"section-header"},[a("h3",[t._v("个人数据报表")])])}],i=(a("a481"),a("2d63")),r=(a("ac6a"),a("c5f6"),a("7f7f"),a("96cf"),a("3b8d")),l=a("75fc"),o=(a("55dd"),a("f576"),a("e1df")),c=a("b775"),u={name:"TkjlbReport",data:function(){var t=new Date,e=new Date;e.setMonth(e.getMonth()-1);var a=function(t){var e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return"".concat(e,"-").concat(a,"-").concat(s)};return{tkhdLoading:!1,queryParams:{eventId:"",startTime:a(e),endTime:a(t)},eventList:[],teamData:[],storeData:[],personData:[],funnelData:[],employeeStatisticsData:null,employeeStatisticsList:[],storeCustomerDetails:[],customerDetailsTotal:0,customerDetailsPageIndex:1,customerDetailsPageSize:10,eventLoading:!1,teamLoading:!1,storeLoading:!1,personLoading:!1,funnelLoading:!1,employeeStatisticsLoading:!1,customerDetailsLoading:!1,screenshotLoading:!1,screenshotDataUrl:"",previewVisible:!1,storeDetailVisible:!1,selectedStore:null,activeTab:"team"}},computed:{sortedTeamData:function(){var t=this;return Object(l["a"])(this.teamData).sort((function(e,a){var s=t.getStoreCompletionRate(e),n=t.getStoreCompletionRate(a);return n-s}))},topStoreData:function(){return this.storeData.slice(0,3)},sortedStoreData:function(){var t=Object(l["a"])(this.storeData).sort((function(t,e){return e.CompletionRate-t.CompletionRate}));return t.push({StoreName:"总计",TotalTarget:this.getTotalStoreTarget(),CompletedTarget:this.getTotalStoreCompleted(),CompletionRate:this.getTotalCompletionRate(),isTotal:!0}),t},topPersonData:function(){return this.personData.slice().sort((function(t,e){return e.CompletedTarget-t.CompletedTarget})).slice(0,3)},noExpansionData:function(){return this.personData.filter((function(t){return 0===t.CompletedTarget}))},sortedFunnelData:function(){return Array.isArray(this.funnelData)?Object(l["a"])(this.funnelData).sort((function(t,e){return(e.hk_amount||0)-(t.hk_amount||0)})):[]}},created:function(){this.getEventList()},methods:{remoteMethod:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(""===e){t.next=6;break}return this.tkhdLoading=!0,t.next=4,Object(c["a"])({url:"/api/Extend/lqevent?page=1&pageSize=10&eventName="+e,method:"GET"}).then((function(t){a.tkhdLoading=!1,200==t.code&&t.data.list.length>0?a.eventList=t.data.list:a.eventList=[],console.error(a.eventList)}));case 4:t.next=6;break;case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),getEventList:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.eventLoading=!0,t.prev=1,console.log("正在获取活动列表..."),t.next=5,Object(o["a"])();case 5:e=t.sent,console.log("活动列表响应:",e),this.eventList=e.data.list||[],this.eventList.length>0&&(this.queryParams.eventId=this.eventList[0].id,console.log("默认选中活动:",this.eventList[0]),this.handleQuery()),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error("获取活动列表失败:",t.t0),this.$message.error("获取活动列表失败: "+t.t0.message),this.eventList=[];case 16:return t.prev=16,this.eventLoading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[1,11,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),handleQuery:function(){if("employee-statistics"===this.activeTab){if(!this.queryParams.startTime||!this.queryParams.endTime)return void this.$message.warning("请选择开始时间和结束时间");this.getEmployeeStatistics()}else{if(!this.queryParams.eventId)return void this.$message.warning("请选择拓客活动");this.getTeamData(),this.getStoreData(),this.getPersonData(),this.getFunnelData()}},resetQuery:function(){if("employee-statistics"===this.activeTab){var t=new Date,e=new Date;e.setMonth(e.getMonth()-1),this.queryParams.startTime=this.formatDateForPicker(e),this.queryParams.endTime=this.formatDateForPicker(t),this.queryParams.eventId="",this.employeeStatisticsData=null,this.employeeStatisticsList=[]}else this.eventList.length>0?(this.queryParams.eventId=this.eventList[0].id,this.handleQuery()):(this.queryParams.eventId="",this.teamData=[],this.storeData=[],this.personData=[],this.funnelData=[])},handleTabClick:function(t){if(this.activeTab=t.name,console.log("切换到选项卡:",t.name),"employee-statistics"===t.name){if(!this.queryParams.startTime||!this.queryParams.endTime){var e=new Date,a=new Date;a.setMonth(a.getMonth()-1),this.queryParams.startTime=this.formatDateForPicker(a),this.queryParams.endTime=this.formatDateForPicker(e)}this.queryParams.startTime&&this.queryParams.endTime&&this.getEmployeeStatistics()}},getTeamData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.teamLoading=!0,t.prev=1,console.log("正在获取团队数据..."),t.next=5,Object(o["h"])(this.queryParams.eventId);case 5:e=t.sent,console.log("团队数据响应:",e),this.teamData=e.data||[],console.log("团队数据:",this.teamData),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error("获取团队数据失败:",t.t0),this.$message.error("获取团队数据失败: "+t.t0.message),this.teamData=[];case 16:return t.prev=16,this.teamLoading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[1,11,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),getStoreData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.storeLoading=!0,t.prev=1,console.log("正在获取门店数据..."),t.next=5,Object(o["g"])(this.queryParams.eventId);case 5:e=t.sent,console.log("门店数据响应:",e),this.storeData=e.data||[],console.log("门店数据:",this.storeData),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error("获取门店数据失败:",t.t0),this.$message.error("获取门店数据失败: "+t.t0.message),this.storeData=[];case 16:return t.prev=16,this.storeLoading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[1,11,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),getPersonData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.personLoading=!0,t.prev=1,console.log("正在获取个人数据..."),t.next=5,Object(o["e"])(this.queryParams.eventId);case 5:e=t.sent,console.log("个人数据响应:",e),this.personData=e.data||[],console.log("个人数据:",this.personData),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error("获取个人数据失败:",t.t0),this.$message.error("获取个人数据失败: "+t.t0.message),this.personData=[];case 16:return t.prev=16,this.personLoading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[1,11,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),getFunnelData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.funnelLoading=!0,t.prev=1,console.log("正在获取到店情况数据..."),t.next=5,Object(c["a"])({url:"/api/Extend/lqtkjlb/GetFunnelStatisticsFast/".concat(this.queryParams.eventId),method:"GET"});case 5:e=t.sent,console.log("到店情况数据响应:",e),200===e.code&&e.data?this.funnelData=Array.isArray(e.data)?e.data:e.data.data||[]:this.funnelData=[],console.log("到店情况数据:",this.funnelData),t.next=16;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error("获取到店情况数据失败:",t.t0),this.$message.error("获取到店情况数据失败: "+(t.t0.message||"未知错误")),this.funnelData=[];case 16:return t.prev=16,this.funnelLoading=!1,t.finish(16);case 19:case"end":return t.stop()}}),t,this,[[1,11,16,19]])})));function e(){return t.apply(this,arguments)}return e}(),getEmployeeStatistics:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.employeeStatisticsLoading=!0,t.prev=1,console.log("正在获取员工统计数据..."),e={startTime:this.queryParams.startTime,endTime:this.queryParams.endTime},this.queryParams.eventId&&(e.eventId=this.queryParams.eventId),t.next=7,Object(o["b"])(e);case 7:a=t.sent,console.log("员工统计数据响应:",a),200===a.code&&a.data?(this.employeeStatisticsData=a.data,s=a.data.employees||a.data.Employees||[],this.employeeStatisticsList=s.map((function(t){return{employeeId:t.employeeId||t.EmployeeId||"",employeeName:t.employeeName||t.EmployeeName||"",departmentId:t.departmentId||t.DepartmentId||"",departmentName:t.departmentName||t.DepartmentName||"",position:t.position||t.Position||"",expansionCount:t.expansionCount||t.ExpansionCount||0,visitCount:t.visitCount||t.VisitCount||0,billingCount:t.billingCount||t.BillingCount||0,billingAmount:t.billingAmount||t.BillingAmount||0}}))):(this.employeeStatisticsData=null,this.employeeStatisticsList=[]),console.log("员工统计数据:",this.employeeStatisticsData),t.next=19;break;case 13:t.prev=13,t.t0=t["catch"](1),console.error("获取员工统计数据失败:",t.t0),this.$message.error("获取员工统计数据失败: "+(t.t0.message||"未知错误")),this.employeeStatisticsData=null,this.employeeStatisticsList=[];case 19:return t.prev=19,this.employeeStatisticsLoading=!1,t.finish(19);case 22:case"end":return t.stop()}}),t,this,[[1,13,19,22]])})));function e(){return t.apply(this,arguments)}return e}(),getStoreCustomerDetails:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a,s,n,i=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:1,s=i.length>2&&void 0!==i[2]?i[2]:10,this.customerDetailsLoading=!0,t.prev=3,console.log("正在获取门店客户详情...",e,a,s),t.next=7,Object(c["a"])({url:"/api/Extend/lqtkjlb/GetStoreCustomerDetailsPaged/".concat(this.queryParams.eventId,"/").concat(e,"?pageIndex=").concat(a,"&pageSize=").concat(s),method:"GET"});case 7:n=t.sent,console.log("门店客户详情响应:",n),200===n.code&&n.data&&n.data.data?(this.storeCustomerDetails=n.data.data.list||[],this.customerDetailsTotal=n.data.data.total||0):(this.storeCustomerDetails=[],this.customerDetailsTotal=0),this.customerDetailsPageIndex=a,this.customerDetailsPageSize=s,console.log("门店客户详情:",this.storeCustomerDetails),console.log("总数量:",this.customerDetailsTotal),t.next=22;break;case 16:t.prev=16,t.t0=t["catch"](3),console.error("获取门店客户详情失败:",t.t0),this.$message.error("获取门店客户详情失败: "+(t.t0.message||"未知错误")),this.storeCustomerDetails=[],this.customerDetailsTotal=0;case 22:return t.prev=22,this.customerDetailsLoading=!1,t.finish(22);case 25:case"end":return t.stop()}}),t,this,[[3,16,22,25]])})));function e(e){return t.apply(this,arguments)}return e}(),handleStoreClick:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.store_id||e.id||e.StoreId,a){t.next=4;break}return this.$message.warning("无法获取门店ID"),t.abrupt("return");case 4:return this.selectedStore=e,this.storeDetailVisible=!0,this.customerDetailsPageIndex=1,t.next=9,this.getStoreCustomerDetails(a,1,this.customerDetailsPageSize);case 9:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),closeStoreDetail:function(){this.storeDetailVisible=!1,this.selectedStore=null,this.storeCustomerDetails=[],this.customerDetailsTotal=0,this.customerDetailsPageIndex=1},handleCustomerDetailsPageChange:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.selectedStore){t.next=5;break}if(a=this.selectedStore.store_id||this.selectedStore.id||this.selectedStore.StoreId,!a){t.next=5;break}return t.next=5,this.getStoreCustomerDetails(a,e,this.customerDetailsPageSize);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleCustomerDetailsPageSizeChange:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.customerDetailsPageSize=e,!this.selectedStore){t.next=6;break}if(a=this.selectedStore.store_id||this.selectedStore.id||this.selectedStore.StoreId,!a){t.next=6;break}return t.next=6,this.getStoreCustomerDetails(a,1,e);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),formatCustomerTime:function(t){if(!t)return"无";var e=new Date(t);return e.toLocaleString("zh-CN")},formatMoney:function(t){return null===t||void 0===t||""===t?"0.00":Number(t).toFixed(2)},getTotalTkCount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(e.tk_count||0)}),0):0},getTotalYaoyCount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(e.yaoy_count||0)}),0):0},getTotalYyCount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(e.yy_count||0)}),0):0},getTotalKdCount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(e.kd_count||0)}),0):0},getTotalHkCount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(e.hk_count||0)}),0):0},getTotalHkAmount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(Number(e.hk_amount)||0)}),0):0},getTotalKdAmount:function(){return Array.isArray(this.funnelData)&&0!==this.funnelData.length?this.funnelData.reduce((function(t,e){return t+(Number(e.kd_amount)||0)}),0):0},getTotalEmployeeExpansionCount:function(){return Array.isArray(this.employeeStatisticsList)&&0!==this.employeeStatisticsList.length?this.employeeStatisticsList.reduce((function(t,e){return t+(e.expansionCount||0)}),0):0},getTotalEmployeeVisitCount:function(){return Array.isArray(this.employeeStatisticsList)&&0!==this.employeeStatisticsList.length?this.employeeStatisticsList.reduce((function(t,e){return t+(e.visitCount||0)}),0):0},getTotalEmployeeBillingCount:function(){return Array.isArray(this.employeeStatisticsList)&&0!==this.employeeStatisticsList.length?this.employeeStatisticsList.reduce((function(t,e){return t+(e.billingCount||0)}),0):0},getTotalEmployeeBillingAmount:function(){return Array.isArray(this.employeeStatisticsList)&&0!==this.employeeStatisticsList.length?this.employeeStatisticsList.reduce((function(t,e){return t+(Number(e.billingAmount)||0)}),0):0},getEmployeeVisitRate:function(t){return t&&t.expansionCount&&0!==t.expansionCount?Math.round((t.visitCount||0)/t.expansionCount*100):0},getEmployeeBillingRate:function(t){return t&&t.expansionCount&&0!==t.expansionCount?Math.round((t.billingCount||0)/t.expansionCount*100):0},formatDate:function(t){if(!t)return"无";var e=new Date(t);return e.toLocaleDateString("zh-CN")},formatDateForPicker:function(t){if(!t)return null;var e=new Date(t),a=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return"".concat(a,"-").concat(s,"-").concat(n)},getCompletionRate:function(t,e){return 0===e?0:Math.round(t/e*100)},getCompletionRateClass:function(t,e){var a=this.getCompletionRate(t,e);return a>=100?"rate-excellent":a>=80?"rate-good":a>=60?"rate-normal":"rate-poor"},getRankingClass:function(t){return t<=3?"ranking-top":t<=6?"ranking-good":"ranking-normal"},formatTime:function(t){if(!t)return"无";var e=new Date(t);return e.toLocaleString("zh-CN")},formatCompletionRate:function(t){return null===t||void 0===t?"0.0":parseFloat(t).toFixed(1)},getStoreTotalTarget:function(t){if(!t.TeamList)return 0;var e=0;return t.TeamList.forEach((function(t){t.TeamUserInfo&&t.TeamUserInfo.forEach((function(t){e+=t.EventTarget||0}))})),e},getStoreTotalCompleted:function(t){if(!t.TeamList)return 0;var e=0;return t.TeamList.forEach((function(t){t.TeamUserInfo&&t.TeamUserInfo.forEach((function(t){e+=t.ExpansionCount||0}))})),e},getStoreCompletionRate:function(t){var e=this.getStoreTotalTarget(t),a=this.getStoreTotalCompleted(t);return 0===e?0:Math.round(a/e*100)},getStoreCompletionRateClass:function(t){var e=this.getStoreCompletionRate(t);return e>=100?"rate-excellent":e>=80?"rate-good":e>=60?"rate-normal":"rate-poor"},getTotalTeams:function(){if(!this.teamData||0===this.teamData.length)return 0;var t=0;return this.teamData.forEach((function(e){e.TeamList&&(t+=e.TeamList.length)})),t},getTotalMembers:function(){if(!this.teamData||0===this.teamData.length)return 0;var t=0;return this.teamData.forEach((function(e){e.TeamList&&e.TeamList.forEach((function(e){e.TeamUserInfo&&(t+=e.TeamUserInfo.length)}))})),t},getTotalExpansionCount:function(){if(!this.teamData||0===this.teamData.length)return 0;var t=0;return this.teamData.forEach((function(e){e.TeamList&&e.TeamList.forEach((function(e){e.TeamUserInfo&&e.TeamUserInfo.forEach((function(e){t+=e.ExpansionCount||0}))}))})),t},getTotalStoreTarget:function(){return this.storeData&&0!==this.storeData.length?this.storeData.reduce((function(t,e){return t+(e.TotalTarget||0)}),0):0},getTotalStoreCompleted:function(){return this.storeData&&0!==this.storeData.length?this.storeData.reduce((function(t,e){return t+(e.CompletedTarget||0)}),0):0},getTotalCompletionRate:function(){var t=this.getTotalStoreTarget(),e=this.getTotalStoreCompleted();return 0===t?0:e/t*100},getTotalCompletionRateClass:function(){var t=this.getTotalCompletionRate();return t>=100?"rate-excellent":t>=80?"rate-good":t>=60?"rate-normal":"rate-poor"},addTestData:function(){var t=this;setTimeout((function(){0===t.eventList.length&&(t.eventList=[{id:"740360861859710213",name:"测试拓客活动"}],t.queryParams.eventId=t.eventList[0].id),0===t.teamData.length&&(t.teamData=[{StoreId:"1649328471923847186",StoreName:"绿纤骑士郡店",TeamList:[{TeamName:"咕噜队",TeamUserInfo:[{ExpansionUserId:"17882512738",ExpansionUserName:"梁诗雨",ExpansionCount:6,EventTarget:100},{ExpansionUserId:"admin",ExpansionUserName:"管理员",ExpansionCount:0,EventTarget:6}]}]}]),0===t.storeData.length&&(t.storeData=[{StoreId:"1649328471923847190",StoreName:"绿纤亚洲湾店",TotalTarget:6,CompletedTarget:6,CompletionRate:100,Ranking:1},{StoreId:"1649328471923847169",StoreName:"绿纤紫荆店",TotalTarget:3,CompletedTarget:3,CompletionRate:100,Ranking:2}]),0===t.personData.length&&(t.personData=[{UserId:"19982024821",UserName:"谢珂欣",StoreId:"1649328471923847190",StoreName:"绿纤亚洲湾店",TeamName:"9444",PersonalTarget:1,CompletedTarget:6,CompletionRate:600,Ranking:1,LastExpansionTime:175869973e4},{UserId:"17780181798",UserName:"王任燕",StoreId:"1649328471923847175",StoreName:"绿纤468店",TeamName:"222",PersonalTarget:1,CompletedTarget:3,CompletionRate:300,Ranking:2,LastExpansionTime:1758699412e3}])}),2e3)},saveScreenshot:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,s,n,r,l,o,c,u,m,d,p,h,v,f,g,y,b,C,_,w,S,T,k,x,D,E,L,R,q,P,A,I,N,W;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.screenshotLoading=!0,t.prev=1,t.next=4,a.e("chunk-2d216257").then(a.t.bind(null,"c0e9",7));case 4:e=t.sent,console.log("当前选中的选项卡:",this.activeTab),n=['.el-tabs__content .el-tab-pane[name="'.concat(this.activeTab,'"] .tab-content'),'.el-tab-pane[name="'.concat(this.activeTab,'"] .tab-content'),'.el-tabs__content .el-tab-pane[aria-labelledby*="'.concat(this.activeTab,'"] .tab-content'),'.el-tab-pane[aria-labelledby*="'.concat(this.activeTab,'"] .tab-content'),".tabs-container .tab-content"],r=0,l=n;case 8:if(!(r<l.length)){t.next=17;break}if(o=l[r],s=document.querySelector(o),!s){t.next=14;break}return console.log("使用选择器找到元素:",o,s),t.abrupt("break",17);case 14:r++,t.next=8;break;case 17:if(s){t.next=39;break}c=document.querySelectorAll(".el-tab-pane"),u=Object(i["a"])(c),t.prev=20,u.s();case 22:if((m=u.n()).done){t.next=31;break}if(d=m.value,!d.classList.contains("is-active")&&"none"===d.style.display){t.next=29;break}if(s=d.querySelector(".tab-content"),!s){t.next=29;break}return console.log("通过活动选项卡找到元素:",s),t.abrupt("break",31);case 29:t.next=22;break;case 31:t.next=36;break;case 33:t.prev=33,t.t0=t["catch"](20),u.e(t.t0);case 36:return t.prev=36,u.f(),t.finish(36);case 39:if(console.log("最终找到的截图元素:",s),s||(s=document.querySelector(".tabs-container"),console.log("使用备用方案 - 整个选项卡容器:",s)),s){t.next=44;break}return this.$message.error("未找到要截图的内容"),t.abrupt("return");case 44:return t.next=46,new Promise((function(t){return setTimeout(t,1e3)}));case 46:return window.scrollTo(0,0),t.next=49,new Promise((function(t){return setTimeout(t,500)}));case 49:return p={height:s.style.height,overflow:s.style.overflow,maxHeight:s.style.maxHeight,position:s.style.position},s.style.height="auto",s.style.overflow="visible",s.style.maxHeight="none",s.style.position="static",h=s.querySelectorAll(".report-section"),h.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="block"})),v=s.querySelector(".statistics-overview"),v&&(v.style.height="auto",v.style.overflow="visible",v.style.maxHeight="none",v.style.display="block",v.style.visibility="visible",v.style.opacity="1"),f=s.querySelector(".waterfall-container"),f&&(f.style.height="auto",f.style.overflow="visible",f.style.maxHeight="none"),g=s.querySelectorAll(".store-card-waterfall"),g.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none"})),s.style.backgroundColor="#ffffff",y=s.querySelectorAll("*"),y.forEach((function(t){t.style.backgroundColor&&"transparent"!==t.style.backgroundColor&&(t.style.backgroundColor="#ffffff")})),b=s.querySelectorAll(".el-table"),b.forEach((function(t){t.style.backgroundColor="#ffffff",t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.tableLayout="auto"})),C=s.querySelectorAll(".el-table td"),C.forEach((function(t){t.style.backgroundColor="#ffffff"})),_=s.querySelectorAll(".el-table th"),_.forEach((function(t){t.style.backgroundColor="#f8f9fa"})),w=s.querySelectorAll(".store-ranking-table, .no-expansion-table, .store-table, .person-table"),w.forEach((function(t){var e=t.offsetWidth||t.clientWidth;e&&(t.style.width=e+"px",t.style.minWidth=e+"px",t.style.maxWidth=e+"px"),t.style.overflow="visible"})),t.next=75,new Promise((function(t){return setTimeout(t,500)}));case 75:return b.forEach((function(t){var e=t.closest(".store-ranking-table");e?(t.style.width="auto",t.style.minWidth="auto",t.style.maxWidth="none"):(t.style.width="auto",t.style.minWidth="auto",t.offsetHeight,t.style.width="100%",t.style.minWidth="100%")})),S=Math.max(s.scrollHeight,s.offsetHeight,s.clientHeight),T=s.querySelector(".store-ranking-table .el-table"),x=!1,T?(k=T.offsetWidth||T.clientWidth||T.scrollWidth,x=!0):(k=s.offsetWidth||s.clientWidth,D=s.querySelectorAll(".el-table"),D.forEach((function(t){var e=t.offsetWidth||t.clientWidth;e>k&&(k=e)})),E=s.parentElement&&s.parentElement.offsetWidth||s.offsetWidth,k>E&&(k=E)),L=Math.min(k,window.innerWidth||1200),k=x?L/2:L,console.log("容器尺寸信息:",{scrollWidth:s.scrollWidth,scrollHeight:s.scrollHeight,offsetWidth:s.offsetWidth,offsetHeight:s.offsetHeight,clientWidth:s.clientWidth,clientHeight:s.clientHeight,actualHeight:S,actualWidth:k}),R=s,q=!1,T&&(P=document.createElement("div"),P.style.position="absolute",P.style.left="-9999px",P.style.width=k+"px",P.style.padding="0",P.style.margin="0",P.style.backgroundColor="#ffffff",A=T.closest(".store-ranking-table"),A&&(I=A.cloneNode(!0),I.style.width="auto",I.style.minWidth="auto",I.style.maxWidth="none",P.appendChild(I),document.body.appendChild(P),R=P,q=!0)),N={allowTaint:!0,useCORS:!0,scale:2,backgroundColor:"#ffffff",logging:!0,imageTimeout:3e4,removeContainer:!0,foreignObjectRendering:!1,scrollX:0,scrollY:0,width:k,height:q?R.scrollHeight:S,ignoreElements:function(t){return t.classList.contains("el-loading-mask")||t.classList.contains("el-loading-spinner")||t.classList.contains("el-message")||t.classList.contains("el-dialog__wrapper")||t.classList.contains("el-tooltip__popper")},onclone:function(t){var e=t.querySelector(".report-sections-container");e&&(e.style.height="auto",e.style.overflow="visible",e.style.maxHeight="none",e.style.position="static",e.style.width="100%",e.style.backgroundColor="#ffffff");var a=t.querySelectorAll("*");a.forEach((function(t){t.style.backgroundColor&&"transparent"!==t.style.backgroundColor&&(t.style.backgroundColor="#ffffff")}));var s=t.querySelectorAll(".el-table");s.forEach((function(t){t.style.backgroundColor="#ffffff",t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.tableLayout="auto"}));var n=t.querySelectorAll(".el-table td");n.forEach((function(t){t.style.backgroundColor="#ffffff"}));var i=t.querySelectorAll(".el-table th");i.forEach((function(t){t.style.backgroundColor="#f8f9fa"}));var r=t.querySelectorAll(".store-ranking-table, .no-expansion-table, .store-table, .person-table");r.forEach((function(t){var e=t.offsetWidth||t.clientWidth||t.scrollWidth;e?(t.style.width=e+"px",t.style.minWidth=e+"px",t.style.maxWidth=e+"px"):(t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none"),t.style.overflow="visible"}));var l=t.querySelectorAll(".store-ranking-table .el-table");l.forEach((function(t){t.style.width="auto",t.style.minWidth="auto",t.style.maxWidth="none"}));var o=t.querySelectorAll(".report-section");o.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="block",t.style.visibility="visible",t.style.opacity="1"}));var c=t.querySelector(".statistics-overview");c&&(c.style.height="auto",c.style.overflow="visible",c.style.maxHeight="none",c.style.display="block",c.style.visibility="visible",c.style.opacity="1",c.style.position="static");var u=t.querySelectorAll(".stat-card");u.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="flex",t.style.visibility="visible",t.style.opacity="1",t.style.position="static"}));var m=t.querySelectorAll(".el-row");m.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none"}));var d=t.querySelectorAll(".el-col");d.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none"}));var p=t.querySelectorAll(".ranking-section");p.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="block",t.style.visibility="visible",t.style.opacity="1"}));var h=t.querySelectorAll(".ranking-card");h.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="flex",t.style.visibility="visible",t.style.opacity="1",t.style.position="static"}));var v=t.querySelectorAll(".ranking-cards");v.forEach((function(t){t.style.display="flex",t.style.visibility="visible",t.style.opacity="1",t.style.height="auto",t.style.overflow="visible"}));var f=t.querySelector(".waterfall-container");f&&(f.style.height="auto",f.style.overflow="visible",f.style.maxHeight="none",f.style.display="flex",f.style.flexWrap="wrap");var g=t.querySelectorAll(".store-card-waterfall");g.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.display="block"}));var y=t.querySelectorAll(".team-card");y.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.display="block"}));var b=t.querySelectorAll(".el-table");b.forEach((function(t){t.style.height="auto",t.style.overflow="visible",t.style.maxHeight="none",t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.tableLayout="auto"}));var C=t.querySelectorAll(".el-table__row");C.forEach((function(t){t.style.height="auto",t.style.overflow="visible"}));var _=t.querySelectorAll(".el-table__column");_.forEach((function(t){t.style.width="auto",t.style.minWidth="auto",t.style.maxWidth="none"}));var w=t.querySelectorAll(".el-table__body");w.forEach((function(t){t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.overflow="visible"}));var S=t.querySelectorAll(".el-table__header");S.forEach((function(t){t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.overflow="visible"}));var T=t.querySelectorAll(".el-table__body-wrapper, .el-table__header-wrapper");T.forEach((function(t){t.style.width="100%",t.style.minWidth="100%",t.style.maxWidth="none",t.style.overflow="visible"}))}},console.log("开始生成截图,配置选项:",N),t.next=90,e.default(R,N);case 90:W=t.sent,console.log("截图生成完成,画布尺寸:",{width:W.width,height:W.height}),q&&R.parentElement&&R.parentElement.removeChild(R),s.style.height=p.height,s.style.overflow=p.overflow,s.style.maxHeight=p.maxHeight,s.style.position=p.position,h.forEach((function(t){t.style.height="",t.style.overflow="",t.style.maxHeight=""})),this.screenshotDataUrl=W.toDataURL("image/png",1),this.previewVisible=!0,this.$message.success("截图生成成功"),t.next=108;break;case 103:t.prev=103,t.t1=t["catch"](1),console.error("截图生成失败:",t.t1),shouldRemoveTempContainer&&screenshotElement&&screenshotElement.parentElement&&screenshotElement.parentElement.removeChild(screenshotElement),this.$message.error("截图生成失败: "+t.t1.message);case 108:return t.prev=108,this.screenshotLoading=!1,t.finish(108);case 111:case"end":return t.stop()}}),t,this,[[1,103,108,111],[20,33,36,39]])})));function e(){return t.apply(this,arguments)}return e}(),downloadScreenshot:function(){if(this.screenshotDataUrl)try{var t=document.createElement("a");t.download="拓客活动报表_".concat((new Date).toISOString().slice(0,19).replace(/:/g,"-"),".png"),t.href=this.screenshotDataUrl,document.body.appendChild(t),t.click(),document.body.removeChild(t),this.$message.success("图片下载成功")}catch(e){console.error("下载失败:",e),this.$message.error("下载失败,请重试")}else this.$message.error("没有可下载的图片")},closePreview:function(){this.previewVisible=!1,this.screenshotDataUrl=""}}},m=u,d=(a("8b61"),a("2877")),p=Object(d["a"])(m,s,n,!1,null,"4d54f424",null);e["default"]=p.exports},"223f":function(t,e,a){},"8b61":function(t,e,a){"use strict";a("223f")},e1df:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"h",(function(){return i})),a.d(e,"g",(function(){return r})),a.d(e,"e",(function(){return l})),a.d(e,"c",(function(){return o})),a.d(e,"f",(function(){return c})),a.d(e,"d",(function(){return u})),a.d(e,"b",(function(){return m}));var s=a("b775");function n(){return Object(s["a"])({url:"/api/Extend/lqevent",method:"get"})}function i(t){return Object(s["a"])({url:"/api/Extend/lqevent/team-data/".concat(t),method:"get"})}function r(t){return Object(s["a"])({url:"/api/Extend/lqevent/store-data/".concat(t),method:"get"})}function l(t){return Object(s["a"])({url:"/api/Extend/lqevent/person-data/".concat(t),method:"get"})}function o(t){return Object(s["a"])({url:"/api/Extend/lqtkjlb/GetFunnelStatisticsFast/".concat(t),method:"get"})}function c(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20;return Object(s["a"])({url:"/api/Extend/lqtkjlb/GetStoreCustomerDetailsPaged/".concat(t,"/").concat(e,"?pageIndex=").concat(a,"&pageSize=").concat(n),method:"get"})}function u(t){return Object(s["a"])({url:"/api/Extend/lqtkjlb/GetOverallFunnelStatistics/".concat(t),method:"get"})}function m(t){return Object(s["a"])({url:"/api/Extend/LqTkjlb/get-expansion-employee-statistics",method:"post",data:t})}}}]);