You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-21d9.d26a4cfd.js

1 line
15 KiB

3 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-21d9"],{"3z7q":function(e,t,i){"use strict";i.r(t);var a=i("7Qib"),s=i("3ojK"),n=i("1bNe"),l=i("gwiD"),o=i("vV2+"),r=i("mVxz"),c=i("tMlD"),d=i("ALhW"),p=i("slnp"),u=i("pKm3"),m=i("QbLZ"),h=i.n(m),v=i("VmBU"),_=i("Ir+r"),f=i("Ew9n"),y=i("MdnP"),b=i("hwzM"),g=i("/407"),D=i("BsgX"),w=i("KmSi"),C=i("dPzk"),L=i("z7oh"),k=i("L2JU"),x=i("jHPx"),T={name:"LogDetail",components:{SlideView:f.a,PictureListView:y.a,FileCell:b.a,RelatedBusinessCell:g.a,ReportMenu:D.a,ReportList:w.a,ReplyComment:C.a,CommentList:L.a,CRMFullScreenDetail:function(){return Promise.resolve().then(i.bind(null,"3z7q"))}},props:{id:[String,Number],noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,detail:null,relatedID:"",relatedCRMType:"",showRelatedDetail:!1,reportList:[{type:"customer",key:"customerNum",info:"今日新增客户",name:"今日新增客户 0"},{type:"business",key:"businessNum",info:"今日新增商机",name:"今日新增商机 0"},{type:"contract",key:"contractNum",info:"今日新增合同",name:"今日新增合同 0"},{type:"receivables",key:"receivablesMoneyNum",info:"今日新增回款",name:"今日新增回款 0"},{type:"record",key:"recordNum",info:"今日新增跟进记录",name:"今日新增跟进记录 0"}],reportListShow:!1,fieldReportList:null,reportData:{title:"",placeholder:"",crmType:"",request:null,recordRequest:v.j,params:null,paging:!0,sortable:!1},commentLoading:!1,replyList:[]}},computed:h()({},Object(k.b)(["userInfo"]),{relatedListData:function(){for(var e={},t=["contacts","customer","business","contract"],i=0;i<t.length;i++){var a=t[i],s=this.detail[a+"List"]||[];s.length>0&&(e[a]=s)}return e}}),watch:{id:function(){this.viewAfterEnter()}},mounted:function(){},beforeDestroy:function(){},methods:{viewAfterEnter:function(){this.detail=null,this.getDetail()},getDetail:function(){var e=this;this.loading=!0,Object(v.i)({log_id:this.id}).then(function(t){if(e.detail=t.data.list,e.replyList=e.detail.replyList,e.detail.bulletin){var i=e.detail.bulletin||{};e.reportList=e.reportList.map(function(e){return"receivablesMoney"==e.key&&(i.receivablesMoney=Object(x.h)(Math.floor(i.receivablesMoney||0))),e.name=e.info+" "+i[e.key],e})}e.loading=!1}).catch(function(){e.loading=!1,e.hideView()})},checkRelatedDetail:function(e,t){this.relatedID=t[e+"_id"],this.relatedCRMType=e,this.showRelatedDetail=!0},hideView:function(){this.$emit("close"),this.$emit("hide-view")},reportSelect:function(e,t){t=this.detail,e.type&&(this.reportData.title="销售简报-"+e.info,this.reportData.placeholder={customer:"请输入客户名称",business:"请输入商机名称",contract:"请输入合同名称",receivables:"请输入回款编号",record:""}[e.type],this.reportData.crmType=e.type,this.reportData.params=t?{log_id:t.log_id}:{today:1},this.reportData.params.type={customer:1,business:2,contract:3,receivables:4,record:5}[e.type],"record"==e.type?(this.fieldReportList=[{label:"模块",prop:"types",width:300},{label:"新增跟进记录数",prop:"dataCount"}],this.reportData.request=v.f,this.reportData.paging=!1,this.reportData.sortable=!1):(this.fieldReportList=this.getReportFieldList(e.type),this.reportData.request=v.h,this.reportData.paging=!0,this.reportData.sortable="custom"),this.reportListShow=!0)},getReportFieldList:function(e){return{customer:[{label:"客户名称",prop:"name"},{label:"成交状态",prop:"deal_status"},{label:"最后跟进时间",prop:"last_time"},{label:"创建时间",prop:"create_time"},{label:"负责人",prop:"owner_user_name"}],business:[{label:"商机名称",prop:"name"},{label:"商机阶段",prop:"status_name"},{label:"最后跟进时间",prop:"last_time"},{label:"创建时间",prop:"create_time"},{label:"负责人",prop:"owner_user_name"}],contract:[{label:"合同名称",prop:"name"},{label:"合同状态",prop:"check_status"},{label:"创建时间",prop:"create_time"},{label:"公司签约人",prop:"order_user_name"}],receivables:[{label:"回款编号",prop:"number"},{label:"回款时间",prop:"return_time"},{la