(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7653"],{"0Lhk":function(e,t,a){"use strict";var n=a("aKO9");a.n(n).a},"2Xr9":function(e,t,a){"use strict";a.r(t);var n=a("/861"),i=a("ViDN"),s=a("KTTK"),l=a("8GhS"),o=a("XAon"),c=a("Ktth"),r=a.n(c),u={name:"CreateSystemExamine",components:{CreateView:i.a,XhInput:l.g,XhTextarea:l.o,XhSelect:l.l,WkUserSelect:o.a,XhStrucUserCell:l.m},filters:{typeToComponentName:function(e){return"text"==e?"XhInput":"textarea"==e?"XhTextarea":"select"==e?"XhSelect":"structure"==e?"XhStrucUserCell":void 0},numberToZh:function(e){return r.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:{queryUserListAPI:function(){return s.y},title:function(){if("examineflow"===this.handle.type){if("save"===this.handle.action)return"新建审批流程";if("update"===this.handle.action)return"编辑审批流程"}return""}},mounted:function(){if(document.body.appendChild(this.$el),this.getField(),this.handle.data)if(this.handle.data.config&&1===this.handle.data.config){this.config=1,this.examineList=[];for(var e=0;e1){var a=t>0?this.examineList[t-1]:null,n=null;t1?a("i",{staticClass:"el-icon-remove examine-item-delete",on:{click:function(t){e.deleteExamineItems(n)}}}):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,"7dbac784",null);h.options.__file="CreateSystemExamine.vue";var m=h.exports,f=a("P2sY"),p=a.n(f),v=a("Ew9n"),g=a("EP+0"),_={name:"SystemExamineDetail",components:{SlideView:v.a,CreateSections:g.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"第"+r.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}},computed:{},watch:{data:function(e){this.getShowData()}},mounted:function(){this.getShowData()},methods:{deleteClick:function(){var e=this;this.$confirm("您确定要删除该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.j)({flow_id:e.data.flow_id,status:2}).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=p()({},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(){Object(n.a)({flow_id:t.data.flow_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")}}},x=(a("0Lhk"),Object(d.a)(_,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.name)),a("i",{staticClass:"el-icon-delete delete",on:{click:e.deleteClick}})])]),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.name))])]),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:"流程"}},[1==e.showData.config?a("div",{staticClass:"create-sections-content"},e._l(e.showData.stepList,function(t,n){return a("flexbox",{key:n,staticClass:"examine-flow",attrs:{align:"stretch"}},[a("div",{staticClass:"examine-flow-header"},[a("div",{staticClass:"mark-circle"}),e._v(" "),0!=n?a("div",{staticClass:"mark-top-line"}):e._e(),e._v(" "),n0?a("flexbox",{staticClass:"examine-users"},e._l(t.user_id_info,function(t,n){return a("div",{key:n,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)])],1)},[],!1,null,"87f128ca",null));x.options.__file="SystemExamineDetail.vue";var y={name:"SystemExamine",components:{CreateSystemExamine:m,SystemExamineDetail:x.exports,XrHeader:a("9GgJ").a},mixins:[],data:function(){return{loading:!1,tableHeight:document.documentElement.clientHeight-240,list:[],fieldList:[{prop:"name",label:"审批流名称",width:150},{prop:"config",label:"流程类型",width:150},{prop:"categoryType",label:"关联对象",width:150},{prop:"userList",label:"适用范围",width:150},{prop:"realname",label:"最后修改人",width:150},{prop:"update_time",label:"最后修改时间",width:150},{prop:"status",label:"状态",width:100}],currentPage:1,pageSize:20,pageSizes:[10,20,30,40],total:0,showHandleView:!1,createHandleInfo:{action:"save",type:"examineflow",id:""},showDetail:!1,detailData:{},categoryTypeList:[{name:"合同",value:"crm_contract"},{name:"回款",value:"crm_receivables"},{name:"发票",value:"crm_invoice"}]}},computed:{},mounted:function(){window.onresize=function(){self.tableHeight=document.documentElement.clientHeight-240},this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(n.c)({page:this.currentPage,limit:this.pageSize}).then(function(t){e.list=t.data.list,e.total=t.data.dataCount,e.loading=!1}).catch(function(){e.loading=!1})},fieldFormatter:function(e,t){if("config"===t.property)return 1===e[t.property]?"固定审批流":0===e[t.property]?"授权审批人":"";if("categoryType"===t.property){var a=this.categoryTypeList.find(function(t){return t.value===e.types});return a?a.name:"--"}if("userList"===t.property){var n=(e.structure_ids_info||[]).map(function(e){return e.name}).join("、"),i=(e.user_ids_info||[]).map(function(e){return e.realname}).join("、");return n&&i&&(n+="、"),n+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"name"===t.property?"can-visit--underline":""},addExamine:function(){this.createHandleInfo={action:"save",type:"examineflow",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"===e?(this.createHandleInfo.action="update",this.createHandleInfo.id=t.row.flow_id,this.createHandleInfo.data=t.row,this.showHandleView=!0):"delete"===e?this.$confirm("您确定要删除该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.j)({flow_id:t.row.flow_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:"操作成功"})}).catch(function(){})}).catch(function(){a.$message({type:"info",message:"已取消删除"})}):"change"===e?this.$confirm("您确定要"+(0===t.row.status?"启用":"停用")+"该审批流?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.a)({flow_id:t.row.flow_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:"取消操作"})}):"copy"===e&&(this.createHandleInfo.action="save",this.createHandleInfo.id="",this.createHandleInfo.data=t.row,this.showHandleView=!0)}}},w=(a("q3/b"),Object(d.a)(y,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main"},[a("xr-header",{attrs:{"icon-class":"wk wk-approve","icon-color":"#FFB940",label:"审批流"}}),e._v(" "),a("div",{staticClass:"main-body"},[a("div",{staticClass:"main-table-header"},[a("el-button",{staticClass:"main-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,"highlight-current-row":""},on:{"row-click":e.handleRowClick}},[e._l(e.fieldList,function(t,n){return a("el-table-column",{key:n,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",t)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{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?"启用":"停用"))]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleClick("copy",t)}}},[e._v("复制并新建")])]}}])})],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)],1),e._v(" "),e.showHandleView?a("create-system-examine",{attrs:{handle:e.createHandleInfo},on:{save:e.getList,"hiden-view":function(t){e.showHandleView=!1}}}):e._e(),e._v(" "),e.showDetail?a("system-examine-detail",{attrs:{data:e.detailData},on:{refresh:e.getList,"hide-view":function(t){e.showDetail=!1}}}):e._e()],1)},[],!1,null,"da099172",null));w.options.__file="index.vue";t.default=w.exports},"2f65":function(e,t,a){},"3V1C":function(e,t,a){},"7mY3":function(e,t,a){"use strict";var n=a("2f65");a.n(n).a},"9GgJ":function(e,t,a){"use strict";var n={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)}}},i=(a("7mY3"),a("KHd+")),s=Object(i.a)(n,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},C3zi:function(e,t,a){"use strict";var n=a("xqqE");a.n(n).a},aKO9:function(e,t,a){},"q3/b":function(e,t,a){"use strict";var n=a("3V1C");a.n(n).a},xqqE:function(e,t,a){}}]);