|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-271c","chunk-5b3b","chunk-e3ec"],{"/G0b":function(e,t,i){"use strict";var s=i("m1cH"),a=i.n(s),n=i("KTTK"),l=i("6iAj"),o=i("4XAY"),c=i("7Dod"),r=i("7Qib"),u=i("mkuN"),d=i("zMq1"),m=i("ye9D"),f=i("NYF1"),h=i("YIeP"),p=i("ZoMv"),v={name:"LogEditDialog",components:{CrmRelative:u.a,AddImageList:d.a,AddFileList:m.a,AddRelateList:f.a,CommonWords:h.a},props:{visible:{type:Boolean,required:!0,default:!1},data:Object},data:function(){return{loading:!1,crmType:"",content:"",imgFiles:[],businessAction:{},files:[],showBusinessPopover:!1,business:[],contacts:[],selectContactsId:"",followTypes:[],followType:"",next_time:"",showRelativeType:"",batchId:""}},computed:{autosize:function(){return{minRows:4,maxRows:8}},id:function(){return this.data?this.data.activity_type_id:""},showBusiness:function(){return"customer"==this.crmType},showContacts:function(){return this.showBusiness}},watch:{visible:{handler:function(e){if(e){var t=p.a.convertTypeToKey(this.data.activity_type);this.crmType!=t&&(this.crmType=t),this.handleDetailInfo(Object(r.t)(this.data))}},immediate:!0,deep:!0},id:{handler:function(){this.businessAction={type:"condition",data:{moduleType:this.crmType,customerId:this.id}}},immediate:!0}},created:function(){},beforeDestroy:function(){},methods:{handleDetailInfo:function(e){var t=this;this.showContacts&&this.getContactsList(),0==this.followTypes.length&&this.getLogTypeList(),this.content=e.content,this.imgFiles=e.imgList||[];var i=e.fileList||[];this.files=i.map(function(e){return e.icon=t.getFileTypeIcon(e.name),e});var s=e.business_list||[];this.business=s.map(function(e){return{businessName:e.name,business_id:e.business_id}}),this.selectContactsId=e.contacts_ids&&parseInt(e.contacts_ids),this.followType=e.category,this.next_time=e.next_time,this.batchId=e.batchId},getFileTypeIcon:function(e){if(!e)return"";var t=e?e.split("."):[],i="";return i=t.length>0?t[t.length-1]:"",Object(r.n)(i)},getLogTypeList:function(){var e=this;Object(l.r)().then(function(t){e.followTypes=t.data.map(function(e){return{value:e,label:e}})}).catch(function(){})},getContactsList:function(){var e=this;Object(c.y)({customer_id:this.id}).then(function(t){e.contacts=t.data.list}).catch(function(){})},getDefalutFollowType:function(){this.followTypes&&this.followTypes.length>0?this.followType=this.followTypes[0].value:this.followType=""},resetInfo:function(){this.next_time="",this.content="",this.imgFiles=[],this.files=[],this.business=[],this.selectContactsId=this.contactsId||"",this.showRelativeType="",this.batchId="",this.getDefalutFollowType()},commonWordsSelect:function(e){var t=this;this.content?this.$confirm("您选中的常用语将覆盖当前填写内容?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){t.content=e}).catch(function(){}):this.content=e},checkRelativeInfos:function(e){"business"==this.showRelativeType&&(this.business=e.data)},barClick:function(e){this.showRelativeType=e,"business"==e?this.showBusinessPopover=!0:"file"==e?this.$refs.fileInput.click():"img"==e&&this.$refs.imgInput.click()},uploadFile:function(e){var t=e.target.files;if(t.length){for(var i=0;i<t.length;i++){if(-1==t[i].type.indexOf("image")&&"img"==this.showRelativeType)return void this.$message.error("请上传正确的文件类型")}for(var s="image/*"==e.target.accept?"img":"file",a=0;a<t.length;a++){var n=t[a];this.uploadFileRequest(n,s)}e.target.value=""}},uploadFileRequest:function(e,t,i){var s=this;this.$wkUploadFile.upload({file:e,params:{type:t,batchId:this.batchId}}).then(function(a){var n=a.res.data||{};n.size=Object(r.h)(e.size),"img"==t?s.imgFiles.push(n):(n.icon=Object(r.o)(e),s.files.push(n)),i&&i()}).catch(function(){})},deleteImage:function(e,t){this.deleteImgOrFile("image",e,t)},deleteFile:function(e,t){this.deleteImgOrFile("file",e,t)},deleteImgOrFile:function(e,t,i){var s=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.c)({module:"crm_"+s.crmType,module_id:t.file_id,save_name:t.save_name}).then(function(t){"image"==e?s.imgFiles.splice(i,1):s.files.splice(i,1),s.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteAllFile:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.e)({module:"crm_"+t.crmType,module_id:t.id,file_id:[].concat(a()(t.imgFiles.map(function(e){return e.file_id})),a()(t.files.map(function(e){return e.file_id}))),batchId:t.batchId,type:e}).then(function(i){2==e?t.imgFiles=[]:t.files=[],t.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteRelate:function(e,t){this.business.splice(t,1)},inputFocus:function(){var e=this;this.$nextTick(function(){e.$refs.textarea.focus(),e.$emit("focus")})},handleConfirm:function(){var e=this;if(this.content){var t={};t.activity_id=this.data.activity_id,t.activity_type=this.data.activity_type,t.activity_type_id=this.id,t.content=this.content,t.category=this.followType,t.file_id=[].concat(a()(this.imgFiles.map(function(e){return e.file_id})),a()(this.files.map(function(e){return e.file_id})));var i=this.business.map(function(e){return e.business_id||e.id});t.batchId=this.batchId,t.business_ids=i,t.contacts_ids=this.contacts_id,t.next_time=this.next_time||"",t.is_event=0,this.loading=!0,Object(o.e)(t).then(function(t){e.loading=!1,e.$message.success("编辑成功"),e.$emit("save",t.data),e.handleCancel()}).catch(function(){e.loading=!1})}else this.$message.error("请输入跟进内容")},handleCancel:function(){this.$emit("update:visible",!1)}}},_=(i("uX/8"),i("KHd+")),g=Object(_.a)(v,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:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"编辑跟进记录",width:"700px","custom-class":"no-padding-dialog"},on:{close:e.handleCancel}},[i("div",{staticClass:"mix-content"},[i("div",{staticClass:"mix-content__body"},[i("div",{staticClass:"mix-content-select"},[e.showContacts?i("el-select",{attrs:{clearable:"",placeholder:"选择联系人"},model:{value:e.selectContactsId,callback:function(t){e.selectContactsId=t},expression:"selectContactsId"}},e._l(e.contacts,function(e){return i("el-option",{key:e.contacts_id,attrs:{label:e.name,value:e.contacts_id}})})):e._e(),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:"选择跟进方式"},model:{value:e.followType,callback:function(t){e.followType=t},expression:"followType"}},e._l(e.followTypes,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),i("el-date-picker",{attrs:{editable:!1,type:"datetime",placeholder:"选择下次联系时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.next_time,callback:function(t){e.next_time=t},expression:"next_time"}}),e._v(" "),i("common-words",{on:{select:e.commonWordsSelect}})],1),e._v(" "),i("div",{staticClass:"i-cont"},[i("el-input",{ref:"textarea",attrs:{autosize:e.autosize,maxlength:800,type:"textarea",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?i("add-image-list",{attrs:{data:e.imgFiles},on:{delete:e.deleteImage,"delete-all":function(t){e.deleteAllFile(2)},upload:e.uploadFile}}):e._e(),e._v(" "),e.files.length>0?i("add-file-list",{attrs:{data:e.files},on:{delete:e.deleteFile,"delete-all":function(t){e.deleteAllFile(1)}}}):e._e(),e._v(" "),e.business.length>0?i("add-relate-list",{attrs:{data:e.business,type:"business"},on:{delete:e.deleteRelate}}):e._e()],1),e._v(" "),i("div",{staticClass:"bar-cont"},[i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-picture"},on:{click:function(t){e.barClick("img")}}},[e._v("图片")]),e._v(" "),i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-file"},on:{click:function(t){e.barClick("file")}}},[e._v("附件")]),e._v(" "),e.showBusiness?i("el-popover",{attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showBusinessPopover,callback:function(t){e.showBusinessPopover=t},expression:"showBusinessPopover"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:e.showBusinessPopover,radio:!1,action:e.businessAction,"selected-data":{business:e.business},"crm-type":"business"},on:{close:function(t){e.showBusinessPopover=!1},changeCheckout:e.checkRelativeInfos}}),e._v(" "),i("el-button",{staticClass:"handle-button",staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",type:"text",icon:"wk wk-associate"},on:{click:function(t){e.barClick("business")}},slot:"reference"},[e._v("关联商机")])],1):e._e()],1),e._v(" "),i("input",{ref:"fileInput",staticClass:"file-input",attrs:{accept:"*.*",type:"file",multiple:""},on:{change:e.uploadFile}}),e._v(" "),i("input",{ref:"imgInput",staticClass:"file-input",attrs:{accept:"image/*",type:"file",multiple:""},on:{change:e.uploadFile}})]),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(t){return e.handleCancel(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.handleConfirm,expression:"handleConfirm"}],attrs:{type:"primary"}},[e._v("确定")])],1)])},[],!1,null,"6939bfe3",null);g.options.__file="LogEditDialog.vue";t.a=g.exports},"4p7F":function(e,t,i){},"77fj":function(e,t,i){"use strict";var s=i("Btlj");i.n(s).a},AeXB:function(e,t,i){},Btlj:function(e,t,i){},BzA1:function(e,t,i){"use strict";var s=i("a/5N"),a={name:"ImportInfo",components:{},props:{list:Array},data:function(){return{}},computed:{showList:function(){return this.list.filter(function(e){return"file"!==e.form_type})}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{getValueContent:function(e){if("map_address"===e.form_type)return e.value?e.value.detail_address:"";if("structure"===e.form_type||"user"===e.form_type||"checkbox"===e.form_type){if(Object(s.a)(e.value)){var t={structure:"name",user:"realname",checkbox:""}[e.form_type];return e.value.map(function(e){return t?e[t]:e}).join(",")}return""}if("single_user"===e.form_type)return Object(s.c)(e.value)&&e.value.realname?e.value.realname:"";if("customer"===e.form_type||"business"===e.form_type||"contract"===e.form_type||"contacts"===e.form_type||"category"===e.form_type||"statusName"===e.form_type||"typeName"===e.form_type){var i={customer:"name",business:"name",contract:"name",contacts:"name",category:"name",statusName:"name",typeName:"name"}[e.form_type];return Object(s.a)(e.value)?e.value.length>0?e.value[0][i]:"":e.value?e.value[i]:""}return e.value}}},n=(i("m7P8"),i("KHd+")),l=Object(n.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"content"},[i("div",{staticClass:"content-title"},[e._v("基本信息")]),e._v(" "),e._l(e.showList,function(t,s){return i("p",{key:s,staticClass:"detail-cell"},[i("span",{staticClass:"detail-cell__label"},[e._v("\n "+e._s(t.name)+"\n ")]),i("br"),e._v(" "),i("span",{staticClass:"detail-cell__value"},[e._v("\n "+e._s(e.getValueContent(t))+"\n ")])])})],2)},[],!1,null,"17796cac",null);l.options.__file="ImportInfo.vue";t.a=l.exports},CrBE:function(e,t,i){},D67r:function(e,t,i){},DXRq:function(e,t,i){},"GlV/":function(e,t,i){},"I+NK":function(e,t,i){"use strict";var s=i("PWYh");i.n(s).a},I9HS:function(e,t,i){"use strict";var s=i("pWUH");i.n(s).a},IvXA:function(e,t,i){"use strict";var s=i("UDEy");i.n(s).a},JBWo:function(e,t,i){"use strict";var s=i("k3SN");i.n(s).a},JftJ:function(e,t,i){"use strict";var s=i("i2VW");i.n(s).a},MeAA:function(e,t,i){"use strict";var s=i("DXRq");i.n(s).a},"N8+3":function(e,t,i){"use strict";var s=i("epE4");i.n(s).a},NYF1:function(e,t,i){"use strict";var s={name:"AddRelateList",components:{},props:{data:Array,type:{type:[String,Number],require:!0},label:String},data:function(){return{}},computed:{typeName:function(){return this.label?this.label:{customer:"客户",contacts:"联系人",business:"商机",contract:"合同"}[this.type]}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{getItemName:function(e){return e[{customer:"customerName",contacts:"name",business:"businessName",contract:"name"}[this.type]]||e.name},deleteItem:function(e,t){this.$emit("delete",e,t,this.type)}}},a=(i("s357"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("section",{staticClass:"c-cont"},[i("flexbox",{staticClass:"c-header"},[i("i",{class:["wk","wk-"+e.type]}),e._v(" "),i("div",{staticClass:"c-name"},[e._v(e._s(e.typeName))])]),e._v(" "),i("div",{staticClass:"c-body"},[i("flexbox",{attrs:{wrap:"wrap"}},e._l(e.data,function(t,s){return i("flexbox",{key:s,staticClass:"c-item"},[i("div",{staticClass:"c-item-name"},[e._v(e._s(e.getItemName(t)))]),e._v(" "),i("div",{staticClass:"c-item-close",on:{click:function(i){e.deleteItem(t,s)}}},[e._v("×")])])}))],1)],1)},[],!1,null,"60fd2091",null);n.options.__file="AddRelateList.vue";t.a=n.exports},O8VQ:function(e,t,i){"use strict";var s=i("QbLZ"),a=i.n(s),n=i("4XAY"),l=i("Vm8M"),o=i("7Qib"),c=i("Z+Ht"),r=i("vvxI"),u=i("L2JU"),d={name:"LogCell",components:{MapView:l.a},filters:{getFileSize:function(e){return Object(o.h)(e)}},mixins:[c.a,r.a],props:{item:{type:Object,default:function(){return{}}},section:[String,Number],index:[String,Number],canDelete:{type:Boolean,default:!0}},data:function(){return{showMapView:!1,mapViewInfo:{}}},computed:a()({},Object(u.b)(["crm"]),{hasEditAuth:function(){return this.crm&&this.crm.activity&&this.crm.activity.update},hasDeleteAuth:function(){return this.crm&&this.crm.activity&&this.crm.activity.delete},activityIcon:function(){return this.getXrIcon(this.getActivityType(this.item.activity_type))},activityIconColor:function(){return this.getXrIconColor(this.getActivityType(this.item.activity_type))}}),mounted:function(){},methods:{previewImg:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e){return e.url=e.file_path,e})})},downloadFile:function(e){Object(o.d)({path:e.file_path,save_name:e.save_name,name:e.name})},handleCommand:function(e){var t=this;"delete"==e?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){(4==t.item.type?n.d:n.b)({activity_id:t.item.activity_id}).then(function(e){t.$emit("delete",t.item,t.index,t.section),t.$store.dispatch("GetMessageNum"),t.$message.success("操作成功")}).catch(function(){})}).catch(function(){}):"edit"==e&&this.$emit("edit",this.item,this.index,this.section)},checkRelationDetail:function(e,t){this.$emit("crm-detail",e,t)},checkMapView:function(e){e.address&&(this.mapViewInfo={title:e.address,lat:e.lat,lng:e.lng},this.showMapView=!0)}}},m=(i("JBWo"),i("KHd+")),f=Object(m.a)(d,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"fl-c"},[i("flexbox",{staticClass:"fl-h"},[i("xr-avatar",{staticClass:"fl-h-img",attrs:{name:e.item.create_user_name,id:e.item.create_user_id,size:30,src:e.item.thumb_img,disabled:!1}}),e._v(" "),i("div",{staticClass:"fl-h-b"},[i("div",{staticClass:"fl-h-name"},[e._v(e._s(e.item.create_user_name))]),e._v(" "),i("div",{staticClass:"fl-h-time"},[e._v(e._s(e.item.update_time))])]),e._v(" "),e.item.category?i("div",{staticClass:"follow"},[i("span",{staticClass:"follow-info"},[e._v(e._s(e.item.category))])]):e._e(),e._v(" "),i("span",{staticClass:"log-mark",style:{right:e.canDelete?"40px":"15px"}},[i("i",{class:e.activityIcon,style:{color:e.activityIconColor}}),e._v(" "),i("span",{staticClass:"log-mark__label"},[e._v(e._s(e.getActivityTypeName(e.item.activity_type)+"-"+e.getRecordLogTypeName(e.item.type)))])]),e._v(" "),e.canDelete&&(e.hasDeleteAuth||e.hasEditAuth)?i("el-dropdown",{staticClass:"more-drop",attrs:{trigger:"click"},on:{command:e.handleCommand}},[i("i",{staticClass:"el-icon-arrow-down el-icon-more"}),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.hasEditAuth?i("el-dropdown-item",{attrs:{command:"edit"}},[e._v("编辑")]):e._e(),e._v(" "),e.hasDeleteAuth?i("el-dropdown-item",{attrs:{command:"delete"}},[e._v("删除")]):e._e()],1)],1):e._e()],1),e._v(" "),i("div",{staticClass:"fl-b"},[i("div",{staticClass:"fl-b-content"},[e._v(e._s(e.item.content))]),e._v(" "),e.item.imgList&&e.item.imgList.length>0?i("flexbox",{staticClass:"fl-b-images",attrs:{wrap:"wrap"}},e._l(e.item.imgList,function(t,s){return i("div",{directives:[{name:"src",rawName:"v-src:background-image",value:t.file_path,expression:"file.file_path",arg:"background-image"}],key:t.file_path,staticClass:"fl-b-img-item",on:{click:function(t){e.previewImg(e.item.imgList,s)}}})})):e._e(),e._v(" "),e.item.fileList&&e.item.fileList.length>0?i("div",e._l(e.item.fileList,function(t,s){return i("flexbox",{key:s,staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd first-show"},[i("i",{staticClass:"wk wk-file"})]),e._v(" "),i("div",{staticClass:"cell-hd first-show"},[e._v("\n 附件:\n ")]),e._v(" "),i("div",{staticClass:"cell-bd text-one-line"},[e._v("\n "+e._s(t.name)+"\n ")]),e._v(" "),i("div",{staticClass:"cell-ft"},[i("span",{staticClass:"des"},[e._v("("+e._s(e._f("getFileSize")(t.size))+")")]),e._v(" "),i("a",{on:{click:function(t){e.previewImg(e.item.fileList,s)}}},[e._v("预览")]),e._v(" "),i("a",{on:{click:function(i){e.downloadFile(t)}}},[e._v("下载")])])])})):e._e(),e._v(" "),e.item.contacts_list&&e.item.contacts_list.length>0?i("div",[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-contacts"})]),e._v(" "),i("div",{staticClass:"cell-bd"},[e._v("\n 相关联系人:\n ")]),e._v(" "),e._l(e.item.contacts_list,function(t,s){return i("div",{key:s,staticClass:"cell-ft__item text-one-line"},[i("a",{on:{click:function(i){e.checkRelationDetail("contacts",t.contacts_id)}}},[e._v(e._s(t.name))])])})],2)],1):e._e(),e._v(" "),e.item.business_list&&e.item.business_list.length>0?i("div",[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-business"})]),e._v(" "),i("div",{staticClass:"cell-bd"},[e._v("\n 相关商机:\n ")]),e._v(" "),i("div",{staticClass:"cell-ft"},e._l(e.item.business_list,function(t,s){return i("div",{key:s,staticClass:"cell-ft__item text-one-line"},[i("a",{on:{click:function(i){e.checkRelationDetail("business",t.business_id)}}},[e._v(e._s(t.name))])])}))])],1):e._e(),e._v(" "),e.item.next_time?i("div",{staticClass:"cell-top"},[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd"},[i("i",{staticClass:"wk wk-time"})]),e._v(" "),i("div",{staticClass:"cell-bd text-one-line"},[e._v("\n 下次联系时间:"+e._s(e.item.next_time)+"\n ")])])],1):e._e(),e._v(" "),e.item.address?i("div",{staticClass:"cell-top"},[i("flexbox",{staticClass:"cell",attrs:{align:"stretch"}},[i("div",{staticClass:"cell-hd is-address"},[i("i",{staticClass:"wk wk-location"})]),e._v(" "),i("div",{staticClass:"cell-bd text-one-line can-visit--underline",on:{click:function(t){e.checkMapView(e.item)}}},[e._v(e._s(e.item.address))])])],1):e._e()],1),e._v(" "),e.showMapView?i("map-view",{attrs:{title:e.mapViewInfo.title,lat:e.mapViewInfo.lat,lng:e.mapViewInfo.lng},on:{hidden:function(t){e.showMapView=!1}}}):e._e(),e._v(" "),e._t("default")],2)},[],!1,null,"0f095540",null);f.options.__file="LogCell.vue";t.a=f.exports},PWYh:function(e,t,i){},TDiV:function(e,t,i){},TuF4:function(e,t,i){},UDEy:function(e,t,i){},Vm8M:function(e,t,i){"use strict";var s=i("7Qib"),a={name:"MapView",components:{},props:{title:{type:String,default:""},lat:{type:[String,Number],default:0},lng:{type:[String,Number],default:0}},data:function(){return{}},computed:{},mounted:function(){var e=this;this.$el.style.zIndex=Object(s.q)(),document.body.appendChild(this.$el),Object(s.l)().then(function(){var t=new BMap.Map("choicemap",{enableMapClick:!1}),i=new BMap.Point(parseFloat(e.lng),parseFloat(e.lat));t.centerAndZoom(i,18),t.enableScrollWheelZoom();var s=new BMap.Marker(i);t.addOverlay(s);var a=new BMap.InfoWindow(e.title);s.addEventListener("click",function(){t.openInfoWindow(a,i)})})},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{hiddenView:function(){this.$emit("hidden")}}},n=(i("I+NK"),i("KHd+")),l=Object(n.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"map-view"},[t("div",{attrs:{id:"choicemap"}}),this._v(" "),t("i",{staticClass:"el-icon-close map-close",on:{click:this.hiddenView}})])},[],!1,null,"33a9f6bf",null);l.options.__file="MapView.vue";t.a=l.exports},WhDH:function(e,t,i){"use strict";var s=i("fV8c");i.n(s).a},"Y+PO":function(e,t,i){},YIeP:function(e,t,i){"use strict";var s=i("4XAY"),a=i("XJYT"),n=i("t2rG"),l={name:"Set",components:{draggable:i.n(n).a},props:{visible:{type:Boolean,required:!0,default:!1},list:Array},data:function(){return{setList:[],isDrag:!1}},computed:{},watch:{list:{handler:function(){this.initInfo()},immediate:!0},visible:function(e){e&&this.initInfo()}},created:function(){},beforeDestroy:function(){},methods:{initInfo:function(){this.setList=this.list.map(function(e){return{value:e}}),0==this.setList.length&&(this.setList=[{value:""}])},close:function(){this.$emit("update:visible",!1)},addClick:function(){this.setList.push({value:""})},deleteClick:function(e){this.setList.splice(e,1)},sureClick:function(){for(var e=this,t=[],i=0;i<this.setList.length;i++){var n=this.setList[i];n.value&&t.push(n.value)}if(0!=t.length){var l=a.Loading.service({target:document.querySelector('.el-dialog[aria-label="常用语管理"]')});Object(s.G)({phrase:t}).then(function(i){l.close(),e.$emit("update",t),e.close()}).catch(function(){l.close()})}else this.$message.error("请输入常用语")},dragEnter:function(){this.isDrag=!0},dragLeave:function(){this.isDrag=!1}}},o=(i("WhDH"),i("KHd+")),c=Object(o.a)(l,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"常用语管理",width:"600px"},on:{close:e.close}},[i("div",{staticClass:"set"},[i("draggable",{attrs:{options:{group:"list",forceFallback:!1,fallbackClass:"draggingStyle",filter:".el-input__inner",preventOnFilter:!1}},model:{value:e.setList,callback:function(t){e.setList=t},expression:"setList"}},e._l(e.setList,function(t,s){return i("flexbox",{key:s,staticClass:"set-item",class:{"is-drag":e.isDrag}},[i("el-input",{attrs:{maxlength:100},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},[i("div",{staticClass:"drag-handle",attrs:{slot:"suffix"},on:{mouseenter:e.dragEnter,mouseleave:e.dragLeave},slot:"suffix"},[e._v("⋮⋮")])]),e._v(" "),i("i",{staticClass:"el-icon-remove",on:{click:function(t){e.deleteClick(s)}}})],1)})),e._v(" "),i("el-button",{attrs:{type:"text",icon:"el-icon-circle-plus"},on:{click:e.addClick}},[e._v("添加常用语")])],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.sureClick,expression:"sureClick"}],attrs:{type:"primary"}},[e._v("保存")])],1)])},[],!1,null,"1acbaeb8",null);c.options.__file="Set.vue";var r={name:"CommonWords",components:{Set:c.exports},props:{},data:function(){return{loading:!1,showPopover:!1,setShow:!1,list:[]}},computed:{},watch:{showPopover:function(e){e&&0==this.list.length&&this.getCommonWords()}},mounted:function(){},beforeDestroy:function(){},methods:{selectScene:function(e,t){this.$emit("select",e),this.showPopover=!1},setClick:function(){this.setShow=!0},getCommonWords:function(){var e=this;this.loading=!0,Object(s.F)().then(function(t){e.loading=!1,e.list=t.data||[]}).catch(function(){e.loading=!1})},udpateCommonWords:function(e){this.list=e}}},u=(i("q0fG"),Object(o.a)(r,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-popover",{attrs:{placement:"bottom",width:"320",trigger:"click","popper-class":"no-padding-popover"},model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"common-words"},[i("div",{directives:[{name:"empty",rawName:"v-empty",value:e.list&&0==e.list.length,expression:"list && list.length == 0"}],staticClass:"word",attrs:{"xs-empty-icon":"none"}},e._l(e.list,function(t,s){return i("div",{key:s,staticClass:"word-item",on:{click:function(i){e.selectScene(t,s)}}},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),i("div",{staticClass:"handle-interval"},[i("flexbox",{staticClass:"handle-button",nativeOn:{click:function(t){return e.setClick(t)}}},[i("i",{staticClass:"wk wk-manage handle-button-icon"}),e._v(" "),i("div",{staticClass:"handle-button-name"},[e._v("管理")])])],1)]),e._v(" "),i("el-button",{staticClass:"word-button",attrs:{slot:"reference"},slot:"reference"},[e._v("常用语")]),e._v(" "),i("set",{attrs:{visible:e.setShow,list:e.list},on:{"update:visible":function(t){e.setShow=t},update:e.udpateCommonWords}})],1)},[],!1,null,"6ddd3652",null));u.options.__file="index.vue";t.a=u.exports},"Z+Ht":function(e,t,i){"use strict";t.a={methods:{getXrIcon:function(e){return{leads:"wk wk-leads",customer:"wk wk-customer",contacts:"wk wk-contacts",product:"wk wk-product",business:"wk wk-business",contract:"wk wk-contract",receivables:"wk wk-receivables",invoice:"wk wk-invoice",log:"wk wk-log",examine:"wk wk-approve",task:"wk wk-o-task",record:"wk wk-record"}[e]},getXrIconColor:function(e){return{leads:"#704afd",customer:"#487DFF",contacts:"#27BA4A",product:"#26d4da",business:"#FB9323",contract:"#FD5B4A",receivables:"#FFB940",invoice:"#1cbaf5",log:"#5864FF",approve:"#9376FF",task:"#D376FF",record:"#19B5F6"}[e]}}}},ZX9L:function(e,t,i){"use strict";var s={name:"TimeTypeSelect",props:{defaultType:[String,Object],width:{type:Number,default:200},options:{type:Array,default:function(){return[{label:"今天",value:"today"},{label:"昨天",value:"yesterday"},{label:"本周",value:"week"},{label:"上周",value:"lastWeek"},{label:"本月",value:"month"},{label:"上月",value:"lastMonth"},{label:"本季度",value:"quarter"},{label:"上季度",value:"lastQuarter"},{label:"本年",value:"year"},{label:"去年",value:"lastYear"}]}}},data:function(){return{selectType:{label:"本年",value:"year"},showTypePopover:!1,showCustomContent:!1,sureCustomContent:!1,startTime:"",endTime:""}},computed:{typeShowValue:function(){return this.sureCustomContent?this.startTime||this.endTime?(this.startTime||"")+"-"+(this.endTime||""):"":this.selectType.label}},watch:{defaultType:function(){this.selectType.value!=this.defaultType&&(this.selectType=this.getDefaultTypeValue(this.defaultType))}},mounted:function(){void 0!==this.defaultType?"string"==typeof this.defaultType?this.selectType=this.getDefaultTypeValue(this.defaultType):this.defaultType.label?this.selectType=this.defaultType:"default"==this.defaultType.type?this.selectType=this.getDefaultTypeValue(this.defaultType.value):"custom"==this.defaultType.type&&(this.sureCustomContent=!0,this.showCustomContent=!0,this.startTime=this.defaultType.startTime,this.endTime=this.defaultType.endTime):this.$emit("change",{type:"default",value:this.selectType.value})},methods:{getDefaultTypeValue:function(e){for(var t=0;t<this.options.length;t++){var i=this.options[t];if(i.value==e)return i}return{label:"本年",value:"year"}},typeSelectClick:function(e){this.showTypePopover=!1,this.sureCustomContent=!1,this.showCustomContent=!1,this.selectType=e,this.$emit("change",{type:"default",value:this.selectType.value})},customSureClick:function(){this.startTime&&this.endTime&&(this.sureCustomContent=!0,this.showTypePopover=!1,this.$emit("change",{type:"custom",startTime:this.startTime,endTime:this.endTime}))}}},a=(i("77fj"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-popover",{staticClass:"time-type-select",attrs:{width:e.width,placement:"bottom","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showTypePopover,callback:function(t){e.showTypePopover=t},expression:"showTypePopover"}},[i("div",{staticClass:"type-popper"},[i("div",{staticClass:"type-content"},[e._l(e.options,function(t,s){return i("div",{key:s,staticClass:"type-content-item",class:{selected:e.selectType.value==t.value&&!e.showCustomContent},on:{click:function(i){e.typeSelectClick(t)}}},[i("div",{staticClass:"mark"}),e._v(e._s(t.label)+"\n ")])}),e._v(" "),i("div",{staticClass:"type-content-item",class:{selected:e.showCustomContent},on:{click:function(t){e.showCustomContent=!0}}},[i("div",{staticClass:"mark"}),e._v("自定义\n ")])],2),e._v(" "),e.showCustomContent?i("div",{staticClass:"type-content-custom"},[i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}}),e._v(" "),i("el-date-picker",{attrs:{type:"date","value-format":"yyyy.MM.dd",placeholder:"选择日期"},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}}),e._v(" "),i("el-button",{on:{click:e.customSureClick}},[e._v("确定")])],1):e._e()]),e._v(" "),i("el-input",{staticClass:"type-select",style:{width:e.width+"px"},attrs:{slot:"reference",readonly:!0},slot:"reference",model:{value:e.typeShowValue,callback:function(t){e.typeShowValue=t},expression:"typeShowValue"}},[i("i",{class:["el-icon-arrow-up",{"is-reverse":e.showTypePopover}],attrs:{slot:"suffix"},slot:"suffix"})])],1)},[],!1,null,"20503202",null);n.options.__file="index.vue";t.a=n.exports},ZtlL:function(e,t,i){"use strict";var s=i("GlV/");i.n(s).a},bxje:function(e,t,i){"use strict";var s=i("tnRl");i.n(s).a},cMzD:function(e,t,i){"use strict";i.r(t);var s=i("7qmR"),a={name:"ExamineTabsHead",components:{BaseTabsHead:i("ej9+").a},inheritAttrs:!1,props:{selectList:Array},data:function(){return{currentValue:{icon:"approve",color:"#9376FF",command:"all",label:"全部审批"}}},computed:{},watch:{selectList:function(){this.getDefaultSelectValue()}},mounted:function(){this.getDefaultSelectValue()},beforeDestroy:function(){},methods:{getDefaultSelectValue:function(){this.currentValue=this.selectList&&this.selectList.length?this.selectList[0]:{icon:"wk wk-approve",color:"#9376FF",command:"all",label:"全部审批"}},handleSelectClick:function(e){this.currentValue=e,this.$emit("select",e.command)},createClick:function(){this.$emit("add")},exportClick:function(){this.$emit("export")}}},n=(i("ZtlL"),i("KHd+")),l=Object(n.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("base-tabs-head",e._g(e._b({staticClass:"examine-tabs-head"},"base-tabs-head",e.$attrs,!1),e.$listeners),[i("el-dropdown",{staticClass:"tabs-head-select",attrs:{slot:"left",trigger:"click"},on:{command:e.handleSelectClick},slot:"left"},[i("span",{staticClass:"el-dropdown-link"},[i("i",{class:["wk","dropdown-icon","wk-"+e.currentValue.icon],style:{backgroundColor:e.currentValue.color}}),e._v(e._s(e.currentValue.label)),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.selectList,function(t,s){return i("el-dropdown-item",{key:s,attrs:{command:t}},[i("i",{class:["wk","dropdown-icon",t.icon],style:{backgroundColor:t.color}}),e._v(e._s(t.label))])}))],1),e._v(" "),i("el-button",{staticClass:"xr-btn--orange",attrs:{slot:"right",icon:"el-icon-plus",type:"primary"},on:{click:e.createClick},slot:"right"},[e._v("新建审批")]),e._v(" "),i("el-button",{staticClass:"export-btn",attrs:{slot:"right"},on:{click:e.exportClick},slot:"right"},[e._v("导出")])],1)},[],!1,null,"4850b39c",null);l.options.__file="ExamineTabsHead.vue";var o=l.exports,c=i("oWzH"),r=i("dAOq"),u={name:"ExamineCell",components:{},mixins:[c.a,r.a],props:{data:Object,section:Number,index:Number},data:function(){return{}},computed:{iconObj:function(){return this.getCategoryIcon(this.data.icon)},relateList:function(){for(var e=["contacts","customer","business","contract"],t=["联系人","客户","商机","合同"],i=[],s=0;s<e.length;s++){var a=e[s],n=this.data[a+"List"];n&&n.length>0&&i.push({type:a,name:t[s],list:n})}return i},moreTypes:function(){var e=[];return this.data.permission&&(this.data.permission.is_recheck&&e.push({type:"withdraw",name:"撤销",icon:"reset"}),this.data.permission.is_update&&e.push({type:"edit",name:"编辑",icon:"edit"}),this.data.permission.is_delete&&e.push({type:"delete",name:"删除",icon:"delete"})),e},canCheck:function(){return this.data.permission&&this.data.permission.is_check}},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{handleClick:function(e){this.$emit("handle",e,this.data,this.index,this.section)},checkRelationDetail:function(e,t){this.$emit("handle","relate-detail",{type:e,id:t},this.index,this.section)},handleTypeDrop:function(e){this.$emit("handle",e,this.data,this.index,this.section)}}},d=(i("gXkk"),Object(n.a)(u,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"section"},[i("div",{staticClass:"examine-cell"},[i("flexbox",{staticClass:"person"},[e.data.create_user_info?i("xr-avatar",{staticClass:"person__hd",attrs:{name:e.data.create_user_info.realname,id:e.data.create_user_info.id,size:40,src:e.data.create_user_info.img,disabled:!1}}):e._e(),e._v(" "),i("div",{staticClass:"person__bd"},[i("div",{staticClass:"person__bd-name"},[e._v(e._s(e.data.create_user_info.realname))]),e._v(" "),i("div",{staticClass:"person__bd-des"},[e._v(e._s("创建审批于 "+e.data.create_time))])]),e._v(" "),i("div",{staticClass:"rt-setting"},[i("span",{staticClass:"dep"},[i("span",[e._v(e._s(e.data.category_name)+" - ")]),e._v(" "),i("span",[e._v(e._s(e.getTaskStatusName(e.data.check_status)))])]),e._v(" "),i("span",{staticClass:"bg-color",style:{"background-color":e.getTaskStatusColor(e.data.check_status)}})])],1),e._v(" "),i("div",{staticClass:"examine-cell__bd"},[e.data.content?i("p",{staticClass:"examine-cell__bd--content"},[e._v(e._s(e.data.content))]):e._e(),e._v(" "),i("flexbox",{staticClass:"examine-content"},[i("i",{class:["wk","examine-content__hd","wk-"+e.iconObj.icon],style:{backgroundColor:e.iconObj.color}}),e._v(" "),i("div",{staticClass:"examine-content__bd"},[i("div",[i("a",{on:{click:function(t){e.handleClick("detail")}}},[e._v(e._s(e.data.category_name))])]),e._v(" "),e.data.causeTitle?i("div",{staticClass:"examine-content__bd--des"},[e._v(e._s(e.data.causeTitle))]):e._e()])]),e._v(" "),i("div",{staticClass:"examine-stage"},[i("i",{class:e.getStatusIcon(e.data.check_status),style:{color:e.getTaskStatusColor(e.data.check_status)}}),e._v(" "),i("span",[e._v(e._s(""+(e.data.examine_name||"")+e.getTaskStatusName(e.data.check_status)))])]),e._v(" "),e.relateList.length?i("div",{staticClass:"examine-relate"},[i("div",{staticClass:"examine-relate__hd"},[e._v("相关信息")]),e._v(" "),i("div",{staticClass:"examine-relate__bd"},e._l(e.relateList,function(t,s){return i("flexbox",{key:s,staticClass:"relate-cell",attrs:{align:"stretch"}},[i("div",{staticClass:"relate-cell__hd"},[i("i",{staticClass:"wk wk-contacts"}),e._v(" "),i("span",[e._v(e._s("相关"+t.name)+":")])]),e._v(" "),i("div",{staticClass:"relate-cell__bd"},e._l(t.list,function(s,a){return i("div",{key:a,staticClass:"relate-cell__bd--item text-one-line"},[i("a",{on:{click:function(i){e.checkRelationDetail(t.type,s[t.type+"_id"]||s.id)}}},[e._v(e._s(s[t.type+"_name"]||s.name))])])}))])}))]):e._e()],1)],1),e._v(" "),i("div",{staticClass:"section__ft"},[e.canCheck?i("el-button",{staticClass:"xr-btn--red handle-button",attrs:{icon:"wk wk-close",type:"primary"},on:{click:function(t){e.handleClick("reject")}}},[e._v("拒绝")]):e._e(),e._v(" "),e.canCheck?i("el-button",{staticClass:"xr-btn--green handle-button",attrs:{icon:"wk wk-success",type:"primary"},nativeOn:{click:function(t){e.handleClick("pass")}}},[e._v("通过")]):e._e(),e._v(" "),e.moreTypes.length>0?i("el-dropdown",{staticStyle:{float:"right"},attrs:{trigger:"click"},on:{command:e.handleTypeDrop}},[i("el-button",{staticClass:"handle-button",attrs:{icon:"el-icon-more"}}),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.moreTypes,function(t,s){return i("el-dropdown-item",{key:s,attrs:{icon:e._f("wkIconPre")(t.icon),command:t.type}},[e._v(e._s(t.name))])}))],1):e._e()],1)])},[],!1,null,"b4b4f672",null));d.options.__file="ExamineCell.vue";var m=d.exports,f=i("t2rG"),h={name:"ExamineCategorySelect",components:{Draggable:i.n(f).a},props:{show:{type:Boolean,default:!1}},data:function(){return{loading:!1,showDialog:!1,categorys:[]}},watch:{show:function(e){this.showDialog=e,this.categorys&&0==this.categorys.length&&this.getDetail()}},mounted:function(){},methods:{getDetail:function(){var e=this;this.loading=!0,Object(s.a)().then(function(t){e.loading=!1,e.categorys=t.data.map(function(e){var t=e.icon?e.icon.split(","):[];return t.length>1?(e.iconClass=t[0],e.iconColor=t[1]):(e.iconClass="wk wk-approve",e.iconColor="#9376FF"),e})}).catch(function(){e.loading=!1})},selectCategorys:function(e){this.$emit("select",e),this.$emit("close")},closeView:function(){this.$emit("close")},draggableEnd:function(){Object(s.b)(this.categorys.map(function(e){return{categoryId:e.categoryId}})).then(function(e){}).catch(function(){})}}},p=(i("nVk2"),Object(n.a)(h,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.showDialog,"close-on-click-modal":!1,title:"审批类型",width:"500px"},on:{"update:visible":function(t){e.showDialog=t},close:e.closeView}},[i("div",{staticClass:"title"},[e._v("可拖拽图标调整显示顺序(管理后台可自定义配置审批类型)")]),e._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"categorys"},[i("draggable",{staticClass:"vux-flexbox",staticStyle:{"flex-wrap":"wrap"},attrs:{options:{dragClass:"sortable-drag",forceFallback:!1}},on:{end:e.draggableEnd},model:{value:e.categorys,callback:function(t){e.categorys=t},expression:"categorys"}},e._l(e.categorys,function(t,s){return i("div",{key:s,staticClass:"category-item",on:{click:function(i){e.selectCategorys(t)}}},[i("div",{staticClass:"category-icon",style:{backgroundColor:t.iconColor}},[i("i",{class:t.iconClass})]),e._v(" "),i("div",{staticClass:"category-label text-one-line"},[e._v(e._s(t.title))])])}))],1)])},[],!1,null,"016f46e7",null));p.options.__file="ExamineCategorySelect.vue";var v=p.exports,_=i("P2sY"),g=i.n(_),y=i("m1cH"),b=i.n(y),C=i("4XAY"),w=i("KTTK"),x=i("ViDN"),k=i("EP+0"),T=i("lcu+"),I=i("Q4J0"),L=i("7Qib"),F={name:"XhExpenses",components:{},mixins:[I.a],props:{},data:function(){return{mainList:[],imageIndex:-1,totalMoney:"0",showItems:[{field:"start_address",name:"出发城市",formType:"text"},{field:"end_address",name:"目的城市",formType:"text"},{field:"start_time",name:"开始时间",formType:"datetime"},{field:"end_time",name:"结束时间",formType:"datetime"},{field:"traffic",name:"交通费(元)",formType:"number"},{field:"stay",name:"住宿费(元)",formType:"number"},{field:"diet",name:"餐饮费(元)",formType:"number"},{field:"other",name:"其他费用(元)",formType:"number"}]}},computed:{},watch:{value:function(e){this.dataValue=e,e.list&&e.list.length>0?this.mainList=e.list.map(function(e){return e.imgList&&(e.imgList.url=e.imgList.file_path),e}):this.mainList.push(this.getValueItem())}},mounted:function(){this.dataValue.list&&this.dataValue.list.length>0?this.mainList=this.dataValue.list:this.mainList.push(this.getValueItem())},methods:{addFiles:function(e){this.imageIndex=e,document.getElementById("imageFileInput").click()},uploadImageFile:function(e){for(var t=this,i=e.target.files,s=0;s<i.length;s++){var a=i[s];Object(w.f)({type:"img",file:a}).then(function(e){e&&(t.mainList[t.imageIndex].imgList.push(e.data||{}),t.submitValueChange())}).catch(function(){})}e.target.value=""},mouseImgOver:function(e,t,i){e.showDelete=!0,this.$set(i,t,e)},mouseImgLeave:function(e,t,i){e.showDelete=!1,this.$set(i,t,e)},deleteFile:function(e,t,i){var s=this;this.$confirm("您确定要删除该文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(w.c)({id:e.file_id,module_id:e.file_id,module:"work_task",save_name:e.save_name}).then(function(e){i.splice(t,1),s.$message.success("操作成功")}).catch(function(){})}).catch(function(){s.$message({type:"info",message:"已取消操作"})})},deleteItems:function(e){this.mainList.splice(e,1),this.updateTotalValue(),this.submitValueChange(!0)},addItems:function(){this.mainList.push(this.getValueItem())},valueChange:function(){this.submitValueChange(!1)},calculateValueChange:function(e,t){if(t<2)this.submitValueChange(!1);else{var i=0,s=this.mainList[e];["traffic","stay","diet","other"].forEach(function(e){i=Object(L.i)(i,parseFloat(s[e]?s[e]:0))}),s.money=i,this.updateTotalValue(),this.submitValueChange(!0)}},updateTotalValue:function(){for(var e=0,t=0;t<this.mainList.length;t++){var i=this.mainList[t];e=Object(L.i)(e,parseFloat(i.money?i.money:0))}this.totalMoney=e},submitValueChange:function(e){this.$emit("value-change",{index:this.index,value:{list:this.mainList.map(function(e){return e.imgList&&(e.file_id=e.imgList.map(function(e){return e.file_id})),e}),update:e,money:this.totalMoney}})},getValueItem:function(){return{start_address:"",end_address:"",start_time:"",end_time:"",traffic:"",stay:"",diet:"",other:"",money:"0",description:"",imgList:[]}}}},D=(i("i+04"),Object(n.a)(F,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._l(e.mainList,function(t,s){return i("div",{key:s,staticClass:"expense-item"},[i("flexbox",{staticClass:"expense-item-head"},[i("div",{staticClass:"expense-item-head-title"},[e._v("报销费用明细("+e._s(s+1)+")")]),e._v(" "),0!=s?i("i",{staticClass:"el-icon-delete expense-item-head-delete",on:{click:function(t){e.deleteItems(s)}}}):e._e()]),e._v(" "),i("flexbox",{staticClass:"clauses",attrs:{wrap:"wrap",align:"stretch"}},[e._l(e.showItems,function(a,n){return i("flexbox-item",{key:n,staticClass:"clauses-item",attrs:{span:.5}},[i("div",{staticClass:"clauses-item-title"},[e._v("\n "+e._s(a.name)+"\n ")]),e._v(" "),"datetime"==a.formType?i("el-date-picker",{attrs:{type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期"},on:{change:e.valueChange},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}}):"number"==a.formType?i("el-input-number",{attrs:{controls:!1,precision:2,min:0},on:{input:function(t){e.calculateValueChange(s,n)}},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}}):i("el-input",{attrs:{maxlength:100,type:"text"},on:{input:function(t){e.calculateValueChange(s,n)}},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}})],1)}),e._v(" "),i("flexbox-item",{staticClass:"clauses-item",attrs:{span:.5}},[i("div",{staticClass:"sub-total"},[e._v("\n 合计(元):"),i("span",[e._v(e._s(t.money))])])])],2),e._v(" "),i("div",{staticClass:"description"},[i("div",{staticClass:"description-title"},[e._v("费用明细描述")]),e._v(" "),i("el-input",{attrs:{rows:3,maxlength:300,type:"textarea",resize:"none","show-word-limit":""},on:{input:e.valueChange},model:{value:t.description,callback:function(i){e.$set(t,"description",i)},expression:"item['description']"}})],1),e._v(" "),i("div",{staticClass:"files"},[i("el-button",{staticClass:"add-files",attrs:{type:"text"},on:{click:function(t){e.addFiles(s)}}},[e._v("上传发票图片")]),e._v(" "),i("flexbox",{attrs:{wrap:"wrap"}},e._l(t.imgList,function(s,a){return i("div",{directives:[{name:"src",rawName:"v-src:background-image",value:s.url,expression:"imgItem.url",arg:"background-image"}],key:a,staticClass:"img-item",on:{mouseover:function(i){e.mouseImgOver(s,a,t.imgList)},mouseleave:function(i){e.mouseImgLeave(s,a,t.imgList)}}},[s.showDelete?i("div",{staticClass:"img-delete",on:{click:function(i){e.deleteFile(s,a,t.imgList)}}},[e._v("×")]):e._e()])}))],1)],1)}),e._v(" "),i("div",{staticClass:"handle-bar"},[i("el-button",{staticClass:"handle-bar-button",attrs:{type:"text",icon:"el-icon-plus"},on:{click:function(t){e.addItems(e.index)}}},[e._v("添加事项")])],1),e._v(" "),i("input",{attrs:{id:"imageFileInput",type:"file",accept:"image/*",multiple:""},on:{change:e.uploadImageFile}})],2)},[],!1,null,"41381020",null));D.options.__file="XhExpenses.vue";var $=D.exports,V=i("wd/R"),S=i.n(V),O={name:"XhLeaves",components:{},mixins:[I.a],props:{},data:function(){return{mainList:[],imageIndex:-1,totalDuration:"0",showItems:[{field:"vehicle",name:"交通工具",formType:"select",data:["飞机","火车","汽车","其他"]},{field:"trip",name:"单程往返",formType:"select",data:["单程","往返"]},{field:"start_address",name:"出发城市",formType:"text"},{field:"end_address",name:"目的城市",formType:"text"},{field:"start_time",name:"开始时间",formType:"datetime"},{field:"end_time",name:"结束时间",formType:"datetime"},{field:"duration",name:"时长(天)",formType:"number"}]}},computed:{},watch:{value:function(e){this.dataValue=e,e.list&&e.list.length>0?this.mainList=e.list:this.mainList.push(this.getValueItem())}},mounted:function(){this.dataValue.list&&this.dataValue.list.length>0?this.mainList=this.dataValue.list:this.mainList.push(this.getValueItem())},methods:{getInputDisable:function(e){return"duration"==e},deleteItems:function(e){this.mainList.splice(e,1),this.calculateValueChange()},addItems:function(){this.mainList.push(this.getValueItem())},datePickerChange:function(e){var t=this.mainList[e];if(t.start_time&&t.end_time){var i=S()(t.start_time),s=S()(t.end_time).diff(i,"hours"),a=Math.floor(s/24),n=s%24;n>=4&&n<8?a+=.5:n>=8&&(a+=1),t.duration=a,this.calculateValueChange()}},valueChange:function(){this.submitValueChange(!1)},calculateValueChange:function(){for(var e=0,t=0;t<this.mainList.length;t++){var i=this.mainList[t];e+=parseFloat(i.duration?i.duration:0)}this.totalDuration=e,this.submitValueChange(!0)},submitValueChange:function(e){this.$emit("value-change",{index:this.index,value:{list:this.mainList,update:e,duration:this.totalDuration}})},getValueItem:function(){return{vehicle:"",trip:"",start_address:"",end_address:"",start_time:"",end_time:"",duration:""}}}},R=(i("MeAA"),Object(n.a)(O,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._l(e.mainList,function(t,s){return i("div",{key:s,staticClass:"expense-item"},[i("flexbox",{staticClass:"expense-item-head"},[i("div",{staticClass:"expense-item-head-title"},[e._v("行程明细("+e._s(s+1)+")")]),e._v(" "),0!=s?i("i",{staticClass:"el-icon-delete expense-item-head-delete",on:{click:function(t){e.deleteItems(s)}}}):e._e()]),e._v(" "),i("flexbox",{staticClass:"clauses",attrs:{wrap:"wrap",align:"stretch"}},e._l(e.showItems,function(a,n){return i("flexbox-item",{key:n,staticClass:"clauses-item",attrs:{span:.5}},[i("div",{staticClass:"clauses-item-title"},[e._v("\n "+e._s(a.name)+"\n ")]),e._v(" "),"datetime"==a.formType?i("el-date-picker",{attrs:{type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期"},on:{change:function(t){e.datePickerChange(s)}},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}}):"select"==a.formType?i("el-select",{on:{change:e.valueChange},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}},e._l(a.data,function(e,t){return i("el-option",{key:t,attrs:{label:e,value:e}})})):"number"==a.formType?i("el-input-number",{attrs:{controls:!1,precision:1,min:0},on:{input:function(t){e.calculateValueChange(s,n)}},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}}):i("el-input",{attrs:{maxlength:100,disabled:e.getInputDisable(a.field),type:"text"},model:{value:t[a.field],callback:function(i){e.$set(t,a.field,i)},expression:"item[subItem.field]"}})],1)})),e._v(" "),i("div",{staticClass:"description"},[i("div",{staticClass:"description-title"},[e._v("备注")]),e._v(" "),i("el-input",{attrs:{rows:3,maxlength:300,type:"textarea",resize:"none","show-word-limit":""},on:{input:e.valueChange},model:{value:t.description,callback:function(i){e.$set(t,"description",i)},expression:"item['description']"}})],1)],1)}),e._v(" "),i("div",{staticClass:"handle-bar"},[i("el-button",{staticClass:"handle-bar-button",attrs:{type:"text",icon:"el-icon-plus"},on:{click:function(t){e.addItems(e.index)}}},[e._v("添加事项")])],1)],2)},[],!1,null,"a260224a",null));R.options.__file="XhLeaves.vue";var j=R.exports,A=i("mkuN"),E=i("/407"),B={name:"RelatedBusiness",components:{CrmRelative:A.a,RelatedBusinessCell:E.a},props:{selectedInfos:{type:Object,default:function(){return{}}}},data:function(){return{showTypes:["customer","contacts","business","contract"],showRelative:!1,showPopover:!1,selectedData:{}}},computed:{},watch:{selectedInfos:function(e){this.selectedData=e}},mounted:function(){},methods:{delRelevance:function(e,t){var i=this;this.$confirm("确认取消关联?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){i.selectedData[e].splice(t,1),i.selectedData=Object(L.t)(i.selectedData),i.submitValueChange()}).catch(function(){i.$message.info("已取消操作")})},getTypeName:function(e){return"customer"==e?"客户":"contacts"==e?"联系人":"business"==e?"商机":"contract"==e?"合同":void 0},crmrelativeClose:function(){this.showPopover=!1},checkInfos:function(e){this.showPopover=!1,this.selectedData=e.data,this.submitValueChange()},submitValueChange:function(){this.$emit("value-change",{index:this.index,value:this.selectedData})}}},M=(i("bxje"),Object(n.a)(B,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-popover",{attrs:{placement:"right-end",width:"800","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}},[e.showRelative?i("crm-relative",{ref:"crmrelative",attrs:{radio:!1,"selected-data":e.selectedData,"show-types":e.showTypes},on:{close:e.crmrelativeClose,changeCheckout:e.checkInfos}}):e._e(),e._v(" "),i("span",{staticClass:"add-btn",attrs:{slot:"reference"},on:{click:function(t){e.showRelative=!0}},slot:"reference"},[i("i",{staticClass:"wk wk-l-plus"}),e._v(" "),i("span",{staticClass:"label"},[e._v("关联业务")])])],1),e._v(" "),i("div",{staticClass:"related-business"},e._l(e.selectedData,function(t,s){return i("div",{key:s},e._l(t,function(t,a){return i("related-business-cell",{key:a,attrs:{data:t,"cell-index":a,type:s,"cursor-pointer":!1},on:{unbind:e.delRelevance}})}))}))],1)},[],!1,null,"942e276e",null));M.options.__file="RelatedBusiness.vue";var N=M.exports,P=i("a/5N"),H=i("vDqi"),X=i.n(H),U=i("8GhS"),z={name:"ExamineCreateView",components:{CreateView:x.a,CreateSections:k.a,CreateExamineInfo:T.a,XhInput:U.g,XhTextarea:U.o,XhSelect:U.l,XhMultipleSelect:U.h,XhDate:U.d,XhDateTime:U.e,XhUserCell:U.p,XhStructureCell:U.n,XhFiles:U.f,CrmRelativeCell:U.a,XhExpenses:$,XhLeaves:j,RelatedBusiness:N},filters:{typeToComponentName:function(e){return"text"==e||"number"==e||"floatnumber"==e||"mobile"==e||"email"==e?"XhInput":"textarea"==e?"XhTextarea":"select"==e?"XhSelect":"checkbox"==e?"XhMultipleSelect":"date"==e?"XhDate":"datetime"==e?"XhDateTime":"user"==e?"XhUserCell":"structure"==e?"XhStructureCell":"file"==e?"XhFiles":"contacts"==e||"customer"==e||"contract"==e||"business"==e?"CrmRelativeCell":"examine_cause"==e?"XhExpenses":"business_cause"==e?"XhLeaves":void 0}},props:{categoryId:{type:[String,Number],default:""},type:[String,Number],categoryTitle:{type:String,default:""},action:{type:Object,default:function(){return{type:"save",id:""}}}},data:function(){return{title:"",loading:!1,crmRules:{},crmForm:{crmFields:[]},batchId:Object(L.s)(),imgFileList:[],fileList:[],examineInfo:{},relatedBusinessInfo:{}}},computed:{showExamine:function(){return!0},crmFileSaveUrl:function(){return w.h},httpHeader:function(){return{authKey:X.a.defaults.headers.authKey,sessionId:X.a.defaults.headers.sessionId}}},watch:{},mounted:function(){document.body.appendChild(this.$el),this.title=this.getTitle(),this.getField(),"update"==this.action.type&&(this.batchId=this.action.data.batchId)},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{relativeValueChange:function(e){this.relatedBusinessInfo=e.value},examineValueChange:function(e){this.examineInfo=e},fieldValueChange:function(e){var t=this.crmForm.crmFields[e.index];if(t.value=e.value,"business_cause"==t.data.form_type&&t.value.update)for(var i=0;i<this.crmForm.crmFields.length;i++){var s=this.crmForm.crmFields[i];if("duration"===s.key){s.value=t.value.duration;break}}else if("examine_cause"==t.data.form_type&&t.value.update)for(var a=0;a<this.crmForm.crmFields.length;a++){var n=this.crmForm.crmFields[a];if("money"===n.key){n.value=t.value.money;break}}"user"!=t.data.form_type&&"structure"!=t.data.form_type&&"file"!=t.data.form_type||this.$refs.crmForm.validateField("crmFields."+e.index+".value")},getField:function(){var e=this;this.loading=!0;var t={types:"oa_examine",module:"oa",controller:"examine",action:"save",types_id:this.categoryId};"update"==this.action.type&&(t.action="update",t.action_id=this.action.id),(0,{update:s.i,save:C.x}[this.action.type])(t).then(function(t){e.getcrmRulesAndModel(t.data),"update"==e.action.type&&e.getUpdateOtherInfo(),e.loading=!1}).catch(function(){e.loading=!1})},getUpdateOtherInfo:function(){this.imgFileList=Object(L.t)(this.action.data.imgList||[]).map(function(e){return e.file_path&&(e.url=e.file_path),e});for(var e=0;e<this.imgFileList.length;e++);this.fileList=Object(L.t)(this.action.data.fileList||[]).map(function(e){return e.file_path&&(e.url=e.file_path),e}),this.relatedBusinessInfo={contacts:(this.action.data.contactsList||[]).map(function(e){return e.id&&(e.contacts_id=e.contacts_id),e}),customer:(this.action.data.customerList||[]).map(function(e){return e.id&&(e.customer_id=e.customer_id),e}),business:(this.action.data.businessList||[]).map(function(e){return e.id&&(e.business_id=e.business_id),e}),contract:(this.action.data.contractList||[]).map(function(e){return e.id&&(e.contract_id=e.contract_id),e})}},setImageList:function(e,t){var i=this;Object(L.p)(e.url).then(function(s){e.url=s.src,i.imgFileList.splice(t,1,e)}).catch(function(){})},getcrmRulesAndModel:function(e){for(var t=-1,i=0;i<e.length;i++){var s=e[i];t+=1;var a=[];if(1==s.is_null)if("business_cause"==s.form_type){var n=function(e,t,i){if(t.list){for(var s=!1,a=0;a<t.list.length;a++)for(var n=t.list[a],l=["start_address","end_address","start_time","end_time","duration"],o=0;o<l.length;o++){var c=l[o];if("duration"==c){if(n.duration<=0){s=!0,i(new Error("行程明细("+(a+1)+")时长应大于0"));break}}else if(Object(P.b)(n[c])){s=!0,i(new Error("请完善明细"));break}}s||i()}else i(new Error("请完善明细"))};a.push({validator:n,trigger:[]})}else if("examine_cause"==s.form_type){n=function(e,t,i){if(t.list){for(var s=!1,a=0;a<t.list.length;a++){for(var n=t.list[a],l=["start_address","end_address","start_time","end_time","traffic","stay","diet","other"],o=0;o<l.length;o++){var c=l[o];if(Object(P.b)(n[c])){s=!0,i(new Error("请完善明细"));break}}if(n.money<=0){s=!0,i(new Error("费用明细("+(a+1)+")合计应大于0"));break}}s||i()}else i(new Error("请完善明细"))};a.push({validator:n,trigger:[]})}else"duration"==s.field&&3==this.type||"money"==s.field&&5==this.type?a.push({required:!0,message:"请完善明细",trigger:["blur","change"]}):a.push({required:!0,message:s.name+"不能为空",trigger:["blur","change"]});if("number"==s.form_type){a.push({validator:function(e,t,i){!t||""==t||Object(L.x)(t)?i():i(new Error("数字的整数部分须少于12位,小数部分须少于4位"))},item:s,trigger:["blur"]})}else if("floatnumber"==s.form_type){a.push({validator:function(e,t,i){!t||""==t||Object(L.w)(t)?i():i(new Error("货币的整数部分须少于10位,小数部分须少于2位"))},item:s,trigger:["blur"]})}else if("mobile"==s.form_type){a.push({validator:function(e,t,i){!t||""==t||Object(L.v)(t)?i():i(new Error("手机格式有误"))},item:s,trigger:["blur"]})}else if("email"==s.form_type){a.push({validator:function(e,t,i){!t||""==t||Object(L.u)(t)?i():i(new Error("邮箱格式有误"))},item:s,trigger:["blur"]})}if(this.crmRules[s.field||s.name]=a,"datetime"==s.form_type){var l={};"update"==this.action.type?l.value=s.value||"":l.value=s.defaultValue,l.key=s.field||s.name,l.data=s,l.disabled=!1,l.styleIndex=t,this.crmForm.crmFields.push(l)}else if("examine_cause"==s.form_type||"business_cause"==s.form_type){l={};if("update"==this.action.type){var o=s.value.map(function(e){return e.imgList?e.imgList=Object(L.t)(e.imgList||[]).map(function(e){return e.file_path&&(e.url=e.file_path),e}):e.imgList=[],e});l.value={list:o}}else l.value={};l.key=s.field||s.name,l.data=s,l.disabled=!1,l.showblock=!0,i%2==0&&(t=-1),this.crmForm.crmFields.push(l)}else if("duration"==s.field&&3==this.type||"money"==s.field&&5==this.type){l={};"update"==this.action.type?l.value=s.value:l.value=s.defaultValue||"",l.key=s.field||s.name,l.data=s,l.disabled=!0,l.styleIndex=t,this.crmForm.crmFields.push(l)}else{l={};"update"==this.action.type?l.value=s.value:"user"==s.form_type||"structure"==s.form_type||"file"==s.form_type||"category"==s.form_type||"customer"==s.form_type||"business"==s.form_type||"contract"==s.form_type?l.value=s.defaultValue?Object(L.t)(s.defaultValue):[]:l.value=s.defaultValue||"",l.key=s.field||s.name,l.data=s,l.disabled=!1,l.styleIndex=t,this.crmForm.crmFields.push(l)}}},saveField:function(){var e=this;this.loading=!0,this.$refs.crmForm.validate(function(t){if(!t){if(e.loading=!1,e.$refs.crmForm.fields)for(var i=0;i<e.$refs.crmForm.fields.length;i++){var s=e.$refs.crmForm.fields[i];if("error"==s.validateState){e.$message.error(s.validateMessage);break}}return!1}if(e.showExamine)e.$refs.examineInfo.validateField(function(t){if(t){var i={file_id:[].concat(b()(e.fileList.map(function(e){return e.response?e.response.data.file_id:e.file_id})),b()(e.imgFileList.map(function(e){return e.response?e.response.data.file_id:e.file_id}))),oaExamineRelation:{}};i.category_id=e.categoryId,e.crmForm.crmFields.map(function(e){i[e.data.field]=e.value}),0===e.examineInfo.config&&(i.check_user_id=e.examineInfo.value[0].id),e.submiteParams(i)}else e.loading=!1});else{var a={file_id:[].concat(b()(e.fileList.map(function(e){return e.response?e.response.data.file_id:e.file_id})),b()(e.imgFileList.map(function(e){return e.response?e.response.data.file_id:e.file_id}))),oaExamineRelation:{}};e.crmForm.crmFields.map(function(e){a[e.data.field]=e.value}),e.submiteParams(a)}})},submiteParams:function(e){var t=this,i=function(i){var s=t.relatedBusinessInfo[i];e.oaExamineRelation[i+"_ids"]=s.map(function(e,t,s){return e[i+"_id"]})};for(var a in this.relatedBusinessInfo)i(a);"update"==this.action.type&&(e.id=this.action.id),Object(s.m)(e).then(function(e){t.loading=!1,t.hidenView(),t.$message.success("操作成功"),t.$emit("save-success")}).catch(function(){t.loading=!1})},getSubmiteParams:function(e,t){for(var i=0;i<e.length;i++){var s=e[i];if("cause"==s.key){if("business_cause"==s.data.form_type)t.oaExamineTravelList=s.value.list;else if("examine_cause"==s.data.form_type){for(var a=0;a<s.value.list.length;a++){var n=s.value.list[a],l=g()({},n);delete l.imgList,t.oaExamineTravelList.push(l)}t[s.key]=[]}}else 1==s.data.fieldType?t.oaExamine[s.key]=this.getRealParams(s):(s.data.value=this.getRealParams(s),t.field.push(s.data))}return t},imgFileUploadSuccess:function(e,t,i){this.imgFileList=i},handleFilePreview:function(e){if(e.response||e.file_id){var t=void 0;t=e.response?e.response.data:e,this.$bus.emit("preview-image-bus",{index:0,data:[t]})}},beforeRemove:function(e,t){var i=this;if(e.response||e.file_id){var s=void 0;return s=e.response?e.response.data.file_id:e.file_id,this.$confirm("您确定要删除该文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(w.c)({file_id:s,module_id:s,module:"work_task",save_name:e.response?e.response.data.save_name:e.save_name}).then(function(e){i.$message.success("操作成功");var t=i.getFileIndex(i.$refs.imageUpload.uploadFiles,s);-1!=t&&i.$refs.imageUpload.uploadFiles.splice(t,1),-1!=(t=i.getFileIndex(i.imgFileList,s))&&i.imgFileList.splice(t,1)}).catch(function(){})}).catch(function(){i.$message({type:"info",message:"已取消操作"})}),!1}return!0},getFileIndex:function(e,t){for(var i=-1,s=0;s<e.length;s++){var a=e[s];if((a.response?a.response.data.file_id:a.file_id)==t){i=s;break}}return i},fileUploadSuccess:function(e,t,i){this.fileList=i},handleFileRemove:function(e,t){var i=this;if(e.response||e.file_id){var s=void 0;return s=e.response?e.response.data.file_id:e.file_id,this.$confirm("您确定要删除该文件吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(w.c)({module_id:s,module:"work_task",file_id:s,save_name:e.response?e.response.data.save_name:e.save_name}).then(function(e){i.$message.success("操作成功");var t=i.getFileIndex(i.$refs.fileUpload.uploadFiles,s);-1!=t&&i.$refs.fileUpload.uploadFiles.splice(t,1),-1!=(t=i.getFileIndex(i.fileList,s))&&i.fileList.splice(t,1)}).catch(function(){})}).catch(function(){i.$message({type:"info",message:"已取消操作"})}),!1}return!0},getRealParams:function(e){return"customer_id"==e.key||"contacts_id"==e.key||"business_id"==e.key||"leads_id"==e.key||"contract_id"==e.key?e.value.length?e.value[0][e.key]:"":"categoryId"==e.key?e.value.length?e.value[e.value.length-1]:"":"user"==e.data.form_type||"structure"==e.data.form_type?e.value.map(function(t,i,s){return e.data.form_type,t.id}).join(","):"file"==e.data.form_type?e.value&&e.value.length>0?e.value[0].batchId:"":"checkbox"==e.data.form_type?e.value&&e.value.length>0?e.value.join(","):"":e.value},hidenView:function(){this.$emit("hiden-view")},getTitle:function(){return"update"==this.action.type?"编辑"+this.categoryTitle:"新建"+this.categoryTitle},getPaddingLeft:function(e,t){return e.showblock&&1==e.showblock?"0":e.styleIndex%2==0?"0":"40px"},getPaddingRight:function(e,t){return e.showblock&&1==e.showblock?"0":e.styleIndex%2==0?"40px":"0"}}},q=(i("cp9R"),Object(n.a)(z,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("create-view",{attrs:{loading:e.loading,"body-style":{height:"100%"}}},[i("flexbox",{staticClass:"crm-create-container",attrs:{direction:"column",align:"stretch"}},[i("flexbox",{staticClass:"crm-create-header"},[i("div",{staticStyle:{flex:"1","font-size":"17px",color:"#333","font-weight":"bold"}},[e._v(e._s(e.title))]),e._v(" "),i("i",{staticClass:"el-icon-close close",on:{click:e.hidenView}})]),e._v(" "),i("div",{staticClass:"crm-create-flex"},[i("create-sections",{attrs:{title:"基本信息"}},[i("flexbox",{attrs:{direction:"column",align:"stretch"}},[i("div",{staticClass:"crm-create-body"},[i("el-form",{ref:"crmForm",staticClass:"crm-create-box",attrs:{model:e.crmForm,"label-position":"top"}},e._l(e.crmForm.crmFields,function(t,s){return i("el-form-item",{key:t.key,class:{"crm-create-block-item":t.showblock,"crm-create-item":!t.showblock},style:{"padding-left":e.getPaddingLeft(t,s),"padding-right":e.getPaddingRight(t,s)},attrs:{prop:"crmFields."+s+".value",rules:e.crmRules[t.key]}},[i("div",{staticStyle:{display:"inline-block"},attrs:{slot:"label"},slot:"label"},[i("div",{staticClass:"form-label"},[e._v("\n "+e._s(t.data.name)+"\n "),i("span",{staticStyle:{color:"#999"}},[e._v("\n "+e._s(t.data.inputTips?"("+t.data.inputTips+")":"")+"\n ")])])]),e._v(" "),i(e._f("typeToComponentName")(t.data.form_type),{tag:"component",attrs:{value:t.value,index:s,item:t,relation:t.relation,radio:!1,disabled:t.disabled},on:{"value-change":e.fieldValueChange}})],1)}))],1)])],1),e._v(" "),i("div",{staticClass:"img-accessory"},[i("div",{staticClass:"img-box"},[i("el-upload",{ref:"imageUpload",attrs:{action:e.crmFileSaveUrl,headers:e.httpHeader,data:{type:"img",batchId:e.batchId},"on-preview":e.handleFilePreview,"before-remove":e.beforeRemove,"on-success":e.imgFileUploadSuccess,"file-list":e.imgFileList,name:"file",multiple:"",accept:"image/*","list-type":"picture-card"}},[i("p",{staticClass:"add-img"},[i("span",{staticClass:"el-icon-picture"}),e._v(" "),i("span",[e._v("添加图片")])]),e._v(" "),i("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),i("p",{staticClass:"add-accessory"},[i("el-upload",{ref:"fileUpload",attrs:{action:e.crmFileSaveUrl,headers:e.httpHeader,data:{type:"file",batchId:e.batchId},"on-preview":e.handleFilePreview,"before-remove":e.handleFileRemove,"on-success":e.fileUploadSuccess,"file-list":e.fileList,name:"file",multiple:"",accept:"*.*"}},[i("p",[i("i",{staticClass:"wukong wukong-file"}),e._v("\n 添加附件\n ")])])],1)]),e._v(" "),i("related-business",{staticClass:"related-business",attrs:{"selected-infos":e.relatedBusinessInfo},on:{"value-change":e.relativeValueChange}}),e._v(" "),e.showExamine?i("create-sections",{attrs:{title:"审核信息"}},[i("template",{slot:"header"},[1===e.examineInfo.config||0===e.examineInfo.config?i("div",{staticClass:"examine-type"},[e._v(e._s(1===e.examineInfo.config?"固定审批流":"授权审批人"))]):e._e(),e._v(" "),e.examineInfo&&e.examineInfo.remark?i("el-tooltip",{attrs:{content:e.examineInfo.remark,effect:"dark",placement:"top"}},[i("i",{staticClass:"wk wk-help wk-help-tips",staticStyle:{height:"13px"}})]):e._e()],1),e._v(" "),i("create-examine-info",{ref:"examineInfo",attrs:{"types-id":e.categoryId,types:"oa_examine"},on:{"value-change":e.examineValueChange}})],2):e._e()],1),e._v(" "),i("div",{staticClass:"handle-bar"},[i("el-button",{staticClass:"handle-button",nativeOn:{click:function(t){return e.hidenView(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.saveField,expression:"saveField"}],staticClass:"handle-button",attrs:{type:"primary"}},[e._v("保存")])],1)],1)],1)},[],!1,null,"5dee738f",null));q.options.__file="ExamineCreateView.vue";var K=q.exports,W=i("slnp"),Y=i("yPq4"),Z=i("QhmF"),Q={name:"Index",components:{ExamineTabsHead:o,ExamineCell:m,ExamineCategorySelect:v,ExamineCreateView:K,ExamineDetail:W.a,CRMAllDetail:Y.a,ExamineHandle:Z.a},mixins:[c.a],props:{},data:function(){return{tabsSelectValue:"",selectList:[],examineType:"",list:[],loading:!1,noMore:!1,scrollKey:Date.now(),page:1,selectId:"",showCategorySelect:!1,isCreate:!1,createAction:{type:"save"},createInfo:{},detailIndex:0,rowID:"",rowData:{},showDview:!1,relatedID:"",relatedCRMType:"",showRelatedDetail:!1,showExamineHandle:!1,recordId:"",examineStatus:1}},computed:{scrollDisabled:function(){return this.loading||this.noMore},tabs:function(){return"my"==this.examineType?[{label:"全部",name:"all"},{label:"待审批",name:"0"},{label:"审批通过",name:"2"},{label:"审批拒绝",name:"4"}]:"wait"==this.examineType?[{label:"全部",name:"all"},{label:"待我审批的",name:"0"},{label:"我已审批的",name:"1"}]:[]}},watch:{},mounted:function(){this.examineType=this.$route.params.type,this.getSelectList(),this.tabsSelectValue=(this.examineType,"0")},beforeRouteUpdate:function(e,t,i){this.examineType=e.params.type,this.selectId="",this.tabsSelectValue=(this.examineType,"0"),this.$refs.tabsHead.getDefaultSelectValue(),this.refreshList(),i()},beforeDestroy:function(){},methods:{refreshList:function(){this.page=1,this.list=[],this.noMore=!1,this.scrollKey=Date.now()},getList:function(){var e=this;this.loading=!0;var t={page:this.page,limit:15,category_id:this.selectId},i=null,a="all"==this.tabsSelectValue?"all":this.tabsSelectValue;"my"==this.examineType?(t.check_status=a,i=s.j):"wait"==this.examineType&&(t.examine_by="0"==a?1:"all"==a?"all":2,i=s.k),i(t).then(function(i){e.loading=!1;var s="all"==e.tabsSelectValue?"all":e.tabsSelectValue,a=!1;"my"==e.examineType&&t.check_status==s?a=!0:"wait"==e.examineType&&t.examine_by==("0"==s?1:"all"==s?"all":2)&&(a=!0),a?(e.noMore||(e.list=e.list.concat(i.data.page.list),e.page++),e.noMore=i.data.page.lastPage):e.refreshList()}).catch(function(){e.noMore=!0,e.loading=!1})},getSelectList:function(){var e=this;Object(s.a)().then(function(t){e.selectList=t.data.map(function(t){var i=e.getCategoryIcon(t.icon);return i.label=t.title,i.command=t.category_id,i}),e.selectList.unshift({icon:"wk wk-approve",color:"#9376FF",command:"",label:"全部审批"})}).catch(function(){e.loading=!1})},tabsChange:function(e){this.refreshList()},tabsSelect:function(e){this.selectId=e,this.refreshList()},cellHandle:function(e,t,i){var a=this;this.detailIndex=i,"detail"==e?(this.showRelatedDetail=!1,this.rowID=t.examine_id,this.showDview=!0):"relate-detail"==e?(this.showDview=!1,this.relatedID=t.id,this.relatedCRMType=t.type,this.showRelatedDetail=!0):"edit"==e?(t.title=t.category_name,this.createInfo=t,this.createAction={type:"update",id:t.examine_id,data:t},this.isCreate=!0):"delete"==e?this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.d)({id:t.examine_id}).then(function(e){a.list.splice(i,1),a.$message({type:"success",message:"删除成功!"})})}).catch(function(){a.$message({type:"info",message:"已取消删除"})}):"reject"!=e&&"pass"!=e&&"withdraw"!=e||(this.rowID=t.examine_id,this.examineStatus={pass:1,reject:2,withdraw:4}[e],this.rowData=t,this.showExamineHandle=!0)},selcetExamineCategory:function(e){this.createInfo=e,this.createAction={type:"save"},this.isCreate=!0},createClick:function(){this.showCategorySelect=!0},createHideView:function(){this.isCreate=!1},examineHandleCallBack:function(e){this.refreshDataByHandle()},refreshDataByHandle:function(){this.refreshList()},detailHandleCallBack:function(e,t){this.detailIndex=t,this.refreshDataByHandle()},exportClick:function(){var e=this;if(""!==this.selectId){this.loading=!0;var t={category_id:this.selectId},i="all"==this.tabsSelectValue?"all":this.tabsSelectValue;"my"==this.examineType?t.check_status=i:"wait"==this.examineType&&(t.examine_by="0"==i?1:"all"==i?"all":2),Object(s.e)(t).then(function(t){Object(L.c)(t),e.loading=!1}).catch(function(){e.loading=!1})}else this.$message.error("请选择一种审批类型导出")}}},J=(i("IvXA"),Object(n.a)(Q,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"main"},[i("examine-tabs-head",{ref:"tabsHead",attrs:{tabs:e.tabs,"select-list":e.selectList,"select-value":e.tabsSelectValue},on:{"update:selectValue":function(t){e.tabsSelectValue=t},change:e.tabsChange,select:e.tabsSelect,add:e.createClick,export:e.exportClick}}),e._v(" "),i("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.getList,expression:"getList"}],key:""+e.scrollKey+e.tabsSelectValue,staticClass:"cell-section",attrs:{"infinite-scroll-distance":"100","infinite-scroll-disabled":"scrollDisabled"}},[e._l(e.list,function(t,s){return i("examine-cell",{key:s,attrs:{data:t,index:s},on:{handle:e.cellHandle}})}),e._v(" "),e.loading?i("p",{staticClass:"scroll-bottom-tips"},[e._v("加载中...")]):e._e(),e._v(" "),e.noMore?i("p",{staticClass:"scroll-bottom-tips"},[e._v("没有更多了")]):e._e()],2),e._v(" "),i("examine-category-select",{attrs:{show:e.showCategorySelect},on:{select:e.selcetExamineCategory,close:function(t){e.showCategorySelect=!1}}}),e._v(" "),e.isCreate?i("examine-create-view",{attrs:{"category-id":e.createInfo.category_id,type:e.createInfo.type,"category-title":e.createInfo.category_name,action:e.createAction},on:{"save-success":e.refreshList,"hiden-view":e.createHideView}}):e._e(),e._v(" "),e.showDview?i("examine-detail",{staticClass:"d-view",attrs:{id:e.rowID,"detail-index":e.detailIndex,"no-listener-class":["examine-content"]},on:{"hide-view":function(t){e.showDview=!1},"on-examine-handle":e.detailHandleCallBack}}):e._e(),e._v(" "),i("c-r-m-all-detail",{attrs:{visible:e.showRelatedDetail,"crm-type":e.relatedCRMType,id:e.relatedID,"no-listener-class":["relate-cell"]},on:{"update:visible":function(t){e.showRelatedDetail=t}}}),e._v(" "),i("examine-handle",{attrs:{show:e.showExamineHandle,id:e.rowID,"record-id":e.rowData.examineRecordId,detail:e.rowData,status:e.examineStatus,"examine-type":"oa_examine"},on:{close:function(t){e.showExamineHandle=!1},save:e.examineHandleCallBack}})],1)},[],!1,null,"14ff51ac",null));J.options.__file="index.vue";t.default=J.exports},cp9R:function(e,t,i){"use strict";var s=i("TuF4");i.n(s).a},deZW:function(e,t,i){},eOwn:function(e,t,i){"use strict";var s=i("m1cH"),a=i.n(s),n=i("QbLZ"),l=i.n(n),o=i("7Dod"),c=i("6iAj"),r=i("4XAY"),u=i("KTTK"),d=i("mkuN"),m=i("zMq1"),f=i("ye9D"),h=i("NYF1"),p=i("YIeP"),v=i("7Qib");var _={methods:{dispatch:function(e,t,i){for(var s=this.$parent||this.$root,a=s.$options.componentName;s&&(!a||a!==e);)(s=s.$parent)&&(a=s.$options.componentName);s&&s.$emit.apply(s,[t].concat(i))},broadcast:function(e,t,i){(function e(t,i,s){this.$children.forEach(function(a){a.$options.componentName===t?a.$emit.apply(a,[i].concat(s)):e.apply(a,[t,i].concat([s]))})}).call(this,e,t,i)}}},g={name:"LogAdd",components:{CrmRelative:d.a,AddImageList:m.a,AddFileList:f.a,AddRelateList:h.a,CommonWords:p.a},mixins:[_],props:{showBusiness:{type:Boolean,default:!1},showContacts:{type:Boolean,default:!1},contacts:Array,contactsId:[String,Number],followTypes:Array,id:[String,Number],crmType:{type:String,default:""}},data:function(){return{isUnfold:!1,content:"",imgFiles:[],businessAction:{},files:[],showBusinessPopover:!1,business:[],selectContactsId:"",followType:"",nextTime:"",showRelativeType:"",batchId:Object(v.s)()}},computed:{autosize:function(){return this.isUnfold?{minRows:3,maxRows:6}:{minRows:1,maxRows:1}}},watch:{followTypes:function(){this.getDefalutFollowType()},content:function(e){var t=!!(e&&e.length>0);this.dispatch("SlideView","setEditClose",[t])},contactsId:function(){this.selectContactsId=this.contactsId||""},id:{handler:function(){this.businessAction={type:"condition",data:{moduleType:this.crmType,customer_id:this.id}}},immediate:!0}},created:function(){this.selectContactsId=this.contactsId||"",this.getDefalutFollowType()},beforeDestroy:function(){},methods:{getDefalutFollowType:function(){this.followTypes&&this.followTypes.length>0?this.followType=this.followTypes[0].value:this.followType=""},resetInfo:function(){this.nextTime="",this.isUnfold=!1,this.content="",this.dispatch("SlideView","setEditClose",[!1]),this.imgFiles=[],this.files=[],this.business=[],this.selectContactsId=this.contactsId||"",this.showRelativeType="",this.batchId=Object(v.s)(),this.getDefalutFollowType()},commonWordsSelect:function(e){var t=this;this.content?this.$confirm("您选中的常用语将覆盖当前填写内容?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",customClass:"is-particulars"}).then(function(){t.content=e}).catch(function(){}):this.content=e},checkRelativeInfos:function(e){"business"==this.showRelativeType&&(this.business=e.data)},barClick:function(e){this.showRelativeType=e,"business"==e?this.showBusinessPopover=!0:"file"==e?this.$refs.fileInput.click():"img"==e&&this.$refs.imgInput.click()},uploadFile:function(e){var t=e.target.files;if(t.length){for(var i=0;i<t.length;i++){if(-1==t[i].type.indexOf("image")&&"img"==this.showRelativeType)return void this.$message.error("请上传正确的文件类型")}for(var s="image/*"==e.target.accept?"img":"file",a=0;a<t.length;a++){var n=t[a];this.uploadFileRequest(n,s)}e.target.value=""}},uploadFileRequest:function(e,t,i){var s=this;this.$wkUploadFile.upload({file:e,params:{module_id:this.id,module:"crm_"+this.crmType,type:t}}).then(function(a){var n=a.res.data||{};n.size=Object(v.h)(e.size),"img"==t?s.imgFiles.push(n):(n.icon=Object(v.o)(e),s.files.push(n)),i&&i()}).catch(function(){})},deleteImage:function(e,t){this.deleteImgOrFile("image",e,t)},deleteFile:function(e,t){this.deleteImgOrFile("file",e,t)},deleteImgOrFile:function(e,t,i){var s=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.c)({module:"crm_"+s.crmType,module_id:s.id,save_name:"image"==e?s.imgFiles[i].save_name:s.files[i].save_name}).then(function(t){"image"==e?s.imgFiles.splice(i,1):s.files.splice(i,1),s.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteAllFile:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.e)({module:"crm_"+t.crmType,module_id:t.id,file_id:[].concat(a()(t.imgFiles.map(function(e){return e.file_id})),a()(t.files.map(function(e){return e.file_id}))),batchId:t.batchId,type:e}).then(function(i){2==e?t.imgFiles=[]:t.files=[],t.$message.success("操作成功")}).catch(function(){})}).catch(function(){})},deleteRelate:function(e,t){this.business.splice(t,1)},inputFocus:function(){var e=this;this.isUnfold=!0,this.$nextTick(function(){e.$refs.textarea.focus(),e.$emit("focus")})},sendClick:function(){this.$emit("send",{id:this.id,content:this.content,files:this.files,images:this.imgFiles,business:this.business,contactsId:this.selectContactsId,batchId:this.batchId,followType:this.followType,nextTime:this.nextTime})},close:function(){this.isUnfold=!1,this.$emit("close")}}},y=(i("uoQ8"),i("KHd+")),b=Object(y.a)(g,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{class:["mix-content",{unfold:!e.isUnfold}]},[e.isUnfold?i("i",{staticClass:"wk wk-close",on:{click:e.close}}):e._e(),e._v(" "),e.isUnfold?i("div",{staticClass:"mix-content-select"},[e.showContacts?i("el-select",{attrs:{clearable:"",placeholder:"选择联系人"},model:{value:e.selectContactsId,callback:function(t){e.selectContactsId=t},expression:"selectContactsId"}},e._l(e.contacts,function(e){return i("el-option",{key:e.contactsId,attrs:{label:e.name,value:e.contacts_id}})})):e._e(),e._v(" "),i("el-select",{attrs:{clearable:"",placeholder:"选择跟进方式"},model:{value:e.followType,callback:function(t){e.followType=t},expression:"followType"}},e._l(e.followTypes,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),i("el-date-picker",{attrs:{editable:!1,type:"datetime",placeholder:"选择下次联系时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.nextTime,callback:function(t){e.nextTime=t},expression:"nextTime"}}),e._v(" "),i("common-words",{on:{select:e.commonWordsSelect}})],1):e._e(),e._v(" "),i("div",{class:["i-cont",{unfold:!e.isUnfold}]},[e.isUnfold?e._e():i("i",{staticClass:"wk wk-write"}),e._v(" "),i("el-input",{ref:"textarea",attrs:{autosize:e.autosize,maxlength:800,type:"textarea",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&&e.isUnfold?i("add-image-list",{attrs:{data:e.imgFiles},on:{delete:e.deleteImage,"delete-all":function(t){e.deleteAllFile(2)},upload:e.uploadFile}}):e._e(),e._v(" "),e.files.length>0&&e.isUnfold?i("add-file-list",{attrs:{data:e.files},on:{delete:e.deleteFile,"delete-all":function(t){e.deleteAllFile(1)}}}):e._e(),e._v(" "),e.business.length>0&&e.isUnfold?i("add-relate-list",{attrs:{data:e.business,type:"business"},on:{delete:e.deleteRelate}}):e._e(),e._v(" "),e.isUnfold?i("div",{staticClass:"bar-cont"},[i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-picture"},on:{click:function(t){e.barClick("img")}}},[e._v("图片")]),e._v(" "),i("el-button",{staticClass:"handle-button",attrs:{type:"text",icon:"wk wk-file"},on:{click:function(t){e.barClick("file")}}},[e._v("附件")]),e._v(" "),e.showBusiness?i("el-popover",{attrs:{placement:"bottom",width:"700","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showBusinessPopover,callback:function(t){e.showBusinessPopover=t},expression:"showBusinessPopover"}},[i("crm-relative",{ref:"crmrelative",attrs:{show:e.showBusinessPopover,radio:!1,action:e.businessAction,"selected-data":{business:e.business},"crm-type":"business"},on:{close:function(t){e.showBusinessPopover=!1},changeCheckout:e.checkRelativeInfos}}),e._v(" "),i("el-button",{staticClass:"handle-button",staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",type:"text",icon:"wk wk-associate"},on:{click:function(t){e.barClick("business")}},slot:"reference"},[e._v("关联商机")])],1):e._e(),e._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.sendClick,expression:"sendClick"}],staticClass:"send-btn",attrs:{type:"primary"}},[e._v("发布")])],1):e._e(),e._v(" "),i("input",{ref:"fileInput",staticClass:"file-input",attrs:{accept:"*.*",type:"file",multiple:""},on:{change:e.uploadFile}}),e._v(" "),i("input",{ref:"imgInput",staticClass:"file-input",attrs:{accept:"image/*",type:"file",multiple:""},on:{change:e.uploadFile}})],1)},[],!1,null,"3cdb3711",null);b.options.__file="LogAdd.vue";var C=b.exports,w=i("O8VQ"),x=i("/G0b"),k=i("8OTK"),T=i("C3Po"),I=i("ZoMv"),L=i("Z+Ht"),F=i("vvxI"),D=i("ZX9L"),$=i("ehos"),V=i("L2JU"),S={name:"Activity",components:{LogAdd:C,LogCell:w.a,CRMAllCreate:k.default,TaskQuickAdd:T.a,TimeTypeSelect:D.a,LogEditDialog:x.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-5f62"),i.e("chunk-34a4"),i.e("chunk-2704"),i.e("chunk-9acd"),i.e("chunk-4ee54")]).then(i.bind(null,"3z7q"))}},mixins:[L.a,F.a],props:{handle:{type:Array,default:function(){return[]}},id:[String,Number],contactsId:[String,Number],crmType:{type:String,default:""},isSeas:{type:Boolean,default:!1},typeList:{type:Array,default:function(){return[]}},detail:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,isSearchRequest:!1,filterValue:{},timeOptions:[{label:"全部",value:""},{label:"最近7天",value:"7"},{label:"最近30天",value:"30"},{label:"最近60天",value:"60"}],contacts:[],followTypes:[],handleType:"",activityType:{icon:"all",color:"#2362FB",command:"",label:"全部活动"},list:[],noMore:!1,page:1,isCRMCreate:!1,createActionInfo:{type:"relative",crmType:this.crmType,data:{}},createCRMType:"",isTaskCreate:!1,showFullDetail:!1,relationID:"",relationCrmType:"",scrollKey:Date.now(),logEditData:null,logEditPosition:{seciton:0,index:0},logEditDialogVisible:!1}},computed:l()({},Object(V.b)(["crm"]),{canCreateFollowRecord:function(){return this.crm&&this.crm.activity&&this.crm.activity.save},showRelate:function(){return"customer"==this.crmType},scrollDisabled:function(){return this.loading||this.noMore},taskParams:function(){var e={};return e[this.crmType+"_ids"]=this.id,e},taskProps:function(){var e={};e[this.crmType]=[this.detail];var t={};return t[this.crmType+"Ids"]=[this.id],{relatedObj:e,relatedObjIds:t}}}),watch:{id:function(){this.initInfo(),this.refreshLogList()}},created:function(){this.debouncedRefreshLogList=Object($.debounce)(300,this.refreshLogList),this.initInfo()},methods:{getLogTypeList:function(){var e=this;Object(c.r)().then(function(t){e.followTypes=t.data.map(function(e){return{value:e,label:e}})}).catch(function(){})},getContactsList:function(){var e=this;Object(o.y)({customer_id:this.id}).then(function(t){e.contacts=t.data.list}).catch(function(){})},sendLog:function(e){var t=this;if(e.content){var i={category:e.followType,activity_type:I.a.keyToTypeData[this.crmType],activity_type_id:e.id,content:e.content,next_time:e.nextTime||"",is_event:0,file_id:[].concat(a()(e.files.map(function(e){return e.file_id})),a()(e.images.map(function(e){return e.file_id}))),business_ids:[].concat(a()(e.business.map(function(e){return e.business_id}))),contacts_ids:e.contactsId};this.sendLoading=!0,Object(r.a)(i).then(function(e){t.sendLoading=!1,t.$message.success("发布成功"),t.$refs.logAdd&&t.$refs.logAdd.resetInfo(),t.refreshLogList()}).catch(function(){t.sendLoading=!1})}else this.$message.error("请输入跟进内容")},handleClick:function(e){var t=this;if(this.handleType==e?this.handleType="":this.handleType=e,"log"==e)this.isTaskCreate=!1,this.$nextTick(function(){t.$refs.logAdd&&(t.$refs.logAdd.isUnfold=t.handleType==e)});else if("task"==e)this.isTaskCreate=!0,this.$nextTick(function(){t.$refs.taskAdd.inputFocus()});else{this.isTaskCreate=!1;var i={type:"relative",crmType:this.crmType,data:{}};"contacts"==this.crmType?(i.data.customer=Object(v.t)(this.detail),"business"==e&&(i.relativeData={contactsId:this.detail.contactsId})):"customer"==this.crmType?i.data.customer=Object(v.t)(this.detail):"business"==this.crmType?(i.data.customer=Object(v.t)(this.detail),i.data.business=Object(v.t)(this.detail),"contacts"==e&&(i.relativeData={businessId:this.detail.businessId})):"contract"==this.crmType&&(i.data.customer=Object(v.t)(this.detail),i.data.contract=Object(v.t)(this.detail)),this.createActionInfo=i,this.createCRMType=e,this.isCRMCreate=!0}},initInfo:function(){var e=this;this.$nextTick(function(){e.$refs.logAdd&&e.$refs.logAdd.resetInfo(),e.$refs.taskAdd&&e.$refs.taskAdd.resetSendData()}),this.filterValue={search:"",timeLine:{label:"全部",value:""}},this.getLogTypeList(),this.showRelate&&this.getContactsList()},refreshLogList:function(e){this.isSearchRequest=e||!1,this.page=1,this.noMore=!1,this.list=[],this.scrollKey=Date.now()},handleSelectClick:function(e){this.activityType=e,this.refreshLogList()},timeTypeChange:function(e){this.filterValue.timeLine=e,this.refreshLogList()},getLogList:function(){var e=this;this.loading=!0;var t={module:this.crmType,page:this.page,crmType:I.a[this.crmType],activity_type:this.activityType.command||"",activity_type_id:this.id};this.filterValue.search&&(t.search=this.filterValue.search),this.filterValue.timeLine.type&&("custom"===this.filterValue.timeLine.type?(t.start_date=this.filterValue.timeLine.startTime.replace(/\./g,"-"),t.end_date=this.filterValue.timeLine.endTime.replace(/\./g,"-")):t.interval_day=this.filterValue.timeLine.value||""),Object(r.c)(t).then(function(t){if(e.loading=!1,!e.noMore)if(e.page++,e.list.length){var i=e.list[e.list.length-1];t.data.time&&t.data.list.length&&i.time!=t.data.time&&e.list.push(t.data)}else t.data.time&&t.data.list.length&&e.list.push(t.data);e.noMore=t.data.lastPage,e.isSearchRequest&&e.$nextTick(function(){e.$refs.activitySearchInput.focus()})}).catch(function(){e.noMore=!0,e.loading=!1})},createCRMSuccess:function(){this.handleType="",this.refreshLogList()},createCRMClose:function(){this.isCRMCreate=!1,this.handleType=""},checkCRMDetail:function(e,t){this.relationID=t,this.relationCrmType=e,this.showFullDetail=!0},getActivityIcon:function(e){return this.getXrIcon(this.getActivityType(e))},getActivityTypeColor:function(e){return this.getXrIconColor(this.getActivityType(e))},logCellDelete:function(e,t,i){this.list[i].list.splice(t,1),0==this.list[i].list.length&&this.list.splice(i,1),this.scrollKey=Date.now()},logCellEdit:function(e,t,i){this.logEditData=e,this.logEditPosition={seciton:i,index:t},this.logEditDialogVisible=!0},logEditSave:function(e){this.logEditPosition.seciton>=0&&this.logEditPosition.index>=0&&this.list[this.logEditPosition.seciton].list.splice(this.logEditPosition.index,1,e),this.getLogList()}}},O=(i("N8+3"),Object(y.a)(S,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.getLogList,expression:"getLogList"}],key:e.scrollKey,staticClass:"main",attrs:{"infinite-scroll-distance":"100","infinite-scroll-disabled":"scrollDisabled"}},[i("div",[!e.isSeas&&e.handle&&e.handle.length?i("div",{staticClass:"main-handle"},e._l(e.handle,function(t,s){return i("el-button",{key:s,class:{"is-select":e.handleType===t.type},attrs:{type:"primary",icon:"wk wk-add"},on:{click:function(i){e.handleClick(t.type)}}},[e._v("\n "+e._s(t.label)+"\n ")])})):e._e(),e._v(" "),!e.isSeas&&e.handle&&e.handle.length?[!e.isTaskCreate&&e.canCreateFollowRecord?i("log-add",{ref:"logAdd",staticClass:"log-add",attrs:{id:e.id,"show-business":e.showRelate,"show-contacts":e.showRelate,contacts:e.contacts,"contacts-id":e.contactsId,"follow-types":e.followTypes,"crm-type":e.crmType},on:{send:e.sendLog,focus:function(t){e.handleType="log"},close:function(t){e.handleClick(e.handleType)}}}):i("task-quick-add",{ref:"taskAdd",staticClass:"task-quick-add",attrs:{params:e.taskParams,props:e.taskProps},on:{focus:function(t){e.handleType="task"},send:e.refreshLogList}})]:e._e(),e._v(" "),i("div",{staticClass:"log",class:{"is-top":e.handle&&0==e.handle.length}},[i("flexbox",{staticClass:"log__header",attrs:{justify:"flex-end"}},[i("el-input",{ref:"activitySearchInput",attrs:{placeholder:"关键字搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.debouncedRefreshLogList(!0)}},model:{value:e.filterValue.search,callback:function(t){e.$set(e.filterValue,"search",t)},expression:"filterValue.search"}}),e._v(" "),i("time-type-select",{attrs:{width:190,options:e.timeOptions,"default-type":e.filterValue.timeLine},on:{change:e.timeTypeChange}}),e._v(" "),e.typeList.length>1?i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleSelectClick}},[i("span",{staticClass:"el-dropdown-link"},[i("i",{class:["wk","dropdown-icon","wk-"+e.activityType.icon],style:{backgroundColor:e.activityType.color}}),e._v(e._s(e.activityType.label)),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.typeList,function(t,s){return i("el-dropdown-item",{key:s,attrs:{command:t}},[i("i",{class:["wk","dropdown-icon","wk-"+t.icon],style:{backgroundColor:t.color}}),e._v(e._s(t.label))])}))],1):e._e()],1),e._v(" "),e._l(e.list,function(t,s){return i("div",{key:s,staticClass:"log-section"},[i("div",{staticClass:"log-section__title"},[i("span",{staticClass:"section-title"},[i("span",{staticClass:"section-title__time"},[e._v(e._s(t.time))])])]),e._v(" "),e._l(t.list,function(a,n){return[1==a.type?i("div",{key:n,staticClass:"log-cell",class:{"only-one":1==t.list.length}},[i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":!e.isSeas},on:{"crm-detail":e.checkCRMDetail,delete:e.logCellDelete,edit:e.logCellEdit}}),e._v(" "),i("i",{staticClass:"wk wk-message log-cell__mark"})],1):i("div",{key:n,staticClass:"log-cell activity-cell",class:{"only-one":1==t.list.length}},[2==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[e._v(e._s(a.update_time)+" "+e._s(a.create_user_name)+"创建了"+e._s(e.getActivityTypeName(a.activity_type))+":")]),i("span",{staticClass:"activity-cell__content",on:{click:function(t){e.checkCRMDetail(e.getActivityType(a.activity_type),a.activity_type_id)}}},[e._v(e._s(a.activity_type_name||"查看详情"))])]):3==a.type?i("div",{staticClass:"activity-cell"},[i("span",{staticClass:"activity-cell__label"},[e._v(e._s(a.update_time)+" "+e._s(a.create_user_name)+"将商机:")]),e._v(" "),i("span",{staticClass:"activity-cell__content",on:{click:function(t){e.checkCRMDetail("business",a.activity_type_id)}}},[e._v(e._s(a.activity_type_name))]),e._v(" "),i("span",[e._v(e._s(" "+a.content))])]):4==a.type?i("log-cell",{attrs:{item:a,section:s,index:n,"can-delete":""},on:{"crm-detail":e.checkCRMDetail,delete:e.logCellDelete}}):e._e(),e._v(" "),i("i",{staticClass:"log-cell__mark",class:e.getActivityIcon(a.activity_type),staticStyle:{"background-color":"#FB9323"},style:{backgroundColor:e.getActivityTypeColor(a.activity_type)}})],1)]})],2)}),e._v(" "),e.loading?i("p",{staticClass:"scroll-bottom-tips"},[e._v("加载中...")]):e._e(),e._v(" "),e.noMore?i("p",{staticClass:"scroll-bottom-tips"},[e._v("没有更多了")]):e._e()],2)],2),e._v(" "),e.isCRMCreate?i("c-r-m-all-create",{attrs:{"crm-type":e.createCRMType,action:e.createActionInfo},on:{"save-success":e.createCRMSuccess,close:e.createCRMClose}}):e._e(),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showFullDetail,"crm-type":e.relationCrmType,id:e.relationID},on:{"update:visible":function(t){e.showFullDetail=t}}}),e._v(" "),i("log-edit-dialog",{attrs:{visible:e.logEditDialogVisible,data:e.logEditData},on:{"update:visible":function(t){e.logEditDialogVisible=t},save:e.logEditSave}})],1)},[],!1,null,"344bab02",null));O.options.__file="index.vue";t.a=O.exports},"ej9+":function(e,t,i){"use strict";var s={name:"BaseTabsHead",components:{},props:{selectValue:[String,Number],tabs:Array},data:function(){return{currentValue:""}},computed:{},watch:{selectValue:function(){this.currentValue=this.selectValue}},mounted:function(){this.currentValue=this.selectValue},beforeDestroy:function(){},methods:{handleTabsClick:function(e,t){this.$emit("update:selectValue",e.name),this.$emit("change",e.name)}}},a=(i("kr3W"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("flexbox",{staticClass:"base-tabs-head",attrs:{justify:"space-between"}},[i("div",[e._t("left")],2),e._v(" "),i("el-tabs",{on:{"tab-click":e.handleTabsClick},model:{value:e.currentValue,callback:function(t){e.currentValue=t},expression:"currentValue"}},e._l(e.tabs,function(e,t){return i("el-tab-pane",{key:t+e.name,attrs:{label:e.label,name:e.name}})})),e._v(" "),i("div",[e._t("right")],2)],1)},[],!1,null,"fa74c14a",null);n.options.__file="index.vue";t.a=n.exports},ep8U:function(e,t,i){},epE4:function(e,t,i){},fV8c:function(e,t,i){},"fp/U":function(e,t,i){},gXkk:function(e,t,i){"use strict";var s=i("CrBE");i.n(s).a},"i+04":function(e,t,i){"use strict";var s=i("sckx");i.n(s).a},i2VW:function(e,t,i){},k3SN:function(e,t,i){},kr3W:function(e,t,i){"use strict";var s=i("4p7F");i.n(s).a},m1cH:function(e,t,i){"use strict";t.__esModule=!0;var s,a=i("rfXi"),n=(s=a)&&s.__esModule?s:{default:s};t.default=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return(0,n.default)(e)}},m7P8:function(e,t,i){"use strict";var s=i("deZW");i.n(s).a},nVk2:function(e,t,i){"use strict";var s=i("fp/U");i.n(s).a},oWzH:function(e,t,i){"use strict";t.a={methods:{getCategoryIcon:function(e){var t=e&&"string"==typeof e?e.split(","):[];return t.length>1?{icon:t[0],color:t[1]}:{icon:"wk wk-approve",color:"#9376FF"}}}}},pWUH:function(e,t,i){},paiq:function(e,t,i){"use strict";var s=i("D67r");i.n(s).a},q0fG:function(e,t,i){"use strict";var s=i("ep8U");i.n(s).a},s357:function(e,t,i){"use strict";var s=i("TDiV");i.n(s).a},sckx:function(e,t,i){},slnp:function(e,t,i){"use strict";var s=i("7qmR"),a=i("Ew9n"),n=i("3biH"),l=i("/407"),o=i("hwzM"),c=i("7Qib"),r=i("oWzH"),u={name:"ExamineDetail",components:{SlideView:a.a,ExamineInfo:n.a,RelatedBusinessCell:l.a,CRMFullScreenDetail:function(){return Promise.all([i.e("chunk-2704"),i.e("chunk-9acd"),i.e("chunk-7d53")]).then(i.bind(null,"3z7q"))},FileCell:o.a},filters:{fileName:function(e){return(e.name&&e.name.length>10?e.name.substring(0,10)+"...":e.name)+"("+Object(c.h)(e.size)+")"}},mixins:[r.a],props:{id:[String,Number],detailIndex:[String,Number],detailSection:[String,Number],noListenerClass:{type:Array,default:function(){return["list-box"]}}},data:function(){return{loading:!1,category_id:"",type:"",detail:null,list:[],category_name:"",fileList:[],imgList:[],travelList:[],travelField:[{prop:"vehicle",label:"交通工具"},{prop:"trip",label:"单程往返"},{prop:"start_address",label:"出发城市"},{prop:"end_address",label:"目的城市"},{prop:"start_time",label:"开始时间"},{prop:"end_time",label:"结束时间"},{prop:"duration",label:"时长(天)"},{prop:"description",label:"备注"}],expensesField:[{prop:"start_address",label:"出发城市"},{prop:"end_address",label:"目的城市"},{prop:"start_time",label:"开始时间"},{prop:"end_time",label:"结束时间"},{prop:"traffic",label:"交通费(元)"},{prop:"stay",label:"住宿费(元)"},{prop:"diet",label:"餐饮费(元)"},{prop:"other",label:"其他费用(元)"},{prop:"description",label:"费用明细描述"}],relatedID:"",relatedCRMType:"",showRelatedDetail:!1}},computed:{relatedListData:function(){for(var e=this,t={},i=["contacts","customer","business","contract"],s=function(s){var a=i[s],n=e.detail[a+"List"]||[];n.length>0&&(t[a]=n.map(function(e){return e.id&&(e[a+"Id"]=e.id),e}))},a=0;a<i.length;a++)s(a);return t},detailIcon:function(){return this.getCategoryIcon(this.detail.icon)}},watch:{id:function(e){this.detail=null,this.getDetail()}},mounted:function(){},methods:{viewAfterEnter:function(){this.getDetail()},getBaseInfo:function(){var e=this;this.loading=!0,Object(s.i)({types:"oa_examine",module:"oa",controller:"examine",action:"read",action_id:this.id}).then(function(t){e.list=t.data,e.loading=!1}).catch(function(){e.loading=!1})},getDetail:function(){var e=this;this.loading=!0,Object(s.l)({id:this.id}).then(function(t){e.loading=!1,e.category_id=t.data.category_id,e.type=t.data.category_id,e.getBaseInfo(),e.detail=t.data,e.category_name=e.detail.category_name,e.fileList=e.detail.fileList,e.imgList=e.detail.imgList,e.travelList=e.detail.travelList}).catch(function(){e.loading=!1,e.hideView()})},hideView:function(){this.$emit("hide-view")},checkRelatedDetail:function(e,t){this.relatedID=t[e+"_id"]||t.id,this.relatedCRMType=e,this.showRelatedDetail=!0},handleFile:function(e,t,i){"preview"===e?t&&t.length>0&&this.$bus.emit("preview-image-bus",{index:i,data:t.map(function(e){return e.file_path&&(e.url=e.file_path),e})}):"download"===e&&Object(c.d)({path:t.url,name:t.name})},imgZoom:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e){return e.file_path&&(e.url=e.file_path),e})})},downloadFile:function(e){Object(c.d)({path:e.url,name:e.name})},examineHandle:function(e){this.$emit("on-examine-handle",e,this.detailIndex),this.$emit("handle",e,this.detailIndex)}}},d=(i("I9HS"),i("KHd+")),m=Object(d.a)(u,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"d-view",attrs:{"listener-ids":["workbench-main-container"],"no-listener-class":e.noListenerClass},on:{afterEnter:e.viewAfterEnter,close:e.hideView}},[e.detail?i("flexbox",{staticClass:"detail-main",attrs:{orient:"vertical"}},[i("flexbox",{staticClass:"detail-header"},[i("div",{staticClass:"header-icon",style:{backgroundColor:e.detailIcon.color}},[i("i",{class:["wk","wk-"+e.detailIcon.icon]})]),e._v(" "),i("div",{staticClass:"header-name"},[e._v(e._s(e.category_name))])]),e._v(" "),i("div",{staticClass:"detail-body"},[i("flexbox",{attrs:{gutter:0,align:"stretch",wrap:"wrap"}},e._l(e.list,function(t,s){return"examine_cause"!==t.form_type&&"business_cause"!==t.form_type?i("flexbox-item",{key:s,staticClass:"b-cell",attrs:{span:.5}},["checkbox"===t.form_type?i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[e._v(e._s(t.name))]),e._v(" "),i("div",{staticClass:"b-cell-value"},[i("flexbox",{staticStyle:{padding:"0px 10px 10px 0px"},attrs:{gutter:0,wrap:"wrap"}},e._l(t.value,function(t,s){return i("div",{key:s},[e._v("\n "+e._s(t)+" \n ")])}))],1)]):"file"===t.form_type?i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[e._v(e._s(t.name))]),e._v(" "),i("div",{staticClass:"b-cell-value"},e._l(t.value,function(s,a){return i("flexbox",{key:a,staticClass:"f-item"},[i("i",{staticClass:"wukong wukong-file f-img"}),e._v(" "),i("div",{staticClass:"f-name"},[e._v(e._s(e._f("fileName")(s)))]),e._v(" "),i("el-button",{attrs:{type:"text"},nativeOn:{click:function(i){e.handleFile("preview",t.value,a)}}},[e._v("预览")]),e._v(" "),i("el-button",{attrs:{type:"text"},nativeOn:{click:function(t){e.handleFile("download",s,a)}}},[e._v("下载")])],1)}))]):i("div",{staticClass:"b-cell-b"},[i("div",{staticClass:"b-cell-name"},[e._v(e._s(t.name))]),e._v(" "),i("div",{staticClass:"b-cell-value"},[e._v(e._s(t.value))])])]):e._e()})),e._v(" "),e.imgList.length>0?i("div",{staticClass:"img-box"},e._l(e.imgList,function(t,s){return i("div",{key:s,staticClass:"img-list",on:{click:function(t){e.imgZoom(e.imgList,s)}}},[i("img",{directives:[{name:"src",rawName:"v-src",value:t.file_path,expression:"imgItem.file_path"}],key:t.file_path})])})):e._e(),e._v(" "),e.fileList.length?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-file"}),e._v(" "),i("span",[e._v("附件")]),e._v(" "),i("span",[e._v("("+e._s(e.fileList.length)+")")])]),e._v(" "),i("div",{staticClass:"section__bd"},e._l(e.fileList,function(t,s){return i("file-cell",{key:s,attrs:{data:t,list:e.fileList,"cell-index":s}})}))]):e._e(),e._v(" "),e.type&&3==e.type&&e.travelList&&e.travelList.length>0?i("div",{staticClass:"table-sections"},[i("div",{staticClass:"table-sections__title"},[e._v("行程")]),e._v(" "),i("el-table",{staticStyle:{"font-size":"13px"},attrs:{data:e.travelList,align:"center","header-align":"center",stripe:""}},e._l(e.travelField,function(e,t){return i("el-table-column",{key:t,attrs:{prop:e.prop,label:e.label,"show-overflow-tooltip":""}})}))],1):e._e(),e._v(" "),e.type&&5==e.type&&e.travelList&&e.travelList.length>0?i("div",{staticClass:"table-sections"},[i("div",{staticClass:"table-sections__title"},[e._v("报销")]),e._v(" "),i("el-table",{staticStyle:{"font-size":"13px"},attrs:{data:e.travelList,align:"center","header-align":"center",stripe:""}},[e._l(e.expensesField,function(e,t){return i("el-table-column",{key:t,attrs:{prop:e.prop,label:e.label,"show-overflow-tooltip":""}})}),e._v(" "),i("el-table-column",{attrs:{label:"发票",width:"50"},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("preview",t.row.imgList,0)}}},[e._v(e._s(t.row.imgList?t.row.imgList.length:0)+"张")])],1)]}}])})],2)],1):e._e(),e._v(" "),Object.keys(e.relatedListData).length>0?i("div",{staticClass:"section"},[i("div",{staticClass:"section__hd"},[i("i",{staticClass:"wukong wukong-relevance"}),e._v(" "),i("span",[e._v("相关信息")])]),e._v(" "),i("div",{staticClass:"section__bd"},e._l(e.relatedListData,function(t,s){return i("div",{key:s},e._l(t,function(t,a){return i("related-business-cell",{key:a,attrs:{data:t,"cell-index":a,type:s,"show-foot":!1},nativeOn:{click:function(i){e.checkRelatedDetail(s,t)}}})}))}))]):e._e(),e._v(" "),i("div",{staticClass:"examine-section"},[i("examine-info",{staticClass:"create-sections-content",attrs:{id:e.id,"record-id":e.detail.flow_id,"examine-type":"oa_examine"},on:{"on-handle":e.examineHandle}})],1)],1)],1):e._e(),e._v(" "),i("c-r-m-full-screen-detail",{attrs:{visible:e.showRelatedDetail,"crm-type":e.relatedCRMType,id:e.relatedID},on:{"update:visible":function(t){e.showRelatedDetail=t}}})],1)},[],!1,null,"44bd26ca",null);m.options.__file="ExamineDetail.vue";t.a=m.exports},tnRl:function(e,t,i){},"uX/8":function(e,t,i){"use strict";var s=i("AeXB");i.n(s).a},uoQ8:function(e,t,i){"use strict";var s=i("Y+PO");i.n(s).a},vvxI:function(e,t,i){"use strict";t.a={filters:{},methods:{getActivityType:function(e){return{1:"leads",2:"customer",3:"contacts",4:"product",5:"business",6:"contract",7:"receivables",8:"log",9:"examine",10:"schedule",11:"task"}[e]},getActivityTypeName:function(e){return{1:"线索",2:"客户",3:"联系人",4:"产品",5:"商机",6:"合同",7:"回款",8:"日志",9:"审批",10:"日程",11:"任务",12:"发邮件"}[e]},getRecordLogTypeName:function(e){return e?{1:"跟进记录",2:"创建记录",3:"商机阶段变更",4:"外勤签到"}[e]:"跟进记录"}}}},ye9D:function(e,t,i){"use strict";var s={name:"AddFileList",components:{},props:{data:Array},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{deleteItem:function(e,t){this.$emit("delete",e,t)},deleteAll:function(){this.$emit("delete-all")}}},a=(i("paiq"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("section",{staticClass:"file-cont"},[i("flexbox",{staticClass:"f-header"},[i("i",{staticClass:"wk wk-file"}),e._v(" "),i("div",{staticClass:"f-name"},[e._v("附件")])]),e._v(" "),i("div",{staticClass:"f-body"},e._l(e.data,function(t,s){return i("flexbox",{key:s,staticClass:"f-item"},[i("img",{staticClass:"f-img",attrs:{src:t.icon}}),e._v(" "),i("div",{staticClass:"f-name"},[e._v(e._s(t.name)),i("span",{staticClass:"f-size"},[e._v(e._s("("+t.size+")"))])]),e._v(" "),i("div",{staticClass:"close-button",on:{click:function(i){e.deleteItem(t,s)}}},[e._v("×")])])})),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:e.deleteAll}},[e._v("全部删除")])],1)},[],!1,null,"472fadca",null);n.options.__file="AddFileList.vue";t.a=n.exports},zMq1:function(e,t,i){"use strict";var s={name:"AddImageList",components:{},props:{data:Array},data:function(){return{}},computed:{},watch:{},mounted:function(){},beforeDestroy:function(){},methods:{mouseImgOver:function(e,t){e.showDelete=!0,this.$set(this.data,t,e)},mouseImgLeave:function(e,t){e.showDelete=!1,this.$set(this.data,t,e)},deleteItem:function(e,t){this.$emit("delete",e,t)},deleteAll:function(){this.$emit("delete-all")},uploadFile:function(e){this.$emit("upload",e)}}},a=(i("JftJ"),i("KHd+")),n=Object(a.a)(s,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("section",{staticClass:"img-cont"},[i("flexbox",{attrs:{wrap:"wrap"}},[e._l(e.data,function(t,s){return i("div",{directives:[{name:"src",rawName:"v-src:background-image",value:t.file_path||t.path||t.url,expression:" item.file_path || item.path || item.url",arg:"background-image"}],key:s,staticClass:"img-item",on:{mouseover:function(i){e.mouseImgOver(t,s)},mouseleave:function(i){e.mouseImgLeave(t,s)}}},[t.showDelete?i("div",{staticClass:"img-delete",on:{click:function(i){e.deleteItem(t,s)}}},[e._v("×")]):e._e()])}),e._v(" "),i("div",{staticClass:"img-item-add"},[i("input",{staticClass:"img-item-iput",attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.uploadFile}})])],2),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:e.deleteAll}},[e._v("全部删除")])],1)},[],!1,null,"99238776",null);n.options.__file="AddImageList.vue";t.a=n.exports}}]); |