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

1 line
32 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6ed4"],{"/V1p":function(e,t,a){"use strict";var i=a("jnRv");a.n(i).a},"2FJB":function(e,t,a){"use strict";var i=a("VYqC");a.n(i).a},"2f65":function(e,t,a){},"2lfc":function(e,t,a){"use strict";var i=a("X70G");a.n(i).a},"4kBI":function(e,t,a){},"7mY3":function(e,t,a){"use strict";var i=a("2f65");a.n(i).a},"9GgJ":function(e,t,a){"use strict";var i={name:"XrHeader",components:{},props:{iconClass:[String,Array],iconColor:String,label:String,showSearch:{type:Boolean,default:!1},searchIconType:{type:String,default:"text"},placeholder:{type:String,default:"请输入内容"},ftTop:{type:String,default:"15px"},content:[String,Number],inputAttr:{type:Object,default:function(){}}},data:function(){return{search:""}},computed:{},watch:{content:{handler:function(){this.search!=this.content&&(this.search=this.content)},immediate:!0}},mounted:function(){},beforeDestroy:function(){},methods:{inputChange:function(){this.$emit("update:content",this.search)},searchClick:function(){this.$emit("search",this.search)}}},n=(a("7mY3"),a("KHd+")),s=Object(n.a)(i,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("flexbox",{staticClass:"xr-header"},[e.iconClass?a("div",{staticClass:"xr-header__icon",style:{backgroundColor:e.iconColor}},[a("i",{class:e.iconClass})]):e._e(),e._v(" "),a("div",{staticClass:"xr-header__label"},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2),e._v(" "),e.showSearch?a("el-input",e._b({staticClass:"xr-header__search",class:{"is-text":"text"===e.searchIconType},style:{"margin-top":e.ftTop},attrs:{placeholder:e.placeholder},on:{input:e.inputChange},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchClick(t):null}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}},"el-input",e.inputAttr,!1),["text"===e.searchIconType?a("el-button",{attrs:{slot:"append",type:"primary"},nativeOn:{click:function(t){return e.searchClick(t)}},slot:"append"},[e._v("搜索")]):a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},nativeOn:{click:function(t){return e.searchClick(t)}},slot:"append"})],1):e._e(),e._v(" "),a("div",{staticClass:"xr-header__ft",style:{top:e.ftTop}},[e._t("ft")],2)],1)},[],!1,null,"acb6d756",null);s.options.__file="index.vue";t.a=s.exports},EIxH:function(e,t,a){"use strict";a.r(t);var i=a("t3Un");function n(e){return Object(i.a)({url:"oa/examine/categoryDelete",method:"post",data:e})}function s(e){return Object(i.a)({url:"oa/examine/categoryEnables",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}var o=a("ViDN"),l=a("8GhS"),c={name:"XhIconPopover",components:{},props:{selectIcon:Object},data:function(){return{showPopover:!1,iconList:[],currentIcon:null}},computed:{},watch:{showPopover:function(e){e&&(this.currentIcon=this.selectIcon)}},mounted:function(){this.getIconList()},beforeDestroy:function(){},methods:{getIconList:function(){for(var e=["l-record","leave","trip","overtime","reimbursement","go-out"],t=1;t<=20;t++)e.push("approval-"+t);for(var a=["#3ABCFB","#00CAAB","#3ABCFB","#FAAD14","#3ABCFB","#FF6033"],i=[],n=0;n<e.length;n++){var s={icon:"wk wk-"+e[n]};s.color=a[n%6],i.push(s)}this.iconList=i},closeClick:function(){this.showPopover=!1},sureClick:function(){this.currentIcon&&(this.showPopover=!1,this.$emit("select",this.currentIcon.icon,this.currentIcon.color))},iconSelect:function(e){this.currentIcon=e}}},r=(a("2FJB"),a("KHd+")),u=Object(r.a)(c,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{attrs:{width:"335","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.showPopover,callback:function(t){e.showPopover=t},expression:"showPopover"}},[a("div",{staticClass:"main"},[a("div",{staticClass:"main__hd"},[e._v("审批流图标")]),e._v(" "),a("flexbox",{staticClass:"main__bd",attrs:{wrap:"wrap"}},e._l(e.iconList,function(t,i){return a("div",{key:i,staticClass:"icon-list",class:{"is-select":e.currentIcon&&e.currentIcon.icon==t.icon},on:{click:function(a){e.iconSelect(t)}}},[a("div",{staticClass:"icon-list__item",style:{backgroundColor:t.color}},[a("i",{class:t.icon})])])})),e._v(" "),a("div",{staticClass:"main__ft"},[a("el-button",{on:{click:e.closeClick}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.sureClick}},[e._v("确 定")])],1)],1),e._v(" "),e._t("reference",null,{slot:"reference"})],2)},[],!1,null,"6a8b1678",null);u.options.__file="XhIconPopover.vue";var d={name:"XhIconSelect",components:{XhIconPopover:u.exports},props:{value:{type:String,default:""},index:Number,item:Object},data:function(){return{dataValue:""}},computed:{iconColor:function(){var e=this.dataValue.split(",");return e.length>1?e[1]:"#9376FF"},iconClass:function(){var e=this.dataValue.split(",");return e.length>1?e[0]:"wk wk-approve"},selectIcon:function(){var e=this.dataValue.split(",");return e.length>1?{icon:e[0],color:e[1]}:null}},watch:{value:function(e){this.dataValue=e}},mounted:function(){this.dataValue=this.value},beforeDestroy:function(){},methods:{iconSelect:function(e,t){this.dataValue=e+","+t,this.valueChange()},valueChange:function(){this.$emit("value-change",{index:this.index,value:this.dataValue})}}},h=(a("2lfc"),Object(r.a)(d,function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("div",{staticClass:"header-icon",style:{backgroundColor:this.iconColor}},[t("i",{class:this.iconClass})]),this._v(" "),t("Xh-icon-popover",{attrs:{"select-icon":this.selectIcon},on:{select:this.iconSelect}},[t("el-button",{attrs:{slot:"reference",type:"primary",plain:""},slot:"reference"},[this._v("选择图标")])],1)],1)},[],!1,null,"d691cdb0",null));h.options.__file="XhIconSelect.vue";var m=h.exports,p=a("Ktth"),v=a.n(p),f={name:"CreateExamineCategory",components:{CreateView:o.a,XhInput:l.g,XhTextarea:l.o,XhSelect:l.l,XhUserCell:l.p,XhStrucUserCell:l.m,XhIconSelect:m},filters:{typeToComponentName:function(e){return"text"==e?"XhInput":"textarea"==e?"XhTextarea":"select"==e?"XhSelect":"structure"==e?"XhStrucUserCell":"icon"==e?"XhIconSelect":void 0},numberToZh:function(e){return v.a.encodeS(e)}},props:{handle:{type:Object,default:function(){return{type:"examineflow",action:"save",id:"",data:null}}}},data:function(){return{loading:!1,crmRules:{},crmForm:{crmFields:[]},currentPage:1,config:1,examineList:[{type:1,value:[],show:!1,options:[{name:"负责人主管",value:1},{name:"指定用户(任意一人)",value:2},{name:"指定用户(多人会签)",value:3}]}]}},computed:{title:function(){return"save"===this.handle.action?"新建审批类型":"update"===this.handle.action?"编辑审批类型":void 0}},mounted:function(){if(document.body.appendChild(this.$el),this.getField(),this.handle.data)if(this.handle.data.config&&1===this.handle.data.config){this.examineList=[];for(var e=0;e<this.handle.data.stepList.length;e++){var t=this.handle.data.stepList[e],a={};a.type=t.status,2===t.status||3===t.status?(a.show=!0,a.value=t.user_id_info):(a.show=!1,a.value=[]),a.options=0===e?[{name:"负责人主管",value:1},{name:"指定用户(任意一人)",value:2},{name:"指定用户(多人会签)",value:3}]:[{name:"负责人主管",value:1},{name:"指定用户(任意一人)",value:2},{name:"指定用户(多人会签)",value:3},{name:"上一级审批人主管",value:4}],this.examineList.push(a)}}else this.config=0},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{fieldValueChange:function(e){var t=this.crmForm.crmFields[e.index];t.value=e.value,"icon"==t.data.formType&&this.$refs.crmForm.validateField("crmFields."+e.index+".value")},getField:function(){var e=[];e.push({field:"title",formType:"text",isNull:1,name:"审批类型名称",setting:[],inputTips:"",value:this.handle.data?this.handle.data.title:""}),e.push({field:"icon",formType:"icon",isNull:1,name:"审批类型图标",setting:[],inputTips:"",value:this.handle.data&&this.handle.data.icon||""}),e.push({field:"dept",formType:"structure",isNull:0,name:"可视范围",setting:[],inputTips:"默认全公司",value:{users:this.handle.data?this.handle.data.user_ids_info:[],strucs:this.handle.data?this.handle.data.structure_ids_info:[]}}),e.push({field:"remark",formType:"textarea",isNull:0,name:"审批类型说明",setting:[],inputTips:"",value:this.handle.data?this.handle.data.remark:""}),this.getcrmRulesAndModel(e)},getcrmRulesAndModel:function(e){for(var t=0;t<e.length;t++){var a=e[t],i=[];1==a.isNull&&i.push({required:!0,message:a.name+"不能为空",trigger:["blur","change"]}),this.crmRules[a.field]=i;var n={};n.value=a.value,n.key=a.field,n.data=a,"textarea"==a.formType&&(n.showblock=!0),this.crmForm.crmFields.push(n)}},saveField:function(){var e=this;this.$refs.crmForm.validate(function(t){if(!t)return e.$message.error("请完善必填信息"),!1;e.validStepsInfo()&&e.submiteParams(e.crmForm.crmFields)})},validStepsInfo:function(){for(var e=0;e<this.examineList.length;e++){var t=this.examineList[e];if((2===t.type||3===t.type)&&0===t.value.length)return this.$message.error("请添加员工"),!1}return!0},submiteParams:function(e){var t=this;this.loading=!0;var a,n=this.getSubmiteParams(e);"update"==this.handle.action&&(n.id=this.handle.id),(a=n,Object(i.a)({url:"oa/examine/"+(a.id?"categoryUpdate":"categorySave"),method:"post",headers:{"Content-Type":"application/json;charset=UTF-8"},data:a})).then(function(e){t.loading=!1,t.$emit("save"),"save"==t.handle.action?t.$confirm("您将继续完成审批表单的创建","创建成功",{showCancelButton:!1,closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!1,confirmButtonText:"确定",type:"warning",callback:function(a){"close"===a?t.hidenView():"confirm"===a&&(t.hidenView(),t.$router.push({name:"workbenchHandlefield",params:{type:"oa_examine",label:"10",id:e.data.category_id}}))}}):(t.$message.success("操作成功"),t.hidenView())}).catch(function(){t.loading=!1})},getSubmiteParams:function(e){for(var t={},a=0;a<e.length;a++){var i=e[a];"dept"===i.key?(t.user_ids=i.value.users&&i.value.users.map(function(e){return e.id}),t.structure_ids=i.value.strucs&&i.value.strucs.map(function(e){return e.id})):t[i.key]=i.value}for(var n=[],s=0;s<this.examineList.length;s++){var o=this.examineList[s];n.push({status:o.type,user_id:o.value.map(function(e){return e.id})})}return t.config=this.config,t.step=n,t},nextPage:function(){var e=this;this.$refs.crmForm.validate(function(t){t&&(e.currentPage=2)})},selectOptionsChange:function(e){2==e.type||3==e.type?e.show=!0:e.show=!1},selectOptionsFocus:function(e,t){if(this.examineList.length>1){var a=t>0?this.examineList[t-1]:null,i=null;t<this.examineList.length-1&&(i=this.examineList[t+1]);var n=!1,s=!1,o=!1;!a||2!==a.type&&3!==a.type||(o=!0),i&&4===i.type&&(n=!0,s=!0);var l=[{name:"负责人主管",value:1}];n||l.push({name:"指定用户(任意一人)",value:2}),s||l.push({name:"指定用户(多人会签)",value:3}),o||l.push({name:"上一级审批人主管",value:4}),e.options=l}},examineItemsAdd:function(){this.examineList.push({type:1,value:[],show:!1,options:[{name:"负责人主管",value:1},{name:"指定用户(任意一人)",value:2},{name:"指定用户(多人会签)",value:3},{name:"上一级审批人主管",value:4}]})},flowUserSelect:function(e){this.examineList[e.index].value=e.value},deleteExamineItems:function(e){this.examineList.splice(e,1)},hidenView:function(){this.$emit("hiden-view")},getPaddingLeft:function(e,t){return e.showblock&&1==e.showblock?"0":t%2==0?"0":"40px"},getPaddingRight:function(e,t){return e.showblock&&1==e.showblock?"0":t%2==0?"40px":"0"}}},g=(a("e2C1"),Object(r.a)(f,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("create-view",{attrs:{loading:e.loading,"body-style":{height:"100%"}}},[a("flexbox",{staticClass:"crm-create-container",attrs:{direction:"column",align:"stretch"}},[a("flexbox",{staticClass:"crm-create-header"},[a("div",{staticStyle:{flex:"1","font-size":"17px",color:"#333","font-weight":"bold"}},[e._v(e._s(e.title))]),e._v(" "),a("i",{staticClass:"el-icon-close close",on:{click:e.hidenView}})]),e._v(" "),a("flexbox",{staticClass:"crm-create-flex",attrs:{direction:"column",align:"stretch"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:1==e.currentPage,expression:"currentPage == 1"}],staticClass:"crm-create-body"},[a("div",{staticClass:"create-name"},[e._v("基本信息")]),e._v(" "),a("el-form",{ref:"crmForm",staticClass:"crm-create-box",attrs:{model:e.crmForm,"label-position":"top"}},e._l(e.crmForm.crmFields,function(t,i){return a("el-form-item",{key:t.key,class:{"crm-create-block-item":t.showblock,"crm-create-item":!t.showblock},style:{"padding-left":e.getPaddingLeft(t,i),"padding-right":e.getPaddingRight(t,i)},attrs:{prop:"crmFields."+i+".value",rules:e.crmRules[t.key]}},[a("div",{staticStyle:{display:"inline-block"},attrs:{slot:"label"},slot:"label"},[a("div",{staticClass:"form-label"},[e._v("\n "+e._s(t.data.name)+"\n "),a("span",{staticStyle:{color:"#999"}},[e._v("\n "+e._s(t.data.inputTips?""+t.data.inputTips+"":"")+"\n ")])])]),e._v(" "),a(e._f("typeToComponentName")(t.data.formType),{tag:"component",attrs:{value:t.value,index:i,item:t,radio:!1},on:{"value-change":e.fieldValueChange}})],1)}))],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:2==e.currentPage,expression:"currentPage == 2"}],staticClass:"crm-create-body"},[a("div",{staticStyle:{padding:"0 20px","font-size":"12px"}},[a("el-radio",{attrs:{label:1},model:{value:e.config,callback:function(t){e.config=t},expression:"config"}},[e._v("固定审批流")]),e._v(" "),a("div",{staticClass:"examine-items"},e._l(e.examineList,function(t,i){return a("flexbox",{key:i,staticClass:"examine-item"},[a("div",{staticClass:"examine-item-name"},[e._v("第"+e._s(e._f("numberToZh")(i+1))+"级")]),e._v(" "),a("el-select",{staticClass:"examine-item-select",on:{focus:function(a){e.selectOptionsFocus(t,i)},change:function(a){e.selectOptionsChange(t)}},model:{value:t.type,callback:function(a){e.$set(t,"type",a)},expression:"item.type"}},e._l(t.options,function(e){return a("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),e._v(" "),t.show?a("xh-user-cell",{staticClass:"examine-item-user",attrs:{radio:!1,index:i,value:t.value},on:{"value-change":e.flowUserSelect}}):e._e(),e._v(" "),e.examineList.length>1?a("i",{staticClass:"el-icon-remove examine-item-delete",on:{click:function(t){e.deleteExamineItems(i)}}}):e._e()],1)})),e._v(" "),a("div",{staticClass:"examine-items-add"},[a("span",{on:{click:e.examineItemsAdd}},[e._v("+ 添加审批层级")])]),e._v(" "),a("div",{staticClass:"examine-add-des"},[a("p",[a("span",{staticClass:"examine-add-required"},[e._v("*")]),e._v("当选择“负责人主管”审批时。系统仅会通知负责人主管。")]),e._v(" "),a("p",[a("span",{staticClass:"examine-add-required"},[e._v("*")]),e._v("当选择多个“指定用户”审批时。如果指定用户没有权限查看对应的合同,系统会通知其审批,但是他无法查看此数据信息。 ")]),e._v(" "),a("p",[a("span",{staticClass:"examine-add-required"},[e._v("*")]),e._v("当选择“指定用户(任意一人)”表示指定用户中任意一人审批即可。当选择“指定用户(多人会签)”表示 指定用户中所有人都要审批。")])]),e._v(" "),a("el-radio",{attrs:{label:0},model:{value:e.config,callback:function(t){e.config=t},expression:"config"}},[e._v("授权审批人")])],1)])]),e._v(" "),1==e.currentPage?a("div",{staticClass:"handle-bar"},[a("el-button",{staticClass:"handle-button",nativeOn:{click:function(t){return e.hidenView(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{staticClass:"handle-button",attrs:{type:"primary"},nativeOn:{click:function(t){return e.nextPage(t)}}},[e._v("下一页")])],1):e._e(),e._v(" "),2==e.currentPage?a("div",{staticClass:"handle-bar"},[a("el-button",{staticClass:"handle-button",nativeOn:{click:function(t){return e.hidenView(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{staticClass:"handle-button",attrs:{type:"primary"},nativeOn:{click:function(t){return e.saveField(t)}}},[e._v("保存")]),e._v(" "),a("el-button",{staticClass:"handle-button",attrs:{type:"primary"},nativeOn:{click:function(t){e.currentPage=1}}},[e._v("上一页")])],1):e._e()],1)],1)},[],!1,null,"3b6405ac",null));g.options.__file="CreateExamineCategory.vue";var _=g.exports,b=a("P2sY"),x=a.n(b),C=a("Ew9n"),w=a("EP+0"),y=a("p2mV"),k={name:"ExamineCategoryDetail",components:{SlideView:C.a,CreateSections:w.a,PreviewFieldView:y.a},filters:{formatedScopeInfo:function(e){var t=(e.structure_ids_info||[]).map(function(e){return e.name}).join("、"),a=(e.user_ids_info||[]).map(function(e){return e.realname}).join("、");return t&&a&&(t+="、"),t+a||"全公司"},toRowName:function(e){return"第"+v.a.encodeS(e)+"级"},toRowNameDes:function(e){return 1==e.status?"负责人主管":2==e.status?e.user_id_info.length+"人或签":3==e.status?e.user_id_info.length+"人会签":4==e.status?"上一级审批人主管":""}},props:{data:Object},data:function(){return{showData:{},examineStatus:!1,tablePreviewData:{types:"",typesId:""},showTablePreview:!1}},computed:{},watch:{data:function(e){this.getShowData()}},mounted:function(){this.getShowData()},methods:{handlePreview:function(){this.tablePreviewData.types="oa_examine",this.tablePreviewData.typesId=this.data.category_id,this.showTablePreview=!0},deleteClick:function(){var e=this;this.$confirm("您确定要删除该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n({id:e.data.category_id}).then(function(t){e.$emit("refresh"),e.hideView(),e.$message({type:"success",message:"操作成功"})}).catch(function(){})}).catch(function(){e.$message({type:"info",message:"已取消删除"})})},getShowData:function(){this.showData=x()({},this.data),this.examineStatus=0!=this.showData.status},examineStatusChange:function(e){var t=this;this.showData.status=e?1:0,this.$confirm("您确定要"+(e?"启用":"停用")+"该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){s({id:t.data.category_id,status:e?1:0}).then(function(e){t.$emit("refresh"),t.$message({type:"success",message:"操作成功"})}).catch(function(){t.cancelStatusChange()})}).catch(function(){t.cancelStatusChange(),t.$message({type:"info",message:"已取消删除"})})},cancelStatusChange:function(){this.examineStatus=!this.examineStatus,this.showData.status=this.examineStatus?1:0},hideView:function(){this.$emit("hide-view")}}},S=(a("sjbl"),Object(r.a)(k,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("slide-view",{staticClass:"d-view",attrs:{"listener-ids":["manager-main-container"],"no-listener-class":["el-table__body"],"append-to-body":!0,"body-style":{padding:"10px 30px",height:"100%"}},on:{close:e.hideView}},[a("flexbox",{staticStyle:{height:"100%"},attrs:{orient:"vertical"}},[a("div",{staticClass:"header"},[a("flexbox",{staticClass:"detail-header"},[a("div",{staticClass:"header-name"},[e._v(e._s(e.showData.title)),1!=e.showData.is_sys?a("i",{staticClass:"el-icon-delete delete",on:{click:e.deleteClick}}):e._e()])]),e._v(" "),a("div",{staticClass:"detail-header-des"},[a("div",{staticClass:"status"},[e._v("状态:"+e._s(0==e.showData.status?"停用":"启用"))]),e._v(" "),a("div",{staticClass:"status-handle"},[e._v("\n 启用\n "),a("el-switch",{on:{change:e.examineStatusChange},model:{value:e.examineStatus,callback:function(t){e.examineStatus=t},expression:"examineStatus"}})],1)])],1),e._v(" "),a("div",{staticClass:"detail-body"},[a("create-sections",{staticClass:"create-sections",attrs:{title:"基本信息"}},[a("div",{staticClass:"create-sections-content"},[a("div",{staticClass:"dialog-content"},[a("flexbox",{staticClass:"content-items"},[a("div",{staticClass:"content-items-name"},[e._v("审批名称")]),e._v(" "),a("div",{staticClass:"content-items-value"},[e._v(e._s(e.showData.title))])]),e._v(" "),a("flexbox",{staticClass:"content-items"},[a("div",{staticClass:"content-items-name"},[e._v("适用范围")]),e._v(" "),a("div",{staticClass:"content-items-value"},[e._v(e._s(e._f("formatedScopeInfo")(e.showData)))])]),e._v(" "),a("flexbox",{staticClass:"content-items"},[a("div",{staticClass:"content-items-name"},[e._v("审批说明")]),e._v(" "),a("div",{staticClass:"content-items-value"},[e._v(e._s(e.showData.remark))])])],1)])]),e._v(" "),a("create-sections",{staticClass:"create-sections",attrs:{title:"表单"}},[a("div",{staticClass:"preview-section",attrs:{slot:"header"},slot:"header"},[a("el-button",{attrs:{type:"text"},on:{click:e.handlePreview}},[e._v("预览")])],1)]),e._v(" "),a("create-sections",{staticClass:"create-sections",attrs:{title:"流程"}},[1==e.showData.config?a("div",{staticClass:"create-sections-content"},e._l(e.showData.stepList,function(t,i){return a("flexbox",{key:i,staticClass:"examine-flow",attrs:{align:"stretch"}},[a("div",{staticClass:"examine-flow-header"},[a("div",{staticClass:"mark-circle"}),e._v(" "),0!=i?a("div",{staticClass:"mark-top-line"}):e._e(),e._v(" "),i<e.showData.stepList.length-1?a("div",{staticClass:"mark-bottom-line"}):e._e()]),e._v(" "),a("div",{staticClass:"examine-flow-body"},[a("div",{staticClass:"body-header"},[a("span",{staticClass:"body-header-name"},[e._v(e._s(e._f("toRowName")(i+1)))]),a("span",{staticClass:"body-header-des"},[e._v(""+e._s(e._f("toRowNameDes")(t))+"")])]),e._v(" "),t.user_id_info.length>0?a("flexbox",{staticClass:"examine-users"},e._l(t.user_id_info,function(t,i){return a("div",{key:i,staticClass:"examine-users-item"},[a("xr-avatar",{attrs:{name:t.realname,size:40,src:t.img}}),e._v(" "),a("div",{staticClass:"name"},[e._v(e._s(t.realname))])],1)})):e._e()],1)])})):a("div",{staticClass:"create-sections-content"},[e._v("授权审批人")])])],1)]),e._v(" "),e.showTablePreview?a("preview-field-view",{attrs:{types:e.tablePreviewData.types,"types-id":e.tablePreviewData.typesId,label:"10"},on:{"hiden-view":function(t){e.showTablePreview=!1}}}):e._e()],1)},[],!1,null,"0257f07e",null));S.options.__file="ExamineCategoryDetail.vue";var P={name:"ExamineManager",components:{CreateExamineCategory:_,ExamineCategoryDetail:S.exports},data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-240,list:[],fieldList:[{prop:"title",label:"审批名称",width:150},{prop:"config",label:"流程类型",width:150},{prop:"userList",label:"可见范围",width:150},{prop:"remark",label:"审批说明",width:150},{prop:"update_time",label:"最后修改时间",width:150},{prop:"status",label:"状态",width:150}],currentPage:1,pageSize:10,pageSizes:[10,20,30,40],total:0,showHandleView:!1,createHandleInfo:{action:"save",type:"examine",id:""},showDetail:!1,detailData:{}}},watch:{},mounted:function(){var e=this;window.onresize=function(){e.tableHeight=document.documentElement.clientHeight-240},this.getList()},methods:{saveSuccess:function(){this.currentPage=1,this.getList()},getList:function(){var e,t=this;this.loading=!0,(e={page:this.currentPage,limit:this.pageSize},Object(i.a)({url:"oa/examine/category",method:"post",data:e})).then(function(e){e.data.list.forEach(function(e){var t=e.icon?e.icon.split(","):[];t.length>1?(e.iconClass=t[0],e.iconColor=t[1]):(e.iconClass="wk wk-approve",e.iconColor="#9376FF")}),t.list=e.data.list,t.total=e.data.dataCount,t.loading=!1}).catch(function(){t.loading=!1})},fieldFormatter:function(e,t){if("config"===t.property)return 1===e[t.property]?"固定审批流":0===e[t.property]?"授权审批人":"";if("userList"===t.property){var a=(e.structure_ids_info||[]).map(function(e){return e.name}).join("、"),i=(e.user_ids_info||[]).map(function(e){return e.realname}).join("、");return a&&i&&(a+="、"),a+i||"全公司"}return"status"===t.property?0===e[t.property]?"停用":"启用":e[t.property]},cellClassName:function(e){e.row;var t=e.column;e.rowIndex,e.columnIndex;return"title"===t.property?"can-visit--underline":""},addExamine:function(){this.createHandleInfo={action:"save",type:"examine",id:""},this.showHandleView=!0},handleRowClick:function(e,t,a){t.property&&(this.detailData=e,this.showDetail=!0)},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.currentPage=e,this.getList()},handleClick:function(e,t){var a=this;"edit-table"===e?this.$router.push({name:"workbenchHandlefield",params:{type:"oa_examine",label:"10",id:t.row.category_id}}):"edit"===e?(this.createHandleInfo.action="update",this.createHandleInfo.id=t.row.category_id,this.createHandleInfo.data=t.row,this.showHandleView=!0):"delete"===e?this.$confirm("您确定要删除该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.loading=!0,n({id:t.row.category_id}).then(function(e){a.list.splice(t.$index,1),0==a.list.length&&(a.currentPage=a.currentPage-1>0?a.currentPage-1:1),a.getList(),a.$message({type:"success",message:"操作成功"}),a.loading=!1}).catch(function(){a.loading=!1})}).catch(function(){a.$message({type:"info",message:"已取消删除"})}):"change"===e&&this.$confirm("您确定要"+(0===t.row.status?"启用":"停用")+"该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){s({id:t.row.category_id,status:0===t.row.status?1:0}).then(function(e){t.row.status=0===t.row.status?1:0,a.$message({type:"success",message:"操作成功"})}).catch(function(){})}).catch(function(){a.$message({type:"info",message:"已取消删除"})})}}},F=(a("tIkU"),Object(r.a)(P,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"se-table-header"},[a("el-button",{staticClass:"se-table-header-button xr-btn--orange",attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.addExamine}},[e._v("新建审批流程")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"main-table",staticStyle:{width:"100%"},attrs:{id:"examine-table",data:e.list,height:e.tableHeight,"cell-class-name":e.cellClassName,stripe:"","highlight-current-row":""},on:{"row-click":e.handleRowClick}},[a("el-table-column",{attrs:{width:"100",label:"审批流图标"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-icon",style:{backgroundColor:e.row.iconColor}},[a("i",{class:e.row.iconClass})])]}}])}),e._v(" "),e._l(e.fieldList,function(t,i){return a("el-table-column",{key:i,attrs:{formatter:e.fieldFormatter,prop:t.prop,width:t.width,label:t.label,"show-overflow-tooltip":""}})}),e._v(" "),a("el-table-column"),e._v(" "),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"250"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleClick("edit-table",t)}}},[e._v("编辑表单")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleClick("edit",t)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{disabled:1===t.row.is_sys,type:"text",size:"small"},on:{click:function(a){e.handleClick("delete",t)}}},[e._v("删除")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleClick("change",t)}}},[e._v(e._s(0===t.row.status?"启用":"停用"))])]}}])})],2),e._v(" "),a("div",{staticClass:"p-contianer"},[a("el-pagination",{staticClass:"p-bar",attrs:{"current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,total:e.total,background:"",layout:"prev, pager, next, sizes, total, jumper"},on:{"update:pageSize":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),e.showHandleView?a("create-examine-category",{attrs:{handle:e.createHandleInfo},on:{save:e.saveSuccess,"hiden-view":function(t){e.showHandleView=!1}}}):e._e(),e._v(" "),e.showDetail?a("examine-category-detail",{attrs:{data:e.detailData},on:{refresh:e.getList,"hide-view":function(t){e.showDetail=!1}}}):e._e()],1)},[],!1,null,"646f5bba",null));F.options.__file="ExamineManager.vue";var I={components:{ExamineManager:F.exports,XrHeader:a("9GgJ").a},data:function(){return{leftType:"ExamineManager",leftSides:[{name:"审批类型管理",type:"ExamineManager"}]}},mounted:function(){},methods:{}},T=(a("xhw+"),Object(r.a)(I,function(){var e=this.$createElement,t=this._self._c||e;return t("flexbox",{staticClass:"main",attrs:{direction:"column",align:"stretch"}},[t("xr-header",{attrs:{"icon-class":"wk wk-workbench","icon-color":"#5864FF",label:"审批流(办公)"}}),this._v(" "),t("div",{staticClass:"main__bd"},[t(this.leftType,{tag:"component"})],1)],1)},[],!1,null,"0861080c",null));T.options.__file="index.vue";t.default=T.exports},K4TJ:function(e,t,a){},VYqC:function(e,t,a){},Wg70:function(e,t,a){},X70G:function(e,t,a){},e2C1:function(e,t,a){"use strict";var i=a("K4TJ");a.n(i).a},itms:function(e,t,a){},jnRv:function(e,t,a){},p2mV:function(e,t,a){"use strict";var i=a("ViDN"),n=a("EP+0"),s=a("6iAj"),o=a("8GhS"),l={name:"PreviewFieldView",components:{CreateView:i.a,CreateSections:n.a,XhInput:o.g,XhTextarea:o.o,XhSelect:o.l,XhMultipleSelect:o.h,XhDate:o.d,XhDateTime:o.e,XhUserCell:o.p,XhStructureCell:o.n,XhFiles:o.f,CrmRelativeCell:o.a,XhProuctCate:o.j,XhProduct:o.i,XhBusinessStatus:o.b,XhCustomerAddress:o.c,XhReceivablesPlan:o.k},filters:{typeToComponentName:function(e){return"text"==e||"number"==e||"floatnumber"==e||"mobile"==e||"email"==e?"XhInput":"textarea"==e?"XhTextarea":"select"==e||"business_status"==e?"XhSelect":"checkbox"==e?"XhMultipleSelect":"date"==e?"XhDate":"datetime"==e?"XhDateTime":"user"==e||"single_user"==e?"XhUserCell":"structure"==e?"XhStructureCell":"file"==e||"pic"==e?"XhFiles":"contacts"==e||"customer"==e||"contract"==e||"business"==e?"CrmRelativeCell":"category"==e?"XhProuctCate":"business_type"==e?"XhBusinessStatus":"product"==e?"XhProduct":"map_address"==e?"XhCustomerAddress":"receivables_plan"==e?"XhReceivablesPlan":void 0}},props:{types:{type:String,default:""},typesId:{type:[String,Number],default:""},label:{type:[String,Number],default:""}},data:function(){return{title:"预览",loading:!1,crmForm:{crmFields:[]}}},computed:{},watch:{types:function(e){this.crmForm={crmFields:[]},this.getField()}},mounted:function(){document.body.appendChild(this.$el),this.getField()},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{getField:function(){var e=this;this.loading=!0;var t=s.u,a={};a.types=this.types,"oa_examine"===this.types&&(t=s.v,a.types_id=this.typesId),t(a).then(function(t){e.getcrmRulesAndModel(t.data),e.loading=!1}).catch(function(){e.loading=!1})},getcrmRulesAndModel:function(e){for(var t=0;t<e.length;t++){var a=e[t],i={};i.value=a.value,i.key=a.fieldName,i.data=a,i.disabled=!0,1!=a.isHidden&&this.crmForm.crmFields.push(i)}},hidenView:function(){this.$emit("hiden-view")},getPaddingLeft:function(e,t){return e.showblock&&1==e.showblock?"0":t%2==0?"0":"40px"},getPaddingRight:function(e,t){return e.showblock&&1==e.showblock?"0":t%2==0?"40px":"0"}}},c=(a("/V1p"),a("KHd+")),r=Object(c.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("create-view",{attrs:{loading:e.loading,"body-style":{height:"100%"}}},[a("flexbox",{staticClass:"crm-create-container",attrs:{direction:"column",align:"stretch"}},[a("flexbox",{staticClass:"crm-create-header"},[a("div",{staticStyle:{flex:"1","font-size":"17px",color:"#333","font-weight":"bold"}},[e._v(e._s(e.title))]),e._v(" "),a("i",{staticClass:"el-icon-close close",on:{click:e.hidenView}})]),e._v(" "),a("div",{staticClass:"crm-create-flex"},[a("create-sections",{attrs:{title:"基本信息"}},[a("flexbox",{attrs:{direction:"column",align:"stretch"}},[a("div",{staticClass:"crm-create-body"},[a("el-form",{ref:"crmForm",staticClass:"crm-create-box",attrs:{model:e.crmForm,"label-position":"top"}},e._l(e.crmForm.crmFields,function(t,i){return a("el-form-item",{key:t.key,class:{"crm-create-block-item":t.showblock,"crm-create-item":!t.showblock},style:{"padding-left":e.getPaddingLeft(t,i),"padding-right":e.getPaddingRight(t,i)},attrs:{prop:"crmFields."+i+".value"}},[a("div",{staticStyle:{display:"inline-block"},attrs:{slot:"label"},slot:"label"},[a("div",{staticClass:"form-label"},[e._v("\n "+e._s(t.data.name)+"\n "),a("span",{staticStyle:{color:"#999"}},[e._v("\n "+e._s(t.data.inputTips?""+t.data.inputTips+"":"")+"\n ")])])]),e._v(" "),a(e._f("typeToComponentName")(t.data.form_type),{tag:"component",attrs:{radio:!1,disabled:t.disabled}})],1)}))],1)])],1)],1)],1)],1)},[],!1,null,"5b989e82",null);r.options.__file="PreviewFieldView.vue";t.a=r.exports},sjbl:function(e,t,a){"use strict";var i=a("itms");a.n(i).a},tIkU:function(e,t,a){"use strict";var i=a("4kBI");a.n(i).a},"xhw+":function(e,t,a){"use strict";var i=a("Wg70");a.n(i).a}}]);