import{$ as e,C as t,O as n,Y as r,dt as i,j as a,k as o}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import"./GxPagination-DOexUzbO.js";import{n as s,t as c}from"./table-C_Bpc8FZ.js";import{t as l}from"./button-CHjzS7b0.js";import{a as u}from"./css-BYms2pL-.js";import{t as d}from"./dialog-BLJqz3g4.js";import{t as f}from"./_plugin-vue_export-helper-CnS4QQza.js";import"./css-DxP8XCTD.js";import"./css-CvqL1q4I.js";import{r as p}from"./useStructurizedVersionDialog-CNAsWSWf.js";import"./css-DunA3L7q.js";import{n as m}from"./request-CWxGgYu0.js";import"./css-ropEN6qH.js";import"./css-BrGVMe3H.js";import{d as h,i as g,n as _,t as v}from"./view_base_options-B9YSRjyH.js";function y(){return{showFlag:!1,componentName:`enum-field-manage`,mainList:[],selectedItem:{},activeRow:{},showAddFlag:!1,showEditFlag:!1,showVersionFlag:!1,showBatchEditFlag:!1}}var b=a({name:`enum-field-manage`,model:{prop:`showFlag`,event:`toggle`},data(){return y()},props:{modelValue:{type:Boolean,default:!1},selectedFatherItem:{type:Object,default:()=>({})}},computed:{..._},components:{...v},mounted(){},watch:{modelValue(e){this.showFlag=e},showFlag(e){e?this.loadData():Object.assign(this.$data,y())}},methods:{...g,loadData(e){this.selectedFatherItem?.generalFieldId&&m({method:`post`,url:`/zxl_pm/request/fieldDict.svc?cmd=getByGeneralFieldId&zxlPrdId=${this.$route.query.productId}`,data:{generalFieldId:this.selectedFatherItem.generalFieldId}}).then(t=>{this.mainList=t,this.$nextTick(()=>{e instanceof Function&&e()})})},closeHandler(){this.$emit(`toggle`,!1),this.$emit(`update:modelValue`,!1),this.showFlag=!1}}});function x(a,f,m,g,_,v){let y=l,b=s,x=c,S=u,C=p,w=h,T=e(`batch-add`),E=d;return r(),t(E,{title:`${a.selectedFatherItem[a.fatherCoreName+`Name`]}(${a.selectedFatherItem[a.fatherCoreName+`No`]||a.selectedFatherItem.fieldNo})的枚举管理`,modelValue:a.showFlag,"onUpdate:modelValue":f[6]||=e=>a.showFlag=e,width:`800px`,onClose:a.closeHandler,"append-to-body":``},{default:i(()=>[o(y,{type:`primary`,onClick:f[0]||=e=>a.showAddFlag=!0},{default:i(()=>[...f[7]||=[n(`新增`,-1)]]),_:1}),o(y,{type:`primary`,disabled:a.mainList.length==0,onClick:f[1]||=e=>a.showBatchEditFlag=!0},{default:i(()=>[...f[8]||=[n(`批量编辑`,-1)]]),_:1},8,[`disabled`]),o(S,null,{default:i(()=>[o(x,{ref:`mainTable`,data:a.mainList,"row-class-name":a.tableRowClassName},{default:i(()=>[o(b,{label:`编号`,prop:`sn`}),o(b,{label:`枚举名称`,prop:a.coreName+`Name`},null,8,[`prop`]),o(b,{label:`英文名称`,prop:`value`}),o(b,{label:`操作`},{default:i(e=>[o(y,{type:`primary`,link:``,onClick:t=>a.show(e.row,`Edit`)},{default:i(()=>[...f[9]||=[n(`修改`,-1)]]),_:1},8,[`onClick`]),o(y,{type:`primary`,link:``,onClick:t=>a.show(e.row,`Version`)},{default:i(()=>[...f[10]||=[n(`版本`,-1)]]),_:1},8,[`onClick`]),o(y,{type:`primary`,link:``,onClick:t=>a.show(e.row,`Delete`)},{default:i(()=>[...f[11]||=[n(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:1}),o(C,{modelValue:a.showAddFlag,"onUpdate:modelValue":f[2]||=e=>a.showAddFlag=e,fatherCoreName:a.fatherCoreName,fatherId:a.selectedFatherItem[a.fatherCoreName+`Id`],coreName:a.coreName,reloadHandler:a.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`coreName`,`reloadHandler`]),o(C,{modelValue:a.showEditFlag,"onUpdate:modelValue":f[3]||=e=>a.showEditFlag=e,fatherCoreName:a.fatherCoreName,fatherId:a.selectedFatherItem[a.fatherCoreName+`Id`],primaryKey:{fieldName:`hid`,value:a.activeRow.hid},coreName:a.coreName,reloadHandler:a.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`primaryKey`,`coreName`,`reloadHandler`]),o(w,{modelValue:a.showVersionFlag,"onUpdate:modelValue":f[4]||=e=>a.showVersionFlag=e,fatherSelectedItem:a.activeRow,coreName:a.coreName,description:a.description},null,8,[`modelValue`,`fatherSelectedItem`,`coreName`,`description`]),o(T,{modelValue:a.showBatchEditFlag,"onUpdate:modelValue":f[5]||=e=>a.showBatchEditFlag=e,fatherCoreName:a.fatherCoreName,fatherInfo:a.selectedFatherItem,coreName:a.coreName,refillData:a.mainList,reloadHandler:a.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherInfo`,`coreName`,`refillData`,`reloadHandler`])]),_:1},8,[`title`,`modelValue`,`onClose`])}var S=f(b,[[`render`,x]]);export{S as t};