highSeasClientsViews-legacy-c23478d7.js 16 KB

1
  1. System.register(["./vendor-legacy-2701520b.js","./LJFlexBox.vue_vue_type_style_index_0_scoped_62c7247f_lang-legacy-9d357713.js","./index-legacy-945a48db.js","./LJLabelValue.vue_vue_type_style_index_0_scoped_5179b9c7_lang-legacy-038fd00b.js","./total-icon8-legacy-d5e00b71.js","./LJPagiNation-legacy-b9ba5750.js","./LJFieldsTable-legacy-0c5629c6.js","./LJWWData-legacy-68f442ba.js","./XLSXUtils-legacy-c1898130.js","./importDialog-legacy-3cb4f6cd.js","./on-icon-legacy-4d9470cc.js","./LJUploadFiles-legacy-142fb228.js","./qiNiu.config-legacy-92df1e03.js","./LJWWMSelect-legacy-35489f61.js","./LJUploadImages-legacy-09f55f54.js","./LJPagiNation.vue_vue_type_style_index_0_scoped_6913d797_lang-legacy-137b9b7c.js","./LJWWData.vue_vue_type_style_index_0_scoped_1870765c_lang-legacy-38258497.js"],(function(e,t){"use strict";var a,i,s,n,l,o,r,c,d,u,f,p,m,g,_,v,h,b,y,x,w=document.createElement("style");return w.textContent=".guide[data-v-a0b06fe6]{width:100%;display:flex;flex-direction:column;align-items:center;margin-top:40px;padding-bottom:45px}.search-title[data-v-a0b06fe6]{width:100%;padding:15px 20px;border-radius:8px;background-color:#fff}.show-title[data-v-a0b06fe6]{width:4%;height:25px;margin-bottom:5px;background-color:#fff;display:flex;align-items:center;justify-content:center;border-top:none;cursor:pointer;border-radius:0 0 8px 8px;margin-left:48%}.radio-btn[data-v-a0b06fe6]{width:180px;display:flex;align-items:center;justify-content:space-between;border:1px solid #dcdcdc;line-height:36px;height:36px;border-radius:4px;padding:0 15px;font-size:14px;color:#c0c4cc;cursor:pointer;transition:all .2s}.radio-btn[data-v-a0b06fe6]:hover{color:#1651ee;border-color:#1651ee;transition:all .3s}.total-box[data-v-a0b06fe6]{display:flex;justify-content:space-between}.total-num[data-v-a0b06fe6]{width:33%;height:100px;background-color:#fdfcff;border:1px solid #dcdcdc;margin-top:15px;border-radius:4px;display:flex;justify-content:space-between;align-items:center}.total-num .img-icon[data-v-a0b06fe6]{border-radius:50%;text-align:center;display:flex;align-items:center;justify-content:center;margin-left:30px}.total-num .img-icon .total-text[data-v-a0b06fe6]{font-size:15px;color:#333;margin-bottom:8px;margin-left:10px}.total-num .total-info[data-v-a0b06fe6]{display:flex;flex-direction:column;justify-content:center;margin-right:30px}.total-num .total-info .total-data[data-v-a0b06fe6]{font-size:30px;font-weight:700}.btn-list[data-v-a0b06fe6]{display:flex;justify-content:flex-end;margin:0 0 15px}.high-seas-clients-views .type-label[data-v-a0b06fe6]{line-height:2}[data-v-a0b06fe6] .el-progress-circle{width:78px!important;height:78px!important}[data-v-a0b06fe6] .el-table{color:#909399;border:1px solid #ebeef5;border-radius:5px}.progress-class[data-v-a0b06fe6]{position:relative}.progress-class[data-v-a0b06fe6] svg>path:nth-child(2){stroke:url(#red)}.progress-class-green[data-v-a0b06fe6]{position:relative}.progress-class-green[data-v-a0b06fe6] svg>path:nth-child(2){stroke:url(#green)}\n",document.head.appendChild(w),{setters:[function(e){a=e.u,i=e.r,s=e.i,n=e.q,l=e.o,o=e.t,r=e.e},function(){},function(e){c=e.n,d=e.S},function(){},function(e){u=e.e,f=e.c,p=e._,m=e.d},function(e){g=e.L},function(e){_=e.L},function(e){v=e.L},function(e){h=e.E},function(e){b=e.i},function(e){y=e._,x=e.a},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){e("default",c({__name:"highSeasClientsViews",setup:function(e){var t=a(),c=i(),p=s({limit:10,offset:0,type:4}),m=i(0),y=i(null),x=s({total_customer:0,unassigned_customer:0,assigned_customer:0}),w=i(),k=i(0),C=i(1),S=i([]),D=i(),L=i([]),j=i({}),T=i([]),N=i([]),J=i([]),F=i([]),P=i(!1),W=i(0),B=i(),M=s({none:"0%",already:"0%"}),z=i("120px"),$=i(!1),H=i([{name:"全部客户",id:3},{name:"未分配的客户",id:4},{name:"已分配的客户",id:5}]),O=i(1),A=i(!0),E=i([]);function R(){P.value=!0,HTTP.post("get_customer",p).then((function(e){0==e.code&&(x.total_customer=e.data.total_customer,x.unassigned_customer=e.data.unassigned_customer,x.assigned_customer=e.data.assigned_customer,M.none=Number((x.unassigned_customer/x.total_customer*100).toFixed(0)),M.already=Number((x.assigned_customer/x.total_customer*100).toFixed(0)),e.data.customer_res.map((function(e){e.customer_label&&(e.customer_label=e.customer_label.split(","))})),k.value=e.data.customer_count,S.value=e.data.customer_res,S.value.length>0?A.value=!0:A.value=!1,T.value=e.data.temp_fields,N.value=T.value.map((function(e){return e.width="120px",["video_link"].includes(e.key)&&(e.width="400px"),["phone"].includes(e.key)&&(e.width="120"),["tel"].includes(e.key)&&(e.width="120"),["source","video_link"].includes(e.key)&&(e.width="120px"),"intention_level"==e.key&&(e.width="160"),"customer_label"==e.key&&(e.width="300"),["become_customer_time","last_follow_up_time","last_follow_up_record","put_in_high_seas_time"].includes(e.key)&&(e.width="180px"),("name"==e.key||"source"==e.key)&&(e.name="客户"+e.name),e.checked=!0,e.visible=!0,e})),J.value=F.value.filter((function(e){return 0==e.is_custom})).map((function(e){return e.name})))})).finally((function(){setTimeout((function(){return P.value=!1}),100)}))}function U(){R()}var q=i(),V=function(){return new Promise((function(e){var t=[],a=JSON.parse(JSON.stringify(p));a.offset=0,a.limit=50,function i(s){HTTP.post("get_customer",s).then((function(s){s.data.customer_res.map((function(n,l){t.push(n),l===s.data.customer_res.length-1&&(s.data.customer_count>=a.offset+a.limit?(a.offset+=a.limit,i(a)):e({list:t,total:s.data.customer_count,header:s.data.temp_fields}))}))}))}(a)}))};function X(){HTTP.get("used_customer_templates",{offset:0,limit:9999,ordering:"-id",fileds:"id,name",del_flag:0,is_default:0}).then((function(e){0==e.code&&(E.value=e.data.results)}))}return n("rowObj",j),n("templateList",T),l((function(){X(),P.value=!0,R(),$Bus.$on("refresh",U)})),o((function(){$Bus.$off("refresh")})),{__sfc:!0,router:t,clientsDetail:c,filter:p,type:m,state:y,statistics:x,ljFieldsTableRef:w,total:k,currentPage:C,tableData:S,allocation:D,getAllocation:L,rowObj:j,templateList:T,temp_fields:N,default_fields:J,fields:F,loading:P,date:W,dateSearch:B,percentageNum:M,showHeigth:z,showNum:$,typeList:H,timeType:O,showTip:A,clientTemplateList:E,getSearch:function(){p.search_fields||delete p.search_fields,R()},getList:R,allocationCustorm:function(){0!=L.value.length?D.value.init(L.value):r.exports.Message("请选中需操作的客户")},receive:function(){0!=L.value.length?r.exports.MessageBox.confirm("确定要领取该客户吗?","提示",{type:"warning"}).then((function(){var e=[];L.value.map((function(t){e.push(t.id)}));var t={customer_id_list:e};HTTP.post("claims_customer",t).then((function(e){0==e.code?(r.exports.Message({message:"领取成功",type:"success"}),R()):r.exports.Message({message:e.msg,type:"waring"})}))})).catch((function(e){console.log(e)})):r.exports.Message("请选中需操作的客户")},handleSelectionChange:function(e){L.value=e},selectable:function(e,t){return 5!=p.type&&1!=e.assign_state},getFilterBtn:function(e){p.type=e,R()},handleDetails:function(e,t){c.value.init(e,t),j.value=JSON.parse(JSON.stringify(e))},handleSizeChange:function(e){p.limit=e,R()},handleCurrentChange:function(e){C.value=e,p.offset=(e-1)*p.limit,R()},refresh:U,showTotal:function(){$.value=!$.value,$.value?z.value="0px":z.value="120px"},handleDayType:function(){delete p.start_date,delete p.end_date,p.time_type=O.value,p.offset=0,R()},changeDatePicker:function(){delete p.time_type,B.value&&B.value.length?(p.start_date=B.value[0],p.end_date=B.value[1]):(delete p.start_date,delete p.end_date),p.offset=0,R()},importDialogRef:q,importBtn:function(){q.value.init({is_self:0,import_type:1})},getAllExportList:V,exportBtn:function(){if(0==S.value.length)return r.exports.Message.error("暂无数据导出");var e=r.exports.Loading.service({lock:!0,text:"正在导出数据...",spinner:"el-icon-loading",background:"rgba(255, 255, 255, 0.7)"});V().then((function(t){console.log("res",t);var a={};t.header.map((function(e){a[e.key]=e.name}));var i={fileName:"公海客户导出记录",sheetName:"公海客户导出记录"};i.headers=a,i.list=t.list;try{h(i),e.close(),r.exports.Message({type:"success",message:"导出成功!",offset:"20px"})}catch(s){r.exports.Message({type:"error",message:"导出失败!",offset:"20px"}),e.close()}}))},getClinetTemp:X,gettempBtn:function(e){p.offset=0,p.customer_templates_id=e,R()},allocationDialog:u,clientsDetailDialog:f,LJPagiNation:g,LJFieldsTable:_,LJWWData:v,SystemConfig:d,importDialog:b}}},(function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"high-seas-clients-views"},[t("div",{staticClass:"search-title"},[t("div",[t("LJTableHeader",{attrs:{dropdown:!1,search:!1}},[t("el-input",{staticStyle:{width:"190px"},attrs:{placeholder:"客户名称/微信/电话","suffix-icon":"el-icon-search",clearable:""},on:{change:a.getSearch},model:{value:a.filter.search_fields,callback:function(t){e.$set(a.filter,"search_fields",t)},expression:"filter.search_fields"}}),t("div",[t("el-select",{attrs:{placeholder:"请选择"},on:{change:a.getFilterBtn},model:{value:a.filter.type,callback:function(t){e.$set(a.filter,"type",t)},expression:"filter.type"}},e._l(a.typeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),t("div",{staticClass:"search-btn"},[t("el-select",{attrs:{placeholder:"请选择客户模板"},on:{change:a.gettempBtn},model:{value:a.filter.customer_templates_id,callback:function(t){e.$set(a.filter,"customer_templates_id",t)},expression:"filter.customer_templates_id"}},e._l(a.clientTemplateList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),t("div",{staticStyle:{"margin-left":"auto"}},[t("el-radio-group",{on:{input:a.handleDayType},model:{value:a.timeType,callback:function(e){a.timeType=e},expression:"timeType"}},[t("el-radio-button",{attrs:{label:1}},[e._v("今日")]),t("el-radio-button",{attrs:{label:2}},[e._v("本周")]),t("el-radio-button",{attrs:{label:3}},[e._v("当月")])],1),t("el-date-picker",{staticStyle:{"margin-left":"10px","margin-right":"-10px",width:"250px"},attrs:{type:"daterange","range-separator":"-","value-format":"yyyy-MM-dd","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:a.changeDatePicker},model:{value:a.dateSearch,callback:function(e){a.dateSearch=e},expression:"dateSearch"}})],1)],1)],1),t("div",{staticClass:"total-box",style:{height:a.showHeigth,overflow:"hidden",transition:"all, 0.3s"}},[t("div",{staticClass:"total-num",staticStyle:{"border-color":"#61D79A","background-color":"rgba(239, 254, 244, 0.50)"}},[e._m(0),t("div",{staticClass:"total-info"},[t("div",{staticClass:"total-data"},[e._v(e._s(a.statistics.total_customer))])])]),t("div",{staticClass:"total-num",staticStyle:{"border-color":"#34E9F7","background-color":"rgba(242, 255, 254, 0.50)"}},[e._m(1),t("div",{staticClass:"total-info"},[t("div",{staticClass:"total-data"},[e._v(e._s(a.statistics.unassigned_customer))])])]),t("div",{staticClass:"total-num",staticStyle:{"border-color":"#82A3FF","background-color":"rgba(240, 245, 255, 0.50)"}},[e._m(2),t("div",{staticClass:"total-info"},[t("div",{staticClass:"total-data"},[e._v(e._s(a.statistics.assigned_customer))])])])])]),t("div",{staticClass:"show-title",on:{click:a.showTotal}},[t("div",{directives:[{name:"show",rawName:"v-show",value:!a.showNum,expression:"!showNum"}],staticStyle:{"font-size":"12px",color:"#7F7F7F"}},[e._v("收起")]),t("div",{directives:[{name:"show",rawName:"v-show",value:a.showNum,expression:"showNum"}],staticStyle:{"font-size":"12px",color:"#7F7F7F"}},[e._v("展开")])]),t("div",{staticStyle:{"background-color":"#fff",padding:"10px","border-radius":"8px"}},[t("div",{staticClass:"btn-list"},[t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:32105,expression:"32105"}],on:{click:a.allocationCustorm}},[e._v("分配")]),t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:32104,expression:"32104"}],staticStyle:{"margin-right":"auto"},on:{click:a.receive}},[e._v("领取")]),t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:32106,expression:"32106"}],staticStyle:{padding:"0 10px"},attrs:{plain:""},on:{click:a.importBtn}},[t("img",{staticStyle:{height:"14px",margin:"0px 3px -3px 0"},attrs:{src:y,alt:""}}),e._v("导入")]),t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:32107,expression:"32107"}],staticStyle:{padding:"0 10px"},attrs:{plain:""},on:{click:a.exportBtn}},[t("img",{staticStyle:{height:"14px",margin:"0px 3px -3px 0"},attrs:{src:x,alt:""}}),e._v("导出")])],1),t("div",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}],staticClass:"lj-el-table m-t-20"},[a.showTip?t(a.LJFieldsTable,{ref:"ljFieldsTableRef",attrs:{"table-key":"markets-client-seas",fields:a.temp_fields,"fields-default":a.default_fields,data:a.tableData,"diff-height":355,loading:a.loading},on:{"selection-change":a.handleSelectionChange,edit:a.handleDetails},scopedSlots:e._u([{key:"name",fn:function(i){return[t("el-button",{attrs:{type:"text"},on:{click:function(e){return a.handleDetails(i.row,"list")}}},[e._v(" "+e._s(i.row.name)+" ")])]}},{key:"intention_level",fn:function(a){return[t("el-rate",{attrs:{disabled:"","text-color":"#ff9900","score-template":"{value}"},model:{value:a.row.intention_level,callback:function(t){e.$set(a.row,"intention_level",t)},expression:"scope.row.intention_level"}})]}},{key:"customer_label",fn:function(a){return e._l(a.row.customer_label,(function(a){return t("el-tag",{staticStyle:{margin:"0 3px 3px 0"}},[e._v(e._s(a))])}))}},{key:"source",fn:function(a){return[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:a.row.source,placement:"bottom"}},[t("div",{staticStyle:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",width:"100px"}},[e._v(" "+e._s(a.row.source)+" ")])])]}},{key:"video_link",fn:function(a){return[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:a.row.video_link,placement:"bottom"}},[t("div",{staticStyle:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",width:"100px"}},[e._v(" "+e._s(a.row.video_link)+" ")])])]}},{key:"pre_member_name",fn:function(i){return[a.SystemConfig.isDD?t("div",[e._v(e._s(i.row.pre_member_name))]):t(a.LJWWData,{attrs:{type:2,openid:i.row.pre_member_name}})]}},{key:"member_name",fn:function(i){return[a.SystemConfig.isDD?t("div",[e._v(e._s(i.row.member_name))]):t(a.LJWWData,{attrs:{type:2,openid:i.row.member_name}})]}},{key:"create_member_name",fn:function(i){return[a.SystemConfig.isDD?t("div",[e._v(e._s(i.row.create_member_name))]):t(a.LJWWData,{attrs:{type:2,openid:i.row.create_member_name}})]}},{key:"dept_name",fn:function(i){return[a.SystemConfig.isDD?t("div",[e._v(e._s(i.row.dept_name))]):t(a.LJWWData,{attrs:{type:1,openid:i.row.dept_name}})]}}],null,!1,1227051057)},[t("template",{slot:"start"},[t("el-table-column",{attrs:{type:"selection",width:"50",align:"center",selectable:a.selectable}})],1),t("template",{slot:"end"},[t("el-table-column",{attrs:{label:"详情",fixed:"right",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:32102,expression:"32102"}],attrs:{type:"text"},on:{click:function(e){return a.handleDetails(i.row,"list")}}},[e._v(" 查看 ")])]}}],null,!1,2469667168)})],1)],2):t("div",{staticClass:"guide"},[t("img",{attrs:{src:p,alt:""}}),t("div",{staticStyle:{"margin-top":"15px","font-size":"16px",color:"#919398"}},[e._v("把线索建联为客户,这是销售第一步,客户越多,签单越多")])])],1),a.showTip?t(a.LJPagiNation,{attrs:{"current-page":a.currentPage,"page-size":a.filter.limit,total:a.total},on:{"size-change":a.handleSizeChange,"current-change":a.handleCurrentChange}}):e._e()],1),t(a.allocationDialog,{ref:"allocation",on:{getList:a.getList}}),t(a.clientsDetailDialog,{ref:"clientsDetail"}),t(a.importDialog,{ref:"importDialogRef",on:{getList:a.getList}})],1)}),[function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"img-icon"},[t("img",{attrs:{src:m,alt:""}}),t("div",{staticClass:"total-text"},[e._v("全部客户")])])},function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"img-icon"},[t("img",{attrs:{src:"/svg/total-icon12-5f17167d.svg",alt:""}}),t("div",{staticClass:"total-text"},[e._v("未分配")])])},function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"img-icon"},[t("img",{attrs:{src:"/svg/total-icon13-68681cc7.svg",alt:""}}),t("div",{staticClass:"total-text"},[e._v("已分配")])])}],!1,null,"a0b06fe6",null,null).exports)}}}));