HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/douyin.dsfnj.com/static/js/chunk-3748.9612f37e.js
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3748","chunk-64bd","chunk-15e0","chunk-c1bc","chunk-a38d","chunk-6008"],{"+9th":function(e,t,i){"use strict";i.d(t,"p",function(){return s}),i.d(t,"n",function(){return n}),i.d(t,"a",function(){return l}),i.d(t,"h",function(){return o}),i.d(t,"j",function(){return c}),i.d(t,"l",function(){return r}),i.d(t,"m",function(){return d}),i.d(t,"u",function(){return u}),i.d(t,"s",function(){return m}),i.d(t,"f",function(){return h}),i.d(t,"d",function(){return f}),i.d(t,"k",function(){return p}),i.d(t,"g",function(){return v}),i.d(t,"q",function(){return g}),i.d(t,"t",function(){return b}),i.d(t,"r",function(){return y}),i.d(t,"o",function(){return _}),i.d(t,"e",function(){return w}),i.d(t,"b",function(){return C}),i.d(t,"c",function(){return k}),i.d(t,"i",function(){return I});var a=i("t3Un");function s(e){return Object(a.a)({url:"oa/task/subTaskList",method:"post",data:e})}function n(e){return Object(a.a)({url:"oa/task/myTask",method:"post",data:e})}function l(e){return Object(a.a)({url:"oa/task/save",method:"post",data:e})}function o(e){return Object(a.a)({url:"oa/task/delete",method:"post",data:e})}function c(e){return Object(a.a)({url:"oa/task/read",method:"post",data:e})}function r(e){return Object(a.a)({url:"oa/task/update",method:"post",data:e})}function d(e){return Object(a.a)({url:"oa/task/updateName",method:"post",data:e})}function u(e){return Object(a.a)({url:"oa/task/updateStoptime",method:"post",data:e})}function m(e){return Object(a.a)({url:"oa/task/updateOwner",method:"post",data:e})}function h(e){return Object(a.a)({url:"oa/task/updateLable",method:"post",data:e})}function f(e){return Object(a.a)({url:"oa/tasklable/save",method:"post",data:e})}function p(e){return Object(a.a)({url:"oa/tasklable/update",method:"post",data:e})}function v(e){return Object(a.a)({url:"oa/tasklable/delete",method:"post",data:e})}function g(e){return Object(a.a)({url:"oa/tasklable/index",method:"post",data:e})}function b(e){return Object(a.a)({url:"oa/task/updatePriority",method:"post",data:e})}function y(e){return Object(a.a)({url:"oa/task/taskOver",method:"post",data:e})}function _(e){return Object(a.a)({url:"oa/task/readLoglist",method:"post",data:e})}function w(e){return Object(a.a)({url:"oa/task/delOwnerById",method:"post",data:e})}function C(e){return Object(a.a)({url:"oa/taskcomment/save",method:"post",data:e})}function k(e){return Object(a.a)({url:"oa/taskcomment/delete",method:"post",data:e})}function I(e){return Object(a.a)({url:"oa/task/delrelation",method:"post",data:e})}},"+NTD":function(e,t,i){"use strict";var a=i("YEIV"),s=i.n(a),n=i("mX3o"),l=i("EgJF"),o=i("ooHJ"),c=i("7Qib"),r={name:"relative-return-money",components:{CRMCreateView:l.default,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))}},computed:{},mixins:[n.a],data:function(){return{list:[],fieldList:[],tableHeight:"250px",showFullDetail:!1,showFullCrmType:"receivables",showFullId:"",createCrmType:"receivables_plan",isCreate:!1,palnList:[],planFieldList:[],createActionInfo:{}}},watch:{id:function(e){this.list=[],this.palnList=[],this.getList(),this.getPlanList()}},props:{id:[String,Number],crmType:{type:String,default:""},detail:{type:Object,default:function(){return{}}},isSeas:{type:Boolean,default:!1}},mounted:function(){this.planFieldList=[{prop:"num",width:"200",label:"期数"},{prop:"customer_id",width:"200",label:"客户名称"},{prop:"contract_id",width:"200",label:"合同编号"},{prop:"money",width:"200",label:"计划回款金额"},{prop:"return_date",width:"200",label:"计划回款日期"},{prop:"return_type",width:"200",label:"计划回款方式"},{prop:"remind",width:"200",label:"提前几日提醒"},{prop:"remark",width:"200",label:"备注"}],this.getPlanList(),this.fieldList=[{prop:"number",width:"200",label:"回款编号"},{prop:"contract_id",width:"200",label:"合同名称"},{prop:"contract_money",width:"200",label:"合同金额"},{prop:"money",width:"200",label:"回款金额"},{prop:"num",width:"200",label:"期数"},{prop:"owner_user_id",width:"200",label:"负责人"},{prop:"check_status_info",width:"200",label:"状态"},{prop:"return_time",width:"200",label:"回款日期"}],this.getList()},methods:s()({getPlanList:function(){var e=this;this.loading=!0,Object(o.e)(this.getParams()).then(function(t){e.loading=!1,e.palnList=t.data.list}).catch(function(){e.loading=!1})},getList:function(){var e=this;this.loading=!0,Object(o.c)(this.getParams()).then(function(t){e.loading=!1,e.list=t.data.list}).catch(function(){e.loading=!1})},getParams:function(){return"customer"===this.crmType?{customer_id:this.id,pageType:"all"}:"contract"===this.crmType?{contract_id:this.id,pageType:"all"}:{}},handleRowClick:function(e,t,i){this.showFullId=e.receivables_id,this.showFullCrmType="receivables",this.showFullDetail=!0},cellStyle:function(e){e.row,e.column,e.rowIndex;return 1==e.columnIndex?{color:"#3E84E9"}:""},createClick:function(e){this.createActionInfo={type:"relative",crmType:this.crmType,data:{}},"money"==e?("contract"===this.crmType?(this.createActionInfo.data.customer=this.detail.customer_id_info,this.createActionInfo.data.contract=this.detail):"customer"===this.crmType&&(this.createActionInfo.data.customer=this.detail),this.createCrmType="receivables",this.isCreate=!0):"plan"==e&&("contract"===this.crmType?(this.createActionInfo.data.customer=this.detail.customer_id_info,this.createActionInfo.data.contract=this.detail):"customer"===this.crmType&&(this.createActionInfo.data.customer=this.detail),this.createCrmType="receivables_plan",this.isCreate=!0)},saveSuccess:function(){"receivables"==this.createCrmType?this.getList():this.getPlanList()},handleFile:function(e,t){var i=this;"edit"==e?(this.createActionInfo={type:"update",id:t.row.plan_id},this.createCrmType="receivables_plan",this.isCreate=!0):"delete"==e&&this.$confirm("您确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.d)({id:t.row.plan_id}).then(function(e){i.palnList.splice(t.$index,1),i.$message.success(e.data)}).catch(function(){})}).catch(function(){i.$message({type:"info",message:"已取消操作"})})},fieldFormatter:function(e,t){return"contract_id"===t.property?e.contract_id_info.name:"customer_id"===t.property?e.customer_id_info.name:"create_time"===t.property?Object(c.m)(e.customer_id_info.create_time):"owner_user_id"===t.property?e.owner_user_id_info.realname:e[t.property]},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}}},"cellStyle",function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}})},d=(i("96Tr"),i("KHd+")),u=Object(d.a)(r,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"rc-cont"},[e.isSeas?e._e():i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}},[i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){e.createClick("plan")}}},[e._v("新建回款计划")])],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.palnList,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle}},[e._l(e.planFieldList,function(t,a){return i("el-table-column",{key:a,attrs:{"show-overflow-tooltip":"",prop:t.prop,formatter:e.fieldFormatter,label:t.label}})}),e._v(" "),i("el-table-column",{attrs:{label:"操作",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("flexbox",{attrs:{justify:"center"}},[i("el-button",{attrs:{type:"text"},nativeOn:{click:function(i){e.handleFile("edit",t)}}},[e._v("编辑")]),e._v(" "),i("el-button",{attrs:{type:"text"},nativeOn:{click:function(i){e.handleFile("delete",t)}}},[e._v("删除")])],1)]}}])})],2),e._v(" "),i("flexbox",{staticClass:"rc-head",staticStyle:{"margin-top":"15px"},attrs:{direction:"row-reverse"}},[e.isSeas?e._e():i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){e.createClick("money")}}},[e._v("新建回款")])],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick}},e._l(e.fieldList,function(t,a){return i("el-table-column",{key:a,attrs:{"show-overflow-tooltip":"",prop:t.prop,formatter:e.fieldFormatter,label:t.label}})})),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:e.showFullCrmType,id:e.showFullId},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":e.createCrmType,action:e.createActionInfo},on:{"save-success":e.saveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"b5fc474a",null);u.options.__file="RelativeReturnMoney.vue";t.a=u.exports},"+QVO":function(e,t,i){"use strict";var a=i("/ECs");i.n(a).a},"+xXq":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wd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5JOoYPUkhQ5Ih/JJnkrYw4r8hG7T6ZIxOcjzcJDEiejZMO+yLA9B8hLWRDB5abXvBGfgF+EE+QZ/t8sn1F7hN0eseISqMFxGM+jXBXIR7TbEtS5mXFmKwjj0VOoyF0gVA7cqMzCD+WwWe2pt/yAhO0zqm8YaGjOvJSFYIxFna4HX5COvQYO9+2jt0iPIaXhMFVVm305SwLJ0yx/z4H6OzAGXzCMerdrp2IdHvChzjFcHabDOLd7Heb2FszlGUc6VM8AVNs9mLufYC5O2T2/6girPdn4foT0wiRw+guqpRW4FszOpVIwN1cyO7nd5PasKZJqL/aIHh8i/YpRlpQC564LEZBqM0343ZQEKfc9t58/vGMVN6G6+jN6e9vu2YQW/Ewa3TPGxBKjK8tdecnfMN+vuUe3tGDMKsq87M8ZI9uh2CpwknDPxvQp64zvu2vxCvaNNBhyKE9QuI3o+K27vE6mCxCbFg1H+xojc1cQmxdfTz+8II/lgOJ5CMWlDwyJb86OrZvmO1msu3e7XHwr8R/kF7Du9wv4J8AAdbF+5wQ+l40AAAAASUVORK5CYII="},"/ECs":function(e,t,i){},"/U9q":function(e,t,i){"use strict";var a=i("mX3o"),s=i("EgJF"),n=i("qbf4"),l=i("mkuN"),o={name:"relative-contacts",components:{CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},CRMCreateView:s.default,CrmRelative:l.a},computed:{customer_id:function(){return this.detail.customer_id},canRelation:function(){return"business"==this.crmType}},mixins:[a.a],data:function(){return{nopermission:!1,list:[],fieldList:[],tableHeight:"400px",showFullDetail:!1,isCreate:!1,contactsId:"",createActionInfo:{type:"relative",crmType:this.crmType,data:{}},showRelativeView:!1,selectionList:[]}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{id:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},detail:{type:Object,default:function(){return{}}}},mounted:function(){this.getDetail()},activated:function(){},deactivated:function(){},methods:{checkRelativeInfos:function(e){var t=this;if(e.data.length>0){var i={is_relation:1};i[this.crmType+"_id"]=this.id,i.contacts_id=e.data.map(function(e){return e.contacts_id}),Object(n.g)(i).then(function(e){t.getDetail(),t.$message.success(e.data)}).catch(function(){})}},unRelevanceHandleClick:function(){var e=this;0==this.selectionList.length?this.$message.error("请先勾选数据"):this.$confirm("确认取消关联?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t={is_relation:0};t[e.crmType+"_id"]=e.id,t.contacts_id=e.selectionList.map(function(e){return e.contacts_id}),Object(n.g)(t).then(function(t){e.getDetail(),e.$message.success(t.data)}).catch(function(){})}).catch(function(){e.$message.info("已取消操作")})},getFieldList:function(){this.fieldList.push({prop:"name",width:"200",label:"姓名"}),this.fieldList.push({prop:"mobile",width:"200",label:"手机"}),this.fieldList.push({prop:"post",width:"200",label:"职务"})},getDetail:function(){var e=this;this.loading=!0;var t={pageType:"all"};t[this.crmType+"_id"]=this.id,Object(n.e)(t).then(function(t){0==e.fieldList.length&&e.getFieldList(),e.nopermission=!1,e.loading=!1,e.list=t.data.list}).catch(function(t){102==t.code&&(e.nopermission=!0),e.loading=!1})},handleRowClick:function(e,t,i){this.contactsId=e.contacts_id,this.showFullDetail=!0},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},cellStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},createClick:function(){"customer"==this.crmType?this.createActionInfo.data.customer=this.detail:"business"==this.crmType&&(this.createActionInfo.data.customer=this.detail.customer_id_info),this.isCreate=!0},createSaveSuccess:function(){this.canRelation?this.$refs.crmrelative.refreshList():this.getDetail()}}},c=(i("UMhO"),i("KHd+")),r=Object(c.a)(o,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"empty",rawName:"v-empty",value:e.nopermission,expression:"nopermission"}],staticClass:"rc-cont",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"}},[e.isSeas?e._e():i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}},[i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){return e.createClick(t)}}},[e._v("新建联系人")]),e._v(" "),e.canRelation?i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){return e.unRelevanceHandleClick(t)}}},[e._v("解除关联")]):e._e(),e._v(" "),e.canRelation?i("el-popover",{staticStyle:{"margin-right":"20px"},attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showRelativeView,callback:function(t){e.showRelativeView=t},expression:"showRelativeView"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:e.showRelativeView,radio:!1,action:{type:"condition",data:{form_type:"customer",customer_id:e.customer_id}},selectedData:{contacts:e.list},"crm-type":"contacts"},on:{close:function(t){e.showRelativeView=!1},changeCheckout:e.checkRelativeInfos},model:{value:e.showRelativeView,callback:function(t){e.showRelativeView=t},expression:"showRelativeView"}}),e._v(" "),i("el-button",{staticClass:"rc-head-item",staticStyle:{"margin-right":"0"},attrs:{slot:"reference",type:"primary"},nativeOn:{click:function(t){e.showRelativeView=!0}},slot:"reference"},[e._v("关联")])],1):e._e()],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick,"selection-change":function(t){e.selectionList=t}}},[e.canRelation&&e.fieldList.length>0?i("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection",align:"center",width:"55"}}):e._e(),e._v(" "),e._l(e.fieldList,function(e,t){return i("el-table-column",{key:t,attrs:{"show-overflow-tooltip":"",prop:e.prop,label:e.label}})})],2),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:"contacts",id:e.contactsId},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"contacts",action:e.createActionInfo},on:{"save-success":e.createSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"4a83080a",null);r.options.__file="RelativeContacts.vue";t.a=r.exports},"0BF6":function(e,t,i){"use strict";var a=i("kKfx");i.n(a).a},"0djP":function(e,t,i){},"1RnH":function(e,t,i){"use strict";var a=i("+9th"),s=i("mkuN"),n=i("Er7M"),l=i("7Qib"),o={components:{CrmRelative:s.a,RelatedBusinessCell:n.a},data:function(){return{showTypes:["customer","contacts","business","contract"],showPopover:!1,relevanceAll:{customer_ids:[],contract_ids:[],contacts_ids:[],business_ids:[]},relatedListData:{},showRelative:!1,showTaskRelative:!1}},watch:{allData:function(){this.relatedListData=this.allData}},props:{marginLeft:{type:String,default:"20px"},allData:{type:Object,default:function(){return{contacts:[],customer:[],business:[],contract:[]}}},isTask:{type:Boolean,default:!1},taskID:Number,alterable:{type:Boolean,default:!0},alterableColor:{type:String,default:"#999"}},mounted:function(){this.relatedListData=this.allData},methods:{crmrelativeClose:function(){this.showPopover=!1},checkInfos:function(e){var t=this;this.showPopover=!1,this.relatedListData=e.data;var i=function(i){var a=e.data[i];t.relevanceAll[i+"_ids"]=a.map(function(e,t,a){return e[i+"_id"]})};for(var a in e.data)i(a);this.$emit("checkInfos",this.relevanceAll)},delRelevance:function(e,t,i){var s=this;this.$confirm("确认取消关联?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){Object(a.i)({task_id:s.taskID,type:{customer:1,contacts:2,business:3,contract:4}[e],id:i[e+"_id"]}).then(function(i){s.relatedListData[e].splice(t,1),s.relatedListData=Object(l.h)(s.relatedListData),s.$message.success("关联取消成功")}).catch(function(){})}).catch(function(){s.$message.info("已取消操作")})},checkRelatedDetail:function(e,t){t.key=t[e+"_id"],this.$emit("checkRelatedDetail",e,t)}}},c=(i("SbwO"),i("KHd+")),r=Object(c.a)(o,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"related-business",style:{"margin-left":e.marginLeft}},[!e.isTask&&e.alterable?a("el-popover",{attrs:{placement:"bottom",width:"800","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}},[e.showRelative?a("crm-relative",{ref:"crmrelative",attrs:{show:e.showPopover,radio:!1,selectedData:e.relatedListData,showTypes:e.showTypes},on:{close:e.crmrelativeClose,changeCheckout:e.checkInfos}}):e._e(),e._v(" "),a("p",{staticClass:"add-file",attrs:{slot:"reference"},on:{click:function(t){e.showRelative=!0}},slot:"reference"},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n      关联业务\n    ")])],1):e._e(),e._v(" "),e.alterable?e._e():a("p",{staticClass:"alterable-p",style:{color:e.alterableColor}},[e._v("关联业务")]),e._v(" "),e._l(e.relatedListData,function(t,i){return a("div",{key:i},e._l(t,function(t,s){return a("related-business-cell",{key:s,attrs:{data:t,cellIndex:s,type:i,showFoot:e.isTask},on:{unbind:e.delRelevance,detail:function(a){e.checkRelatedDetail(i,t)}}})}))}),e._v(" "),e.isTask?a("el-popover",{attrs:{placement:"bottom",width:"800","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}},[e.showTaskRelative?a("crm-relative",{ref:"crmrelative",attrs:{radio:!1,show:e.showPopover,selectedData:e.relatedListData,showTypes:e.showTypes},on:{close:e.crmrelativeClose,changeCheckout:e.checkInfos}}):e._e(),e._v(" "),a("p",{staticClass:"add-file",attrs:{slot:"reference"},on:{click:function(t){e.showTaskRelative=!0}},slot:"reference"},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n      关联业务\n    ")])],1):e._e()],2)},[],!1,null,"a1b65e4a",null);r.options.__file="relatedBusiness.vue";t.a=r.exports},"1ePD":function(e,t,i){},"2OrX":function(e,t,i){"use strict";var a=i("Ncy/");i.n(a).a},"2dGW":function(e,t,i){},"2y1U":function(e,t,i){},"3/bq":function(e,t,i){"use strict";var a=i("EGis");i.n(a).a},"36K6":function(e,t,i){"use strict";var a=i("2y1U");i.n(a).a},"3biH":function(e,t,i){"use strict";var a=i("KzkL"),s=i("Ktth"),n=i.n(s),l=i("QhmF"),o={name:"check-flow",components:{},filters:{statusIcon:function(e){return 0==e?i("migV"):1==e?i("y4JV"):2==e?i("+xXq"):3==e?i("wu/m"):4==e?i("6pZM"):""},detailName:function(e){return 2==e.status?e.user_id_info.length+"人或签":3==e.status?e.user_id_info.length+"人会签":1==e.status?"负责人主管":4==e.status?"上一级审批人主管":void 0},stepName:function(e){return"第"+n.a.encodeS(e)+"级"}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{examineType:{type:String,default:""},id:[String,Number]},data:function(){return{loading:!1,list:[]}},computed:{},mounted:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.loading=!0,Object(a.b)({types:this.examineType,types_id:this.id}).then(function(t){e.loading=!1,e.list=t.data,e.$emit("value-change",{config:t.data.config,value:[]})}).catch(function(){e.loading=!1})},getStatusName:function(e){return 0==e?"拒绝":1==e?"通过":2==e?"撤回":3==e?"创建":4==e?"待审核":5==e?"审核中":""},close:function(){this.$emit("close")}}},c=(i("0BF6"),i("KHd+")),r=Object(c.a)(o,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"},{name:"empty",rawName:"v-empty",value:e.list,expression:"list"}],attrs:{"xs-empty-icon":"none","xs-empty-text":"暂无记录"}},[a("flexbox",{staticClass:"flow-head"},[a("div",{staticClass:"flow-head-name"},[e._v("审批流程")]),e._v(" "),a("img",{staticClass:"flow-head-close",attrs:{src:i("cjwK")},on:{click:e.close}})]),e._v(" "),a("div",{staticClass:"flow-body"},e._l(e.list,function(t,i){return a("flexbox",{key:i,staticClass:"cf-flow-item",attrs:{align:"stretch",justify:"flex-start"}},[a("img",{staticClass:"cf-flow-item-img",attrs:{src:e._f("statusIcon")(t.status)}}),e._v(" "),a("div",[a("flexbox",{staticClass:"cf-flow-item-head"},[a("div",{staticClass:"cf-flow-item-des"},[e._v(e._s(e._f("stepName")(t.order_id)))]),e._v(" "),a("div",[e._v(e._s(e._f("filterTimestampToFormatTime")(t.check_time)))])]),e._v(" "),a("flexbox",{staticClass:"cf-flow-item-info"},[a("div",{staticClass:"cf-flow-item-name"},[e._v(e._s(t.check_user_id_info.realname))]),e._v(" "),a("div",[a("span",[e._v(e._s(e.getStatusName(t.status)))]),e._v("了此申请")])]),e._v(" "),t.content?a("div",{staticClass:"cf-flow-item-content"},[e._v(e._s(t.content)+"\n          "),a("div",{staticClass:"cf-flow-item-content-arrow"})]):e._e()],1),e._v(" "),a("div",{staticClass:"cf-flow-item-line"})])}))],1)},[],!1,null,"7090246f",null);r.options.__file="CheckFlow.vue";var d=r.exports,u={name:"examine-info",components:{ExamineHandle:l.default,CheckFlow:d},computed:{},filters:{statusIcon:function(e){return 0==e?i("migV"):1==e?i("y4JV"):2==e?i("+xXq"):3==e?i("wu/m"):4==e?i("6pZM"):""},detailName:function(e){return 2==e.status?e.user_id_info.length+"人或签":3==e.status?e.user_id_info.length+"人会签":1==e.status?"负责人主管":4==e.status?"上一级审批人主管":3==e.type?"创建人":void 0},stepName:function(e){return"第"+n.a.encodeS(e)+"级"}},watch:{id:{handler:function(e){e&&(this.examineInfo={},this.getFlowStepList())},deep:!0,immediate:!0},flow_id:{handler:function(e){e&&(this.examineInfo={},this.getFlowStepList())},deep:!0,immediate:!0}},data:function(){return{loading:!1,examineInfo:{},showFlowPopover:!1,examineHandleInfo:{status:0},showExamineHandle:!1}},props:{examineType:{type:String,default:""},id:[String,Number],flow_id:[String,Number]},mounted:function(){},methods:{getFlowStepList:function(){var e=this;this.flow_id&&this.id&&(this.loading=!0,Object(a.c)({types:this.examineType,flow_id:this.flow_id,types_id:this.id,action:"view"}).then(function(t){e.loading=!1,e.examineInfo=t.data,e.$emit("value-change",{config:t.data.config,value:[]})}).catch(function(){e.loading=!1}))},examineHandle:function(e){this.examineHandleInfo.status=e,this.showExamineHandle=!0},getStatusName:function(e){return 0==e?"拒绝":1==e?"通过":2==e?"撤回":3==e?"创建":4==e?"待审核":5==e?"审核中":""},getContentFilters:function(e){for(var t="",i=0;i<e.length;i++){var a=e[i];t=i==e.length-1?t+a.realname+":"+this.getStatusName(a.check_type):t+a.realname+":"+this.getStatusName(a.check_type)+"、"}return t},examineHandleClick:function(e){this.getFlowStepList(),this.$emit("on-handle",e)}}},m=(i("7Lck"),Object(c.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"contract-flow-box"},[a("flexbox",{staticStyle:{position:"relative"},attrs:{direction:"row-reverse"}},[a("el-popover",{attrs:{placement:"bottom",width:"300",trigger:"click"},model:{value:e.showFlowPopover,callback:function(t){e.showFlowPopover=t},expression:"showFlowPopover"}},[a("check-flow",{attrs:{id:e.id,examineType:e.examineType},on:{close:function(t){e.showFlowPopover=!1}}}),e._v(" "),a("el-button",{staticClass:"check-flow-button",attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("查看审批历史")])],1),e._v(" "),a("div",{staticStyle:{"min-height":"40px"}},[1==e.examineInfo.is_recheck?a("el-button",{staticClass:"flow-button white",on:{click:function(t){e.examineHandle(2)}}},[e._v("撤回审批")]):e._e(),e._v(" "),1==e.examineInfo.is_check?a("el-button",{staticClass:"flow-button red",on:{click:function(t){e.examineHandle(0)}}},[e._v("拒绝")]):e._e(),e._v(" "),1==e.examineInfo.is_check?a("el-button",{staticClass:"flow-button blue",on:{click:function(t){e.examineHandle(1)}}},[e._v("通过")]):e._e()],1)],1),e._v(" "),0==e.examineInfo.config?a("flexbox",{staticClass:"check-items"},e._l(e.examineInfo.stepList,function(t,i){return a("flexbox",{key:i,staticClass:"check-item"},[a("div",[a("flexbox",{staticClass:"check-item-user",staticStyle:{width:"auto"}},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:t.userInfo,expression:"item.userInfo"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(t.userInfo.thumb_img),expression:"$options.filters.filterUserLazyImg(item.userInfo.thumb_img)",arg:"background-image"}],key:t.userInfo.thumb_img,staticClass:"div-photo check-item-img"}),e._v(" "),a("div",{staticClass:"check-item-name"},[e._v(e._s(t.userInfo.realname))])]),e._v(" "),a("flexbox",{staticClass:"check-item-info"},[a("img",{staticClass:"check-item-img",attrs:{src:e._f("statusIcon")(t.type)}}),e._v(" "),a("div",{staticClass:"check-item-name"},[e._v(e._s(e.getStatusName(t.type)))])])],1),e._v(" "),e.examineInfo.stepList.length-1!=i?a("i",{staticClass:"el-icon-arrow-right check-item-arrow"}):e._e()])})):1==e.examineInfo.config?a("flexbox",{staticClass:"check-items",attrs:{wrap:"wrap"}},e._l(e.examineInfo.stepList,function(t,s){return a("el-popover",{key:s,attrs:{placement:"bottom",disabled:0==t.user_id_info.length,trigger:"hover"}},[a("div",{staticClass:"popover-detail"},e._l(t.user_id_info,function(t,i){return a("flexbox",{key:i,staticClass:"popover-detail-item",attrs:{align:"stretch"}},[a("img",{staticClass:"popover-detail-item-img",attrs:{src:e._f("statusIcon")(t.check_type)}}),e._v(" "),a("div",[a("div",{staticClass:"popover-detail-item-time"},[e._v(e._s(e._f("filterTimestampToFormatTime")(t.check_time)))]),e._v(" "),a("flexbox",{staticClass:"popover-detail-item-examine"},[a("div",{staticClass:"examine-name"},[e._v(e._s(t.realname))]),e._v(" "),a("div",{staticClass:"examine-info"},[e._v(e._s(e.getStatusName(t.check_type))+"此申请")])])],1)])})),e._v(" "),a("flexbox",{staticClass:"fixed-examine-item",attrs:{slot:"reference"},slot:"reference"},[a("div",{staticClass:"fixed-examine-info"},[a("img",{attrs:{src:i("dZj0")}}),e._v(" "),a("div",{staticClass:"detail"},[e._v(e._s(e._f("detailName")(t)))]),e._v(" "),a("flexbox",{staticClass:"check-item-info"},[a("img",{staticClass:"check-item-img",attrs:{src:e._f("statusIcon")(t.type)}}),e._v(" "),a("div",{staticClass:"check-item-name"},[e._v(e._s(e.getStatusName(t.type)))])])],1),e._v(" "),e.examineInfo.stepList.length-1!=s?a("i",{staticClass:"el-icon-arrow-right check-item-arrow"}):e._e()])],1)})):e._e(),e._v(" "),a("examine-handle",{attrs:{show:e.showExamineHandle,id:e.id,examineType:e.examineType,detail:e.examineInfo,status:e.examineHandleInfo.status},on:{close:function(t){e.showExamineHandle=!1},save:e.examineHandleClick}})],1)},[],!1,null,"08189a9b",null));m.options.__file="ExamineInfo.vue";t.a=m.exports},"3gs7":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9y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QaLwv/oGoZhLBBKiUcpNcCGYHT8//+fIi8ABBgA6ZAToBWLB7IAAAAASUVORK5CYII="},"5j45":function(e,t,i){"use strict";var a=i("mX3o"),s=i("EgJF"),n=i("UcQx"),l=i("qbf4"),o=i("mkuN"),c={name:"relative-business",components:{CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},CRMCreateView:s.default,CrmRelative:o.a},computed:{customer_id:function(){return this.detail.customer_id},canRelation:function(){return"contacts"==this.crmType}},mixins:[a.a],data:function(){return{nopermission:!1,list:[],fieldList:[],tableHeight:"400px",showFullDetail:!1,isCreate:!1,businessId:"",formatterRules:{},createActionInfo:{type:"relative",crmType:this.crmType,data:{}},showRelativeView:!1,selectionList:[]}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{id:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},detail:{type:Object,default:function(){return{}}}},mounted:function(){this.getDetail()},activated:function(){},deactivated:function(){},methods:{checkRelativeInfos:function(e){var t=this;if(e.data.length>0){var i={is_relation:1};i[this.crmType+"_id"]=this.id,i.business_id=e.data.map(function(e){return e.business_id}),Object(l.g)(i).then(function(e){t.getDetail(),t.$message.success(e.data)}).catch(function(){})}},unRelevanceHandleClick:function(){var e=this;0==this.selectionList.length?this.$message.error("请先勾选数据"):this.$confirm("确认取消关联?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t={is_relation:0};t[e.crmType+"_id"]=e.id,t.business_id=e.selectionList.map(function(e){return e.business_id}),Object(l.g)(t).then(function(t){e.getDetail(),e.$message.success(t.data)}).catch(function(){})}).catch(function(){e.$message.info("已取消操作")})},getFieldList:function(){function e(e){return e||""}this.fieldList.push({prop:"name",width:"200",label:"商机名称"}),this.fieldList.push({prop:"money",width:"200",label:"商机金额"}),this.fieldList.push({prop:"customer_id",width:"200",label:"客户名称"}),this.fieldList.push({prop:"type_id",width:"200",label:"商机状态组"}),this.fieldList.push({prop:"status_id",width:"200",label:"状态"}),this.formatterRules.customer_id={type:"crm",formatter:function(e){return e?e.name:""}},this.formatterRules.type_id={type:"crm",formatter:e},this.formatterRules.status_id={type:"crm",formatter:e}},getDetail:function(){var e=this;this.loading=!0;var t={pageType:"all"};t[this.crmType+"_id"]=this.id,Object(n.c)(t).then(function(t){0==e.fieldList.length&&e.getFieldList(),e.nopermission=!1,e.loading=!1,e.list=t.data.list}).catch(function(t){102==t.code&&(e.nopermission=!0),e.loading=!1})},fieldFormatter:function(e,t){var i=this.formatterRules[t.property];return i?"crm"===i.type?t.property?i.formatter(e[t.property+"_info"]):"":i.formatter(e[t.property]):e[t.property]},handleRowClick:function(e,t,i){this.businessId=e.business_id,this.showFullDetail=!0},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},cellStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},createClick:function(){"contacts"==this.crmType?this.createActionInfo.data.customer=this.detail.customer_id_info:"customer"==this.crmType&&(this.createActionInfo.data.customer=this.detail),this.isCreate=!0},createSaveSuccess:function(){this.canRelation?this.$refs.crmrelative.refreshList():this.getDetail()}}},r=(i("Z1Yp"),i("KHd+")),d=Object(r.a)(c,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"empty",rawName:"v-empty",value:e.nopermission,expression:"nopermission"}],staticClass:"rc-cont",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"}},[e.isSeas?e._e():i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}},[i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){return e.createClick(t)}}},[e._v("新建商机")]),e._v(" "),e.canRelation?i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){return e.unRelevanceHandleClick(t)}}},[e._v("解除关联")]):e._e(),e._v(" "),e.canRelation?i("el-popover",{staticStyle:{"margin-right":"20px"},attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showRelativeView,callback:function(t){e.showRelativeView=t},expression:"showRelativeView"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:e.showRelativeView,radio:!1,action:{type:"condition",data:{form_type:"customer",customer_id:e.customer_id}},selectedData:{business:e.list},"crm-type":"business"},on:{close:function(t){e.showRelativeView=!1},changeCheckout:e.checkRelativeInfos},model:{value:e.showRelativeView,callback:function(t){e.showRelativeView=t},expression:"showRelativeView"}}),e._v(" "),i("el-button",{staticClass:"rc-head-item",staticStyle:{"margin-right":"0"},attrs:{slot:"reference",type:"primary"},nativeOn:{click:function(t){e.showRelativeView=!0}},slot:"reference"},[e._v("关联")])],1):e._e()],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick,"selection-change":function(t){e.selectionList=t}}},[e.canRelation&&e.fieldList.length>0?i("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection",align:"center",width:"55"}}):e._e(),e._v(" "),e._l(e.fieldList,function(t,a){return i("el-table-column",{key:a,attrs:{"show-overflow-tooltip":"",prop:t.prop,formatter:e.fieldFormatter,label:t.label}})})],2),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:"business",id:e.businessId},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"business",action:e.createActionInfo},on:{"save-success":e.createSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"b63cec34",null);d.options.__file="RelativeBusiness.vue";t.a=d.exports},"5qxJ":function(e,t,i){"use strict";var a=i("k5Y1");i.n(a).a},"6Aus":function(e,t,i){"use strict";var a=i("woQC");i.n(a).a},"6ZrO":function(e,t,i){},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VtZW50SUQ9InhtcC5kaWQ6MDIzODg1M0E0MTY2MTFFOTgyQTVBQjZDQjYwOTFDREMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7hsdBeAAABLklEQVR42mL8WxjFgAWwAXEAFFsCsRQQ/wLiJ0B8HojXA/FGqBgKYMFiWCAQdwGxChZLNKA4EojvAHE5EK9DVsSExGYG4k6oAhUGwgCkZi1UDzM2F7YBcRkD6QCmpxzZhSH4DGPKrQNjAoaGwAwEhU0/XjcoqkMwfjABZBbIwFAglmGgHEgDcRgTNGlQCwSADDSlooEmIAMlqGigJAs0tbMTo5qpbymm4P2bDP8mN6Ek7OcETQJqwg0YkTnPQS68BMRq+MxDdgEBcAbkwg1UDMMNIANXQ0sRSsFTkFlM0EgpooKBhUD8E5aXQa7spsCwbqgZKMVXJRBPIcOwqVC9GOXhXyDOhZYad4gw6A60HMiB6sVZYoMKzc1QxaDS2xia8WEBfxZaBazGVgUABBgAnqU8Wz9MmZkAAAAASUVORK5CYII="},"7Lck":function(e,t,i){"use strict";var a=i("Qixx");i.n(a).a},"8KPp":function(e,t,i){"use strict";var a=i("FyfS"),s=i.n(a),n=i("Qldq"),l=i("Iae0"),o=i("KzkL"),c=(i("7Qib"),{name:"journal-log",components:{JournalCell:l.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},NewDialog:function(){return i.e("chunk-1d69").then(i.bind(null,"kFvY"))}},props:{id:[String,Number],crmType:{type:String,default:""}},watch:{id:function(e){this.refreshList()}},data:function(){return{loading:!1,loadMoreLoading:!0,isPost:!1,page:1,list:[],rowID:"",showFullDetail:!1,detailCRMType:"",showNewDialog:!1,formData:{},dialogTitle:"",imgFileList:[],accessoryFileList:[],newLoading:!1}},computed:{},mounted:function(){var e=this,t=document.getElementById("follow-log-content");t.onscroll=function(){t.scrollTop+t.clientHeight==t.scrollHeight&&1==e.loadMoreLoading&&(e.isPost?e.loadMoreLoading=!1:(e.isPost=!0,e.page++,e.getList()))},this.getList()},activated:function(){},deactivated:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(o.k)({page:this.page,limit:10,types:"crm_"+this.crmType,types_id:this.id,by:"log"}).then(function(t){var i=!0,a=!1,n=void 0;try{for(var l,o=s()(t.data.list);!(i=(l=o.next()).done);i=!0){var c=l.value;c.dataInfo.allData={},c.dataInfo.allData.business=c.dataInfo.businessList,c.dataInfo.allData.contacts=c.dataInfo.contactsList,c.dataInfo.allData.contract=c.dataInfo.contractList,c.dataInfo.allData.customer=c.dataInfo.customerList,0!=c.dataInfo.businessList.length||0!=c.dataInfo.contactsList.length||0!=c.dataInfo.contractList.length||0!=c.dataInfo.customerList.length?c.dataInfo.allDataShow=!0:c.dataInfo.allDataShow=!1}}catch(e){a=!0,n=e}finally{try{!i&&o.return&&o.return()}finally{if(a)throw n}}e.list=e.list.concat(t.data.list),t.data.list.length<10?e.loadMoreLoading=!1:e.loadMoreLoading=!0,e.loading=!1,e.isPost=!1}).catch(function(){e.isPost=!1,e.loading=!1})},refreshList:function(){this.page=1,this.list=[],this.getList()},jourecallCellHandle:function(e){var t=this;if("edit"==e.type){var i=e.data.item;if(this.showNewDialog=!0,this.dialogTitle="编辑日志",this.formData=i,this.imgFileList=[],i.imgList){var a=!0,l=!1,o=void 0;try{for(var c,r=s()(i.imgList);!(a=(c=r.next()).done);a=!0){var d=c.value;d.url=d.file_path_thumb,this.imgFileList.push(d)}}catch(e){l=!0,o=e}finally{try{!a&&r.return&&r.return()}finally{if(l)throw o}}}if(this.accessoryFileList=[],i.fileList){var u=!0,m=!1,h=void 0;try{for(var f,p=s()(i.fileList);!(u=(f=p.next()).done);u=!0){var v=f.value;v.url=v.file_path_thumb,this.accessoryFileList.push(v)}}catch(e){m=!0,h=e}finally{try{!u&&p.return&&p.return()}finally{if(m)throw h}}}this.formData.depData=i.sendStructList?i.sendStructList:[],this.formData.sentWhoList=i.sendUserList?i.sendUserList:[]}else"delete"==e.type?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.d)({log_id:e.data.item.log_id}).then(function(i){for(var a in t.$message({type:"success",message:"删除成功!"}),t.list)if(t.list[a].log_id==e.data.item.log_id){t.list.splice(a,1);break}})}).catch(function(){t.$message({type:"info",message:"已取消删除"})}):"related-detail"==e.type&&(this.rowID=e.data.item.key,this.detailCRMType=e.data.type,this.showFullDetail=!0)},submitBtn:function(e,t,i,a){var l=this;this.newLoading=!0;var o=[],c=[],r=[];if(this.formData.depData){var d=!0,u=!1,m=void 0;try{for(var h,f=s()(this.formData.depData);!(d=(h=f.next()).done);d=!0){var p=h.value;r.push(p.id)}}catch(e){u=!0,m=e}finally{try{!d&&f.return&&f.return()}finally{if(u)throw m}}}var v=[];if(this.formData.sentWhoList){var g=!0,b=!1,y=void 0;try{for(var _,w=s()(this.formData.sentWhoList);!(g=(_=w.next()).done);g=!0){var C=_.value;v.push(C.id)}}catch(e){b=!0,y=e}finally{try{!g&&w.return&&w.return()}finally{if(b)throw y}}}var k=!0,I=!1,A=void 0;try{for(var x,D=s()(this.imgFileList);!(k=(x=D.next()).done);k=!0){var T=x.value;o.push(T.file_id)}}catch(e){I=!0,A=e}finally{try{!k&&D.return&&D.return()}finally{if(I)throw A}}var R=!0,L=!1,E=void 0;try{for(var N,S=s()(this.accessoryFileList);!(R=(N=S.next()).done);R=!0){var M=N.value;c.push(M.file_id)}}catch(e){L=!0,E=e}finally{try{!R&&S.return&&S.return()}finally{if(L)throw E}}var j={id:this.formData.log_id,category_id:e,content:this.formData.content,tomorrow:this.formData.tomorrow,question:this.formData.question,file:c.concat(o),send_user_ids:v,send_structure_ids:r,customer_ids:a.customer_ids,contacts_ids:a.contacts_ids,business_ids:a.business_ids,contract_ids:a.contract_ids};Object(n.e)(j).then(function(e){l.refreshList(),l.showNewDialog=!1,l.$message.success("编辑成功"),l.newLoading=!1}).catch(function(e){l.newLoading=!1,l.$message.error("编辑失败")})}}}),r=(i("VuGW"),i("KHd+")),d=Object(r.a)(c,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:0===e.list.length,expression:"list.length === 0"}]},[i("div",{staticClass:"log-items"},[e._l(e.list,function(t,a){return i("journal-cell",{key:a,staticClass:"list-cell",attrs:{data:t.dataInfo},on:{"on-handle":e.jourecallCellHandle}})}),e._v(" "),i("div",{staticClass:"load"},[i("el-button",{attrs:{type:"text",loading:e.loadMoreLoading}},[e._v(e._s(e.loadMoreLoading?"加载更多":"没有更多了"))])],1)],2)]),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:e.detailCRMType,id:e.rowID},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.showNewDialog?i("new-dialog",{attrs:{formData:e.formData,dialogTitle:e.dialogTitle,imgFileList:e.imgFileList,accessoryFileList:e.accessoryFileList,newLoading:e.newLoading},on:{close:function(t){e.showNewDialog=!1},submitBtn:e.submitBtn}}):e._e()],1)},[],!1,null,"5460ac12",null);d.options.__file="JournalLog.vue";t.a=d.exports},"8gwX":function(e,t,i){"use strict";var a=i("YrMO"),s=i("Ew9n"),n=i("F03V"),l=i("U05J"),o=i("C+sD"),c=i("8DbX"),r=i("EgJF"),d=i("4+0Q"),u={name:"product-detail",components:{SlideView:s.a,CRMDetailHead:n.a,CRMBaseInfo:l.a,RelativeFiles:o.a,RelativeHandle:c.a,CRMCreateView:r.default},mixins:[d.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"product",detailData:{},headDetails:[{title:"产品类别",value:""},{title:"产品单位",value:""},{title:"产品价格",value:""},{title:"产品编码",value:""}],tabnames:[{label:"基本信息",name:"basicinfo"},{label:"附件",name:"file"},{label:"操作记录",name:"operationlog"}],tabCurrentName:"basicinfo",isCreate:!1}},computed:{tabName:function(){return"basicinfo"==this.tabCurrentName?"c-r-m-base-info":"file"==this.tabCurrentName?"relative-files":"operationlog"==this.tabCurrentName?"relative-handle":""}},mounted:function(){},methods:{getDetial:function(){var e=this;this.loading=!0,Object(a.e)({id:this.id}).then(function(t){e.loading=!1,e.detailData=t.data,e.headDetails[0].value=t.data.category_id_info,e.headDetails[1].value=t.data.unit,e.headDetails[2].value=t.data.price,e.headDetails[3].value=t.data.num}).catch(function(){e.loading=!1})},hideView:function(){this.$emit("hide-view")},handleClick:function(e,t){},editSaveSuccess:function(){this.$emit("handle",{type:"save-success"}),this.getDetial()}}},m=(i("tCRV"),i("KHd+")),h=Object(m.a)(u,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!e.canShowDetail,expression:"!canShowDetail"}],attrs:{listenerIDs:e.listenerIDs,noListenerIDs:e.noListenerIDs,noListenerClass:e.noListenerClass,"body-style":{padding:0,height:"100%"}},on:{"side-close":e.hideView}},[e.canShowDetail?i("flexbox",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"d-container",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限",direction:"column",align:"stretch"}},[i("c-r-m-detail-head",{attrs:{crmType:"product",detail:e.detailData,headDetails:e.headDetails,id:e.id},on:{handle:e.detailHeadHandle,close:e.hideView}}),e._v(" "),i("div",{staticClass:"tabs"},[i("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.tabCurrentName,callback:function(t){e.tabCurrentName=t},expression:"tabCurrentName"}},e._l(e.tabnames,function(e,t){return i("el-tab-pane",{key:t,attrs:{label:e.label,name:e.name}})}))],1),e._v(" "),i("div",{staticClass:"t-loading-content"},[i("keep-alive",[i(e.tabName,{tag:"component",attrs:{crmType:"product",id:e.id}})],1)],1)],1):e._e(),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"product",action:{type:"update",id:this.id}},on:{"save-success":e.editSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"5d3e1f80",null);h.options.__file="ProductDetail.vue";t.a=h.exports},"95V8":function(e,t,i){"use strict";var a=i("s7Zx");i.n(a).a},"96Tr":function(e,t,i){"use strict";var a=i("Qx3G");i.n(a).a},"9rzi":function(e,t,i){"use strict";var a=i("FLoD");i.n(a).a},"9tXl":function(e,t,i){"use strict";var a=i("SxJm");i.n(a).a},AWHz:function(e,t,i){"use strict";var a=i("wWfP");i.n(a).a},B4ez:function(e,t,i){},Bb26:function(e,t,i){"use strict";var a=i("QrKL");i.n(a).a},"Bf/B":function(e,t,i){"use strict";var a=i("z2lB");i.n(a).a},BuGm:function(e,t,i){"use strict";i.r(t);var a=i("gDS+"),s=i.n(a),n=i("FyfS"),l=i.n(n),o=i("Dh/N"),c=(i("KTTK"),i("1RnH")),r=i("0hym"),d=i("7Qib"),u={components:{relatedBusiness:c.a,XhUser:r.a},data:function(){var e=this,t=function(t,i,a){e.formData.start_time&&e.formData.end_time&&e.formData.start_time.getTime()>=e.formData.end_time.getTime()&&a(new Error("开始时间必须小于结束时间")),a()};return{zIndex:Object(d.g)(),formList:[{label:"主题",field:"title",type:"color"},{label:"开始时间",field:"start_time",type:"time"},{label:"结束时间",field:"end_time",type:"time"},{label:"参与人",field:"owner_user_ids",type:"participant"},{label:"备注",field:"remark",type:"textarea",width:"100%"}],options:[{value:0,label:"无"},{value:1,label:"准时提醒"},{value:2,label:"5分钟前"},{value:3,label:"15分钟前"},{value:4,label:"30分钟前"},{value:5,label:"一个小时前"},{value:6,label:"二个小时前"},{value:7,label:"一天前"},{value:8,label:"二天前"},{value:9,label:"一周前"}],fileList:[],loading:!1,colorList:["#3E8EF7","#11C06C","#0BB2D4","#EB6709","#FF4C52","#526069","#9262F4"],rules:{title:[{required:!0,message:"主题不能为空",trigger:"blur"},{max:50,message:"主题长度最多为50个字符",trigger:"blur"}],start_time:[{required:!0,message:"开始时间不能为空",trigger:"blur"},{validator:t,trigger:"blur"}],end_time:[{required:!0,message:"结束时间不能为空",trigger:"blur"},{validator:t,trigger:"blur"}]},relevanceAll:{},allData:{},colleaguesList:[]}},props:{formData:{type:Object,default:function(){return{color:""}}},text:{type:String,default:"创建日程"},appendToBody:{type:Boolean,default:!1}},created:function(){},mounted:function(){this.appendToBody&&document.body.appendChild(this.$el),this.allData.business=this.formData.businessList?this.formData.businessList:[],this.allData.contacts=this.formData.contactsList?this.formData.contactsList:[],this.allData.contract=this.formData.contractList?this.formData.contractList:[],this.allData.customer=this.formData.customerList?this.formData.customerList:[],this.formData.ownerList&&(this.colleaguesList=[].concat(this.formData.ownerList)),"创建日程"==this.text&&this.$set(this.formData,"color","#3E8EF7")},methods:{close:function(){1==this.$route.query.routerKey?this.$router.go(-1):this.$emit("closeDialog")},checkInfos:function(e){this.relevanceAll=e},onSubmit:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.loading=!0;var i=e.formData,a=[],n=!0,c=!1,r=void 0;try{for(var d,u=l()(e.colleaguesList);!(n=(d=u.next()).done);n=!0){var m=d.value;a.push(m.id)}}catch(e){c=!0,r=e}finally{try{!n&&u.return&&u.return()}finally{if(c)throw r}}if("创建日程"==e.text)Object(o.a)({title:i.title,start_time:i.start_time.getTime()/1e3,end_time:i.end_time.getTime()/1e3,owner_user_ids:a,remark:i.remark,color:i.color,customer_ids:e.relevanceAll.customer_ids,contacts_ids:e.relevanceAll.contacts_ids,business_ids:e.relevanceAll.business_ids,contract_ids:e.relevanceAll.contract_ids}).then(function(t){1==e.$route.query.routerKey?e.$router.push("schedule"):e.$emit("onSubmit"),e.loading=!1}).catch(function(t){e.loading=!1});else{var h={customer_ids:[],contract_ids:[],contacts_ids:[],business_ids:[]};if(e.allData.customer){var f=!0,p=!1,v=void 0;try{for(var g,b=l()(e.allData.customer);!(f=(g=b.next()).done);f=!0){var y=g.value;h.customer_ids.push(y.customer_id)}}catch(e){p=!0,v=e}finally{try{!f&&b.return&&b.return()}finally{if(p)throw v}}}if(e.allData.contract){var _=!0,w=!1,C=void 0;try{for(var k,I=l()(e.allData.contract);!(_=(k=I.next()).done);_=!0){var A=k.value;h.contract_ids.push(A.contract_id)}}catch(e){w=!0,C=e}finally{try{!_&&I.return&&I.return()}finally{if(w)throw C}}}if(e.allData.contacts){var x=!0,D=!1,T=void 0;try{for(var R,L=l()(e.allData.contacts);!(x=(R=L.next()).done);x=!0){var E=R.value;h.contacts_ids.push(E.contacts_id)}}catch(e){D=!0,T=e}finally{try{!x&&L.return&&L.return()}finally{if(D)throw T}}}if(e.allData.business){var N=!0,S=!1,M=void 0;try{for(var j,O=l()(e.allData.business);!(N=(j=O.next()).done);N=!0){var G=j.value;h.business_ids.push(G.business_id)}}catch(e){S=!0,M=e}finally{try{!N&&O.return&&O.return()}finally{if(S)throw M}}}var B="{}"==s()(e.relevanceAll)?h:e.relevanceAll;Object(o.c)({event_id:i.event_id,title:i.title,start_time:new Date(i.start_time).getTime()/1e3,end_time:new Date(i.end_time).getTime()/1e3,owner_user_ids:a,remark:i.remark,color:i.color,customer_ids:B.customer_ids,contacts_ids:B.contacts_ids,business_ids:B.business_ids,contract_ids:B.contract_ids}).then(function(t){e.$emit("onSubmit"),e.loading=!1}).catch(function(t){e.loading=!1})}})},httpRequest:function(e){this.fileList.push(e.file)},onRemove:function(e){for(var t in this.fileList)this.fileList[t].uid==e.uid&&this.fileList.splice(t,1)},changeColor:function(e){this.$set(this.formData,"color",e)},changeCheckout:function(e){this.colleaguesList=e.data},selectDelect:function(e,t){this.$refs.xhuser[0].cancelCheckItem(e),this.colleaguesList.splice(t,1)}},beforeDestroy:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},m=(i("2OrX"),i("KHd+")),h=Object(m.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"create-schedule",style:{"z-index":e.zIndex}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"add-schedule"},[a("div",{staticClass:"header",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"text"},[e._v(e._s(e.text))]),e._v(" "),a("img",{staticClass:"el-icon-close rt",attrs:{src:i("cjwK"),alt:""},on:{click:e.close}})]),e._v(" "),a("div",{staticClass:"content"},[a("el-form",{ref:"form",attrs:{model:e.formData,rules:e.rules}},e._l(e.formList,function(t,i){return a("el-form-item",{key:i,class:"el-form-item-"+t.field,style:{width:t.width},attrs:{prop:t.field,label:t.label}},["time"==t.type?[a("el-date-picker",{attrs:{type:"datetime",format:"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期时间"},model:{value:e.formData[t.field],callback:function(i){e.$set(e.formData,t.field,i)},expression:"formData[item.field]"}})]:"textarea"==t.type?[a("el-input",{attrs:{type:"textarea",autosize:{minRows:6},placeholder:"请输入内容"},model:{value:e.formData[t.field],callback:function(i){e.$set(e.formData,t.field,i)},expression:"formData[item.field]"}})]:"participant"==t.type?[a("el-popover",{attrs:{placement:"bottom-end",width:"280",trigger:"click"}},[a("xh-user",{ref:"xhuser",refInFor:!0,attrs:{selectedData:e.colleaguesList},on:{changeCheckout:e.changeCheckout}}),e._v(" "),a("div",{staticClass:"select-box",attrs:{slot:"reference"},slot:"reference"},[e._l(e.colleaguesList,function(t,i){return a("span",{key:i,staticClass:"select-box-span"},[e._v("\n                  "+e._s(t.realname)+"\n                  "),a("span",{staticClass:"el-icon-close",on:{click:function(a){a.stopPropagation(),e.selectDelect(t,i)}}})])}),e._v(" "),a("span",{staticClass:"el-icon-plus"})],2)],1)]:"select"==t.type?[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.formData[t.field],callback:function(i){e.$set(e.formData,t.field,i)},expression:"formData[item.field]"}},e._l(e.options,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))]:"color"==t.type?[a("el-input",{attrs:{placeholder:"请输入内容"},model:{value:e.formData[t.field],callback:function(i){e.$set(e.formData,t.field,i)},expression:"formData[item.field]"}},[a("i",{staticClass:"el-input__icon",attrs:{slot:"prefix"},slot:"prefix"},[a("span",{staticClass:"bg-color",style:{background:e.formData.color}})])]),e._v(" "),a("div",{staticClass:"color-box"},e._l(e.colorList,function(t,i){return a("span",{key:i,style:{background:t},on:{click:function(i){e.changeColor(t)}}})}))]:a("el-input",{model:{value:e.formData[t.field],callback:function(i){e.$set(e.formData,t.field,i)},expression:"formData[item.field]"}})],2)})),e._v(" "),a("related-business",{attrs:{allData:e.allData},on:{checkInfos:e.checkInfos}})],1),e._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")]),e._v(" "),a("el-button",{on:{click:e.close}},[e._v("取消")])],1)])])},[],!1,null,"36723b83",null);h.options.__file="createSchedule.vue";t.default=h.exports},CTKu:function(e,t,i){"use strict";i.r(t);var a=i("JXju"),s=i("kegP"),n={name:"businessIndex",components:{CRMAllDetail:a.a},mixins:[s.a],data:function(){return{crmType:"business"}},computed:{},mounted:function(){},methods:{cellStyle:function(e){e.row;var t=e.column;e.rowIndex,e.columnIndex;return"name"===t.property||"customer_id"===t.property?{color:"#3E84E9",cursor:"pointer"}:""}}},l=(i("Bf/B"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("c-r-m-list-head",{attrs:{title:"商机管理",placeholder:"请输入商机名称","main-title":"新建商机","crm-type":e.crmType},on:{"on-handle":e.listHeadHandle,"on-search":e.crmSearch}}),e._v(" "),a("div",{directives:[{name:"empty",rawName:"v-empty",value:!e.crm.business.index,expression:"!crm.business.index"}],staticClass:"crm-container",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"}},[a("c-r-m-table-head",{ref:"crmTableHead",attrs:{"crm-type":e.crmType},on:{filter:e.handleFilter,handle:e.handleHandle,scene:e.handleScene}}),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"n-table--border",staticStyle:{width:"100%"},attrs:{id:"crm-table",data:e.list,height:e.tableHeight,stripe:"",border:"","highlight-current-row":"","cell-style":e.cellStyle},on:{"row-click":e.handleRowClick,"header-dragend":e.handleHeaderDragend,"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection",align:"center",width:"55"}}),e._v(" "),e._l(e.fieldList,function(t,i){return a("el-table-column",{key:i,attrs:{"show-overflow-tooltip":"",fixed:0==i,prop:t.prop,label:t.label,width:t.width,formatter:e.fieldFormatter},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"table-head-name"},[e._v(e._s(t.column.label))])]}}])})}),e._v(" "),a("el-table-column"),e._v(" "),a("el-table-column",{attrs:{fixed:"right",width:"36"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("img",{staticClass:"table-set",attrs:{src:i("zbTZ")},on:{click:e.handleTableSet}})]}}])})],2),e._v(" "),a("div",{staticClass:"p-contianer"},[a("el-pagination",{staticClass:"p-bar",attrs:{"current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:pageSize":function(t){e.pageSize=t}}})],1)],1),e._v(" "),a("c-r-m-all-detail",{staticClass:"d-view",attrs:{visible:e.showDview,crmType:e.rowType,id:e.rowID},on:{"update:visible":function(t){e.showDview=t},handle:e.handleHandle}}),e._v(" "),a("fields-set",{attrs:{crmType:e.crmType,dialogVisible:e.showFieldSet},on:{"set-success":e.setSave,"update:dialogVisible":function(t){e.showFieldSet=t}}})],1)},[],!1,null,"175cc2f4",null);o.options.__file="BusinessIndex.vue";t.default=o.exports},DUlf:function(e,t,i){"use strict";var a=i("KzkL"),s=i("mX3o"),n={name:"relative-team",components:{TeamsHandle:i("eOzp").a},computed:{},mixins:[s.a],data:function(){return{list:[],fieldList:[],tableHeight:"400px",teamsDialogShow:!1,handleType:1,editPermissionShow:!1,selectionList:[]}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{id:[String,Number],detail:{type:Object,default:function(){return{}}},crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},mounted:function(){this.fieldList.push({prop:"realname",width:"200",label:"姓名"}),this.fieldList.push({prop:"structure_name",width:"200",label:"职位"}),this.fieldList.push({prop:"group_name",width:"200",label:"团队角色"}),this.fieldList.push({prop:"authority",width:"200",label:"权限"}),this.getDetail()},activated:function(){},deactivated:function(){},methods:{getDetail:function(){var e=this;this.loading=!0,Object(a.t)({types:"crm_"+this.crmType,types_id:this.id}).then(function(t){e.loading=!1,e.list=t.data}).catch(function(){e.loading=!1})},handleSelectionChange:function(e){this.selectionList=e},handleClick:function(e){var t=this;"add"==e?this.teamsDialogShow=!0:0==this.selectionList.length?this.$message.error("请勾选需要操作的团队成员"):"edit"==e?this.editPermissionShow=!0:"remove"==e&&this.$confirm("此操作将移除这些团队成员是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=t.selectionList.map(function(e,t,i){return e.id}),i={types:"crm_"+t.crmType,types_id:[t.detail[t.crmType+"_id"]],user_id:e,is_del:1};t.loading=!0,Object(a.u)(i).then(function(e){t.$message({type:"success",message:e.data}),t.loading=!1,t.getDetail()}).catch(function(){t.loading=!1})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},handleCallBack:function(e){this.getDetail()},handleEditConfirm:function(){var e=this,t=this.selectionList.map(function(e,t,i){return e.id});this.loading=!0,Object(a.u)({types:"crm_"+this.crmType,types_id:[this.detail[this.crmType+"_id"]],user_id:t,type:this.handleType}).then(function(t){e.editPermissionShow=!1,e.$message({type:"success",message:t.data}),e.loading=!1,e.getDetail()}).catch(function(){e.loading=!1})},handleSelectable:function(e,t){return 0!=e.type},handleRowClick:function(e,t,i){},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},cellStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}}}},l=(i("3/bq"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"rc-cont"},[e.isSeas?e._e():i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}},[i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){e.handleClick("remove")}}},[e._v("移除")]),e._v(" "),i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){e.handleClick("edit")}}},[e._v("编辑")]),e._v(" "),i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){e.handleClick("add")}}},[e._v("添加团队成员")])],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick,"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{"show-overflow-tooltip":"",type:"selection",align:"center",width:"55",selectable:e.handleSelectable}}),e._v(" "),e._l(e.fieldList,function(e,t){return i("el-table-column",{key:t,attrs:{"show-overflow-tooltip":"",prop:e.prop,label:e.label}})})],2),e._v(" "),i("teams-handle",{attrs:{crmType:e.crmType,title:"添加团队成员",selectionList:[e.detail],dialogVisible:e.teamsDialogShow},on:{handle:e.handleCallBack,"update:dialogVisible":function(t){e.teamsDialogShow=t}}}),e._v(" "),i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{title:"编辑权限",visible:e.editPermissionShow,"append-to-body":!0,width:"400px"},on:{"update:visible":function(t){e.editPermissionShow=t}}},[i("div",{staticClass:"handle-box"},[i("flexbox",{staticClass:"handle-item"},[i("div",{staticClass:"handle-item-name"},[e._v("权限:")]),e._v(" "),i("el-radio-group",{model:{value:e.handleType,callback:function(t){e.handleType=t},expression:"handleType"}},[i("el-radio",{attrs:{label:1}},[e._v("只读")]),e._v(" "),i("el-radio",{attrs:{label:2}},[e._v("读写")])],1)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(t){e.editPermissionShow=!1}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return e.handleEditConfirm(t)}}},[e._v("保存")])],1)])],1)},[],!1,null,"7e0941ea",null);o.options.__file="RelativeTeam.vue";t.a=o.exports},"Dh/N":function(e,t,i){"use strict";i.d(t,"d",function(){return s}),i.d(t,"a",function(){return n}),i.d(t,"b",function(){return l}),i.d(t,"c",function(){return o});var a=i("t3Un");function s(e){return Object(a.a)({url:"oa/event/index",method:"post",data:e})}function n(e){return Object(a.a)({url:"oa/event/save",method:"post",data:e})}function l(e){return Object(a.a)({url:"oa/event/delete",method:"post",data:e})}function o(e){return Object(a.a)({url:"oa/event/update",method:"post",data:e})}},EGis:function(e,t,i){},FLoD:function(e,t,i){},Fpl1:function(e,t,i){"use strict";var a=i("Er7M"),s=i("O1Uw"),n={name:"examine-cell",components:{RelatedBusinessCell:a.a,FileCell:s.a},mixins:[],computed:{relatedListData:function(){return{contacts:this.data.contactsList||[],customer:this.data.customerList||[],business:this.data.businessList||[],contract:this.data.contractList||[]}}},watch:{},data:function(){return{}},props:{data:Object},mounted:function(){},methods:{getStatusName:function(e){return 0==e?"待审":1==e?"审批中":2==e?"通过":3==e?"拒绝":4==e?"撤回":""},getStatusColor:function(e){return 0==e?"#F3A633":1==e?"#F3A633":2==e?"#93E06D":3==e?"#FF0000":4==e?"#FF0000":""},imgZoom:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e,t,i){return{url:e.file_path,name:e.name}})})},handleCommand:function(e){this.$emit("on-handle",{type:e,data:{item:this.data}})},checkDetail:function(e){this.$emit("on-handle",{type:"view",data:{item:this.data}})},checkRelatedDetail:function(e,t){this.$emit("on-handle",{type:"related-detail",data:{type:e,item:t}})}}},l=(i("VrTI"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"list"},[i("div",{staticClass:"list-content"},[i("flexbox",{staticClass:"header"},[i("div",{directives:[{name:"photo",rawName:"v-photo",value:e.data.create_user_info,expression:"data.create_user_info"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(e.data.create_user_info.thumb_img),expression:"$options.filters.filterUserLazyImg(data.create_user_info.thumb_img)",arg:"background-image"}],key:e.data.create_user_info.thumb_img,staticClass:"div-photo head-img"}),e._v(" "),i("div",{staticClass:"name-time"},[i("span",{staticClass:"name"},[e._v(e._s(e.data.create_user_info.realname))]),e._v(" "),i("span",{staticClass:"time"},[e._v(e._s(e._f("filterTimestampToFormatTime")(e.data.create_time)))])]),e._v(" "),i("div",{staticClass:"rt-setting"},[i("span",{staticClass:"bg-color",style:{"background-color":e.getStatusColor(e.data.check_status)}}),e._v(" "),i("span",{staticClass:"dep"},[i("span",[e._v(e._s(e.data.category_name)+" - ")]),e._v(" "),i("span",[e._v(e._s(e.getStatusName(e.data.check_status)))])]),e._v(" "),e.data.permission&&(e.data.permission.is_recheck||e.data.permission.is_update||e.data.permission.is_delete)?i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[i("i",{staticClass:"el-icon-arrow-down el-icon-more",staticStyle:{color:"#CDCDCD",cursor:"pointer"}}),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.data.permission&&e.data.permission.is_recheck?i("el-dropdown-item",{attrs:{command:"withdraw"}},[e._v("撤回")]):e._e(),e._v(" "),e.data.permission&&e.data.permission.is_update?i("el-dropdown-item",{attrs:{command:"edit"}},[e._v("编辑")]):e._e(),e._v(" "),e.data.permission&&e.data.permission.is_delete?i("el-dropdown-item",{attrs:{command:"delete"}},[e._v("删除")]):e._e()],1)],1):e._e()],1)]),e._v(" "),i("div",{staticClass:"row",on:{click:function(t){e.checkDetail(e.data)}}},[e.data.content?i("p",{staticClass:"text"},[e._v(e._s(e.data.content))]):e._e(),e._v(" "),e.data.causeTitle?i("p",{staticClass:"title"},[e._v(e._s(e.data.causeTitle))]):e._e()]),e._v(" "),e.data.fileList.length>0||e.data.imgList.length>0?i("div",{staticClass:"accessory"},[i("div",{staticClass:"upload-img-box"},e._l(e.data.imgList,function(t,a){return i("div",{key:a,staticClass:"img-list",on:{click:function(t){e.imgZoom(e.data.imgList,a)}}},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.file_path_thumb,expression:"imgItem.file_path_thumb"}]})])})),e._v(" "),i("div",{staticClass:"accessory-box"},e._l(e.data.fileList,function(e,t){return i("file-cell",{key:t,attrs:{data:e,cellIndex:t}})}))]):e._e(),e._v(" "),e.relatedListData.contacts.length>0||e.relatedListData.customer.length>0||e.relatedListData.business.length>0||e.relatedListData.contract.length>0?i("div",{staticClass:"related-business"},[i("div",{staticClass:"label"},[e._v("关联业务")]),e._v(" "),e._l(e.relatedListData,function(t,a){return i("div",{key:a},e._l(t,function(t,s){return i("related-business-cell",{key:s,attrs:{data:t,cellIndex:s,type:a,showFoot:!1},nativeOn:{click:function(i){e.checkRelatedDetail(a,t)}}})}))})],2):e._e()],1)])},[],!1,null,"20d52e26",null);o.options.__file="examineCell.vue";t.a=o.exports},GSQh:function(e,t,i){"use strict";var a=i("r7fL");i.n(a).a},GsAi:function(e,t,i){},H5CR:function(e,t,i){"use strict";var a=i("0djP");i.n(a).a},HfS2:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAA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42qTTzyvEQRjH8V0hbk6r/Ngc2CgnthC2Jc7KKsVfIOtGrbuNoiRaf4FSGzlL2oMD+XHSJvaEhJM9rRvvR5+tOXz3G5l61czOM8/OzDPfYGzlLfCfVuUzl8eX5P+aoBHNaBDrh7wCq53+NlpwizmkUdRcWrvYRTeeseDuIIpJ5FCPPuxgHINK3q+5nGKj7g4yWMeWxsM4RUHjdsxiUeOgkg6UExxiGfsoIYsZJbE2igNEtAuL3XR3sIYYelGHC2dxQP1zjOET11pTsQo1Hr/V+pUxpX+3zCfqx524EfRo7kbzKfcIdqureNV4Cnt40G7akFBZi4qdtmOUE8zjSK+uVfXuxJDmz9CEDTxhCRPuES5VibiqYJeYxLEkdYklxVjs1U89K3xM9pTvEdb4ER1493vKbrOsL/jQ+M5rsV8Ca12/+Zy/BRgAE3dJqM+BEpAAAAAASUVORK5CYII="},"IG5+":function(e,t,i){"use strict";var a=i("jxLh");i.n(a).a},Iae0:function(e,t,i){"use strict";var a=i("QbLZ"),s=i.n(a),n=i("S3Kq"),l=i("Qldq"),o=i("1RnH"),c=i("Xjjk"),r=i.n(c),d=i("L2JU"),u=i("O1Uw"),m={name:"journal-cell",components:{emoji:n.a,relatedBusiness:o.a,FileCell:u.a},mixins:[],computed:s()({},Object(d.b)(["userInfo"]),{allData:function(){var e={};return e.business=this.data.businessList,e.contacts=this.data.contactsList,e.contract=this.data.contractList,e.customer=this.data.customerList,e},allDataShow:function(){return!this.showWorkbench&&(0!=this.data.businessList.length||0!=this.data.contactsList.length||0!=this.data.contractList.length||0!=this.data.customerList.length)}}),watch:{},data:function(){return{commentsTextarea:"",childCommentsTextarea:"",commentsPopover:!1,replyChildComment:null,replyChildIndex:-1,childCommentsPopover:!1,blurIndex:0,contentLoading:!1,parentTarget:null,awaitMoment:!1}},props:{data:Object,logIndex:{type:Number,default:0},showWorkbench:{type:Boolean,default:!1}},mounted:function(){var e=this;0!=this.data.is_read||this.showWorkbench||(this.$bus.on("journal-list-box-scroll",function(t){e.observePreview(t)}),this.observePreview(document.getElementById("journal-cell"+this.logIndex).parentNode))},methods:{observePreview:function(e){var t=this;if(0==this.data.is_read){e&&(this.parentTarget=e);var i=this.whetherPreview();!this.awaitMoment&&i&&(this.awaitMoment=!0,setTimeout(function(){t.awaitMoment=!1,t.whetherPreview()&&t.submiteIsRead()},3e3))}},whetherPreview:function(){var e=this.parentTarget.children[this.logIndex];if(this.parentTarget.getBoundingClientRect()){var t=this.parentTarget.getBoundingClientRect().top-e.getBoundingClientRect().top,i=!1;return t<=0&&Math.abs(t)<this.parentTarget.clientHeight?i=!0:t>0&&t<e.clientHeight&&(i=!0),i}return!1},submiteIsRead:function(){var e=this;Object(l.g)({log_id:this.showWorkbench?this.data.action_id:this.data.log_id}).then(function(t){e.data.is_read=1,e.$store.dispatch("GetOAMessageNum","log")}).catch(function(e){})},verifyAwaitInfo:function(){},handleCommand:function(e){this.$emit("on-handle",{type:e,data:{item:this.data}})},checkRelatedDetail:function(e,t){this.$emit("on-handle",{type:"related-detail",data:{type:e,item:t}})},discussDelete:function(e,t,i){var a=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l.b)({comment_id:e.comment_id,log_id:e.type_id}).then(function(e){a.$message({type:"success",message:"删除成功!"}),t.splice(i,1),a.$emit("on-handle",{type:"discuss-delete",data:{item:a.data}})})}).catch(function(){a.$message({type:"info",message:"已取消删除"})})},discussBtn:function(e,t){e.show?(this.$set(e,"show",!1),this.replyChildComment=null):(this.$set(e,"show",!0),this.$set(e,"showComment",!1),this.replyChildComment=e,this.replyChildIndex=t)},childCommentSubmit:function(){var e=this;if(this.replyChildComment&&this.childCommentsTextarea){var t=-1==this.replyChildIndex?this.replyChildComment:this.replyChildComment.replyList[this.replyChildIndex];this.contentLoading=!0,Object(l.c)({reply_fid:this.replyChildComment.comment_id,log_id:t.type_id,content:r()(this.childCommentsTextarea),reply_content:t.content,reply_comment_id:t.comment_id,reply_user_id:t.userInfo.id,reply_name:t.userInfo.realname}).then(function(i){e.replyChildComment.replyList.push({comment_id:i.data,type_id:t.type_id,userInfo:e.userInfo,create_time:parseInt((new Date).getTime()/1e3),content:r()(e.childCommentsTextarea),reply_content:t.content,replyuserInfo:t.userInfo}),e.$message.success("回复成功"),e.replyChildComment.show=!1,e.replyChildComment=null,e.contentLoading=!1,e.childCommentsTextarea="",e.$emit("on-handle",{type:"discuss-submit",data:{item:e.data}})}).catch(function(t){e.$message.error("回复失败"),e.contentLoading=!1})}},commentSubmit:function(e){var t=this;this.commentsTextarea&&(this.contentLoading=!0,Object(l.c)({log_id:this.showWorkbench?this.data.action_id:this.data.log_id,content:r()(this.commentsTextarea)}).then(function(i){e.showComment=!1,e.replyList.push({comment_id:i.data,type_id:t.showWorkbench?t.data.action_id:t.data.log_id,userInfo:t.userInfo,create_time:parseInt((new Date).getTime()/1e3),content:r()(t.commentsTextarea),replyList:[],show:!1}),t.commentsTextarea="",t.$message.success("回复成功"),t.contentLoading=!1}).catch(function(e){t.$message.error("回复失败"),t.contentLoading=!1}))},commentBtn:function(e){e.showComment?this.$set(e,"showComment",!1):(this.replyChildComment&&(this.replyChildComment.show=!1),this.$set(e,"showComment",!0))},selectEmoji:function(e){var t=this.commentsTextarea.split("");t.splice(this.blurIndex,0,e),this.commentsTextarea=t.join(""),this.commentsPopover=!1},childSelectEmoji:function(e){var t=this.childCommentsTextarea.split("");t.splice(this.blurIndex,0,e),this.childCommentsTextarea=t.join(""),this.childCommentsPopover=!1},blurFun:function(e){this.blurIndex=e.target.selectionEnd},imgZoom:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e,t,i){return{url:e.file_path,name:e.name}})})}},beforeDestroy:function(){this.$bus.off("journal-list-box-scroll")}},h=(i("RgWh"),i("KHd+")),f=Object(h.a)(m,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"list",attrs:{id:"journal-cell"+e.logIndex}},[a("div",{staticClass:"list-content"},[a("div",{staticClass:"header"},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:e.data.create_user_info,expression:"data.create_user_info"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(e.data.create_user_info.thumb_img),expression:"$options.filters.filterUserLazyImg(data.create_user_info.thumb_img)",arg:"background-image"}],key:e.data.create_user_info.thumb_img,staticClass:"div-photo head-img header-circle"}),e._v(" "),a("div",{staticClass:"row"},[a("p",{staticClass:"row-title"},[a("span",{staticClass:"name"},[e._v(e._s(e.data.create_user_info.realname))]),e._v(" "),e.showWorkbench?a("span",{staticClass:"item-content"},[e._v(e._s(e.data.action_content))]):a("span",{staticClass:"read",style:{color:0==e.data.is_read?"#3E84E9":"#ccc"}},[e._v(e._s(0==e.data.is_read?"未读":"已读"))])]),e._v(" "),a("span",{staticClass:"time"},[e._v(e._s(e._f("moment")(e.data.create_time,"YYYY-MM-DD HH:mm")))]),e._v(" "),a("el-tooltip",{attrs:{disabled:!(e.data.sendUserList.length>0||e.data.sendStructList.length>0),placement:"bottom",effect:"light","popper-class":"tooltip-change-border"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("div",{staticClass:"members-dep-title"},[e.data.sendUserList?a("span",e._l(e.data.sendUserList,function(t,i){return a("span",{key:i},[e._v("\n                  "+e._s(0==e.data.sendStructList.length&&i==e.data.sendUserList.length-1?t.realname:t.realname+",")+"\n                ")])})):e._e(),e._v(" "),e._l(e.data.sendStructList,function(t,i){return 0!=e.data.sendStructList.legnth?a("span",{key:i},[e._v("\n                "+e._s(i==e.data.sendStructList.length-1?t.name:t.name+",")+"\n              ")]):e._e()})],2)]),e._v(" "),a("p",{staticClass:"row-title",staticStyle:{display:"inline-block"}},[e.data.sendStructList?a("span",[e._v(e._s(e.data.sendStructList.length)+" 个部门,")]):e._e(),e._v(" "),e.data.sendUserList?a("span",[e._v(e._s(e.data.sendUserList.length)+"个同事")]):e._e()])])],1),e._v(" "),!e.showWorkbench&&e.data.permission&&(e.data.permission.is_update||e.data.permission.is_delete)?a("div",{staticClass:"rt-setting"},[a("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[a("i",{staticClass:"el-icon-arrow-down el-icon-more",staticStyle:{color:"#CDCDCD",cursor:"pointer"}}),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.data.permission.is_update?a("el-dropdown-item",{attrs:{command:"edit"}},[e._v("编辑")]):e._e(),e._v(" "),e.data.permission.is_delete?a("el-dropdown-item",{attrs:{command:"delete"}},[e._v("删除")]):e._e()],1)],1)],1):e._e()]),e._v(" "),a("div",{staticClass:"text"},[e.data.content?a("p",{staticClass:"row"},[a("span",{staticClass:"title"},[e._v(e._s(1==e.data.category_id?"今日工作内容":2==e.data.category_id?"本周工作内容":"本月工作内容")+":")]),e._v(e._s(e.data.content))]):e._e(),e._v(" "),e.data.tomorrow?a("p",{staticClass:"row"},[a("span",{staticClass:"title"},[e._v(e._s(1==e.data.category_id?"明日工作内容":2==e.data.category_id?"下周工作内容":"下月工作内容")+":")]),e._v(e._s(e.data.tomorrow))]):e._e(),e._v(" "),e.data.question?a("p",{staticClass:"row"},[a("span",{staticClass:"title"},[e._v("遇到的问题:")]),e._v(e._s(e.data.question))]):e._e()]),e._v(" "),a("div",{staticClass:"accessory"},[0!=e.data.imgList.length?a("div",{staticClass:"upload-img-box"},e._l(e.data.imgList,function(t,i){return a("div",{key:i,staticClass:"img-list",on:{click:function(t){e.imgZoom(e.data.imgList,i)}}},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.file_path,expression:"imgItem.file_path"}],key:t.file_path})])})):e._e(),e._v(" "),0!=e.data.fileList.length?a("div",{staticClass:"accessory-box"},e._l(e.data.fileList,function(e,t){return a("file-cell",{key:t,attrs:{data:e,cellIndex:t}})})):e._e()]),e._v(" "),e.allDataShow?a("related-business",{attrs:{marginLeft:"0",alterable:!1,allData:e.allData},on:{checkRelatedDetail:e.checkRelatedDetail}}):e._e(),e._v(" "),0!=e.data.replyList.length?a("div",{staticClass:"discuss"},[a("div",{staticClass:"border"}),e._v(" "),e._l(e.data.replyList,function(t,s){return a("div",{key:s,staticClass:"discuss-list"},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:t.userInfo,expression:"discussItem.userInfo"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(t.userInfo.thumb_img),expression:"$options.filters.filterUserLazyImg(discussItem.userInfo.thumb_img)",arg:"background-image"}],key:t.userInfo.thumb_img,staticClass:"div-photo head-img header-circle"}),e._v(" "),a("span",{staticClass:"name"},[e._v(e._s(t.userInfo.realname))]),e._v(" "),a("span",{staticClass:"time"},[e._v(e._s(e._f("moment")(t.create_time,"YYYY-MM-DD HH:mm")))]),e._v(" "),a("p",{staticClass:"reply-title"},[a("span",{domProps:{innerHTML:e._s(e.emoji(t.content))}}),e._v(" "),a("i",{staticClass:"wukong wukong-log-reply log-handle",on:{click:function(i){e.discussBtn(t,-1)}}}),e._v(" "),a("i",{staticClass:"wukong wukong-log-delete log-handle",on:{click:function(i){e.discussDelete(t,e.data.replyList,s)}}})]),e._v(" "),a("p",{staticClass:"discuss-content",domProps:{innerHTML:e._s(e.emoji(t.reply_content))}}),e._v(" "),t.replyList&&t.replyList.length>0?a("div",{staticClass:"children-reply"},e._l(t.replyList,function(i,s){return a("div",{key:s,staticClass:"discuss-list"},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:i.userInfo,expression:"childDiscussItem.userInfo"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(i.userInfo.thumb_img),expression:"$options.filters.filterUserLazyImg(childDiscussItem.userInfo.thumb_img)",arg:"background-image"}],key:i.userInfo.thumb_img,staticClass:"div-photo head-img header-circle"}),e._v(" "),a("span",{staticClass:"name"},[e._v(e._s(i.userInfo.realname))]),e._v(" "),a("span",{staticClass:"time"},[e._v(e._s(e._f("moment")(i.create_time,"YYYY-MM-DD HH:mm")))]),e._v(" "),a("p",{staticClass:"reply-title"},[[a("span",[e._v("回复")]),e._v(" "),a("span",{staticClass:"reply"},[e._v("@"+e._s(i.replyuserInfo.realname)+":")])],e._v(" "),a("span",{domProps:{innerHTML:e._s(e.emoji(i.content))}}),e._v(" "),a("i",{staticClass:"wukong wukong-log-reply log-handle",on:{click:function(i){e.discussBtn(t,s)}}}),e._v(" "),a("i",{staticClass:"wukong wukong-log-delete log-handle",on:{click:function(a){e.discussDelete(i,t.replyList,s)}}})],2)])})):e._e(),e._v(" "),t.show?a("div",{staticClass:"comment-box"},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},on:{blur:e.blurFun},model:{value:e.childCommentsTextarea,callback:function(t){e.childCommentsTextarea=t},expression:"childCommentsTextarea"}}),e._v(" "),a("div",{staticClass:"btn-group"},[a("el-popover",{attrs:{placement:"top",width:"400",trigger:"click"},model:{value:e.childCommentsPopover,callback:function(t){e.childCommentsPopover=t},expression:"childCommentsPopover"}},[a("emoji",{on:{select:e.childSelectEmoji}}),e._v(" "),a("img",{staticClass:"smiling-img",attrs:{slot:"reference",src:i("woiz")},slot:"reference"})],1),e._v(" "),a("div",{staticClass:"btn-box"},[a("el-button",{attrs:{type:"primary",loading:e.contentLoading},on:{click:function(t){e.childCommentSubmit()}}},[e._v("回复")]),e._v(" "),a("el-button",{on:{click:function(e){t.show=!1}}},[e._v("取消")])],1)],1)],1):e._e(),e._v(" "),a("div",{staticClass:"border"})])})],2):e._e()],1),e._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{type:"primary",icon:"el-icon-chat-line-round"},on:{click:function(t){e.commentBtn(e.data)}}},[e._v("回复")])],1),e._v(" "),e.data.showComment?a("div",{staticClass:"comment-box"},[a("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入内容"},on:{blur:e.blurFun},model:{value:e.commentsTextarea,callback:function(t){e.commentsTextarea=t},expression:"commentsTextarea"}}),e._v(" "),a("div",{staticClass:"btn-group"},[a("el-popover",{attrs:{placement:"top",width:"400",trigger:"click"},model:{value:e.commentsPopover,callback:function(t){e.commentsPopover=t},expression:"commentsPopover"}},[a("emoji",{on:{select:e.selectEmoji}}),e._v(" "),a("img",{staticClass:"smiling-img",attrs:{slot:"reference",src:i("woiz")},slot:"reference"})],1),e._v(" "),a("div",{staticClass:"btn-box"},[a("el-button",{attrs:{type:"primary",loading:e.contentLoading},on:{click:function(t){e.commentSubmit(e.data)}}},[e._v("回复")]),e._v(" "),a("el-button",{on:{click:function(t){e.data.showComment=!1}}},[e._v("取消")])],1)],1)],1):e._e()])},[],!1,null,"461bf67c",null);f.options.__file="journalCell.vue";t.a=f.exports},JXju:function(e,t,i){"use strict";var a=i("7Qib"),s=i("mqlf"),n=i("ppJE"),l=i("PS1M"),o=i("n1dw"),c=i("xfX+"),r=i("8gwX"),d=i("K6D0"),u={name:"c-r-m-all-detail",components:{ClueDetail:s.a,CustomerDetail:n.a,ContactsDetail:l.a,BusinessDetail:o.a,ContractDetail:c.a,ProductDetail:r.a,MoneyDetail:d.a},watch:{crmType:function(e){"leads"==this.crmType?this.tabName="clue-detail":"customer"==this.crmType?this.tabName="customer-detail":"contacts"==this.crmType?this.tabName="contacts-detail":"business"==this.crmType?this.tabName="business-detail":"contract"==this.crmType?this.tabName="contract-detail":"product"==this.crmType?this.tabName="product-detail":"receivables"==this.crmType&&(this.tabName="money-detail")}},computed:{},data:function(){return{tabName:""}},props:{id:[String,Number],crmType:{type:String,default:""},visible:{type:Boolean,default:!1},listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},mounted:function(){this.visible&&(document.body.appendChild(this.$el),this.$el.style.zIndex=Object(a.g)())},methods:{hiddenView:function(){this.$emit("update:visible",!1)},detailHandle:function(e){this.$emit("handle",e)}},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},m=(i("9tXl"),i("KHd+")),h=Object(m.a)(u,function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.id&&e.visible?i(e.tabName,{tag:"component",staticClass:"d-view",attrs:{crmType:e.crmType,id:e.id,listenerIDs:e.listenerIDs,noListenerIDs:e.noListenerIDs},on:{handle:e.detailHandle,"hide-view":e.hiddenView}}):e._e()},[],!1,null,"74e88d81",null);h.options.__file="CRMAllDetail.vue";t.a=h.exports},JrHR:function(e,t,i){},JwrD:function(e,t,i){},N0PQ:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjZGRjBCRTYxRTBBNzExRTg5QkREOEQxRjlDMkUxOUExIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjZGRjBCRTYyRTBBNzExRTg5QkREOEQxRjlDMkUxOUExIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NkZGMEJFNUZFMEE3MTFFODlCREQ4RDFGOUMyRTE5QTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NkZGMEJFNjBFMEE3MTFFODlCREQ4RDFGOUMyRTE5QTEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz704RrgAAABwUlEQVR42uSXz0sCQRTH36h1sGNlaHjpVJoHC0KCOnVJOwSdqmM/6NZ/EF071rluQaduGQWd9BZEqWBhQQQmHYIQikDU6bs6G8Oy4q7sskYPPuzOzFu+++a9mZ1lnHNywlzkkDkm7JEb7/m8rWIDoVBHEc+DEuAaSmLMtqk+An6dfr8Ys0T4BHxJUbUzJq6q/yc47kR4CXg1fevgTcf3Faxp+vrAsuHikqxH054A5y2mWvYxnEaPwZTc/Kl1zJPJBt27gbR667YlnUjYMNWMORMxi8edETZhH+AZ9IIx4LZb+A5sieskGALfYMWW4hIFdQtmwJyIVt5gruEziucfrF5OVbAKZsGpzq42BVIQH+6suFovlRRQojnTzWethl73IO52wYaVEd+DcTDSaFUqRPV6c6RYJJ5ON8WJFqwuLkWl/7cWMhmE4SLm8xHP5YhFIkrEJPsYibhqQDgKCur3moXDROUy8Wy2KRoMqn5PZoQLBoSnxTf7otHyeonFYsSiUVlUsUMzwttAOfnV2my3e2ATvKjiFAjIPpdg30yOr0DYRL6VpbMDFoEPPIpz2EGrl2fyn0S3Hm8tNfbv/p1+BBgA+Vdv2Iz9D6cAAAAASUVORK5CYII="},N1fg:function(e,t,i){},NFfE:function(e,t,i){},NOa9:function(e,t,i){},NS7n:function(e,t,i){"use strict";var a={name:"filterContent",props:{obj:{default:{},required:!0}},watch:{obj:function(e){this.showObj=e}},computed:{},data:function(){return{optionsNames:{is:"等于",isnot:"不等于",contains:"包含",not_contain:"不包含",start_with:"开始于",end_with:"结束于",is_empty:"为空",is_not_empty:"不为空",eq:"等于",neq:"不等于",gt:"大于",egt:"大于等于",lt:"小于",elt:"小于等于"},showObj:{}}},mounted:function(){this.showObj=this.obj},methods:{handleDelete:function(e,t){this.$delete(this.showObj.obj,e.field),this.showObj.form.splice(t,1),this.$emit("delete",{item:e,index:t,obj:this.showObj})},getTypesName:function(e){return e.type_id&&e.typeOption.find(function(t){return t.type_id===e.type_id}).name||""},getStatusName:function(e){if(e.status_id){var t=e.statusOption.find(function(t){return t.status_id===e.status_id});return t.name?"-"+t.name:""}return""}}},s=(i("no1/"),i("KHd+")),n=Object(s.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wrapper"},[i("ul",{staticClass:"list"},e._l(e.showObj.form,function(t,a){return i("li",{key:a,staticClass:"list-item"},["date"==t.form_type&&t.value.length>1?i("span",[e._v(e._s(t.name+" “"+t.value[0]+"-"+t.value[1]+"”"))]):"datetime"===t.form_type&&t.value.length>1?i("span",[e._v(e._s(t.name+" “"+t.value[0]+"-"+t.value[1]+"”"))]):"business_type"===t.form_type&&t.status_id?i("span",[e._v(e._s(t.name+" “"+e.getTypesName(t)+e.getStatusName(t)+"”"))]):"user"===t.form_type&&t.value.length>0?i("span",[e._v(e._s(t.name+" "+e.optionsNames[t.condition]+"“"+t.value[0].realname+"”"))]):"category"===t.form_type&&t.value.length>0?i("span",[e._v(e._s(t.name+" “"+t.valueContent+"”"))]):i("span",[e._v(e._s(t.name+" "+e.optionsNames[t.condition]+"“"+t.value+"”"))]),e._v(" "),i("i",{staticClass:"el-icon-close icon",on:{click:function(i){e.handleDelete(t,a)}}})])}))])},[],!1,null,"4abe73fe",null);n.options.__file="filterContent.vue";t.a=n.exports},"Ncy/":function(e,t,i){},Ny23:function(e,t,i){"use strict";var a=i("GsAi");i.n(a).a},O1Uw:function(e,t,i){"use strict";var a=i("7Qib"),s=i("KTTK"),n={name:"file-cell",computed:{},watch:{},data:function(){return{}},props:{cellIndex:Number,data:Object,showFoot:{type:Boolean,default:!0},cursorPointer:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!1},module_id:[String,Number]},mounted:function(){},methods:{downloadClick:function(){Object(a.a)({path:this.data.file_path,name:this.data.name})},deleteClick:function(){var e=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.c)({module:"work_task",module_id:e.module_id,save_name:e.data.save_name}).then(function(t){e.$message.success(t.data),e.$emit("delete",e.cellIndex,e.data)}).catch(function(){})}).catch(function(){e.$message({type:"info",message:"已取消删除"})})}},beforeDestroy:function(){}},l=(i("IG5+"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("flexbox",{staticClass:"cell"},[a("img",{staticClass:"cell-head",attrs:{src:i("6KEE"),alt:""}}),e._v(" "),a("div",{staticClass:"cell-body",class:{"cursor-pointer":e.cursorPointer}},[a("span",[e._v(e._s(e.data.name.length>20?e.data.name.substring(0,20)+"...":e.data.name))]),e._v(" "),a("span",{staticClass:"size"},[e._v("("+e._s(e.data.size)+")")])]),e._v(" "),a("div",{staticClass:"cell-foot"},[a("el-button",{attrs:{type:"primary",icon:"el-icon-download"},on:{click:e.downloadClick}},[e._v("下载")]),e._v(" "),e.showDelete?a("i",{staticClass:"el-icon-delete",on:{click:e.deleteClick}}):e._e()],1)])},[],!1,null,"6658ac12",null);o.options.__file="index.vue";t.a=o.exports},OPCT:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD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AXITigfL2DBIxcCxHlA7AnEz4CYB4gnQ+VW4dKEz4UNQBwNNQwEvgBxBhAn4XMhPgMFgPghmthPIP5NroF/cYgzkmsgMw7x/+Qa+AGIZbBEIgu5BjYC8VIgloLyQbE8E4gXkJtsVkMt3Ak1DOTiDiBeSa6BDFDNK0nJNdi8rArEa4H4IzQC0PFHqLwqMQaqA/ERID4IxIrQJIKOFaDyR6Dq8Xq5DYon4fHVe6g8J1RtMD4XugDxYiKDazYQu5GSbMgC6AbuAeJYIvWmAPEuQmFYDQ3w/1Cvv8dikCDU0mIgtifkwhtAbAdV+BBHsnkIlbeDqieYsG+ixxwpACDAAIZEQR7SM/O0AAAAAElFTkSuQmCC"},Op00:function(e,t,i){"use strict";var a=i("+9th"),s={name:"task-cell",components:{},mixins:[],computed:{},watch:{},data:function(){return{}},props:{data:Object,dataIndex:Number},mounted:function(){},methods:{taskOverClick:function(e){var t=this;Object(a.r)({task_id:e.task_id,type:e.checked?1:2}).then(function(e){t.$store.dispatch("GetOAMessageNum","task")}).catch(function(t){e.checked=!1})},rowFun:function(e){this.$emit("on-handle",{type:"view",data:{item:this.data,index:this.dataIndex}})},onmouseoverFun:function(e){this.$refs.itemSpan.offsetWidth>this.$refs.listLeft.offsetWidth-21?this.$set(e,"show",!0):this.$set(e,"show",!1)}}},n=(i("h/gC"),i("KHd+")),l=Object(n.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"taskRow",staticClass:"list",style:{"border-left-color":1==e.data.priority?"#8bb5f0":2==e.data.priority?"#FF9668":3==e.data.priority?"#ED6363":"transparent"},on:{click:function(t){e.rowFun(e.data)}}},[i("div",{ref:"listLeft",staticClass:"list-left"},[i("div",{class:e.data.checked?"title title-active":"title",on:{click:function(e){e.stopPropagation()}}},[i("el-checkbox",{on:{change:function(t){e.taskOverClick(e.data)}},model:{value:e.data.checked,callback:function(t){e.$set(e.data,"checked",t)},expression:"data.checked"}})],1),e._v(" "),i("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"task-tooltip tooltip-change-border"}},[i("div",{attrs:{slot:"content"},slot:"content"},[i("span",[e._v(e._s(e.data.task_name))])]),e._v(" "),i("span",{ref:"itemSpan",class:e.data.checked?"item-name-active":"item-name"},[e._v("\n        "+e._s(e.data.task_name)+"\n      ")])])],1),e._v(" "),i("div",{staticClass:"list-right"},[e.data.lableList?i("div",{staticClass:"tag-box"},[e.data.lableList.length<=2?e._l(e.data.lableList,function(t,a){return i("div",{key:a,staticClass:"item-label"},[i("span",{staticClass:"k-name",style:{background:t.color}},[e._v(e._s(t.name))])])}):[i("span",{staticClass:"k-name",style:{background:e.data.lableList[0].color}},[e._v(e._s(e.data.lableList[0].name))]),e._v(" "),i("span",{staticClass:"k-name",style:{background:e.data.lableList[1].color}},[e._v(e._s(e.data.lableList[1].name))]),e._v(" "),i("el-tooltip",{attrs:{placement:"top",effect:"light","popper-class":"tooltip-change-border task-tooltip"}},[i("div",{staticClass:"tooltip-content",staticStyle:{margin:"10px 10px 10px 0"},attrs:{slot:"content"},slot:"content"},e._l(e.data.lableList,function(t,a){return i("div",{key:a,staticClass:"item-label",staticStyle:{display:"inline-block","margin-right":"10px"}},[a>=2?i("span",{staticClass:"k-name",staticStyle:{"border-radius":"3px",color:"#FFF",padding:"3px 10px"},style:{background:t.color?t.color:"#ccc"}},[e._v(e._s(t.name))]):e._e()])})),e._v(" "),i("span",{staticClass:"color-label-more"},[i("i",[e._v("...")])])])]],2):e._e(),e._v(" "),i("div",{staticClass:"img-group"},[e.data.relationCount?i("div",{staticClass:"img-box"},[i("i",{staticClass:"wukong wukong-relevance"}),e._v(" "),i("span",[e._v(e._s(e.data.relationCount))])]):e._e(),e._v(" "),e.data.subcount+e.data.subdonecount!=0?i("div",{staticClass:"img-box"},[i("i",{staticClass:"wukong wukong-sub-task"}),e._v(" "),i("span",[e._v(e._s(e.data.subdonecount)+"/"+e._s(e.data.subcount+e.data.subdonecount))])]):e._e(),e._v(" "),e.data.filecount?i("div",{staticClass:"img-box"},[i("i",{staticClass:"wukong wukong-file"}),e._v(" "),i("span",[e._v(e._s(e.data.filecount))])]):e._e(),e._v(" "),e.data.commentcount?i("div",{staticClass:"img-box"},[i("i",{staticClass:"wukong wukong-comment-task"}),e._v(" "),i("span",[e._v(e._s(e.data.commentcount))])]):e._e(),e._v(" "),e.data.stop_time?i("div",{staticClass:"img-box"},[i("i",{staticClass:"wukong wukong-time-task",style:{color:1!=e.data.is_end||e.data.checked?"#999":"red"}}),e._v(" "),i("span",{style:{color:1!=e.data.is_end||e.data.checked?"#999":"red"}},[e._v(e._s(e._f("moment")(e.data.stop_time,"MM-DD"))+" 截止")])]):e._e()]),e._v(" "),i("div",{staticClass:"item-own-box"},[e.data.main_user&&e.data.main_user.id?i("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"tooltip-change-border"}},[i("div",{attrs:{slot:"content"},slot:"content"},[i("span",[e._v(e._s(e.data.main_user.realname))])]),e._v(" "),i("div",{directives:[{name:"photo",rawName:"v-photo",value:e.data.main_user,expression:"data.main_user"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(e.data.main_user.thumb_img),expression:"$options.filters.filterUserLazyImg(data.main_user.thumb_img)",arg:"background-image"}],key:e.data.main_user.thumb_img,staticClass:"div-photo"})]):e._e()],1)])])},[],!1,null,"9b3991fc",null);l.options.__file="taskCell.vue";t.a=l.exports},P03M:function(e,t,i){"use strict";var a=i("hMee");i.n(a).a},QD92:function(e,t,i){"use strict";var a=i("NOa9");i.n(a).a},QJC7:function(e,t,i){"use strict";var a=i("7Qib"),s=i("KzkL"),n={name:"follow-record-cell",components:{CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-1226"),i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-15e0"),i.e("chunk-68d76")]).then(i.bind(null,"uMjE"))}},props:{item:{type:Object,default:function(){return{}}},crmType:{type:String,default:""},index:[String,Number]},data:function(){return{showFullDetail:!1,relationID:"",relationCrmType:""}},computed:{},mounted:function(){},methods:{previewImg:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e,t,i){return e.url=e.file_path,e})})},downloadFile:function(e){Object(a.a)({path:e.file_path,name:e.name})},handleCommand:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.j)({id:t.item.record_id}).then(function(i){t.$emit("on-handle",{type:e,data:{item:t.item,index:t.index}}),t.$message.success(i.data)}).catch(function(){})}).catch(function(){t.$message({type:"info",message:"已取消操作"})})},checkRelationDetail:function(e,t){this.relationID=t,this.relationCrmType=e,this.showFullDetail=!0}}},l=(i("36K6"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"fl-c"},[a("flexbox",{staticClass:"fl-h"},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:e.item.create_user_info,expression:"item.create_user_info"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(e.item.create_user_info.thumb_img),expression:"$options.filters.filterUserLazyImg(item.create_user_info.thumb_img)",arg:"background-image"}],key:e.item.create_user_info.thumb_img,staticClass:"div-photo fl-h-img"}),e._v(" "),a("div",{staticClass:"fl-h-b"},[a("div",{staticClass:"fl-h-name"},[e._v(e._s(e.item.create_user_info.realname))]),e._v(" "),a("div",{staticClass:"fl-h-time"},[e._v(e._s(e._f("filterTimestampToFormatTime")(e.item.create_time,"YYYY-MM-DD HH:mm")))])]),e._v(" "),a("flexbox",{staticClass:"fl-h-mark"},[a("img",{staticClass:"fl-h-mark-img",attrs:{src:i("N0PQ")}}),e._v(" "),a("div",{staticClass:"fl-h-mark-name"},[e._v("跟进记录")])]),e._v(" "),a("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[a("i",{staticClass:"el-icon-arrow-down el-icon-more",staticStyle:{color:"#CDCDCD","margin-left":"8px"}}),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"delete"}},[e._v("删除")])],1)],1)],1),e._v(" "),a("div",{staticClass:"fl-b"},[a("div",{staticClass:"fl-b-content"},[e._v(e._s(e.item.content))]),e._v(" "),e.item.dataInfo.imgList&&e.item.dataInfo.imgList.length>0?a("flexbox",{staticClass:"fl-b-images",attrs:{wrap:"wrap"}},e._l(e.item.dataInfo.imgList,function(t,i){return a("div",{directives:[{name:"lazy",rawName:"v-lazy:background-image",value:t.file_path_thumb,expression:"file.file_path_thumb",arg:"background-image"}],key:t.file_path_thumb,staticClass:"fl-b-img-item",on:{click:function(t){e.previewImg(e.item.dataInfo.imgList,i)}}})})):e._e(),e._v(" "),e.item.dataInfo.fileList&&e.item.dataInfo.fileList.length>0?a("div",{staticClass:"fl-b-files"},e._l(e.item.dataInfo.fileList,function(t,s){return a("flexbox",{key:s,staticClass:"cell"},[a("img",{staticClass:"cell-head",attrs:{src:i("6KEE")}}),e._v(" "),a("div",{staticClass:"cell-body"},[e._v(e._s(t.name)),a("span",{staticStyle:{color:"#ccc"}},[e._v("("+e._s(t.size)+")")])]),e._v(" "),a("el-button",{attrs:{type:"primary",icon:"el-icon-download"},on:{click:function(i){e.downloadFile(t)}}},[e._v("下载")])],1)})):e._e(),e._v(" "),e.item.category||e.item.next_time?a("div",{staticClass:"follow"},[e.item.category?a("span",{staticClass:"follow-info"},[e._v(e._s(e.item.category))]):e._e(),e._v(" "),e.item.next_time?a("span",{staticClass:"follow-info"},[e._v(e._s(e._f("filterTimestampToFormatTime")(e.item.next_time,"YYYY-MM-DD HH:mm:ss")))]):e._e()]):e._e(),e._v(" "),e.item.dataInfo.contactsList&&e.item.dataInfo.contactsList.length>0?a("div",{staticClass:"fl-b-other"},[a("div",{staticClass:"fl-b-other-name"},[e._v("关联联系人")]),e._v(" "),a("div",e._l(e.item.dataInfo.contactsList,function(t,i){return a("flexbox",{key:i,staticClass:"cell",nativeOn:{click:function(i){e.checkRelationDetail("contacts",t.contacts_id)}}},[a("i",{staticClass:"wukong wukong-contacts cell-head crm-type",style:{opacity:0==i?1:0}}),e._v(" "),a("div",{staticClass:"cell-body",staticStyle:{color:"#6394E5",cursor:"pointer"}},[e._v(e._s(t.name))])])}))]):e._e(),e._v(" "),e.item.dataInfo.businessList&&e.item.dataInfo.businessList.length>0?a("div",{staticClass:"fl-b-other"},[a("div",{staticClass:"fl-b-other-name"},[e._v("关联商机")]),e._v(" "),a("div",e._l(e.item.dataInfo.businessList,function(t,i){return a("flexbox",{key:i,staticClass:"cell",nativeOn:{click:function(i){e.checkRelationDetail("business",t.business_id)}}},[a("i",{staticClass:"wukong wukong-business cell-head crm-type",style:{opacity:0==i?1:0}}),e._v(" "),a("div",{staticClass:"cell-body",staticStyle:{color:"#6394E5",cursor:"pointer"}},[e._v(e._s(t.name))])])}))]):e._e()],1),e._v(" "),a("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:e.relationCrmType,id:e.relationID},on:{"update:visible":function(t){e.showFullDetail=t}}})],1)},[],!1,null,"2cb1ea51",null);o.options.__file="FollowRecordCell.vue";var c={name:"record-log",components:{FollowRecordCell:o.exports},props:{id:[String,Number],crmType:{type:String,default:""}},watch:{id:function(e){this.refreshList()}},data:function(){return{loading:!1,loadMoreLoading:!0,isPost:!1,page:1,list:[]}},computed:{},mounted:function(){var e=this;this.$bus.on("follow-log-refresh",function(t){"record-log"==t.type&&e.refreshList()});var t=this,i=document.getElementById("follow-log-content");i.onscroll=function(){i.scrollTop+i.clientHeight==i.scrollHeight&&1==t.loadMoreLoading&&(t.isPost?t.loadMoreLoading=!1:(t.isPost=!0,t.page++,t.getList()))},this.getList()},activated:function(){},deactivated:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(s.k)({page:this.page,limit:10,types:"crm_"+this.crmType,types_id:this.id,by:"record"}).then(function(t){e.list=e.list.concat(t.data.list),t.data.list.length<10?e.loadMoreLoading=!1:e.loadMoreLoading=!0,e.loading=!1,e.isPost=!1}).catch(function(){e.isPost=!1,e.loading=!1})},refreshList:function(){this.page=1,this.list=[],this.getList()},cellHandle:function(e){"delete"==e.type&&this.list.splice(e.data.index,1)}},beforeDestroy:function(){this.$bus.off("follow-log-refresh")}},r=(i("9rzi"),Object(l.a)(c,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:0===e.list.length,expression:"list.length === 0"}]},[i("div",{staticClass:"log-items"},[e._l(e.list,function(t,a){return i("follow-record-cell",{key:a,attrs:{item:t,crmType:e.crmType,index:a},on:{"on-handle":e.cellHandle}})}),e._v(" "),i("div",{staticClass:"load"},[i("el-button",{attrs:{type:"text",loading:e.loadMoreLoading}},[e._v(e._s(e.loadMoreLoading?"加载更多":"没有更多了"))])],1)],2)])])},[],!1,null,"7facfbc0",null));r.options.__file="RecordLog.vue";t.a=r.exports},QhmF:function(e,t,i){"use strict";i.r(t);var a=i("6zBA"),s=i("ooHJ"),n=i("ExMk"),l={name:"examine-handle",components:{XhUserCell:i("8GhS").p},computed:{title:function(){return 1==this.status?"审批通过":0==this.status?"审批拒绝":2==this.status?"撤回审批":""},placeholder:function(){return 1==this.status?"请输入审批意见(选填)":0==this.status?"请输入审批意见(必填)":2==this.status?"请输入撤回理由(必填)":""}},watch:{show:{handler:function(e){this.showDialog=e},deep:!0,immediate:!0}},data:function(){return{loading:!1,showDialog:!1,handleType:1,selectUsers:[],content:""}},props:{show:{type:Boolean,default:!1},status:{type:[String,Number],default:1},id:[String,Number],detail:{type:Object,default:function(){return{}}},examineType:{type:String,default:""}},mounted:function(){},methods:{submitInfo:function(){0!=this.status&&2!=this.status||this.content?0==this.status||1==this.status?this.handlePassAndReject():2==this.status&&this.handleRevoke():this.$message.error(this.placeholder)},handleRevoke:function(){var e=this;this.loading=!0,this.getExamineRevokeRequest()({id:this.id,content:this.content}).then(function(t){e.loading=!1,e.$message.success(t.data),e.$emit("save"),e.hiddenView()}).catch(function(){e.loading=!1})},getExamineRevokeRequest:function(){return"crm_contract"==this.examineType?a.f:"crm_receivables"==this.examineType?s.g:"oa_examine"==this.examineType?n.f:void 0},handlePassAndReject:function(){var e=this;this.loading=!0;var t={id:this.id,status:this.status,content:this.content,flow_id:this.detail.flow_id};1==this.status&&0==this.detail.config&&(1==this.handleType?t.is_end=1:t.check_user_id=this.selectUsers[0].id),this.getExamineRequest()(t).then(function(t){e.loading=!1,e.$message.success(t.data),e.$emit("save",{type:e.status}),e.hiddenView()}).catch(function(){e.loading=!1})},getExamineRequest:function(){return"crm_contract"==this.examineType?a.a:"crm_receivables"==this.examineType?s.a:"oa_examine"==this.examineType?n.b:void 0},handleClick:function(e){"cancel"==e?this.hiddenView():"confirm"==e&&this.submitInfo()},selectUserFocus:function(){this.handleType=2},selectExamineUser:function(e){this.selectUsers=e.value},hiddenView:function(){this.$emit("close")}}},o=(i("rzp2"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{title:e.title,width:"400px","append-to-body":!0,visible:e.showDialog},on:{close:e.hiddenView,"update:visible":function(t){e.showDialog=t}}},[1==e.status&&0==e.detail.config?i("div",{staticClass:"handle-type"},[i("flexbox",{staticClass:"handle-item"},[i("el-radio",{attrs:{label:1},model:{value:e.handleType,callback:function(t){e.handleType=t},expression:"handleType"}},[i("span")]),e._v(" "),i("div",{staticStyle:{"font-size":"12px"},nativeOn:{click:function(t){e.handleType=1}}},[e._v("审核结束")])],1),e._v(" "),i("flexbox",{staticClass:"handle-item",attrs:{id:"selectUser"}},[i("el-radio",{attrs:{label:2},model:{value:e.handleType,callback:function(t){e.handleType=t},expression:"handleType"}},[i("span")]),e._v(" "),i("xh-user-cell",{staticClass:"select-user",attrs:{placeholder:"选择下一审批人"},on:{focus:e.selectUserFocus,"value-change":e.selectExamineUser}})],1)],1):e._e(),e._v(" "),1==e.status&&0==e.detail.config?i("div",{staticClass:"title"},[e._v("意见")]):e._e(),e._v(" "),i("el-input",{attrs:{type:"textarea",resize:"none",rows:5,placeholder:e.placeholder},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.handleClick("cancel")}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){e.handleClick("confirm")}}},[e._v("确 定")])],1)],1)},[],!1,null,"46cdfebe",null);c.options.__file="ExamineHandle.vue";t.default=c.exports},Qixx:function(e,t,i){},Qldq:function(e,t,i){"use strict";i.d(t,"f",function(){return s}),i.d(t,"a",function(){return n}),i.d(t,"e",function(){return l}),i.d(t,"c",function(){return o}),i.d(t,"d",function(){return c}),i.d(t,"b",function(){return r}),i.d(t,"g",function(){return d});var a=i("t3Un");function s(e){return Object(a.a)({url:"oa/log/index",method:"post",data:e})}function n(e){return Object(a.a)({url:"oa/log/save",method:"post",data:e})}function l(e){return Object(a.a)({url:"oa/log/update",method:"post",data:e})}function o(e){return Object(a.a)({url:"oa/log/commentSave",method:"post",data:e})}function c(e){return Object(a.a)({url:"oa/log/delete",method:"post",data:e})}function r(e){return Object(a.a)({url:"oa/log/commentDel",method:"post",data:e})}function d(e){return Object(a.a)({url:"oa/log/setread",method:"post",data:e})}},QrKL:function(e,t,i){},Qx3G:function(e,t,i){},R3ir:function(e,t,i){"use strict";var a=i("pRrg");i.n(a).a},RgWh:function(e,t,i){"use strict";var a=i("NFfE");i.n(a).a},S3Kq:function(e,t,i){"use strict";var a=i("GQeE"),s=i.n(a),n=i("sCIN"),l={name:"emoji",data:function(){return{emojiData:n.a,pannels:["表情","自然","物品","地点","符号"],activeIndex:0}},created:function(){},methods:{changeActive:function(e){this.activeIndex=e},getPureName:function(e){return e.replace(/:/g,"")},selectItem:function(e){this.$emit("select",e)}},computed:{emojis:function(){var e=this;return this.pannels.map(function(t){return s()(e.emojiData[t])})}}},o=(i("+QVO"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"emoji"},[i("ul",{staticClass:"emoji-controller"},e._l(e.pannels,function(t,a){return i("li",{key:a,class:{active:a===e.activeIndex},on:{click:function(t){e.changeActive(a)}}},[e._v("\n      "+e._s(t)+"\n    ")])})),e._v(" "),i("ul",{staticClass:"emoji-container"},e._l(e.emojis,function(t,a){return a===e.activeIndex?i("li",{key:a,staticStyle:{padding:"0"}},[e._v("\n      "+e._s(t)+"--"+e._s(a)+"\n      "),e._l(t,function(t,a){return i("a",{key:a,attrs:{href:"javascript:;"},on:{click:function(i){e.selectItem(t)}}},[i("span",{staticClass:"emoji-item",class:"sprite-"+e.getPureName(t),attrs:{title:t}})])})],2):e._e()}))])},[],!1,null,"4f303d0e",null);c.options.__file="emoji.vue";t.a=c.exports},SE13:function(e,t,i){"use strict";var a=i("mX3o"),s=i("UcQx"),n=i("6zBA"),l={name:"relative-product",components:{CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-68d763")]).then(i.bind(null,"uMjE"))}},computed:{},mixins:[a.a],data:function(){return{nopermission:!1,list:[],fieldList:[],tableHeight:"400px",showFullDetail:!1,productId:"",totalInfo:{total_price:"0.00",discount_rate:"0.00"},formatterRules:{}}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{id:[String,Number],detail:{type:Object,default:function(){return{}}},crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},mounted:function(){this.getDetail()},activated:function(){},deactivated:function(){},methods:{getFieldList:function(){this.fieldList.push({prop:"name",width:"200",label:"产品名称"}),this.fieldList.push({prop:"category_id",width:"200",label:"产品类别"}),this.fieldList.push({prop:"unit",width:"200",label:"单位"}),this.fieldList.push({prop:"price",width:"200",label:"标准价格"}),this.fieldList.push({prop:"sales_price",width:"200",label:"售价"}),this.fieldList.push({prop:"num",width:"200",label:"数量"}),this.fieldList.push({prop:"discount",width:"200",label:"折扣(%)"}),this.fieldList.push({prop:"subtotal",width:"200",label:"合计"}),this.formatterRules.category_id={type:"crm",formatter:function(e){return e||""}}},getDetail:function(){var e=this;this.loading=!0,this.getRequest()(this.getParams()).then(function(t){0==e.fieldList.length&&e.getFieldList(),e.nopermission=!1,e.loading=!1,e.list=t.data.list,e.totalInfo.total_price=t.data.total_price,e.totalInfo.discount_rate=t.data.discount_rate}).catch(function(t){102==t.code&&(e.nopermission=!0),e.loading=!1})},getRequest:function(){return"business"==this.crmType?s.d:"contract"==this.crmType?n.d:void 0},getParams:function(){return"business"==this.crmType?{business_id:this.id}:"contract"==this.crmType?{contract_id:this.id}:void 0},fieldFormatter:function(e,t){var i=this.formatterRules[t.property];return i?"crm"===i.type?t.property?i.formatter(e[t.property+"_info"]):"":i.formatter(e[t.property]):e[t.property]},handleRowClick:function(e,t,i){this.productId=e.product_id,this.showFullDetail=!0},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},cellStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}}}},o=(i("P03M"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"empty",rawName:"v-empty",value:e.nopermission,expression:"nopermission"}],staticClass:"rc-cont",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"}},[i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}}),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick}},e._l(e.fieldList,function(t,a){return i("el-table-column",{key:a,attrs:{"show-overflow-tooltip":"",prop:t.prop,formatter:e.fieldFormatter,label:t.label}})})),e._v(" "),i("flexbox",{staticClass:"handle-footer"},[i("div",{staticClass:"discount-title"},[e._v("整单折扣(%):"),i("span",{staticClass:"discount-title-value"},[e._v(e._s(e.totalInfo.discount_rate))])]),e._v(" "),i("div",{staticClass:"total-info"},[e._v("已选中产品:"),i("span",{staticClass:"info-yellow"},[e._v(e._s(e.list.length))]),e._v(" 种  总金额:"),i("span",{staticClass:"info-yellow"},[e._v(e._s(e.totalInfo.total_price))]),e._v(" 元")])]),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:"product",id:e.productId},on:{"update:visible":function(t){e.showFullDetail=t}}})],1)},[],!1,null,"0fbb76f5",null);c.options.__file="RelativeProduct.vue";t.a=c.exports},SbwO:function(e,t,i){"use strict";var a=i("XxXa");i.n(a).a},SxJm:function(e,t,i){},UEWd:function(e,t,i){"use strict";var a=i("7Qib"),s=i("KTTK"),n={name:"mix-add",components:{CrmRelative:i("mkuN").a},props:{showRelativeBusiness:{type:Boolean,default:!1},showRelativeContacts:{type:Boolean,default:!1},id:[String,Number],crmType:{type:String,default:""}},data:function(){return{content:"",inputAutosize:{minRows:1,maxRows:6},barItems:[{img:i("S1Xc"),title:"图片",type:"img",data:"image/*"},{img:i("rl4O"),title:"附件",type:"file",data:"*.*"}],imgFiles:[],files:[],business:[],contacts:[],showRelativeType:""}},computed:{},mounted:function(){this.showRelativeBusiness&&this.barItems.push({img:i("i91G"),title:"关联商机",type:"business",show:!1}),this.showRelativeContacts&&this.barItems.push({img:i("OPCT"),title:"关联联系人",type:"contacts",show:!1}),this.$on("submit-info",function(){this.$emit("mixadd-info",{content:this.content,files:this.files,images:this.imgFiles,business:this.business,contacts:this.contacts})})},methods:{resetInfo:function(){this.content="",this.imgFiles=[],this.files=[],this.business=[],this.contacts=[],this.showRelativeType=""},checkRelativeInfos:function(e){"business"==this.showRelativeType?this.business=e.data:"contacts"==this.showRelativeType&&(this.contacts=e.data)},barClick:function(e){"business"==e.type?(this.showRelativeType=e.type,e.show=!0):"contacts"==e.type&&(this.showRelativeType=e.type,e.show=!0)},uploadFile:function(e){for(var t=this,i=e.target.files,n=this,l=function(l){var o=i[l];(c={}).module_id=t.id,c.module="crm_"+t.crmType,"image/*"==e.target.accept?c["img[]"]=o:"*.*"==e.target.accept&&(c["file[]"]=o),Object(s.e)(c).then(function(t){t.data.forEach(function(t,i){t.size=Object(a.c)(o.size),"image/*"==e.target.accept?n.imgFiles.push(t):"*.*"==e.target.accept&&(t.icon=Object(a.f)(o),n.files.push(t))})}).catch(function(){})},o=0;o<i.length;o++){var c;l(o)}e.target.value=""},deleteAllImg:function(){this.imgFiles=[]},deleteImgOrFile:function(e,t,i){var a=this;Object(s.c)({save_name:t.save_name,module_id:this.id,module:"crm_"+this.crmType}).then(function(t){"image"==e?a.imgFiles.splice(i,1):a.files.splice(i,1),a.$message.success(t.data)}).catch(function(){})},mouseImgOver:function(e,t){e.showDelete=!0,this.$set(this.imgFiles,t,e)},mouseImgLeave:function(e,t){e.showDelete=!1,this.$set(this.imgFiles,t,e)},inputFocus:function(){var e=this;this.inputAutosize={minRows:3,maxRows:6},this.$nextTick(function(){e.$refs.textarea.resizeTextarea()})}},beforeDestroy:function(){this.$off("submit-info")}},l=(i("yNwx"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mix-container"},[a("div",{staticClass:"i-cont"},[a("el-input",{ref:"textarea",attrs:{type:"textarea",autosize:e.inputAutosize,clearable:"",resize:"none",placeholder:"请输入内容"},on:{focus:e.inputFocus},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}})],1),e._v(" "),e.imgFiles.length>0?a("section",{staticClass:"img-cont"},[a("flexbox",{attrs:{wrap:"wrap"}},[e._l(e.imgFiles,function(t,i){return a("div",{key:i,staticClass:"img-item",style:{"background-image":"url("+t.path+")"},on:{mouseover:function(a){e.mouseImgOver(t,i)},mouseleave:function(a){e.mouseImgLeave(t,i)}}},[t.showDelete?a("div",{staticClass:"img-delete",on:{click:function(a){e.deleteImgOrFile("image",t,i)}}},[e._v("×")]):e._e()])}),e._v(" "),a("div",{staticClass:"img-item-add"},[a("input",{staticClass:"img-item-iput",attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.uploadFile}})])],2),e._v(" "),a("div",{staticClass:"img-bar",on:{click:e.deleteAllImg}},[e._v("全部删除")])],1):e._e(),e._v(" "),e.files.length>0?a("section",{staticClass:"file-cont"},[a("flexbox",{staticClass:"f-header"},[a("img",{staticClass:"f-logo",attrs:{src:i("rl4O")}}),e._v(" "),a("div",{staticClass:"f-name"},[e._v("附件")])]),e._v(" "),a("div",{staticClass:"f-body"},e._l(e.files,function(t,i){return a("flexbox",{key:i,staticClass:"f-item"},[a("img",{staticClass:"f-img",attrs:{src:t.icon}}),e._v(" "),a("div",{staticClass:"f-name"},[e._v(e._s(t.name+"("+t.size+")"))]),e._v(" "),a("div",{staticClass:"close-button",on:{click:function(a){e.deleteImgOrFile("file",t,i)}}},[e._v("×")])])})),e._v(" "),a("div",{staticClass:"img-bar",on:{click:function(t){e.files=[]}}},[e._v("全部删除")])],1):e._e(),e._v(" "),e.business.length>0?a("section",{staticClass:"c-cont"},[a("flexbox",{staticClass:"c-header"},[a("img",{staticClass:"c-logo",attrs:{src:i("i91G")}}),e._v(" "),a("div",{staticClass:"c-name"},[e._v("商机")])]),e._v(" "),a("div",{staticClass:"c-body"},[a("flexbox",{attrs:{wrap:"wrap"}},e._l(e.business,function(t,i){return a("flexbox",{key:i,staticClass:"c-item"},[a("div",{staticClass:"c-item-name"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"c-item-close",on:{click:function(t){e.business.splice(i,1)}}},[e._v("×")])])}))],1)],1):e._e(),e._v(" "),e.contacts.length>0?a("section",{staticClass:"c-cont"},[a("flexbox",{staticClass:"c-header"},[a("img",{staticClass:"c-logo",attrs:{src:i("OPCT")}}),e._v(" "),a("div",{staticClass:"c-name"},[e._v("联系人")])]),e._v(" "),a("div",{staticClass:"c-body"},[a("flexbox",{attrs:{wrap:"wrap"}},e._l(e.contacts,function(t,i){return a("flexbox",{key:i,staticClass:"c-item"},[a("div",{staticClass:"c-item-name"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"c-item-close",on:{click:function(t){e.contacts.splice(i,1)}}},[e._v("×")])])}))],1)],1):e._e(),e._v(" "),a("flexbox",{staticClass:"bar-cont"},[e._l(e.barItems,function(t,i){return["img"==t.type||"file"==t.type?a("flexbox",{key:i,staticClass:"bar-item",nativeOn:{click:function(i){e.barClick(t)}}},[a("input",{staticClass:"bar-input",attrs:{type:"file",accept:t.data,multiple:""},on:{change:e.uploadFile}}),e._v(" "),a("img",{staticClass:"bar-img",attrs:{src:t.img}}),e._v(" "),a("div",{staticClass:"bar-title"},[e._v(e._s(t.title))])]):a("el-popover",{key:i,attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:t.show,callback:function(i){e.$set(t,"show",i)},expression:"item.show"}},[a("crm-relative",{ref:"crmrelative",refInFor:!0,attrs:{show:t.show,radio:!1,action:{type:"condition",data:{form_type:"customer",customer_id:e.id}},selectedData:"business"==t.type?{business:e.business}:{contacts:e.contacts},"crm-type":t.type},on:{close:function(e){t.show=!1},changeCheckout:e.checkRelativeInfos}}),e._v(" "),a("flexbox",{staticClass:"bar-item",attrs:{slot:"reference"},nativeOn:{click:function(i){e.barClick(t)}},slot:"reference"},[a("img",{staticClass:"bar-img",attrs:{src:t.img}}),e._v(" "),a("div",{staticClass:"bar-title"},[e._v(e._s(t.title))])])],1)]})],2)],1)},[],!1,null,"72849f50",null);o.options.__file="MixAdd.vue";t.a=o.exports},UMhO:function(e,t,i){"use strict";var a=i("tp26");i.n(a).a},V3gP:function(e,t,i){},VrTI:function(e,t,i){"use strict";var a=i("oTr5");i.n(a).a},VuGW:function(e,t,i){"use strict";var a=i("V3gP");i.n(a).a},XxXa:function(e,t,i){},YWwE:function(e,t,i){"use strict";var a=i("mBo6");i.n(a).a},Ymr4:function(e,t,i){"use strict";var a=i("N1fg");i.n(a).a},Z1Yp:function(e,t,i){"use strict";var a=i("2dGW");i.n(a).a},Zv6X:function(e,t,i){},"aQg/":function(e,t,i){"use strict";var a=i("d0bK"),s=i("Op00"),n=i("KzkL"),l=i("7Qib"),o={name:"task-log",components:{TaskCell:s.a,Particulars:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-5880")]).then(i.bind(null,"+Gvz"))}},props:{id:[String,Number],crmType:{type:String,default:""}},mixins:[a.a],watch:{id:function(e){this.refreshList()}},data:function(){return{loading:!1,loadMoreLoading:!0,isPost:!1,page:1,list:[]}},computed:{},mounted:function(){var e=this,t=document.getElementById("follow-log-content");t.onscroll=function(){t.scrollTop+t.clientHeight==t.scrollHeight&&1==e.loadMoreLoading&&(e.isPost?e.loadMoreLoading=!1:(e.isPost=!0,e.page++,e.getList()))},this.getList()},activated:function(){},deactivated:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(n.k)({page:this.page,limit:10,types:"crm_"+this.crmType,types_id:this.id,by:"task"}).then(function(t){e.list=e.list.concat(t.data.list),t.data.list.length<10?e.loadMoreLoading=!1:e.loadMoreLoading=!0,e.loading=!1,e.isPost=!1}).catch(function(){e.isPost=!1,e.loading=!1})},refreshList:function(){this.page=1,this.list=[],this.getList()},taskCellHandle:function(e){var t=this;"view"==e.type&&this.showDetailView(e.data.item,e.data.index,function(){t.$nextTick(function(){document.body.appendChild(t.$refs.taskShade),t.$refs.taskShade.style.zIndex=Object(l.g)(),t.$refs.taskShade.addEventListener("click",t.handleDocumentClick,!1)})})},handleDocumentClick:function(e){e.stopPropagation(),this.$refs.taskShade==e.target&&(this.taskDetailShow=!1)}}},c=(i("QD92"),i("KHd+")),r=Object(c.a)(o,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:0===e.list.length,expression:"list.length === 0"}]},[i("div",{staticClass:"log-items"},[e._l(e.list,function(t,a){return i("task-cell",{key:a,attrs:{data:t.dataInfo,dataIndex:a},on:{"on-handle":e.taskCellHandle}})}),e._v(" "),i("div",{staticClass:"load"},[i("el-button",{attrs:{type:"text",loading:e.loadMoreLoading}},[e._v(e._s(e.loadMoreLoading?"加载更多":"没有更多了"))])],1)],2)]),e._v(" "),e.taskDetailShow?i("div",{ref:"taskShade",staticClass:"full-container"},[i("particulars",{staticClass:"d-view",attrs:{id:e.taskID,detailIndex:e.detailIndex},on:{"on-handle":e.detailHandle,close:e.closeBtn}})],1):e._e()])},[],!1,null,"15beb9e6",null);r.options.__file="TaskLog.vue";t.a=r.exports},bec2:function(e,t,i){"use strict";var a=i("l/97");i.n(a).a},bwvB:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjdFOTRBNUY2RjEzRTExRThCMzE4RjAyMzQwQTc5RjQ3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjdFOTRBNUY3RjEzRTExRThCMzE4RjAyMzQwQTc5RjQ3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6N0U5NEE1RjRGMTNFMTFFOEIzMThGMDIzNDBBNzlGNDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6N0U5NEE1RjVGMTNFMTFFOEIzMThGMDIzNDBBNzlGNDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4t60rSAAAAkUlEQVR42mL8//8/AzUBEwOVAQuMsXr1arINCQ0NJdmFOtT0ch0QXwbiepK8jAOADIH5B0Y3kuvCGqghjlC+I5RfQ66BD6CGvIbyX0P5D8j18hIsYq9xiNMuHQ49A0nN2P/JdSHjoPHycyC2IVKvNRC/IJQOU0AFDxBLEGHgUyBOJmTgNiCWpMTLjIO+xAYIMABJgBzD8GiSjgAAAABJRU5ErkJggg=="},cYid:function(e,t,i){"use strict";var a=i("mX3o"),s=i("EgJF"),n=i("6zBA"),l={name:"relative-contract",components:{CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},CRMCreateView:s.default},computed:{},mixins:[a.a],data:function(){return{nopermission:!1,list:[],fieldList:[],tableHeight:"400px",showFullDetail:!1,isCreate:!1,contractId:"",formatterRules:{},createActionInfo:{type:"relative",crmType:this.crmType,data:{}}}},watch:{id:function(e){this.list=[],this.getDetail()}},props:{id:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},detail:{type:Object,default:function(){return{}}}},mounted:function(){this.getDetail()},activated:function(){},deactivated:function(){},methods:{getFieldList:function(){this.fieldList.push({prop:"num",width:"200",label:"合同编号"}),this.fieldList.push({prop:"name",width:"200",label:"合同名称"}),this.fieldList.push({prop:"customer_id",width:"200",label:"客户名称"}),this.fieldList.push({prop:"money",width:"200",label:"合同金额"}),this.fieldList.push({prop:"start_time",width:"200",label:"开始日期"}),this.fieldList.push({prop:"end_time",width:"200",label:"结束日期"}),this.formatterRules.customer_id={type:"crm",formatter:function(e){return e?e.name:""}}},getDetail:function(){var e=this;this.loading=!0;var t={pageType:"all"};t[this.crmType+"_id"]=this.id,Object(n.c)(t).then(function(t){0==e.fieldList.length&&e.getFieldList(),e.nopermission=!1,e.loading=!1,e.list=t.data.list}).catch(function(t){102==t.code&&(e.nopermission=!0),e.loading=!1})},fieldFormatter:function(e,t){var i=this.formatterRules[t.property];return i?"crm"===i.type?t.property?i.formatter(e[t.property+"_info"]):"":i.formatter(e[t.property]):e[t.property]},handleRowClick:function(e,t,i){this.contractId=e.contract_id,this.showFullDetail=!0},headerRowStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},cellStyle:function(e){e.row,e.column,e.rowIndex,e.columnIndex;return{textAlign:"center"}},createClick:function(){"business"==this.crmType?(this.createActionInfo.data.customer=this.detail.customer_id_info,this.createActionInfo.data.business=this.detail):"customer"==this.crmType&&(this.createActionInfo.data.customer=this.detail),this.isCreate=!0},createSaveSuccess:function(){this.getDetail()}}},o=(i("GSQh"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"empty",rawName:"v-empty",value:e.nopermission,expression:"nopermission"}],staticClass:"rc-cont",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"}},[e.isSeas?e._e():i("flexbox",{staticClass:"rc-head",attrs:{direction:"row-reverse"}},[i("el-button",{staticClass:"rc-head-item",attrs:{type:"primary"},nativeOn:{click:function(t){return e.createClick(t)}}},[e._v("新建合同\n    ")])],1),e._v(" "),i("el-table",{staticStyle:{width:"100%",border:"1px solid #E6E6E6"},attrs:{data:e.list,height:e.tableHeight,stripe:"","header-cell-style":e.headerRowStyle,"cell-style":e.cellStyle},on:{"row-click":e.handleRowClick}},e._l(e.fieldList,function(t,a){return i("el-table-column",{key:a,attrs:{"show-overflow-tooltip":"",prop:t.prop,formatter:e.fieldFormatter,label:t.label}})})),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:"contract",id:e.contractId},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"contract",action:e.createActionInfo},on:{"save-success":e.createSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"1c765dd8",null);c.options.__file="RelativeContract.vue";t.a=c.exports},d0bK:function(e,t,i){"use strict";t.a={components:{},data:function(){return{taskID:"",detailIndex:-1,taskDetailShow:!1}},mounted:function(){},methods:{closeBtn:function(){this.taskDetailShow=!1},showDetailView:function(e,t,i){this.taskID=e.task_id,this.detailIndex=t,this.taskDetailShow=!0,i&&i()},detailHandle:function(e){if(0==e.index||e.index)if("title-check"==e.type)this.$set(this.list[e.index],"checked",e.value);else if("delete"==e.type)this.list.splice(e.index,1);else if("change-stop-time"==e.type){parseInt(e.value)+86399>new Date(new Date).getTime()/1e3?this.list[e.index].is_end=!1:this.list[e.index].is_end=!0,this.list[e.index].stop_time=e.value}else if("change-priority"==e.type)this.list[e.index].priority=e.value.id;else if("change-name"==e.type)this.list[e.index].task_name=e.value;else if("change-comments"==e.type){var t=this.list[e.index].commentcount;"add"==e.value?this.list[e.index].commentcount=t+1:this.list[e.index].commentcount=t-1}else"change-sub-task"==e.type&&(this.list[e.index].subdonecount=e.value.subdonecount,this.list[e.index].subcount=e.value.allcount-e.value.subdonecount)}},deactivated:function(){}}},dNm9:function(e,t,i){"use strict";var a=i("nWoq");i.n(a).a},gQk7:function(e,t,i){"use strict";var a=i("JrHR");i.n(a).a},gd5k:function(e,t,i){"use strict";var a=i("Fpl1"),s=i("+zsY"),n=i("KzkL"),l=i("ExMk"),o=(i("7Qib"),{name:"examine-log",components:{ExamineCell:a.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},ExamineHandle:function(){return i.e("chunk-6008").then(i.bind(null,"QhmF"))},ExamineCreateView:s.a},props:{id:[String,Number],crmType:{type:String,default:""}},watch:{id:function(e){this.refreshList()}},data:function(){return{loading:!1,loadMoreLoading:!0,isPost:!1,page:1,list:[],rowID:"",showExamineHandle:!1,isCreate:!1,createAction:{type:"save"},createInfo:{},showFullDetail:!1,detailCRMType:""}},computed:{},mounted:function(){var e=this,t=document.getElementById("follow-log-content");t.onscroll=function(){t.scrollTop+t.clientHeight==t.scrollHeight&&1==e.loadMoreLoading&&(e.isPost?e.loadMoreLoading=!1:(e.isPost=!0,e.page++,e.getList()))},this.getList()},activated:function(){},deactivated:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(n.k)({page:this.page,limit:10,types:"crm_"+this.crmType,types_id:this.id,by:"examine"}).then(function(t){e.list=e.list.concat(t.data.list),t.data.list.length<10?e.loadMoreLoading=!1:e.loadMoreLoading=!0,e.loading=!1,e.isPost=!1}).catch(function(){e.isPost=!1,e.loading=!1})},refreshList:function(){this.page=1,this.list=[],this.getList()},examineCellHandle:function(e){var t=this;"edit"==e.type?(e.data.item.title=e.data.item.category_name,this.createInfo=e.data.item,this.createAction={type:"update",id:e.data.item.examine_id,data:e.data.item},this.isCreate=!0):"delete"==e.type?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l.c)({id:e.data.item.examine_id}).then(function(e){t.refreshList(),t.$message({type:"success",message:"删除成功!"})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})}):"withdraw"==e.type?(this.rowID=e.data.item.examine_id,this.showExamineHandle=!0):"view"==e.type?(this.detailCRMType="examine",this.rowID=e.data.item.examine_id,this.showFullDetail=!0):"related-detail"==e.type&&(this.rowID=e.data.item[e.data.type+"_id"],this.detailCRMType=e.data.type,this.showFullDetail=!0)}}}),c=(i("H5CR"),i("KHd+")),r=Object(c.a)(o,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:0===e.list.length,expression:"list.length === 0"}]},[i("div",{staticClass:"log-items"},[e._l(e.list,function(t,a){return i("examine-cell",{key:a,attrs:{data:t.dataInfo},on:{"on-handle":e.examineCellHandle}})}),e._v(" "),i("div",{staticClass:"load"},[i("el-button",{attrs:{type:"text",loading:e.loadMoreLoading}},[e._v(e._s(e.loadMoreLoading?"加载更多":"没有更多了"))])],1)],2)]),e._v(" "),i("examine-handle",{attrs:{show:e.showExamineHandle,id:e.rowID,examineType:"oa_examine",status:"2"},on:{close:function(t){e.showExamineHandle=!1},save:e.refreshList}}),e._v(" "),e.isCreate?i("examine-create-view",{attrs:{category_id:e.createInfo.category_id,category_title:e.createInfo.title,action:e.createAction},on:{"save-success":e.refreshList,"hiden-view":function(t){e.isCreate=!1}}}):e._e(),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:e.detailCRMType,id:e.rowID},on:{"update:visible":function(t){e.showFullDetail=t}}})],1)},[],!1,null,"72ad3372",null);r.options.__file="ExamineLog.vue";t.a=r.exports},"h/gC":function(e,t,i){"use strict";var a=i("Zv6X");i.n(a).a},hMee:function(e,t,i){},hW97:function(e,t,i){},i68b:function(e,t,i){"use strict";var a=i("KzkL");t.a={data:function(){return{followTypes:[],followType:""}},created:function(){this.getFollowLogType()},methods:{getFollowLogType:function(){var e=this;this.loading=!0,Object(a.s)().then(function(t){e.loading=!1,e.followTypes=t.data.map(function(e){return{type:e,name:e}}),e.followType=t.data.length>0?t.data[0]:""}).catch(function(){e.loading=!1})}},deactivated:function(){}}},i91G:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU2RjI0NjM0RTA5QjExRTg4QTE5QjM2OEE1QUE5MUZBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU2RjI0NjM1RTA5QjExRTg4QTE5QjM2OEE1QUE5MUZBIj4gPHhtcE1NOkRlcml2ZWRG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VEEOlMGEuvG2s+ybHoNzXghXNJtx4ypMcxXkclhPv01CNSvqG9uORdx+BRgAmcBOEZLrcDgAAAAASUVORK5CYII="},jxLh:function(e,t,i){},k5Y1:function(e,t,i){},kKfx:function(e,t,i){},kegP:function(e,t,i){"use strict";var a=i("GQeE"),s=i.n(a),n=i("QbLZ"),l=i.n(n),o=i("L2JU"),c=i("EgJF"),r=i("vG5h"),d=i("5tgW"),u=i("qbf4"),m=i("YrMO"),h=i("KzkL"),f=i("8GhS"),p={name:"c-r-m-import",components:{XhUserCell:f.p},data:function(){return{loading:!1,showDialog:!1,config:1,file:{name:""},user:[],fieldUniqueInfo:""}},computed:l()({},Object(o.b)(["userInfo"]),{crmTypeName:function(){return{customer:"客户",leads:"线索",contacts:"联系人",product:"产品"}[this.crmType]||""}}),props:{show:{type:Boolean,default:!1},crmType:{type:String,default:""}},watch:{show:function(e){this.showDialog=e,this.fieldUniqueInfo||this.getFieldUniqueInfo()}},mounted:function(){this.user.push(this.userInfo)},methods:{sure:function(){var e=this,t={};if(this.file.name)if("customer"==this.crmType||this.user&&0!=this.user.length){t.config=this.config,t.file=this.file,t.owner_user_id=this.user.length>0?this.user[0].id:"";var i={customer:r.e,leads:d.d,contacts:u.d,product:m.c}[this.crmType];this.loading=!0,i(t).then(function(t){e.loading=!1,e.$message.success(t.data),e.closeView()}).catch(function(){e.loading=!1})}else this.$message.error("请选择负责人");else this.$message.error("请选择导入文件")},download:function(){var e=document.createElement("a");e.href=window.BASE_URL+{customer:r.c,leads:d.b,contacts:u.b,product:m.a}[this.crmType],e.target="_black",document.body.appendChild(e),e.click(),document.body.removeChild(e)},selectFile:function(){document.getElementById("importInputFile").click()},uploadFile:function(e){var t=e.target.files[0];this.file=t,e.target.value=""},userSelect:function(e){e.value&&e.value.length>0?this.user=e.value:this.user=[]},closeView:function(){this.$emit("close")},getFieldUniqueInfo:function(){var e=this;Object(h.a)({types:"crm_"+this.crmType}).then(function(t){e.fieldUniqueInfo=t.data}).catch(function(){})}}},v=(i("zyqF"),i("KHd+")),g=Object(v.a)(p,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"资料导入中","element-loading-spinner":"el-icon-loading",visible:e.showDialog,title:"导入"+e.crmTypeName,width:"550px","append-to-body":!0},on:{"update:visible":function(t){e.showDialog=t},close:e.closeView}},[i("div",{staticClass:"dialog-body"},[i("div",{staticClass:"sections"},[i("div",[e._v("一、请按照数据模板的格式准备要导入的数据。"),i("span",{staticClass:"download",on:{click:e.download}},[e._v("点击下载")]),e._v("《"+e._s(e.crmTypeName)+"导入模板》")]),e._v(" "),i("div",{staticClass:"content content-tips"},[i("div",[e._v("注意事项:")]),e._v(" "),i("div",[e._v("1、模板中的表头名称不能更改,表头行不能删除")]),e._v(" "),i("div",[e._v("2、其中标*为必填项,必须填写")]),e._v(" "),i("div",[e._v("3、导入文件请勿超过20MB")])])]),e._v(" "),i("div",{staticClass:"sections"},[i("flexbox",{attrs:{align:"initial"}},[i("div",[e._v("二、")]),e._v(" "),i("div",[e._v("请选择数据重复时的处理方式(查重规则:【"+e._s(e.fieldUniqueInfo)+"】)")])]),e._v(" "),i("div",{staticClass:"content"},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.config,callback:function(t){e.config=t},expression:"config"}},e._l([{name:"覆盖系统原有数据",value:1},{name:"跳过",value:0}],function(e,t){return i("el-option",{key:t,attrs:{label:e.name,value:e.value}})}))],1)],1),e._v(" "),i("div",{staticClass:"sections"},[i("div",[e._v("三、请选择需要导入的文件")]),e._v(" "),i("div",{staticClass:"content"},[i("flexbox",{staticClass:"file-select"},[i("el-input",{attrs:{disabled:!0},model:{value:e.file.name,callback:function(t){e.$set(e.file,"name",t)},expression:"file.name"}}),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.selectFile}},[e._v("选择文件")])],1)],1)]),e._v(" "),i("div",{staticClass:"sections"},[i("div",[e._v("四、请选择负责人("+e._s("customer"==e.crmType?"如不选择,导入的客户将进入公海":"必选")+")")]),e._v(" "),i("div",{staticClass:"content"},[i("div",{staticClass:"user-cell"},[i("xh-user-cell",{attrs:{value:e.user},on:{"value-change":e.userSelect}})],1)])]),e._v(" "),i("input",{attrs:{type:"file",id:"importInputFile",accept:".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},on:{change:e.uploadFile}})]),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.closeView}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.sure}},[e._v("确 定")])],1)])},[],!1,null,"a197ad6e",null);g.options.__file="CRMImport.vue";var b=g.exports,y={name:"CRM-list-head",components:{CRMCreateView:c.default,CRMImport:b},computed:l()({},Object(o.b)(["crm"]),{canSave:function(){return!this.isSeas&&this.crm[this.crmType].save}}),data:function(){return{inputContent:"",moreTypes:[],createActionInfo:{type:"save"},createCRMType:"",isCreate:!1,showCRMImport:!1}},props:{title:{type:String,default:""},placeholder:{type:String,default:"请输入内容"},mainTitle:{type:String,default:""},crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},mounted:function(){this.isSeas?this.crm[this.crmType].poolexcelexport&&this.moreTypes.push({type:"out",name:"导出"}):(this.crm[this.crmType].excelimport&&this.moreTypes.push({type:"enter",name:"导入"}),this.crm[this.crmType].excelexport&&this.moreTypes.push({type:"out",name:"导出"}))},methods:{handleTypeDrop:function(e){"out"==e?this.$emit("on-export"):"enter"==e&&(this.showCRMImport=!0)},createClick:function(){this.createCRMType=this.crmType,this.createActionInfo={type:"save"},this.isCreate=!this.isCreate},searchInput:function(){this.$emit("on-search",this.inputContent)},createSaveSuccess:function(e){e&&e.saveAndCreate?"customer"==e.type&&(this.createCRMType="contacts",this.createActionInfo={type:"relative",crmType:"customer",data:{}},this.createActionInfo.data.customer=e.data,this.isCreate=!0):this.$emit("on-handle",{type:"save-success"})},hideView:function(){this.isCreate=!1}}},_=(i("5qxJ"),Object(v.a)(y,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"c-container"},[i("div",{staticClass:"title"},[e._v(e._s(e.title))]),e._v(" "),i("el-input",{staticClass:"sc-container",attrs:{placeholder:e.placeholder},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchInput(t):null}},model:{value:e.inputContent,callback:function(t){e.inputContent=t},expression:"inputContent"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(t){return e.searchInput(t)}},slot:"append"})],1),e._v(" "),i("div",{staticClass:"right-container"},[e.canSave?i("el-button",{attrs:{type:"primary"},on:{click:e.createClick}},[e._v(e._s(e.mainTitle))]):e._e(),e._v(" "),e.moreTypes.length>0?i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleTypeDrop}},[i("flexbox",{staticClass:"right-more-item"},[i("div",[e._v("更多")]),e._v(" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right",staticStyle:{color:"#777"}})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.moreTypes,function(t,a){return i("el-dropdown-item",{key:a,attrs:{command:t.type}},[e._v(e._s(t.name))])}))],1):e._e()],1),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":e.createCRMType,action:e.createActionInfo},on:{"save-success":e.createSaveSuccess,"hiden-view":e.hideView}}):e._e(),e._v(" "),i("c-r-m-import",{attrs:{show:e.showCRMImport,crmType:e.crmType},on:{close:function(t){e.showCRMImport=!1}}})],1)},[],!1,null,"6dd71341",null));_.options.__file="CRMListHead.vue";var w=_.exports,C=i("UcQx"),k=i("6zBA"),I=i("ooHJ"),A=i("oWS4"),x=i("NS7n"),D={name:"scene-list",components:{},computed:l()({},Object(o.b)(["crm"])),data:function(){return{sceneSelectId:-1,sceneList:[]}},watch:{},props:{crmType:{type:String,default:""}},mounted:function(){this.crm[this.crmType].index&&this.getSceneList()},methods:{getSceneList:function(){var e=this;Object(h.o)({types:"crm_"+this.crmType}).then(function(t){var i=t.data.list.filter(function(e,t){return 1===e.is_default});if(i&&i.length>0){var a=i[0];e.sceneSelectId=a.scene_id,e.$emit("scene",{id:a.scene_id,name:a.name,bydata:a.bydata||""})}else e.sceneSelectId="",e.$emit("scene",{id:"",name:"",bydata:""});e.sceneList=t.data.list}).catch(function(){e.$emit("scene",{id:"",name:"",bydata:""})})},selectScene:function(e,t){this.sceneSelectId=e.scene_id,this.$emit("scene",{id:e.scene_id,name:e.name,bydata:e.bydata}),this.$emit("hidden-scene")},addScene:function(){this.$emit("scene-handle",{type:"add"})},setScene:function(){this.$emit("scene-handle",{type:"set"})}}},T=(i("YWwE"),Object(v.a)(D,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"scene-container"},[a("div",{staticClass:"scene-list"},e._l(e.sceneList,function(t,i){return a("div",{key:i,staticClass:"scene-list-item",class:{"scene-list-item-select":t.scene_id==e.sceneSelectId},on:{click:function(a){e.selectScene(t,i)}}},[e._v("\n      "+e._s(t.name)+"\n    ")])})),e._v(" "),a("div",[a("flexbox",{staticClass:"handle-button",nativeOn:{click:function(t){return e.addScene(t)}}},[a("img",{staticClass:"handle-button-icon",attrs:{src:i("5hU7")}}),e._v(" "),a("div",{staticClass:"handle-button-name"},[e._v("新建场景")])]),e._v(" "),a("flexbox",{staticClass:"handle-button",nativeOn:{click:function(t){return e.setScene(t)}}},[a("img",{staticClass:"handle-button-icon",attrs:{src:i("HfS2")}}),e._v(" "),a("div",{staticClass:"handle-button-name"},[e._v("管理")])])],1)])},[],!1,null,"8d57a94c",null));T.options.__file="SceneList.vue";var R=T.exports,L=i("GYAN"),E=i.n(L),N=i("7Qib"),S={name:"scene-create",components:{XhUserCell:f.p},props:{dialogVisible:{type:Boolean,required:!0,default:!1},fieldList:{type:Array,required:!0,default:[]},obj:{default:function(){return{}},required:!0},crmType:{type:String,default:""},name:{type:String,default:""},isDefault:{type:Boolean,default:!1},edit_id:{type:String,default:""}},data:function(){return{form:[],visible:!1,showErrors:!1,saveDefault:!1,saveName:null}},watch:{dialogVisible:{handler:function(e){var t=this;if(e){if(this.edit_id){this.form=[];var i=function(e){var i=t.obj.obj[e],a=t.getItem();if(a.name=i.name,a.field=e,a.condition=i.condition,a.form_type=i.form_type,"date"==i.form_type)a.value=[i.start_date,i.end_date];else if("datetime"==i.form_type)a.value=[Object(N.m)(i.start,"YYYY-MM-DD HH:mm:ss"),Object(N.m)(i.end,"YYYY-MM-DD HH:mm:ss")];else if("business_type"==i.form_type){if(a.type_id=i.type_id,a.status_id=i.status_id,a.typeOption=i.setting,i.type_id){var s=i.setting.find(function(e){return e.type_id===i.type_id});a.statusOption=s?s.statusList:[]}}else"user"==i.form_type?a.value=i.setting?[i.setting]:[]:(a.setting=i.setting,a.value=i.value);t.form.push(a)};for(var a in this.obj.obj)i(a)}else this.form=Object(N.h)(this.obj.form),0==this.form.length&&this.form.push(this.getItem());this.name?this.saveName=this.name:this.saveName="",this.isDefault?this.saveDefault=this.isDefault:this.saveDefault=!1}this.visible=this.dialogVisible},deep:!0,immediate:!0},form:function(){this.$nextTick(function(){var e=document.getElementById("scene-filter-container");e.scrollTop=e.scrollHeight})}},methods:{getItem:function(){return{field:"",name:"",form_type:"",condition:"is",value:"",typeOption:[],statusOption:[],type_id:"",status_id:""}},typeOptionsChange:function(e){if(e.type_id){var t=e.typeOption.find(function(t){return t.type_id===e.type_id});e.statusOption=t.statusList||[]}else e.statusOption=[];e.status_id=""},userValueChange:function(e){e.value.length>0?e.item.value=e.value:e.item.value=[]},calConditionOptions:function(e,t){return"select"==e||"checkbox"==e||"user"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1}]:"module"==e||"text"==e||"textarea"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1}]:"floatnumber"==e||"number"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1},{value:"is_empty",label:"为空",disabled:!1},{value:"is_not_empty",label:"不为空",disabled:!1},{value:"gt",label:"大于",disabled:!1},{value:"egt",label:"大于等于",disabled:!1},{value:"lt",label:"小于",disabled:!1},{value:"elt",label:"小于等于",disabled:!1}]:"category"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1}]:[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1},{value:"start_with",label:"开始于",disabled:!1},{value:"end_with",label:"结束于",disabled:!1},{value:"is_empty",label:"为空",disabled:!1},{value:"is_not_empty",label:"不为空",disabled:!1},{value:"gt",label:"大于",disabled:!1},{value:"egt",label:"大于等于",disabled:!1},{value:"lt",label:"小于",disabled:!1},{value:"elt",label:"小于等于",disabled:!1}]},fieldChange:function(e){var t=this.fieldList.find(function(t){return t.field===e.field});t&&(e.form_type=t.form_type,e.name=t.name,"business_type"==e.form_type?(e.typeOption=t.setting,e.statusOption=[],e.type_id="",e.status_id=""):"select"==e.form_type?e.setting=t.setting||[]:"date"!==e.form_type&&"datetime"!==e.form_type&&"user"!==e.form_type||(e.value=[])),this.form.filter(function(t){return t.field===e.field}).length>1?this.showErrors=!0:this.showErrors=!1},handleCancel:function(){this.visible=!1,this.$emit("update:dialogVisible",!1)},handleConfirm:function(){if(this.showErrors)this.$message.error("筛选条件中有重复项!");else if(this.saveName&&""!==this.saveName){for(var e=0;e<this.form.length;e++){var t=this.form[e];if(!t.field||""===t.field)return void this.$message.error("要筛选的字段名称不能为空!");if("business_type"==t.form_type){if(!t.type_id&&!t.status_id)return void this.$message.error("请输入筛选条件的值!")}else if("date"==t.form_type||"datetime"==t.form_type||"user"==t.form_type){if(!t.value||0===t.value.length)return void this.$message.error("请输入筛选条件的值!")}else if(!t.value)return void this.$message.error("请输入筛选条件的值!")}var i={};this.form.forEach(function(e){"date"==e.form_type?i[e.field]={start_date:e.value[0],end_date:e.value[1],form_type:e.form_type,name:e.name}:"datetime"==e.form_type?i[e.field]={start:Object(N.d)(e.value[0]),end:Object(N.d)(e.value[1]),form_type:e.form_type,name:e.name}:"business_type"==e.form_type?i[e.field]={type_id:e.type_id,status_id:e.status_id,form_type:e.form_type,name:e.name}:"user"==e.form_type?i[e.field]={condition:e.condition,value:e.value[0].id,form_type:e.form_type,name:e.name}:i[e.field]={condition:e.condition,value:e.value,form_type:e.form_type,name:e.name}});var a={obj:i,form:this.form,saveDefault:this.saveDefault,saveName:this.saveName};this.requestCreateScene(a)}else this.$message.error("场景名称不能为空!")},requestCreateScene:function(e){var t=this;this.edit_id?Object(h.r)({types:"crm_"+this.crmType,is_default:e.saveDefault?1:0,name:e.saveName,id:this.edit_id,data:e.obj}).then(function(e){t.$message({type:"success",message:"编辑成功"}),t.$emit("saveSuccess"),t.handleCancel()}).catch(function(){}):Object(h.p)({types:"crm_"+this.crmType,is_default:e.saveDefault?1:0,name:e.saveName,data:e.obj}).then(function(e){t.$message({type:"success",message:"创建成功"}),t.$emit("saveSuccess"),t.handleCancel()}).catch(function(){})},handleAdd:function(){this.form.push(this.getItem())},handleDelete:function(e){var t=this;this.$confirm("您确定要删除这一条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.form.splice(e,1)}).catch(function(){t.$message({type:"info",message:"已取消删除"})})}}},M=(i("Ny23"),Object(v.a)(S,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:e.edit_id?"编辑场景":"新建场景",visible:e.visible,"append-to-body":!0,width:"800px"},on:{"update:visible":function(t){e.visible=t},close:e.handleCancel}},[i("div",{staticClass:"scene-name-container"},[i("div",{staticClass:"scene-name"},[e._v("场景名称")]),e._v(" "),i("el-input",{staticClass:"scene-input",attrs:{maxlength:10,placeholder:"请输入场景名称,最多10个字符"},model:{value:e.saveName,callback:function(t){e.saveName="string"==typeof t?t.trim():t},expression:"saveName"}})],1),e._v(" "),i("div",{staticClass:"scene-name"},[e._v("筛选条件")]),e._v(" "),i("el-form",{staticClass:"filter-container",attrs:{id:"scene-filter-container"}},[i("el-form-item",[e._l(e.form,function(t,a){return[i("el-row",{key:a},[i("el-col",{attrs:{span:8}},[i("el-select",{attrs:{placeholder:"请选择要筛选的字段名"},on:{change:function(i){e.fieldChange(t)}},model:{value:t.field,callback:function(i){e.$set(t,"field",i)},expression:"formItem.field"}},e._l(e.fieldList,function(e){return i("el-option",{key:e.field,attrs:{label:e.name,value:e.field}})}))],1),e._v(" "),"date"!==t.form_type&&"datetime"!==t.form_type&&"business_type"!==t.form_type?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),"date"!==t.form_type&&"datetime"!==t.form_type&&"business_type"!==t.form_type?i("el-col",{attrs:{span:4}},[i("el-select",{attrs:{placeholder:"请选择范围"},model:{value:t.condition,callback:function(i){e.$set(t,"condition",i)},expression:"formItem.condition"}},e._l(e.calConditionOptions(t.form_type,t),function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:4}},[i("el-select",{attrs:{placeholder:"请选择"},on:{change:function(i){e.typeOptionsChange(t)}},model:{value:t.type_id,callback:function(i){e.$set(t,"type_id",i)},expression:"formItem.type_id"}},e._l(t.typeOption,function(e){return i("el-option",{key:e.type_id,attrs:{label:e.name,value:e.type_id}})}))],1):e._e(),e._v(" "),i("el-col",{attrs:{span:1}},[e._v(" ")]),e._v(" "),i("el-col",{attrs:{span:"datetime"===t.form_type||"date"===t.form_type?13:8}},["select"===t.form_type?i("el-select",{attrs:{placeholder:"请选择筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}},e._l(t.setting,function(e){return i("el-option",{key:e,attrs:{label:e,value:e}})})):"date"===t.form_type||"datetime"===t.form_type?i("el-date-picker",{staticStyle:{padding:"0px 10px"},attrs:{"value-format":"date"===t.form_type?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",type:"date"===t.form_type?"daterange":"datetimerange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}}):"business_type"===t.form_type?i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.status_id,callback:function(i){e.$set(t,"status_id",i)},expression:"formItem.status_id"}},e._l(t.statusOption,function(e){return i("el-option",{key:e.status_id,attrs:{label:e.name,value:e.status_id}})})):"user"===t.form_type?i("xh-user-cell",{attrs:{item:t,infoParams:{m:"crm",c:e.crmType,a:"index"},value:t.value},on:{"value-change":e.userValueChange}}):i("el-input",{attrs:{placeholder:"请输入筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}})],1),e._v(" "),i("el-col",{staticClass:"delete",attrs:{span:1}},[i("i",{staticClass:"el-icon-error delete-btn",on:{click:function(t){e.handleDelete(a)}}})])],1)]})],2)],1),e._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:e.showErrors,expression:"showErrors"}],staticClass:"el-icon-warning warning-info"},[i("span",{staticClass:"desc"},[e._v("筛选条件中有重复项!")])]),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:e.handleAdd}},[e._v("+ 添加筛选条件")]),e._v(" "),i("div",{staticClass:"save"},[i("div",{staticClass:"save-setting"},[i("el-checkbox",{model:{value:e.saveDefault,callback:function(t){e.saveDefault=t},expression:"saveDefault"}},[e._v("设置为默认")])],1)]),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleCancel}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v("确 定")])],1)],1)},[],!1,null,"784c79b6",null));M.options.__file="SceneCreate.vue";var j=M.exports,O={name:"scene-set",components:{draggable:E.a,SceneCreate:j},computed:{},data:function(){return{default_id:"",visible:!1,isleftIndeterminate:!1,checkleftAll:!1,checkedLeftData:[],leftCheckItems:[],isrightIndeterminate:!1,checkrightAll:!1,checkedRightData:[],rightCheckItems:[],moveItem:{},handlDefaultItem:{},showCreateScene:!1,fieldList:[],filterObj:{form:[]},filterName:"",filterDefault:!1,filterEditId:""}},watch:{dialogVisible:{handler:function(e){this.visible=e,e&&this.getSceneList()},deep:!0,immediate:!0}},props:{dialogVisible:{type:Boolean,required:!0,default:!1},crmType:{type:String,default:""}},mounted:function(){},methods:{getSceneList:function(){var e=this;Object(h.o)({types:"crm_"+this.crmType}).then(function(t){e.checkedLeftData=t.data.list.map(function(e,t){return e.check=!1,e}),e.checkedRightData=t.data.hideList.map(function(e,t){return e.check=!1,e});var i=e.checkedLeftData.filter(function(e,t){return 1==e.is_default});i&&i.length>0?e.default_id=i[0].scene_id:e.default_id=""}).catch(function(){})},handleConfirm:function(){var e=this,t=this;0==this.checkedLeftData.filter(function(e,i){return e.scene_id==t.default_id}).length&&(this.default_id=""),Object(h.q)({types:"crm_"+this.crmType,ids:this.checkedLeftData.map(function(e,t,i){return e.scene_id}),hide_ids:this.checkedRightData.map(function(e,t,i){return e.scene_id}),default_id:this.default_id}).then(function(t){e.$message({type:"success",message:"操作成功"}),e.handleCancel(),e.$emit("save-success")}).catch(function(){})},itemHandle:function(e,t,i){var a=this;"edit"==e?this.addAndEditScene("edit",t):"delete"==e?this.$confirm("您确定要删除这一条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(h.n)({id:t.scene_id}).then(function(e){a.$message({type:"success",message:"删除成功"}),a.checkedLeftData.splice(i,1),a.leftCheckItemChange(),a.$emit("save-success")}).catch(function(){})}).catch(function(){a.$message({type:"info",message:"已取消删除"})}):"default"==e&&(this.handlDefaultItem=t)},defaultHandle:function(){var e=this;Object(h.m)({id:this.handlDefaultItem.scene_id,types:"crm_"+this.crmType}).then(function(t){e.$message({type:"success",message:t.data}),e.default_id=e.handlDefaultItem.scene_id}).catch(function(){})},addAndEditScene:function(e,t){var i=this;Object(h.x)({types:"crm_"+this.crmType}).then(function(a){i.fieldList=a.data,"edit"==e?(i.filterObj={form:[],obj:t.data},i.filterName=t.name,i.filterDefault=1==t.is_default,i.filterEditId=t.scene_id.toString()):(i.filterObj={form:[]},i.filterEditId="",i.filterName="",i.filterDefault=!1),i.showCreateScene=!0}).catch(function(){})},handleCancel:function(){this.visible=!1,this.$emit("update:dialogVisible",!1)},rightMoveEnd:function(e){this.moveItem.check=!1,this.leftCheckItemChange(),this.rightCheckItemChange()},rightMove:function(e){this.moveItem=e.draggedContext.element},leftMoveEnd:function(e){this.moveItem.check=!1,this.leftCheckItemChange(),this.rightCheckItemChange()},leftMove:function(e){this.moveItem=e.draggedContext.element},handleleftCheckAllChange:function(e){e&&(this.isleftIndeterminate=!1),this.checkedLeftData=this.checkedLeftData.filter(function(t,i,a){return t.check=e,t}),this.leftCheckItems=e?this.checkedLeftData:[]},leftCheckItemChange:function(){this.leftCheckItems=this.checkedLeftData.filter(function(e,t,i){return 1==e.check}),this.leftCheckItems.length>0?this.leftCheckItems.length==this.checkedLeftData.length?(this.checkleftAll=!0,this.isleftIndeterminate=!1):(this.checkleftAll=!1,this.isleftIndeterminate=!0):(this.checkleftAll=!1,this.isleftIndeterminate=!1)},handlerightCheckAllChange:function(e){e&&(this.isrightIndeterminate=!1),this.checkedRightData=this.checkedRightData.filter(function(t,i,a){return t.check=e,t}),this.rightCheckItems=e?this.checkedRightData:[]},rightCheckItemChange:function(){this.rightCheckItems=this.checkedRightData.filter(function(e,t,i){return 1==e.check}),this.rightCheckItems.length>0?this.rightCheckItems.length==this.checkedRightData.length?(this.checkrightAll=!0,this.isrightIndeterminate=!1):(this.checkrightAll=!1,this.isrightIndeterminate=!0):(this.checkrightAll=!1,this.isrightIndeterminate=!1)},changePositon:function(e){var t=this;"left"==e?(this.checkedRightData=this.checkedRightData.filter(function(e,i,a){var s=!1;return t.rightCheckItems.forEach(function(t,i){e.scene_id==t.scene_id&&(s=!0)}),!s}),this.rightCheckItems.forEach(function(e,i){e.check=!1,t.checkedLeftData.push(e)}),this.rightCheckItems=[],this.isrightIndeterminate=!1,this.checkrightAll=!1,this.leftCheckItemChange(),this.rightCheckItemChange()):(this.checkedLeftData=this.checkedLeftData.filter(function(e,i,a){var s=!1;return t.leftCheckItems.forEach(function(t,i){e.scene_id==t.scene_id&&(s=!0)}),!s}),this.leftCheckItems.forEach(function(e,i){e.check=!1,t.checkedRightData.push(e)}),this.leftCheckItems=[],this.isleftIndeterminate=!1,this.checkleftAll=!1,this.leftCheckItemChange(),this.rightCheckItemChange())}}},G=(i("6Aus"),Object(v.a)(O,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"场景管理",visible:e.visible,"append-to-body":!0,width:"700px"},on:{"update:visible":function(t){e.visible=t},close:e.handleCancel}},[i("div",{staticClass:"scene-name"},[e._v("您可通过拖拽管理标签")]),e._v(" "),i("flexbox",{staticClass:"scene-list"},[i("div",{staticClass:"scene-list-box"},[i("flexbox",{staticClass:"scene-list-head"},[i("el-checkbox",{attrs:{indeterminate:e.isleftIndeterminate},on:{change:e.handleleftCheckAllChange},model:{value:e.checkleftAll,callback:function(t){e.checkleftAll=t},expression:"checkleftAll"}}),e._v(" "),i("div",{staticClass:"scene-list-head-name"},[e._v("显示的标签")]),e._v(" "),i("div",{staticClass:"scene-list-head-detail"},[e._v(e._s(e.leftCheckItems.length+"/"+e.checkedLeftData.length))])],1),e._v(" "),i("div",{staticClass:"scene-list-body"},[e._l(e.checkedLeftData,function(t,a){return 1==t.type?i("flexbox",{key:a,staticClass:"list-item"},[i("div",{staticClass:"default-mark",class:{"default-mark-active":t.scene_id==e.default_id}}),e._v(" "),i("el-checkbox",{staticClass:"list-item-check",attrs:{disabled:!0},on:{change:e.leftCheckItemChange},model:{value:t.check,callback:function(i){e.$set(t,"check",i)},expression:"item.check"}}),e._v(" "),i("div",{staticClass:"list-item-name"},[e._v(e._s(t.name))]),e._v(" "),i("div",{staticClass:"list-item-handle"},[i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.defaultHandle}},[i("i",{staticClass:"el-icon-arrow-down",on:{click:function(i){e.itemHandle("default",t,a)}}}),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",[e._v("设置为默认标签")])],1)],1)],1)],1):e._e()}),e._v(" "),i("draggable",{staticStyle:{"min-height":"100px"},attrs:{move:e.leftMove,options:{group:"list",forceFallback:!1,fallbackClass:"draggingStyle"}},on:{end:e.leftMoveEnd},model:{value:e.checkedLeftData,callback:function(t){e.checkedLeftData=t},expression:"checkedLeftData"}},e._l(e.checkedLeftData,function(t,a){return 1!=t.type?i("flexbox",{key:a,staticClass:"list-item"},[i("div",{staticClass:"default-mark",class:{"default-mark-active":t.scene_id==e.default_id}}),e._v(" "),i("el-checkbox",{staticClass:"list-item-check",on:{change:e.leftCheckItemChange},model:{value:t.check,callback:function(i){e.$set(t,"check",i)},expression:"item.check"}}),e._v(" "),i("div",{staticClass:"list-item-name"},[e._v(e._s(t.name))]),e._v(" "),i("div",{staticClass:"list-item-handle"},[i("i",{staticClass:"el-icon-edit",on:{click:function(i){e.itemHandle("edit",t,a)}}}),e._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(i){e.itemHandle("delete",t,a)}}}),e._v(" "),i("el-dropdown",{on:{command:e.defaultHandle}},[i("i",{staticClass:"el-icon-arrow-down",on:{click:function(i){e.itemHandle("default",t,a)}}}),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",[e._v("设置为默认标签")])],1)],1)],1)],1):e._e()}))],2)],1),e._v(" "),i("div",{staticClass:"scene-middle-list"},[i("el-button",{staticClass:"scene-middle-left-button",class:{"scene-middle-button-select":e.rightCheckItems.length>0},attrs:{disabled:0==e.rightCheckItems.length},on:{click:function(t){e.changePositon("left")}}},[i("i",{staticClass:"el-icon-arrow-left scene-middle-icon"})]),e._v(" "),i("el-button",{staticClass:"scene-middle-right-button",class:{"scene-middle-button-select":e.leftCheckItems.length>0},attrs:{disabled:0==e.leftCheckItems.length},on:{click:function(t){e.changePositon("right")}}},[i("i",{staticClass:"el-icon-arrow-right scene-middle-icon"})])],1),e._v(" "),i("div",{staticClass:"scene-list-box"},[i("flexbox",{staticClass:"scene-list-head"},[i("el-checkbox",{attrs:{indeterminate:e.isrightIndeterminate},on:{change:e.handlerightCheckAllChange},model:{value:e.checkrightAll,callback:function(t){e.checkrightAll=t},expression:"checkrightAll"}}),e._v(" "),i("div",{staticClass:"scene-list-head-name"},[e._v("隐藏的标签")]),e._v(" "),i("div",{staticClass:"scene-list-head-detail"},[e._v(e._s(e.rightCheckItems.length+"/"+e.checkedRightData.length))])],1),e._v(" "),i("div",{staticClass:"scene-list-body"},[i("draggable",{staticStyle:{"min-height":"100px"},attrs:{move:e.rightMove,options:{group:"list",forceFallback:!1,fallbackClass:"draggingStyle"}},on:{end:e.rightMoveEnd},model:{value:e.checkedRightData,callback:function(t){e.checkedRightData=t},expression:"checkedRightData"}},e._l(e.checkedRightData,function(t,a){return i("flexbox",{key:a,staticClass:"list-item"},[i("el-checkbox",{staticClass:"list-item-check",staticStyle:{"margin-left":"9px"},on:{change:e.rightCheckItemChange},model:{value:t.check,callback:function(i){e.$set(t,"check",i)},expression:"item.check"}}),e._v(" "),i("div",{staticClass:"list-item-name"},[e._v(e._s(t.name))])],1)}))],1)],1)]),e._v(" "),i("div",{staticClass:"handle-bar"},[i("div",{staticClass:"handle-bar-add",on:{click:function(t){e.addAndEditScene("add",{})}}},[e._v("+ 新建场景")]),e._v(" "),i("div",{staticClass:"handle-bar-save"},[i("el-button",{nativeOn:{click:function(t){return e.handleCancel(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return e.handleConfirm(t)}}},[e._v("保存")])],1)]),e._v(" "),i("scene-create",{attrs:{fieldList:e.fieldList,crmType:e.crmType,dialogVisible:e.showCreateScene,obj:e.filterObj,name:e.filterName,edit_id:e.filterEditId,isDefault:e.filterDefault},on:{"update:dialogVisible":function(t){e.showCreateScene=t},saveSuccess:e.getSceneList}})],1)},[],!1,null,"2d1ecf66",null));G.options.__file="SceneSet.vue";var B=G.exports,F=i("QY39"),Y=i("eOzp"),Z=i("V47a"),z={name:"CRM-table-head",components:{filterForm:A.a,filterContent:x.a,SceneList:R,TransferHandle:F.a,TeamsHandle:Y.a,AllocHandle:Z.a,SceneCreate:j,SceneSet:B},computed:l()({},Object(o.b)(["crm","CRMConfig"])),data:function(){return{sceneTypes:[{type:"enter",name:"我负责的"},{type:"out",name:"我"}],sceneType:null,showScene:!1,showFilter:!1,fieldList:[],filterObj:{form:[]},sceneData:{id:"",bydata:"",name:""},showSceneSet:!1,showSceneCreate:!1,sceneFilterObj:{form:[]},selectionList:[],transferDialogShow:!1,teamsDialogShow:!1,teamsTitle:"",allocDialogShow:!1}},watch:{},props:{title:{type:String,default:""},crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},mounted:function(){},methods:{handleTypeDrop:function(e){this.sceneType=e},showFilterClick:function(){this.getFilterFieldInfo()},getFilterFieldInfo:function(){var e=this;Object(h.x)({types:"crm_"+this.crmType}).then(function(t){e.fieldList=t.data,e.showFilter=!0}).catch(function(){})},handleFilter:function(e){var t=this;this.filterObj=e,this.showFilter=!1,e.saveChecked&&Object(h.p)({types:"crm_"+this.crmType,is_default:e.saveDefault?1:0,name:e.saveName,data:e.obj}).then(function(e){t.updateSceneList()}).catch(function(){}),this.$emit("filter",e.obj)},handleDeleteField:function(e){this.filterObj=e.obj,this.$emit("filter",this.filterObj.obj)},sceneSelect:function(e){this.sceneData=e,this.$emit("scene",e)},sceneHandle:function(e){var t=this;"set"==e.type?this.showSceneSet=!0:"add"==e.type&&Object(h.x)({types:"crm_"+this.crmType}).then(function(e){t.fieldList=e.data,t.showSceneCreate=!0}).catch(function(){})},updateSceneList:function(){this.$refs.sceneList.getSceneList()},headSelectionChange:function(e){this.selectionList=e},selectionBarClick:function(e){var t=this;if("transfer"==e)this.transferDialogShow=!0;else if("export"==e){var i={scene_id:this.scene_id},a=void 0;a=this.isSeas?r.i:{customer:r.d,leads:d.c,contacts:u.c,product:m.b}[this.crmType],i[this.crmType+"_id"]=this.selectionList.map(function(e){return e[t.crmType+"_id"]}),a(i).then(function(e){var t=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),i=document.createElement("a"),a=window.URL.createObjectURL(t);i.href=a,i.download=decodeURI(e.headers["content-disposition"].split("filename=")[1])||"",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(a)}).catch(function(){})}else if("transform"==e||"put_seas"==e||"delete"==e||"lock"==e||"unlock"==e||"start"==e||"disable"==e||"get"==e){var s="";"transform"==e?s="确定将这些线索转换为客户吗?":"put_seas"==e?s="确定转移到公海吗?":"delete"==e?s="确定要删除这些数据吗?":"lock"==e?s="确定要锁定这些客户吗?锁定后将不会掉入公海。":"unlock"==e?s="确定要解锁这些客户吗?":"start"==e?s="确定要上架这些产品吗?":"disable"==e?s="确定要下架这些产品吗?":"get"==e&&(s="确定要领取该客户吗?"),this.$confirm(s,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.confirmHandle(e)}).catch(function(){t.$message({type:"info",message:"已取消操作"})})}else"add_user"==e?(this.teamsTitle="添加团队成员",this.teamsDialogShow=!0):"delete_user"==e?(this.teamsTitle="移除团队成员",this.teamsDialogShow=!0):"alloc"==e&&(this.allocDialogShow=!0)},confirmHandle:function(e){var t=this;if("lock"===e||"unlock"===e){var i=this.selectionList.map(function(e,t,i){return e.customer_id});Object(r.g)({is_lock:"lock"===e?"1":"2",customer_id:i}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}else if("put_seas"===e){i=this.selectionList.map(function(e,t,i){return e.customer_id});Object(r.j)({customer_id:i}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}else if("transform"===e){var a=this.selectionList.map(function(e,t,i){return e.leads_id});Object(d.j)({leads_id:a}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}else if("start"===e||"disable"===e){var s=this.selectionList.map(function(e,t,i){return e.product_id});Object(m.g)({id:s,status:"start"===e?"上架":"下架"}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}else if("delete"===e){var n=this,l=this.selectionList.map(function(e,t,i){return e[n.crmType+"_id"]}),o=void 0;"leads"==this.crmType?o=d.a:"customer"==this.crmType?o=r.a:"contacts"==this.crmType?o=u.a:"business"==this.crmType?o=C.b:"contract"==this.crmType?o=k.b:"receivables"==this.crmType&&(o=I.b),o({id:l}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}else if("get"===e){i=this.selectionList.map(function(e,t,i){return e.customer_id});Object(r.l)({customer_id:i}).then(function(i){t.$message({type:"success",message:i.data}),t.$emit("handle",{type:e})}).catch(function(){})}},getSelectionHandleItemsInfo:function(){var e={transfer:{name:"转移",type:"transfer",icon:i("W1y5")},transform:{name:"转化为客户",type:"transform",icon:i("rvIm")},export:{name:"导出选中",type:"export",icon:i("bwvB")},delete:{name:"删除",type:"delete",icon:i("NKOo")},put_seas:{name:"放入公海",type:"put_seas",icon:i("tmjI")},lock:{name:"锁定",type:"lock",icon:i("lYrD")},unlock:{name:"解锁",type:"unlock",icon:i("4N2P")},add_user:{name:"添加团队成员",type:"add_user",icon:i("jJjR")},delete_user:{name:"移除团队成员",type:"delete_user",icon:i("svWA")},alloc:{name:"分配",type:"alloc",icon:i("aQEv")},get:{name:"领取",type:"get",icon:i("lF6w")},start:{name:"上架",type:"start",icon:i("yTN1")},disable:{name:"下架",type:"disable",icon:i("disj")}};return"leads"==this.crmType?this.forSelectionHandleItems(e,["transfer","transform","export","delete"]):"customer"==this.crmType?this.isSeas?this.forSelectionHandleItems(e,["alloc","get","export"]):this.forSelectionHandleItems(e,["transfer","export","put_seas","delete","lock","unlock","add_user","delete_user"]):"contacts"==this.crmType?this.forSelectionHandleItems(e,["transfer","export","delete"]):"business"==this.crmType?this.forSelectionHandleItems(e,["transfer","delete","add_user","delete_user"]):"contract"==this.crmType?this.forSelectionHandleItems(e,["transfer","delete","add_user","delete_user"]):"receivables"==this.crmType?this.forSelectionHandleItems(e,["delete"]):"product"==this.crmType?this.forSelectionHandleItems(e,["export","start","disable"]):void 0},forSelectionHandleItems:function(e,t){for(var i=[],a=0;a<t.length;a++){var s=t[a];this.whetherTypeShowByPermision(s)&&i.push(e[s])}return i},whetherTypeShowByPermision:function(e){return"transfer"==e?"is_transform"!=this.sceneData.bydata&&this.crm[this.crmType].transfer:"transform"==e?"is_transform"!=this.sceneData.bydata&&this.crm[this.crmType].transform:"export"==e?this.isSeas?this.crm[this.crmType].poolexcelexport:this.crm[this.crmType].excelexport:"delete"==e?this.crm[this.crmType].delete:"put_seas"==e?this.crm[this.crmType].putinpool:"lock"==e||"unlock"==e?this.crm[this.crmType].lock&&1==this.CRMConfig.config:"add_user"==e||"delete_user"==e?this.crm[this.crmType].teamsave:"alloc"==e?this.crm[this.crmType].distribute:"get"==e?this.crm[this.crmType].receive:"start"!=e&&"disable"!=e||this.crm[this.crmType].status},handleCallBack:function(e){this.$emit("handle",{type:e.type})},getDefaultSceneName:function(){return"leads"==this.crmType?"全部线索":"customer"==this.crmType?"全部客户":"contacts"==this.crmType?"全部联系人":"business"==this.crmType?"全部商机":"contract"==this.crmType?"全部合同":"receivables"==this.crmType?"全部回款":"product"==this.crmType?"全部产品":void 0}}},U=(i("bec2"),Object(v.a)(z,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("flexbox",{directives:[{name:"show",rawName:"v-show",value:0==e.selectionList.length,expression:"selectionList.length == 0"}],staticClass:"th-container"},[e.isSeas?e._e():a("div",[e._v("场景:")]),e._v(" "),e.isSeas?e._e():a("el-popover",{attrs:{trigger:"click","popper-class":"no-padding-popover",width:"150"},model:{value:e.showScene,callback:function(t){e.showScene=t},expression:"showScene"}},[a("flexbox",{attrs:{slot:"reference"},slot:"reference"},[a("div",{staticClass:"condition_title"},[e._v(e._s(e.sceneData.name||e.getDefaultSceneName()))]),e._v(" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right",staticStyle:{color:"#777"}})]),e._v(" "),a("scene-list",{ref:"sceneList",attrs:{crmType:e.crmType},on:{scene:e.sceneSelect,"scene-handle":e.sceneHandle,"hidden-scene":function(t){e.showScene=!1}}})],1),e._v(" "),a("img",{staticClass:"c-filtrate",style:{"margin-left":e.isSeas?0:"30px"},attrs:{src:i("3gs7")},on:{click:e.showFilterClick}}),e._v(" "),a("div",{staticClass:"condition_title",on:{click:e.showFilterClick}},[e._v("高级筛选")]),e._v(" "),a("filter-form",{attrs:{fieldList:e.fieldList,dialogVisible:e.showFilter,obj:e.filterObj,crmType:e.crmType,isSeas:e.isSeas},on:{"update:dialogVisible":function(t){e.showFilter=t},filter:e.handleFilter}})],1),e._v(" "),e.selectionList.length>0?a("flexbox",{staticClass:"selection-bar"},[a("div",{staticClass:"selected—title"},[e._v("已选中"),a("span",{staticClass:"selected—count"},[e._v(e._s(e.selectionList.length))]),e._v("项")]),e._v(" "),a("flexbox",{staticClass:"selection-items-box"},e._l(e.getSelectionHandleItemsInfo(),function(t,i){return a("flexbox",{key:i,staticClass:"selection-item",nativeOn:{click:function(i){e.selectionBarClick(t.type)}}},[a("img",{staticClass:"selection-item-icon",attrs:{src:t.icon}}),e._v(" "),a("div",{staticClass:"selection-item-name"},[e._v(e._s(t.name))])])}))],1):e._e(),e._v(" "),e.filterObj.form&&e.filterObj.form.length>0?a("filter-content",{attrs:{obj:e.filterObj},on:{delete:e.handleDeleteField}}):e._e(),e._v(" "),a("transfer-handle",{attrs:{crmType:e.crmType,selectionList:e.selectionList,dialogVisible:e.transferDialogShow},on:{handle:e.handleCallBack,"update:dialogVisible":function(t){e.transferDialogShow=t}}}),e._v(" "),a("teams-handle",{attrs:{crmType:e.crmType,title:e.teamsTitle,selectionList:e.selectionList,dialogVisible:e.teamsDialogShow},on:{handle:e.handleCallBack,"update:dialogVisible":function(t){e.teamsDialogShow=t}}}),e._v(" "),a("alloc-handle",{attrs:{crmType:e.crmType,selectionList:e.selectionList,dialogVisible:e.allocDialogShow},on:{handle:e.handleCallBack,"update:dialogVisible":function(t){e.allocDialogShow=t}}}),e._v(" "),a("scene-set",{attrs:{dialogVisible:e.showSceneSet,crmType:e.crmType},on:{"update:dialogVisible":function(t){e.showSceneSet=t},"save-success":e.updateSceneList}}),e._v(" "),a("scene-create",{attrs:{fieldList:e.fieldList,crmType:e.crmType,dialogVisible:e.showSceneCreate,obj:e.sceneFilterObj},on:{"update:dialogVisible":function(t){e.showSceneCreate=t},saveSuccess:e.updateSceneList}})],1)},[],!1,null,"d0a6ec3c",null));U.options.__file="CRMTableHead.vue";var H=U.exports,Q={name:"fields-set",components:{draggable:E.a},computed:{},data:function(){return{visible:!1,isleftIndeterminate:!1,checkleftAll:!1,leftInput:"",checkedLeftData:[],leftCheckItems:[],isrightIndeterminate:!1,checkrightAll:!1,rightInput:"",checkedRightData:[],rightCheckItems:[],moveItem:{},handlDefaultItem:{}}},watch:{dialogVisible:{handler:function(e){this.visible=e,e&&0==this.checkedLeftData.length&&0==this.checkedRightData.length&&this.getFieldConfigIndex()},deep:!0,immediate:!0}},props:{dialogVisible:{type:Boolean,required:!0,default:!1},crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},mounted:function(){document.body.ondrop=function(e){e.preventDefault(),e.stopPropagation()}},methods:{getFieldConfigIndex:function(){var e=this,t="crm_"+this.crmType;this.isSeas&&(t+="_pool"),Object(h.g)({types:t}).then(function(t){e.checkedLeftData=t.data.value_list.map(function(e,t){return e.check=!1,e.show=!0,e}),e.checkedRightData=t.data.hide_list.map(function(e,t){return e.check=!1,e.show=!0,e})}).catch(function(){})},inputLeftChange:function(e){this.checkedLeftData=this.checkedLeftData.map(function(t,i){return-1!=t.name.indexOf(e)?t.show=!0:t.show=!1,t})},inputRightChange:function(e){this.checkedRightData=this.checkedRightData.map(function(t,i){return-1!=t.name.indexOf(e)?t.show=!0:t.show=!1,t})},handleConfirm:function(){var e=this;if(this.checkedLeftData.length<2)this.$message.error("至少要显示两列");else{var t="crm_"+this.crmType;this.isSeas&&(t+="_pool"),Object(h.f)({types:t,value:this.checkedLeftData,hide_value:this.checkedRightData}).then(function(t){e.$message.success(t.data),e.$emit("set-success"),e.handleCancel()}).catch(function(){})}},handleCancel:function(){this.visible=!1,this.$emit("update:dialogVisible",!1)},rightMoveEnd:function(e){this.moveItem.check=!1,this.leftCheckItemChange(),this.rightCheckItemChange()},rightMove:function(e){this.moveItem=e.draggedContext.element},leftMoveEnd:function(e){this.moveItem.check=!1,this.leftCheckItemChange(),this.rightCheckItemChange()},leftMove:function(e){this.moveItem=e.draggedContext.element},handleleftCheckAllChange:function(e){e&&(this.isleftIndeterminate=!1),this.checkedLeftData=this.checkedLeftData.filter(function(t,i,a){return t.check=e,t}),this.leftCheckItems=e?this.checkedLeftData:[]},leftCheckItemChange:function(){this.leftCheckItems=this.checkedLeftData.filter(function(e,t,i){return 1==e.check}),this.leftCheckItems.length>0?this.leftCheckItems.length==this.checkedLeftData.length?(this.checkleftAll=!0,this.isleftIndeterminate=!1):(this.checkleftAll=!1,this.isleftIndeterminate=!0):(this.checkleftAll=!1,this.isleftIndeterminate=!1)},handlerightCheckAllChange:function(e){e&&(this.isrightIndeterminate=!1),this.checkedRightData=this.checkedRightData.filter(function(t,i,a){return t.check=e,t}),this.rightCheckItems=e?this.checkedRightData:[]},rightCheckItemChange:function(){this.rightCheckItems=this.checkedRightData.filter(function(e,t,i){return 1==e.check}),this.rightCheckItems.length>0?this.rightCheckItems.length==this.checkedRightData.length?(this.checkrightAll=!0,this.isrightIndeterminate=!1):(this.checkrightAll=!1,this.isrightIndeterminate=!0):(this.checkrightAll=!1,this.isrightIndeterminate=!1)},changePositon:function(e){var t=this;"left"==e?(this.checkedRightData=this.checkedRightData.filter(function(e,i,a){var s=!1;return t.rightCheckItems.forEach(function(t,i){e.field==t.field&&(s=!0)}),!s}),this.rightCheckItems.forEach(function(e,i){e.check=!1,t.checkedLeftData.push(e)}),this.rightCheckItems=[],this.isrightIndeterminate=!1,this.checkrightAll=!1,this.leftCheckItemChange(),this.rightCheckItemChange()):(this.checkedLeftData=this.checkedLeftData.filter(function(e,i,a){var s=!1;return t.leftCheckItems.forEach(function(t,i){e.field==t.field&&(s=!0)}),!s}),this.leftCheckItems.forEach(function(e,i){e.check=!1,t.checkedRightData.push(e)}),this.leftCheckItems=[],this.isleftIndeterminate=!1,this.checkleftAll=!1,this.leftCheckItemChange(),this.rightCheckItemChange())}}},V=(i("95V8"),Object(v.a)(Q,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"编辑列",visible:e.visible,"append-to-body":!0,width:"600px"},on:{"update:visible":function(t){e.visible=t},close:e.handleCancel}},[i("div",{staticClass:"scene-name"},[e._v("您可通过拖拽管理列")]),e._v(" "),i("flexbox",{staticClass:"scene-list"},[i("div",{staticClass:"scene-list-box"},[i("flexbox",{staticClass:"scene-list-head"},[i("el-checkbox",{attrs:{indeterminate:e.isleftIndeterminate},on:{change:e.handleleftCheckAllChange},model:{value:e.checkleftAll,callback:function(t){e.checkleftAll=t},expression:"checkleftAll"}}),e._v(" "),i("div",{staticClass:"scene-list-head-name"},[e._v("显示的列")]),e._v(" "),i("div",{staticClass:"scene-list-head-detail"},[e._v(e._s(e.leftCheckItems.length+"/"+e.checkedLeftData.length))])],1),e._v(" "),i("div",{staticStyle:{position:"relative"}},[i("div",{staticClass:"scene-list-search"},[i("el-input",{attrs:{placeholder:"请输入",size:"small","suffix-icon":"el-icon-search"},on:{input:e.inputLeftChange},model:{value:e.leftInput,callback:function(t){e.leftInput=t},expression:"leftInput"}})],1),e._v(" "),i("div",{staticClass:"scene-list-body"},[i("draggable",{staticStyle:{"min-height":"100px"},attrs:{move:e.leftMove,options:{group:"list",forceFallback:!1,dragClass:"sortable-drag"}},on:{end:e.leftMoveEnd},model:{value:e.checkedLeftData,callback:function(t){e.checkedLeftData=t},expression:"checkedLeftData"}},e._l(e.checkedLeftData,function(t,a){return t.show?i("flexbox",{key:a,staticClass:"list-item"},[i("el-checkbox",{staticClass:"list-item-check",on:{change:e.leftCheckItemChange},model:{value:t.check,callback:function(i){e.$set(t,"check",i)},expression:"item.check"}}),e._v(" "),i("div",{staticClass:"list-item-name"},[e._v(e._s(t.name))])],1):e._e()}))],1)])],1),e._v(" "),i("div",{staticClass:"scene-middle-list"},[i("el-button",{staticClass:"scene-middle-left-button",class:{"scene-middle-button-select":e.rightCheckItems.length>0},attrs:{disabled:0==e.rightCheckItems.length},on:{click:function(t){e.changePositon("left")}}},[i("i",{staticClass:"el-icon-arrow-left scene-middle-icon"})]),e._v(" "),i("el-button",{staticClass:"scene-middle-right-button",class:{"scene-middle-button-select":e.leftCheckItems.length>0},attrs:{disabled:0==e.leftCheckItems.length},on:{click:function(t){e.changePositon("right")}}},[i("i",{staticClass:"el-icon-arrow-right scene-middle-icon"})])],1),e._v(" "),i("div",{staticClass:"scene-list-box"},[i("flexbox",{staticClass:"scene-list-head"},[i("el-checkbox",{attrs:{indeterminate:e.isrightIndeterminate},on:{change:e.handlerightCheckAllChange},model:{value:e.checkrightAll,callback:function(t){e.checkrightAll=t},expression:"checkrightAll"}}),e._v(" "),i("div",{staticClass:"scene-list-head-name"},[e._v("隐藏的列")]),e._v(" "),i("div",{staticClass:"scene-list-head-detail"},[e._v(e._s(e.rightCheckItems.length+"/"+e.checkedRightData.length))])],1),e._v(" "),i("div",{staticStyle:{position:"relative"}},[i("div",{staticClass:"scene-list-body"},[i("div",{staticClass:"scene-list-search"},[i("el-input",{attrs:{placeholder:"请输入",size:"small","suffix-icon":"el-icon-search"},on:{input:e.inputRightChange},model:{value:e.rightInput,callback:function(t){e.rightInput=t},expression:"rightInput"}})],1),e._v(" "),i("draggable",{staticStyle:{"min-height":"100px"},attrs:{move:e.rightMove,options:{group:"list",forceFallback:!1,dragClass:"sortable-drag"}},on:{end:e.rightMoveEnd},model:{value:e.checkedRightData,callback:function(t){e.checkedRightData=t},expression:"checkedRightData"}},e._l(e.checkedRightData,function(t,a){return t.show?i("flexbox",{key:a,staticClass:"list-item"},[i("el-checkbox",{staticClass:"list-item-check",on:{change:e.rightCheckItemChange},model:{value:t.check,callback:function(i){e.$set(t,"check",i)},expression:"item.check"}}),e._v(" "),i("div",{staticClass:"list-item-name"},[e._v(e._s(t.name))])],1):e._e()}))],1)])],1)]),e._v(" "),i("div",{staticClass:"handle-bar"},[i("div",{staticClass:"handle-bar-save"},[i("el-button",{nativeOn:{click:function(t){return e.handleCancel(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return e.handleConfirm(t)}}},[e._v("保存")])],1)])],1)},[],!1,null,"315acad0",null));V.options.__file="FieldsSet.vue";var J=V.exports,W=i("wd/R"),P=i.n(W);t.a={components:{CRMListHead:w,CRMTableHead:H,FieldsSet:J},data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-240,list:[],fieldList:[],currentPage:1,pageSize:15,pageSizes:[15,30,45,60],total:0,search:"",rowID:"",rowType:"",showDview:!1,formatterRules:{},filterObj:{},scene_id:"",scene_name:"",showFieldSet:!1,selectionList:[]}},computed:l()({},Object(o.b)(["crm"])),mounted:function(){var e=this;window.onresize=function(){var t=document.documentElement.clientHeight,i=s()(e.filterObj).length>0?310:240;e.tableHeight=t-i},this.crm[this.crmType].index&&(this.isSeas?this.getFieldList():this.loading=!0)},methods:{getList:function(){var e=this;this.loading=!0;var t=this.getIndexRequest(),i={page:this.currentPage,limit:this.pageSize,search:this.search};for(var a in this.scene_id&&(i.scene_id=this.scene_id),this.filterObj)i[a]=this.filterObj[a];t(i).then(function(t){"customer"===e.crmType?e.list=t.data.list.map(function(e){return e.show=!1,e}):("contract"===e.crmType&&(e.moneyData=t.data.data),e.list=t.data.list),e.total=t.data.dataCount,e.loading=!1}).catch(function(){e.loading=!1})},getIndexRequest:function(){return"leads"===this.crmType?d.e:"customer"===this.crmType?this.isSeas?r.h:r.f:"contacts"===this.crmType?u.e:"business"===this.crmType?C.c:"contract"===this.crmType?k.c:"product"===this.crmType?m.d:"receivables"===this.crmType?I.c:void 0},getFieldList:function(){var e=this;if(0==this.fieldList.length){this.loading=!0;var t={types:"crm_"+this.crmType,module:"crm",action:this.isSeas?"pool":"index"};t.controller=this.crmType,Object(h.v)(t).then(function(t){for(var i=0;i<t.data.length;i++){var a=t.data[i];if("date"===a.form_type){e.formatterRules[a.field]={formatter:function(e){return"0000-00-00"==e&&(e=""),e}}}else if("datetime"===a.form_type){e.formatterRules[a.field]={formatter:function(e){return 0!=e&&e?P()(Object(N.e)(e)).format("YYYY-MM-DD HH:mm:ss"):""}}}else if("create_user_id"===a.field||"owner_user_id"===a.field){e.formatterRules[a.field]={type:"crm",formatter:function(e){return e?e.realname:""}}}else if("user"===a.form_type){e.formatterRules[a.field]={type:"crm",formatter:function(e){if(e){for(var t="",i=0;i<e.length;i++)t=t+e[i].realname+(i===e.length-1?"":",");return t}return""}}}else if("structure"===a.form_type){e.formatterRules[a.field]={type:"crm",formatter:function(e){if(e){for(var t="",i=0;i<e.length;i++)t=t+e[i].name+(i===e.length-1?"":",");return t}return""}}}else if("contacts_id"===a.field||"customer_id"===a.field||"business_id"===a.field||"contract_id"===a.field){e.formatterRules[a.field]={type:"crm",formatter:function(e){return e?e.name:""}}}else if("status_id"===a.field||"type_id"===a.field||"category_id"===a.field){e.formatterRules[a.field]={type:"crm",formatter:function(e){return e||""}}}var s=0;s=a.width?a.width:a.name&&a.name.length<=6?15*a.name.length+45:140,e.fieldList.push({prop:a.field,label:a.name,width:s})}e.getList()}).catch(function(){e.loading=!1})}else this.getList()},fieldFormatter:function(e,t){var i=this.formatterRules[t.property];return i?"crm"===i.type?t.property?i.formatter(e[t.property+"_info"])||"--":"":i.formatter(e[t.property])||"--":e[t.property]||"--"},crmSearch:function(e){this.search=e,this.fieldList.length&&this.getList()},handleRowClick:function(e,t,i){if("selection"!==t.type)if("leads"===this.crmType)"name"===t.property?(this.rowID=e.leads_id,this.showDview=!0):this.showDview=!1;else if("customer"===this.crmType){if("business-check"===t.property&&e.business_count>0)return;"name"===t.property?(this.rowID=e.customer_id,this.rowType="customer",this.showDview=!0):this.showDview=!1}else"contacts"===this.crmType?"customer_id"===t.property?(this.rowID=e.customer_id_info.customer_id,this.rowType="customer",this.showDview=!0):"name"===t.property?(this.rowID=e.contacts_id,this.rowType="contacts",this.showDview=!0):this.showDview=!1:"business"===this.crmType?"customer_id"===t.property?(this.rowID=e.customer_id_info.customer_id,this.rowType="customer",this.showDview=!0):"name"===t.property?(this.rowID=e.business_id,this.rowType="business",this.showDview=!0):this.showDview=!1:"contract"===this.crmType?"customer_id"===t.property?(this.rowID=e.customer_id_info.customer_id,this.rowType="customer",this.showDview=!0):"business_id"===t.property?(this.rowID=e.business_id_info.business_id,this.rowType="business",this.showDview=!0):"contacts_id"===t.property?(this.rowID=e.contacts_id_info.contacts_id,this.rowType="contacts",this.showDview=!0):"num"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):this.showDview=!1:"product"===this.crmType?"name"===t.property?(this.rowID=e.product_id,this.showDview=!0):this.showDview=!1:"receivables"===this.crmType&&("customer_id"===t.property?(this.rowID=e.customer_id_info.customer_id,this.rowType="customer",this.showDview=!0):"contract_id"===t.property?(this.rowID=e.contract_id,this.rowType="contract",this.showDview=!0):"number"===t.property?(this.rowID=e.receivables_id,this.rowType="receivables",this.showDview=!0):this.showDview=!1)},exportInfos:function(){var e={search:this.search};for(var t in this.scene_id&&(e.scene_id=this.scene_id),this.filterObj)e[t]=this.filterObj[t];(this.isSeas?r.i:{customer:r.d,leads:d.c,contacts:u.c,product:m.b}[this.crmType])(e).then(function(e){var t=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),i=document.createElement("a"),a=window.URL.createObjectURL(t);i.href=a,i.download=decodeURI(e.headers["content-disposition"].split("filename=")[1])||"",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(a)}).catch(function(){})},handleFilter:function(e){this.filterObj=e;var t=document.documentElement.clientHeight,i=s()(this.filterObj).length>0?310:240;this.tableHeight=t-i,this.currentPage=1,this.getList()},handleScene:function(e){this.scene_id=e.id,this.scene_name=e.name,this.currentPage=1,this.getFieldList()},handleHandle:function(e){"alloc"!==e.type&&"get"!==e.type&&"transfer"!==e.type&&"transform"!==e.type&&"delete"!==e.type&&"put_seas"!==e.type||(this.showDview=!1),"edit"!==e.type&&this.getList()},setSave:function(){this.fieldList=[],this.getFieldList()},listHeadHandle:function(e){"save-success"===e.type&&(this.currentPage=1,this.getList())},handleTableSet:function(){this.showFieldSet=!0},handleSelectionChange:function(e){this.selectionList=e,this.$refs.crmTableHead.headSelectionChange(e)},handleHeaderDragend:function(e,t,i,a){var s=this;if(i.property){var n=this.isSeas?this.crmType+"_pool":this.crmType;Object(h.e)({types:"crm_"+n,field:i.property,width:e}).then(function(e){s.$message({type:"success",message:e.data})}).catch(function(){})}},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.currentPage=e,this.getList()},getStatusStyle:function(e){return 0==e?{"border-color":"#E6A23C","background-color":"#FDF6EC",color:"#E6A23C"}:1==e?{"border-color":"#409EFF","background-color":"#ECF5FF",color:"#409EFF"}:2==e?{"border-color":"#67C23A","background-color":"#F0F9EB",color:"#67C23A"}:3==e?{"border-color":"#F56C6B","background-color":"#FEF0F0",color:"#F56C6B"}:4==e?{"background-color":"#FFFFFF"}:void 0}},beforeDestroy:function(){}}},"l/97":function(e,t,i){},mBo6:function(e,t,i){},migV:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkJGNkIxREZBNDE2NTExRTlBQkY1RjdBNzY2QThDRUY2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkJGNkIxREZCNDE2NTExRTlBQkY1RjdBNzY2QThDRUY2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QkY2QjFERjg0MTY1MTFFOUFCRjVGN0E3NjZBOENFRjYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkY2QjFERjk0MTY1MTFFOUFCRjVGN0E3NjZBOENFRjYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7u8NAUAAABfklEQVR42qSVsUoDQRCG5y5imfo0gk0C9la+RYQY4gOENNokkOALCBqIFlrlBYJBjfgaimCbKxSUpE4phDg/zJLd2wmnuR9+WHZmv9ud25sLFo0GKdpkl8UH7G32D/uL/cZ+ZD/JnKMNBXbIvmQXlYfsiY/ZMbvDfrCTQmucY19IQpHShZx7WZPTdnjObtP/ZdZ07B1W1oTZ0IoBojZXTrhQIGq1iPJ5fynmEEOOq2uwADxi7zihWo2oVCJqNl0oxphDDDmu8IRqKFfDVb9PNJ0SRdESamCYQww5vsoB38MPHuyqR7MBkBn3ekSzmQb8xA4jtcxYgIVmp+kwaCvUbnsWAThRI8kjJ2uqawLgeyoMx7SPvxr6AuDIm67X/Zola4ocXyMAh9JFlhoMiMZj/wUYKGLIcfUNViDtC5f7LuP7qAJovmXsspsB1hWG077O2DdrwG5lrdcP5+xT6RrxH0CxlOpE1q7s2Giaz5KM7r0vH74p/Kv8AobaR/ErwAAhLXvaJ0ohPQAAAABJRU5ErkJggg=="},nWoq:function(e,t,i){},"no1/":function(e,t,i){"use strict";var a=i("yl5+");i.n(a).a},oTr5:function(e,t,i){},oWS4:function(e,t,i){"use strict";var a=i("7Qib"),s=i("8GhS"),n={name:"index",components:{XhUserCell:s.p,XhProuctCate:s.j},props:{dialogVisible:{type:Boolean,required:!0,default:!1},fieldList:{type:Array,required:!0,default:[]},obj:{default:{},required:!0},isSeas:{type:Boolean,default:!1},crmType:{type:String,default:""}},data:function(){return{form:[],formCopy:[],visible:!1,showErrors:!1,saveChecked:!1,saveDefault:!1,saveName:null}},watch:{dialogVisible:{handler:function(e){e&&(this.form=Object(a.h)(this.obj.form),0==this.form.length&&this.form.push({field:"",name:"",form_type:"",condition:"is",value:"",typeOption:[],statusOption:[],type_id:"",status_id:""}),this.saveChecked=!1,this.saveDefault=!1,this.saveName=null),this.visible=this.dialogVisible},deep:!0,immediate:!0},form:function(){this.$nextTick(function(){var e=document.getElementById("filter-container");e.scrollTop=e.scrollHeight})}},methods:{typeOptionsChange:function(e){if(e.type_id){var t=e.typeOption.find(function(t){return t.type_id===e.type_id});e.statusOption=t.statusList||[]}else e.statusOption=[];e.status_id=""},arrayValueChange:function(e){e.value.length>0?(e.item.value=e.value,e.item.valueContent=e.valueContent):e.item.value=[]},calConditionOptions:function(e,t){return"select"==e||"checkbox"==e||"user"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1}]:"module"==e||"text"==e||"textarea"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1}]:"floatnumber"==e||"number"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1},{value:"is_empty",label:"为空",disabled:!1},{value:"is_not_empty",label:"不为空",disabled:!1},{value:"gt",label:"大于",disabled:!1},{value:"egt",label:"大于等于",disabled:!1},{value:"lt",label:"小于",disabled:!1},{value:"elt",label:"小于等于",disabled:!1}]:"category"==e?[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1}]:[{value:"is",label:"等于",disabled:!1},{value:"isnot",label:"不等于",disabled:!1},{value:"contains",label:"包含",disabled:!1},{value:"not_contain",label:"不包含",disabled:!1},{value:"start_with",label:"开始于",disabled:!1},{value:"end_with",label:"结束于",disabled:!1},{value:"is_empty",label:"为空",disabled:!1},{value:"is_not_empty",label:"不为空",disabled:!1},{value:"gt",label:"大于",disabled:!1},{value:"egt",label:"大于等于",disabled:!1},{value:"lt",label:"小于",disabled:!1},{value:"elt",label:"小于等于",disabled:!1}]},fieldChange:function(e){var t=this.fieldList.find(function(t){return t.field===e.field});t&&(e.form_type=t.form_type,e.name=t.name,"business_type"==e.form_type?(e.typeOption=t.setting,e.statusOption=[],e.type_id="",e.status_id=""):"select"==e.form_type?e.setting=t.setting||[]:"date"!==e.form_type&&"datetime"!==e.form_type&&"user"!==e.form_type&&"category"!==e.form_type||(e.value=[])),this.form.filter(function(t){return t.field===e.field}).length>1?this.showErrors=!0:this.showErrors=!1},handleCancel:function(){this.$emit("update:dialogVisible",!1)},handleConfirm:function(){if(this.showErrors)this.$message.error("筛选条件中有重复项!");else if(!this.saveChecked||this.saveName&&""!==this.saveName){for(var e=0;e<this.form.length;e++){var t=this.form[e];if(!t.field||""===t.field)return void this.$message.error("要筛选的字段名称不能为空!");if("business_type"==t.form_type){if(!t.type_id&&!t.status_id)return void this.$message.error("请输入筛选条件的值!")}else if("date"==t.form_type||"datetime"==t.form_type||"user"==t.form_type||"category"==t.form_type){if(!t.value||0===t.value.length)return void this.$message.error("请输入筛选条件的值!")}else if(!t.value)return void this.$message.error("请输入筛选条件的值!")}var i={};this.form.forEach(function(e){"date"==e.form_type?i[e.field]={start_date:e.value[0],end_date:e.value[1],form_type:e.form_type,name:e.name}:"datetime"==e.form_type?i[e.field]={start:Object(a.d)(e.value[0]),end:Object(a.d)(e.value[1]),form_type:e.form_type,name:e.name}:"business_type"==e.form_type?i[e.field]={type_id:e.type_id,status_id:e.status_id,form_type:e.form_type,name:e.name}:"user"==e.form_type?i[e.field]={condition:e.condition,value:e.value[0].id,form_type:e.form_type,name:e.name}:"category"==e.form_type?i[e.field]={value:e.value[e.value.length-1],form_type:e.form_type,name:e.name}:i[e.field]={condition:e.condition,value:e.value,form_type:e.form_type,name:e.name}});var s={obj:i,form:this.form,saveChecked:this.saveChecked,saveDefault:this.saveDefault,saveName:this.saveName};this.$emit("filter",s)}else this.$message.error("场景名称不能为空!")},handleAdd:function(){this.form.push({field:"",condition:"is",value:"",form_type:"",setting:[],typeOption:[],statusOption:[],type_id:"",status_id:""})},handleDelete:function(e){var t=this;this.$confirm("您确定要删除这一条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.form.splice(e,1)}).catch(function(){t.$message({type:"info",message:"已取消删除"})})}}},l=(i("Ymr4"),i("KHd+")),o=Object(l.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"高级筛选",visible:e.visible,width:"800px"},on:{"update:visible":function(t){e.visible=t},close:e.handleCancel}},[i("div",{staticStyle:{"margin-bottom":"10px"}},[e._v("筛选条件")]),e._v(" "),i("el-form",{staticClass:"filter-container",attrs:{id:"filter-container"}},[i("el-form-item",[e._l(e.form,function(t,a){return[i("el-row",{key:a},[i("el-col",{attrs:{span:8}},[i("el-select",{attrs:{placeholder:"请选择要筛选的字段名"},on:{change:function(i){e.fieldChange(t)}},model:{value:t.field,callback:function(i){e.$set(t,"field",i)},expression:"formItem.field"}},e._l(e.fieldList,function(e){return i("el-option",{key:e.field,attrs:{label:e.name,value:e.field}})}))],1),e._v(" "),"date"!==t.form_type&&"datetime"!==t.form_type&&"business_type"!==t.form_type&&"category"!==t.form_type?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),"date"!==t.form_type&&"datetime"!==t.form_type&&"business_type"!==t.form_type&&"category"!==t.form_type?i("el-col",{attrs:{span:4}},[i("el-select",{attrs:{placeholder:"请选择范围"},model:{value:t.condition,callback:function(i){e.$set(t,"condition",i)},expression:"formItem.condition"}},e._l(e.calConditionOptions(t.form_type,t),function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:1}},[e._v(" ")]):e._e(),e._v(" "),"business_type"==t.form_type?i("el-col",{attrs:{span:4}},[i("el-select",{attrs:{placeholder:"请选择"},on:{change:function(i){e.typeOptionsChange(t)}},model:{value:t.type_id,callback:function(i){e.$set(t,"type_id",i)},expression:"formItem.type_id"}},e._l(t.typeOption,function(e){return i("el-option",{key:e.type_id,attrs:{label:e.name,value:e.type_id}})}))],1):e._e(),e._v(" "),i("el-col",{attrs:{span:1}},[e._v(" ")]),e._v(" "),i("el-col",{attrs:{span:"datetime"===t.form_type||"date"===t.form_type?13:8}},["select"===t.form_type?i("el-select",{attrs:{placeholder:"请选择筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}},e._l(t.setting,function(e){return i("el-option",{key:e,attrs:{label:e,value:e}})})):"date"===t.form_type||"datetime"===t.form_type?i("el-date-picker",{staticStyle:{padding:"0px 10px"},attrs:{"value-format":"date"===t.form_type?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",type:"date"===t.form_type?"daterange":"datetimerange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}}):"business_type"===t.form_type?i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.status_id,callback:function(i){e.$set(t,"status_id",i)},expression:"formItem.status_id"}},e._l(t.statusOption,function(e){return i("el-option",{key:e.status_id,attrs:{label:e.name,value:e.status_id}})})):"user"===t.form_type?i("xh-user-cell",{attrs:{item:t,infoParams:{m:"crm",c:e.crmType,a:"index"}},on:{"value-change":e.arrayValueChange}}):"category"===t.form_type?i("xh-prouct-cate",{attrs:{item:t},on:{"value-change":e.arrayValueChange}}):i("el-input",{attrs:{placeholder:"请输入筛选条件"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"formItem.value"}})],1),e._v(" "),i("el-col",{staticClass:"delete",attrs:{span:1}},[i("i",{staticClass:"el-icon-error delete-btn",on:{click:function(t){e.handleDelete(a)}}})])],1)]})],2)],1),e._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:e.showErrors,expression:"showErrors"}],staticClass:"el-icon-warning warning-info"},[i("span",{staticClass:"desc"},[e._v("筛选条件中有重复项!")])]),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:e.handleAdd}},[e._v("+ 添加筛选条件")]),e._v(" "),e.isSeas?e._e():i("div",{staticClass:"save"},[i("el-checkbox",{model:{value:e.saveChecked,callback:function(t){e.saveChecked=t},expression:"saveChecked"}},[e._v("保存为场景")]),e._v(" "),i("el-input",{directives:[{name:"show",rawName:"v-show",value:e.saveChecked,expression:"saveChecked"}],staticClass:"name",attrs:{maxlength:10,placeholder:"请输入场景名称,最多10个字符"},model:{value:e.saveName,callback:function(t){e.saveName="string"==typeof t?t.trim():t},expression:"saveName"}}),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.saveChecked,expression:"saveChecked"}],staticClass:"save-setting"},[i("el-checkbox",{model:{value:e.saveDefault,callback:function(t){e.saveDefault=t},expression:"saveDefault"}},[e._v("设置为默认")])],1)],1),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleCancel}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v("确 定")])],1)],1)},[],!1,null,"2d36c92d",null);o.options.__file="index.vue";t.a=o.exports},pRrg:function(e,t,i){},ppJE:function(e,t,i){"use strict";var a=i("vG5h"),s=i("Ew9n"),n=i("F03V"),l=i("UEWd"),o=i("QJC7"),c=i("8KPp"),r=i("gd5k"),d=i("aQg/"),u=i("y9lt"),m=i("KzkL"),h=i("7Qib"),f=i("i68b"),p={name:"customer-follow",components:{MixAdd:l.a,RecordLog:o.a,JournalLog:c.a,ExamineLog:r.a,TaskLog:d.a,ScheduleLog:u.a},mixins:[f.a],props:{id:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1}},watch:{},data:function(){return{sendLoading:!1,next_time:"",is_event:!1,logType:"record",logTypes:[{type:"record",name:"跟进记录"},{type:"log",name:"日志"},{type:"examine",name:"审批"},{type:"task",name:"任务"},{type:"schedule",name:"日程"}]}},computed:{componentsName:function(){return"record"==this.logType?"RecordLog":"log"==this.logType?"JournalLog":"examine"==this.logType?"ExamineLog":"task"==this.logType?"TaskLog":"schedule"==this.logType?"ScheduleLog":""}},mounted:function(){},activated:function(){},deactivated:function(){},methods:{handleTypeDrop:function(e){this.followType=e},logTabsClick:function(e,t){this.logType=e.type},sendInfo:function(){this.$refs.mixadd.$emit("submit-info")},submitInfo:function(e){var t=this;if(!this.is_event||this.next_time){var i={};i.types="crm_"+this.crmType,i.types_id=this.id,i.content=e.content,i.category=this.followType;var a=e.images.map(function(e,t,i){return e.file_id}),s=e.files.map(function(e,t,i){return e.file_id}),n=e.business.map(function(e,t,i){return e.business_id}),l=e.contacts.map(function(e,t,i){return e.contacts_id});i.file_id=a.concat(s),i.business_ids=n,i.contacts_ids=l,this.next_time&&(i.is_event=this.is_event?1:0,i.next_time=Object(h.d)(this.next_time)),this.sendLoading=!0,Object(m.l)(i).then(function(e){t.sendLoading=!1,t.$message.success(e.data),t.$refs.mixadd.resetInfo(),t.is_event=!1,t.next_time="",t.$bus.emit("follow-log-refresh",{type:"record-log"})}).catch(function(){t.sendLoading=!1})}else this.$message.error("请选择下次联系时间")}}},v=(i("dNm9"),i("KHd+")),g=Object(v.a)(p,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"f-container"},[e.isSeas?e._e():i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.sendLoading,expression:"sendLoading"}]},[i("mix-add",{ref:"mixadd",attrs:{crmType:e.crmType,id:e.id,"show-relative-business":!0,"show-relative-contacts":!0},on:{"mixadd-info":e.submitInfo}}),e._v(" "),i("flexbox",{staticClass:"se-section"},[i("div",{staticClass:"se-name"},[e._v("记录类型")]),e._v(" "),i("el-dropdown",{staticStyle:{"margin-right":"20px"},attrs:{trigger:"click"},on:{command:e.handleTypeDrop}},[i("flexbox",{staticClass:"se-select"},[i("div",{staticClass:"se-select-name"},[e._v(e._s(e.followType?e.followType:"请选择"))]),e._v(" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right",staticStyle:{color:"#ccc"}})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.followTypes,function(t,a){return i("el-dropdown-item",{key:a,attrs:{command:t.type}},[e._v(e._s(t.name))])}))],1),e._v(" "),i("div",{staticClass:"se-name"},[e._v("下次联系时间")]),e._v(" "),i("el-date-picker",{staticClass:"se-datepicker",attrs:{type:"datetime",placeholder:"选择日期","default-value":new Date,"value-format":"yyyy-MM-dd HH:mm:ss",editable:!1},model:{value:e.next_time,callback:function(t){e.next_time=t},expression:"next_time"}}),e._v(" "),i("el-checkbox",{model:{value:e.is_event,callback:function(t){e.is_event=t},expression:"is_event"}},[e._v("添加到日程提醒")]),e._v(" "),i("el-button",{staticClass:"se-send",attrs:{type:"primary"},nativeOn:{click:function(t){return e.sendInfo(t)}}},[e._v("发布")])],1)],1),e._v(" "),i("div",{staticClass:"log-cont"},[i("flexbox",{staticStyle:{"border-bottom":"1px solid #E6E6E6"}},e._l(e.logTypes,function(t,a){return i("flexbox",{key:a,staticStyle:{width:"auto"},nativeOn:{click:function(i){e.logTabsClick(t,a)}}},[i("div",{staticClass:"log-tabs-item",style:{color:e.logType==t.type?"#F18C70":"#777"}},[e._v(e._s(t.name))]),e._v(" "),e.logTypes.length-1!=a?i("div",{staticClass:"log-tabs-line"}):e._e()])})),e._v(" "),i("keep-alive",[i(e.componentsName,{tag:"component",attrs:{id:e.id,crmType:e.crmType}})],1)],1)])},[],!1,null,"9330eabc",null);g.options.__file="CustomerFollow.vue";var b=g.exports,y=i("U05J"),_=i("/U9q"),w=i("5j45"),C=i("cYid"),k=i("+NTD"),I=i("C+sD"),A=i("8DbX"),x=i("DUlf"),D=i("EgJF"),T=(i("wd/R"),i("4+0Q")),R={name:"customer-detail",components:{SlideView:s.a,CustomerFollow:b,CRMDetailHead:n.a,CRMBaseInfo:y.a,RelativeContacts:_.a,RelativeBusiness:w.a,RelativeContract:C.a,RelativeReturnMoney:k.a,RelativeFiles:I.a,RelativeHandle:A.a,RelativeTeam:x.a,CRMCreateView:D.default},mixins:[T.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"customer",detailData:{},headDetails:[{title:"客户级别",value:""},{title:"成交状态",value:""},{title:"负责人",value:""},{title:"更新时间",value:""}],tabCurrentName:"followlog",isCreate:!1}},computed:{tabName:function(){return"followlog"==this.tabCurrentName?"customer-follow":"basicinfo"==this.tabCurrentName?"c-r-m-base-info":"contacts"==this.tabCurrentName?"relative-contacts":"team"==this.tabCurrentName?"relative-team":"business"==this.tabCurrentName?"relative-business":"contract"==this.tabCurrentName?"relative-contract":"returnedmoney"==this.tabCurrentName?"relative-return-money":"file"==this.tabCurrentName?"relative-files":"operationlog"==this.tabCurrentName?"relative-handle":""},tabnames:function(){var e=[];return e.push({label:"跟进记录",name:"followlog"}),this.crm.customer&&this.crm.customer.read&&e.push({label:"基本信息",name:"basicinfo"}),this.crm.contacts&&this.crm.contacts.index&&e.push({label:"联系人",name:"contacts"}),e.push({label:"相关团队",name:"team"}),this.crm.business&&this.crm.business.index&&e.push({label:"商机",name:"business"}),this.crm.contract&&this.crm.contract.index&&e.push({label:"合同",name:"contract"}),this.crm.receivables&&this.crm.receivables.index&&e.push({label:"回款信息",name:"returnedmoney"}),e.push({label:"附件",name:"file"}),e.push({label:"操作记录",name:"operationlog"}),e}},mounted:function(){},methods:{getDetial:function(){var e=this;this.loading=!0,Object(a.k)({id:this.id}).then(function(t){e.loading=!1,e.detailData=t.data,e.headDetails[0].value=t.data.level,e.headDetails[1].value=t.data.deal_status,e.headDetails[2].value=e.isSeas?"- -":t.data.owner_user_id_info?t.data.owner_user_id_info.realname:"",e.headDetails[3].value=t.data.update_time}).catch(function(){e.loading=!1})},hideView:function(){this.$emit("hide-view")},handleClick:function(e,t){},editSaveSuccess:function(){this.$emit("handle",{type:"save-success"}),this.getDetial()}}},L=(i("Bb26"),Object(v.a)(R,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!e.canShowDetail,expression:"!canShowDetail"}],attrs:{listenerIDs:e.listenerIDs,noListenerIDs:e.noListenerIDs,noListenerClass:e.noListenerClass,"body-style":{padding:0,height:"100%"}},on:{"side-close":e.hideView}},[e.canShowDetail?i("flexbox",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"d-container",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限",direction:"column",align:"stretch"}},[i("c-r-m-detail-head",{attrs:{crmType:"customer",isSeas:e.isSeas,detail:e.detailData,headDetails:e.headDetails,id:e.id},on:{handle:e.detailHeadHandle,close:e.hideView}}),e._v(" "),i("div",{staticClass:"tabs"},[i("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.tabCurrentName,callback:function(t){e.tabCurrentName=t},expression:"tabCurrentName"}},e._l(e.tabnames,function(e,t){return i("el-tab-pane",{key:t,attrs:{label:e.label,name:e.name}})}))],1),e._v(" "),i("div",{staticClass:"t-loading-content",attrs:{id:"follow-log-content"}},[i("keep-alive",[i(e.tabName,{tag:"component",attrs:{crmType:"customer",detail:e.detailData,id:e.id,isSeas:e.isSeas}})],1)],1)],1):e._e(),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"customer",action:{type:"update",id:this.id}},on:{"save-success":e.editSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"b2dbb7a4",null));L.options.__file="CustomerDetail.vue";t.a=L.exports},r7fL:function(e,t,i){},rl4O:function(e,t){e.exports="data:image/png;base64,iVBORw0K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lCMTFFODgxNkQ4QzY4NjE2MTlCMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7neeY0AAABL0lEQVR42syUv0tCURSA1Vzam5ya+h8ag5DG3GpqqsAiwVFoECJc+jGpCFZrLTpFUjQ7PPwjClxyiCY3+y6cB5fLud0rOXjhG965j++de865L5skSWaRK5dZ8JpHmIUG/MAA1v4jNLIWVKAO6/CmSWOFO3AAJbiCLVjVpLHCV9iAF3ke+6S5wDFr8Az78Ons29LHkNDImnAO3/AAZeU9I+3AZhrI/9EAU7Nd6egIbuEJJk5tL2RPzVCTpfGZ0qieZF/TMvTJzmT+TqzsbFnZ/pidYUORHcKNzF87JHMzPJXUB1ZsBY6gGyNzhUM4lhEYS6ztqZkqc4+8B1N4h4LSgH5I5gq/YFuRprL7kEwbm4kjrYrsLkbmuymp9AMu4VpGZhZz6fOeuJEWl+KP/SvAAHR5UyjSji44AAAAAElFTkSuQmCC"},rzp2:function(e,t,i){"use strict";var a=i("hW97");i.n(a).a},s7Zx:function(e,t,i){},svWA:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnM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/Ao2VYg00oZzQrS1+zDOvak2pGw6r0dWsPe6qpO/Ur8OExGoZ9WIF5ac2r15bI3YAnOIJrHZirgmXYgRfp2n/d5dR0Flb1IGzLrKODqyjNXpbH4Xf6pyJXBEW/2GGp4PgWYAAHtEsSK3MhmAAAAABJRU5ErkJggg=="},tCRV:function(e,t,i){"use strict";var a=i("JwrD");i.n(a).a},tp26:function(e,t,i){},wWfP:function(e,t,i){},woQC:function(e,t,i){},woiz:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjhGQTE4Q0E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ldCBlbmQ9InIiPz4ZL3N5AAABQklEQVR42mJ0O3ueAQtgA+IAKLYEYikg/gXET4AYpGE9EG+EiqEAFiyGBQJxFxCrYLFEA4ojgfgOEJcD8TpkRUxIbGYg7oQqUGEgDEBq1kL1MGNzYRsQlzGQDmB6ypFdGEKmYciGhsAMBIVNPz7VvWqqYEwATACZBfJyKBDL4FOpw8NNjCulgTiMCZo0qAUCQAaaUtFAE5CXJbCFGTZv7jQygLOvfPnKUHzrNroSSSZsqZ0YwIhDHOTC50DMiyyIbjPMZe7nLhCy5znIhZeoGIZnQAZuoKKBG0AGroaWIjgBKAKuAjEB8BRkFgs0UoqAeBUulVhiExsoBOKfsLwMcmU3BV7thpqBUnxVAvEUMgybCtWLUR7+BeJcaKlxhwiD7kDLgRyoXpwlNqjQ3AxVDCq9jaEZHxbwZ6FVwGpsmQIgwAD7IEenGBpwRwAAAABJRU5ErkJggg=="},"xfX+":function(e,t,i){"use strict";var a=i("6zBA"),s=i("Ew9n"),n=i("F03V"),l=i("UEWd"),o=i("QJC7"),c=i("8KPp"),r=i("gd5k"),d=i("aQg/"),u=i("y9lt"),m=i("KzkL"),h=i("7Qib"),f=i("i68b"),p={name:"contract-follow",components:{MixAdd:l.a,RecordLog:o.a,JournalLog:c.a,ExamineLog:r.a,TaskLog:d.a,ScheduleLog:u.a},mixins:[f.a],watch:{},props:{id:[String,Number],crmType:{type:String,default:""}},data:function(){return{sendLoading:!1,next_time:"",is_event:!1,logType:"record",logTypes:[{type:"record",name:"跟进记录"},{type:"log",name:"日志"},{type:"examine",name:"审批"},{type:"task",name:"任务"},{type:"schedule",name:"日程"}]}},computed:{componentsName:function(){return"record"==this.logType?"RecordLog":"log"==this.logType?"JournalLog":"examine"==this.logType?"ExamineLog":"task"==this.logType?"TaskLog":"schedule"==this.logType?"ScheduleLog":""}},mounted:function(){},activated:function(){},deactivated:function(){},methods:{handleTypeDrop:function(e){this.followType=e},logTabsClick:function(e,t){this.logType=e.type},sendInfo:function(){this.$refs.mixadd.$emit("submit-info")},submitInfo:function(e){var t=this;if(!this.is_event||this.next_time){var i={};i.types="crm_"+this.crmType,i.types_id=this.id,i.content=e.content,i.category=this.followType;var a=e.images.map(function(e,t,i){return e.file_id}),s=e.files.map(function(e,t,i){return e.file_id});i.file_id=a.concat(s),this.next_time&&(i.is_event=this.is_event?1:0,i.next_time=Object(h.d)(this.next_time)),this.sendLoading=!0,Object(m.l)(i).then(function(e){t.sendLoading=!1,t.$message.success(e.data),t.$refs.mixadd.resetInfo(),t.is_event=!1,t.next_time="",t.$bus.emit("follow-log-refresh",{type:"record-log"})}).catch(function(){t.sendLoading=!1})}else this.$message.error("请选择下次联系时间")}}},v=(i("iK2b"),i("KHd+")),g=Object(v.a)(p,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"f-container"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.sendLoading,expression:"sendLoading"}]},[i("mix-add",{ref:"mixadd",attrs:{crmType:e.crmType,id:e.id},on:{"mixadd-info":e.submitInfo}}),e._v(" "),i("flexbox",{staticClass:"se-section"},[i("div",{staticClass:"se-name"},[e._v("记录类型")]),e._v(" "),i("el-dropdown",{staticStyle:{"margin-right":"20px"},attrs:{trigger:"click"},on:{command:e.handleTypeDrop}},[i("flexbox",{staticClass:"se-select"},[i("div",{staticClass:"se-select-name"},[e._v(e._s(e.followType?e.followType:"请选择"))]),e._v(" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right",staticStyle:{color:"#ccc"}})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.followTypes,function(t,a){return i("el-dropdown-item",{key:a,attrs:{command:t.type}},[e._v(e._s(t.name))])}))],1),e._v(" "),i("div",{staticClass:"se-name"},[e._v("下次联系时间")]),e._v(" "),i("el-date-picker",{staticClass:"se-datepicker",attrs:{type:"datetime",placeholder:"选择日期","default-value":new Date,"value-format":"yyyy-MM-dd HH:mm:ss",editable:!1},model:{value:e.next_time,callback:function(t){e.next_time=t},expression:"next_time"}}),e._v(" "),i("el-checkbox",{model:{value:e.is_event,callback:function(t){e.is_event=t},expression:"is_event"}},[e._v("添加到日程提醒")]),e._v(" "),i("el-button",{staticClass:"se-send",attrs:{type:"primary"},nativeOn:{click:function(t){return e.sendInfo(t)}}},[e._v("发布")])],1)],1),e._v(" "),i("div",{staticClass:"log-cont"},[i("flexbox",{staticStyle:{"border-bottom":"1px solid #E6E6E6"}},e._l(e.logTypes,function(t,a){return i("flexbox",{key:a,staticStyle:{width:"auto"},nativeOn:{click:function(i){e.logTabsClick(t,a)}}},[i("div",{staticClass:"log-tabs-item",style:{color:e.logType==t.type?"#F18C70":"#777"}},[e._v(e._s(t.name))]),e._v(" "),e.logTypes.length-1!=a?i("div",{staticClass:"log-tabs-line"}):e._e()])})),e._v(" "),i("keep-alive",[i(e.componentsName,{tag:"component",attrs:{id:e.id,crmType:e.crmType}})],1)],1)])},[],!1,null,"6d01b3b4",null);g.options.__file="ContractFollow.vue";var b=g.exports,y=i("U05J"),_=i("8DbX"),w=i("DUlf"),C=i("SE13"),k=i("+NTD"),I=i("C+sD"),A=i("3biH"),x=i("EgJF"),D=(i("wd/R"),i("4+0Q")),T={name:"contract-detail",components:{SlideView:s.a,CRMDetailHead:n.a,ContractFollow:b,CRMBaseInfo:y.a,RelativeHandle:_.a,RelativeTeam:w.a,RelativeProduct:C.a,RelativeReturnMoney:k.a,RelativeFiles:I.a,ExamineInfo:A.a,CRMCreateView:x.default},mixins:[D.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"contract",detailData:{},headDetails:[{title:"合同编号",value:""},{title:"客户名称",value:""},{title:"合同金额(元)",value:""},{title:"下单时间",value:""},{title:"回款金额(元)",value:""},{title:"负责人",value:""}],tabCurrentName:"followlog",isCreate:!1}},computed:{tabName:function(){return"followlog"==this.tabCurrentName?"contract-follow":"basicinfo"==this.tabCurrentName?"c-r-m-base-info":"team"==this.tabCurrentName?"relative-team":"contract"==this.tabCurrentName?"relative-contract":"operationlog"==this.tabCurrentName?"relative-handle":"product"==this.tabCurrentName?"relative-product":"returnedmoney"==this.tabCurrentName?"relative-return-money":"file"==this.tabCurrentName?"relative-files":""},tabnames:function(){var e=[];return e.push({label:"跟进记录",name:"followlog"}),this.crm.contract&&this.crm.contract.read&&e.push({label:"基本信息",name:"basicinfo"}),this.crm.product&&this.crm.product.index&&e.push({label:"产品",name:"product"}),this.crm.receivables&&this.crm.receivables.index&&e.push({label:"回款信息",name:"returnedmoney"}),e.push({label:"相关团队",name:"team"}),e.push({label:"附件",name:"file"}),e.push({label:"操作记录",name:"operationlog"}),e}},mounted:function(){},methods:{getDetial:function(){var e=this;this.loading=!0,Object(a.e)({id:this.id}).then(function(t){e.loading=!1,e.detailData=t.data,e.headDetails[0].value=t.data.num,e.headDetails[1].value=t.data.customer_id_info?t.data.customer_id_info.name:"",e.headDetails[2].value=t.data.money,e.headDetails[3].value="0000-00-00"==t.data.order_date?"":t.data.order_date,e.headDetails[4].value=t.data.receivablesMoney?t.data.receivablesMoney.doneMoney:"",e.headDetails[5].value=t.data.owner_user_id_info?t.data.owner_user_id_info.realname:""}).catch(function(){e.loading=!1})},hideView:function(){this.$emit("hide-view")},handleClick:function(e,t){},editSaveSuccess:function(){this.$emit("handle",{type:"save-success"}),this.getDetial()}}},R=(i("R3ir"),Object(v.a)(T,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!e.canShowDetail,expression:"!canShowDetail"}],attrs:{listenerIDs:e.listenerIDs,noListenerIDs:e.noListenerIDs,noListenerClass:e.noListenerClass,"body-style":{padding:0,height:"100%"}},on:{"side-close":e.hideView}},[e.canShowDetail?i("flexbox",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"d-container",attrs:{"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限",direction:"column",align:"stretch"}},[i("c-r-m-detail-head",{attrs:{crmType:"contract",detail:e.detailData,headDetails:e.headDetails,id:e.id},on:{handle:e.detailHeadHandle,close:e.hideView}}),e._v(" "),i("div",{staticClass:"examine-info"},[i("examine-info",{staticClass:"examine-info-border",attrs:{id:e.id,examineType:"crm_contract",flow_id:e.detailData.flow_id}})],1),e._v(" "),i("div",{staticClass:"tabs"},[i("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.tabCurrentName,callback:function(t){e.tabCurrentName=t},expression:"tabCurrentName"}},e._l(e.tabnames,function(e,t){return i("el-tab-pane",{key:t,attrs:{label:e.label,name:e.name}})}))],1),e._v(" "),i("div",{staticClass:"t-loading-content",attrs:{id:"follow-log-content"}},[i("keep-alive",[i(e.tabName,{tag:"component",attrs:{crmType:"contract",detail:e.detailData,id:e.id}})],1)],1)],1):e._e(),e._v(" "),e.isCreate?i("c-r-m-create-view",{attrs:{"crm-type":"contract",action:{type:"update",id:this.id}},on:{"save-success":e.editSaveSuccess,"hiden-view":function(t){e.isCreate=!1}}}):e._e()],1)},[],!1,null,"4df09963",null));R.options.__file="ContractDetail.vue";t.a=R.exports},y4JV:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8v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WVWEQYGFhOP7xI0PjvfvoWiWZsKV2kMVKnJwM/UCDFTg5wGK2AgIMLSpKDJzMTAw7375jaLr3gOHnv38YPmAEZr2bQFoNWZCTiYmhVkmRwZiPl+HL378MO968ZQgSE2VgYmRkWPXyFcO8p88Y/mMPkYcgF15CF/0OtLnu7j2Gg+8/MPAwMzOEiIsxMAINm/XkKcNc3IaBwBmQgRuwyfz5/5+h/f4DhvWvXoNd2f3gEcNaIJsA2ADyMijk71IhLT4FYmVYpBRRIWEXAvFPWF5eDcTdFBjWDTUDpfiqBOIpZBg2FaoXozz8C8S50FLjDhEG3YGWAzlQvThLbFChuRmqGFR6G0MzPizgz0KrgNXYMgVAgAEAQ6R42TeJ/UsAAAAASUVORK5CYII="},y9lt:function(e,t,i){"use strict";var a=i("FyfS"),s=i.n(a),n=i("KzkL"),l={name:"follow-schedule-cell",components:{},props:{data:Object},data:function(){return{}},filters:{getRemindtypeText:function(e){switch(e){case 0:return"无";case 1:return"准时提醒";case 2:return"5分钟前";case 3:return"15分钟前";case 4:return"30分钟前";case 5:return"一个小时前";case 6:return"二个小时前";case 7:return"一天前";case 8:return"二天前";case 9:return"一周前"}return""}},computed:{},mounted:function(){},methods:{checkRelatedDetail:function(e,t){this.$emit("on-handle",{type:"related-detail",data:{type:e,item:t}})},handleCommand:function(e){this.$emit("on-handle",{type:e,data:{item:this.data}})}}},o=(i("gQk7"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"fl-c"},[a("flexbox",{staticClass:"fl-h"},[a("div",{directives:[{name:"photo",rawName:"v-photo",value:e.data.create_user_info,expression:"data.create_user_info"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(e.data.create_user_info.thumb_img),expression:"$options.filters.filterUserLazyImg(data.create_user_info.thumb_img)",arg:"background-image"}],key:e.data.create_user_info.thumb_img,staticClass:"div-photo fl-h-img"}),e._v(" "),a("div",{staticClass:"fl-h-b"},[a("div",{staticClass:"fl-h-name"},[e._v(e._s(e.data.create_user_info.realname))]),e._v(" "),a("div",{staticClass:"fl-h-time"},[e._v(e._s(e._f("filterTimestampToFormatTime")(e.data.create_time)))])]),e._v(" "),a("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[a("i",{staticClass:"el-icon-arrow-down el-icon-more",staticStyle:{color:"#CDCDCD"}}),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"edit"}},[e._v("编辑")]),e._v(" "),a("el-dropdown-item",{attrs:{command:"delete"}},[e._v("删除")])],1)],1)],1),e._v(" "),a("div",{staticClass:"fl-b"},[a("div",[a("div",{staticClass:"state-color",style:{"background-color":e.data.color?e.data.color:"#fff"}}),e._v(e._s(e.data.title)+"\n    ")]),e._v(" "),a("div",{staticClass:"fl-b-des"},[a("flexbox",{staticClass:"fl-b-des-item"},[a("div",{staticClass:"fl-b-des-item-name"},[e._v("参与人:")]),e._v(" "),a("div",{staticClass:"owner-list"},e._l(e.data.ownerList,function(t,i){return a("span",{key:i},[a("el-tooltip",{attrs:{placement:"bottom",effect:"light","popper-class":"tooltip-change-border"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("span",[e._v(e._s(t.realname))])]),e._v(" "),a("div",{directives:[{name:"photo",rawName:"v-photo",value:t,expression:"k"},{name:"lazy",rawName:"v-lazy:background-image",value:e.$options.filters.filterUserLazyImg(t.thumb_img),expression:"$options.filters.filterUserLazyImg(k.thumb_img)",arg:"background-image"}],key:t.thumb_img,staticClass:"div-photo header-circle"})])],1)}))]),e._v(" "),a("flexbox",{staticClass:"fl-b-des-item"},[a("div",{staticClass:"fl-b-des-item-name"},[e._v("开始时间:")]),e._v(" "),a("div",[e._v(e._s(e._f("moment")(e.data.start_time,"YYYY-MM-DD HH:mm:ss")))])]),e._v(" "),a("flexbox",{staticClass:"fl-b-des-item"},[a("div",{staticClass:"fl-b-des-item-name"},[e._v("结束时间:")]),e._v(" "),a("div",[e._v(e._s(e._f("moment")(e.data.end_time,"YYYY-MM-DD HH:mm:ss")))])]),e._v(" "),a("flexbox",{staticClass:"fl-b-des-item"},[a("div",{staticClass:"fl-b-des-item-name"},[e._v("备注:")]),e._v(" "),a("div",[e._v(e._s(e.data.remark))])])],1),e._v(" "),e.data.contactsList.length>0||e.data.customerList.length>0||e.data.businessList.length>0||e.data.contractList.length>0?a("div",{staticClass:"related-business"},[a("div",{staticClass:"label"},[e._v("关联业务")]),e._v(" "),e._l(e.data.contactsList,function(t,s){return a("p",{key:"contacts"+s,on:{click:function(i){e.checkRelatedDetail("contacts",t)}}},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n        联系人-"+e._s(t.name)+"\n      ")])}),e._v(" "),e._l(e.data.customerList,function(t,s){return a("p",{key:"customer"+s,on:{click:function(i){e.checkRelatedDetail("customer",t)}}},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n        客户-"+e._s(t.name)+"\n      ")])}),e._v(" "),e._l(e.data.businessList,function(t,s){return a("p",{key:"business"+s,on:{click:function(i){e.checkRelatedDetail("business",t)}}},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n        商机-"+e._s(t.name)+"\n      ")])}),e._v(" "),e._l(e.data.contractList,function(t,s){return a("p",{key:"contract"+s,on:{click:function(i){e.checkRelatedDetail("contract",t)}}},[a("img",{attrs:{src:i("AFlK"),alt:""}}),e._v("\n        合同-"+e._s(t.name)+"\n      ")])})],2):e._e()])],1)},[],!1,null,"138477e4",null);c.options.__file="FollowScheduleCell.vue";var r=c.exports,d=i("Dh/N"),u=i("BuGm"),m=(i("7Qib"),{name:"schedule-log",components:{FollowScheduleCell:r,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-3d7c"),i.e("chunk-64bd"),i.e("chunk-68d7")]).then(i.bind(null,"uMjE"))},CreateSchedule:u.default},props:{id:[String,Number],crmType:{type:String,default:""}},watch:{id:function(e){this.refreshList()}},data:function(){return{loading:!1,loadMoreLoading:!0,isPost:!1,page:1,list:[],showFullDetail:!1,detailCRMType:"",rowID:"",showDialog:!1,formData:{checkList:[]},newtext:""}},computed:{},mounted:function(){var e=this,t=document.getElementById("follow-log-content");t.onscroll=function(){t.scrollTop+t.clientHeight==t.scrollHeight&&1==e.loadMoreLoading&&(e.isPost?e.loadMoreLoading=!1:(e.isPost=!0,e.page++,e.getList()))},this.getList()},activated:function(){},deactivated:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(n.k)({page:this.page,limit:10,types:"crm_"+this.crmType,types_id:this.id,by:"event"}).then(function(t){e.list=e.list.concat(t.data.list),t.data.list.length<10?e.loadMoreLoading=!1:e.loadMoreLoading=!0,e.loading=!1,e.isPost=!1}).catch(function(){e.isPost=!1,e.loading=!1})},refreshList:function(){this.page=1,this.list=[],this.getList()},examineCellHandle:function(e){var t=this;if("edit"==e.type){this.newText="编辑日程";var i=e.data.item;i.start_time=1e3*i.start_time,i.end_time=1e3*i.end_time,i.owner_user_ids=[];var a=!0,n=!1,l=void 0;try{for(var o,c=s()(i.ownerList);!(a=(o=c.next()).done);a=!0){var r=o.value;i.owner_user_ids.push(r.owner_id)}}catch(e){n=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(n)throw l}}this.formData=i,this.showDialog=!0}else"delete"==e.type?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.b)({event_id:e.data.item.event_id}).then(function(e){t.refreshList(),t.$message({type:"success",message:"删除成功!"})})}).catch(function(){t.$message({type:"info",message:"已取消删除"})}):"related-detail"==e.type&&(this.rowID=e.data.item[e.data.type+"_id"],this.detailCRMType=e.data.type,this.showFullDetail=!0)},onSubmit:function(e,t){this.refreshList(),"创建日程"==this.newText?(this.$message.success("新建成功"),this.showDialog=!1):(this.$message.success("编辑成功"),this.showDialog=!1)}}}),h=(i("AWHz"),Object(o.a)(m,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:0===e.list.length,expression:"list.length === 0"}]},[i("div",{staticClass:"log-items"},[e._l(e.list,function(t,a){return i("follow-schedule-cell",{key:a,attrs:{data:t.dataInfo},on:{"on-handle":e.examineCellHandle}})}),e._v(" "),i("div",{staticClass:"load"},[i("el-button",{attrs:{type:"text",loading:e.loadMoreLoading}},[e._v(e._s(e.loadMoreLoading?"加载更多":"没有更多了"))])],1)],2)]),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,crmType:e.detailCRMType,id:e.rowID},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),e.showDialog?i("create-schedule",{attrs:{text:e.newText,formData:e.formData,appendToBody:!0},on:{onSubmit:e.onSubmit,closeDialog:function(t){e.showDialog=!1}}}):e._e()],1)},[],!1,null,"018bb388",null));h.options.__file="ScheduleLog.vue";t.a=h.exports},yNwx:function(e,t,i){"use strict";var a=i("6ZrO");i.n(a).a},"yl5+":function(e,t,i){},z2lB:function(e,t,i){},zbTZ:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZj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