"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[9859],{97312:function(e,s,a){a.r(s),a.d(s,{default:function(){return f}});var t=a(66252),i=a(3577);const l=e=>((0,t.dD)("data-v-3ef7f139"),e=e(),(0,t.Cn)(),e),o=l((()=>(0,t._)("div",{class:"left-panel"},null,-1))),n={class:"right-panel"},c={class:"right-panel-search"},r={style:{"margin-right":"15px"}},d={class:"tableBtnView",style:{"justify-content":"flex-start"}};function u(e,s,a,l,u,p){const h=(0,t.up)("el-input"),g=(0,t.up)("el-button"),w=(0,t.up)("el-header"),m=(0,t.up)("el-table-column"),v=(0,t.up)("scTable"),f=(0,t.up)("el-main"),y=(0,t.up)("el-container"),k=(0,t.up)("save-dialog"),_=(0,t.up)("review-dialog"),D=(0,t.up)("process-dialog");return(0,t.wg)(),(0,t.iD)(t.HY,null,[(0,t.Wm)(y,{style:{padding:"0 10px"}},{default:(0,t.w5)((()=>[(0,t.Wm)(w,null,{default:(0,t.w5)((()=>[o,(0,t._)("div",n,[(0,t._)("div",c,[(0,t.Wm)(h,{modelValue:u.params.keyword,"onUpdate:modelValue":s[0]||(s[0]=e=>u.params.keyword=e),size:u.size,placeholder:"流程名称",clearable:""},null,8,["modelValue","size"]),(0,t.Wm)(g,{type:"primary",icon:"el-icon-search",size:u.size,onClick:p.upSearch},null,8,["size","onClick"])])])])),_:1}),(0,t.Wm)(f,{class:"nopadding"},{default:(0,t.w5)((()=>[(0,t.Wm)(v,{ref:"table",tableName:"listCustomColumn",onSelectionChange:p.selectionChange,apiObj:u.list.apiObj,column:u.list.column,data:u.list.data,"row-key":"id",params:u.params,stripe:"",hidePagination:""},{default:(0,t.w5)((()=>[(0,t.Wm)(m,{label:"序号",align:"center",type:"index",width:"50"}),(0,t.Wm)(m,{label:"业务名称",width:"160",prop:"name","show-overflow-tooltip":""}),(0,t.Wm)(m,{label:"影响单据范围"},{default:(0,t.w5)((e=>[((0,t.wg)(!0),(0,t.iD)(t.HY,null,(0,t.Ko)(e.row.affect_order_type,((e,s)=>((0,t.wg)(),(0,t.iD)("span",{key:s},[(0,t._)("span",r,(0,i.toDisplayString)(e.order_type_name),1)])))),128))])),_:1}),(0,t.Wm)(m,{label:"操作",fixed:"right",align:"center",width:"260"},{default:(0,t.w5)((e=>[(0,t._)("div",d,[((0,t.wg)(!0),(0,t.iD)(t.HY,null,(0,t.Ko)(e.row.operate,((s,a)=>((0,t.wg)(),(0,t.j4)(g,{key:a,onClick:a=>p.handlerCommand(e.row,s),text:"",type:"primary",size:u.size},{default:(0,t.w5)((()=>[(0,t.Uk)((0,i.toDisplayString)(s.label),1)])),_:2},1032,["onClick","size"])))),128))])])),_:1})])),_:1},8,["onSelectionChange","apiObj","column","data","params"])])),_:1})])),_:1}),u.dialog.save?((0,t.wg)(),(0,t.j4)(k,{key:0,ref:"saveDialog",onSuccess:p.handleSaveSuccess,onClosed:s[1]||(s[1]=e=>u.dialog.save=!1)},null,8,["onSuccess"])):(0,t.kq)("",!0),u.dialog.review?((0,t.wg)(),(0,t.j4)(_,{key:1,ref:"reviewDialog",onSuccess:p.handleSaveSuccess,onClosed:s[2]||(s[2]=e=>u.dialog.review=!1)},null,8,["onSuccess"])):(0,t.kq)("",!0),u.dialog.process?((0,t.wg)(),(0,t.j4)(D,{key:2,ref:"processDialog",onSuccess:p.handleSaveSuccess,onClosed:s[3]||(s[3]=e=>u.dialog.process=!1)},null,8,["onSuccess"])):(0,t.kq)("",!0)],64)}var p=a(82656),h=a(34112),g=a(32535),w={name:"flowPath",components:{saveDialog:p["default"],reviewDialog:h["default"],processDialog:g["default"]},data(){return{size:"small",dialog:{save:!1,review:!1,process:!1},setMap:{},list:{column:[],data:[]},selection:[],params:{keyword:"",url:""}}},mounted(){this.getData()},methods:{async getData(){const e=await this.$API.system.reviewProcess.list.post(this.params);200===e.code&&(this.list.data=e.data)},selectionChange(e){this.selection=e},changeSwitch(e,s){s.$switch_yx=!0,setTimeout((async()=>{let e={id:s.id,status:s.active_status};const a=await this.$API.system.reviewProcess.status.post(e);200==a.code||(s.active_status=!s.active_status),delete s.$switch_yx}),500)},upSearch(){this.getData()},add(){this.dialog.save=!0,this.$nextTick((()=>{this.$refs.saveDialog.open()}))},async batch_del(){const e={ids:this.selection.map((e=>e.id))},s=await this.$API.system.reviewProcess.del.post(e);200===s.code&&(this.$refs.table.refresh(),this.$message.success("删除成功"))},table_edit(e){this.dialog.save=!0,this.$nextTick((()=>{this.$refs.saveDialog.open("edit").setData(e)}))},async table_del(e){const s={ids:[e.id]},a=await this.$API.system.reviewProcess.del.post(s);200===a.code&&(this.$refs.table.refresh(),this.$message.success("删除成功"))},handlerCommand(e,s){1===s.value?(this.dialog.save=!0,this.$nextTick((()=>{this.$refs.saveDialog.open("add").setOrder(e)}))):2===s.value?(this.dialog.review=!0,this.$nextTick((()=>{this.$refs.reviewDialog.open("review").setData(e)}))):3===s.value&&(this.dialog.process=!0,this.$nextTick((()=>{this.$refs.processDialog.open("show").setData(e)})))},handleSaveSuccess(){this.upSearch()}}},m=a(83744);const v=(0,m.Z)(w,[["render",u],["__scopeId","data-v-3ef7f139"]]);var f=v}}]);