import{A as e,M as t,X as n,dt as r,et as i,k as a,mn as o,t as s,w as c}from"./_plugin-vue_export-helper-C0lsYS1a.js";import{i as l,r as u}from"./GxPagination-DaT0MOF0.js";import{t as d}from"./button-CTBy3KbX.js";import{a as f}from"./css-CNIqhbiM.js";import{t as p}from"./dialog-C-zlcBiu.js";import{r as m}from"./useStructurizedVersionDialog-ByTgs9AA.js";import{n as h}from"./request-B9wfR4zJ.js";import{d as g,i as _,n as v,t as y}from"./view_base_options-c2kiHw0P.js";function b(){return{showFlag:!1,componentName:`enum-field-manage`,mainList:[],selectedItem:{},activeRow:{},showAddFlag:!1,showEditFlag:!1,showVersionFlag:!1,showBatchEditFlag:!1}}var x=t({name:`enum-field-manage`,model:{prop:`showFlag`,event:`toggle`},data(){return b()},props:{modelValue:{type:Boolean,default:!1},selectedFatherItem:{type:Object,default:()=>({})}},computed:{...v},components:{...y},mounted(){},watch:{modelValue(e){this.showFlag=e},showFlag(e){e?this.loadData():Object.assign(this.$data,b())}},methods:{..._,loadData(e){this.selectedFatherItem?.generalFieldId&&h({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 S(t,o,s,h,_,v){let y=d,b=l,x=u,S=f,C=m,w=g,T=i(`batch-add`),E=p;return n(),c(E,{title:`${t.selectedFatherItem[t.fatherCoreName+`Name`]}(${t.selectedFatherItem[t.fatherCoreName+`No`]||t.selectedFatherItem.fieldNo})的枚举管理`,modelValue:t.showFlag,"onUpdate:modelValue":o[6]||=e=>t.showFlag=e,width:`800px`,onClose:t.closeHandler,"append-to-body":``},{default:r(()=>[e(y,{type:`primary`,onClick:o[0]||=e=>t.showAddFlag=!0},{default:r(()=>[...o[7]||=[a(`新增`,-1)]]),_:1}),e(y,{type:`primary`,disabled:t.mainList.length==0,onClick:o[1]||=e=>t.showBatchEditFlag=!0},{default:r(()=>[...o[8]||=[a(`批量编辑`,-1)]]),_:1},8,[`disabled`]),e(S,null,{default:r(()=>[e(x,{ref:`mainTable`,data:t.mainList,"row-class-name":t.tableRowClassName},{default:r(()=>[e(b,{label:`编号`,prop:`sn`}),e(b,{label:`枚举名称`,prop:t.coreName+`Name`},null,8,[`prop`]),e(b,{label:`英文名称`,prop:`value`}),e(b,{label:`操作`},{default:r(n=>[e(y,{type:`primary`,link:``,onClick:e=>t.show(n.row,`Edit`)},{default:r(()=>[...o[9]||=[a(`修改`,-1)]]),_:1},8,[`onClick`]),e(y,{type:`primary`,link:``,onClick:e=>t.show(n.row,`Version`)},{default:r(()=>[...o[10]||=[a(`版本`,-1)]]),_:1},8,[`onClick`]),e(y,{type:`primary`,link:``,onClick:e=>t.show(n.row,`Delete`)},{default:r(()=>[...o[11]||=[a(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:1}),e(C,{modelValue:t.showAddFlag,"onUpdate:modelValue":o[2]||=e=>t.showAddFlag=e,fatherCoreName:t.fatherCoreName,fatherId:t.selectedFatherItem[t.fatherCoreName+`Id`],coreName:t.coreName,reloadHandler:t.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`coreName`,`reloadHandler`]),e(C,{modelValue:t.showEditFlag,"onUpdate:modelValue":o[3]||=e=>t.showEditFlag=e,fatherCoreName:t.fatherCoreName,fatherId:t.selectedFatherItem[t.fatherCoreName+`Id`],primaryKey:{fieldName:`hid`,value:t.activeRow.hid},coreName:t.coreName,reloadHandler:t.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`primaryKey`,`coreName`,`reloadHandler`]),e(w,{modelValue:t.showVersionFlag,"onUpdate:modelValue":o[4]||=e=>t.showVersionFlag=e,fatherSelectedItem:t.activeRow,coreName:t.coreName,description:t.description},null,8,[`modelValue`,`fatherSelectedItem`,`coreName`,`description`]),e(T,{modelValue:t.showBatchEditFlag,"onUpdate:modelValue":o[5]||=e=>t.showBatchEditFlag=e,fatherCoreName:t.fatherCoreName,fatherInfo:t.selectedFatherItem,coreName:t.coreName,refillData:t.mainList,reloadHandler:t.loadData},null,8,[`modelValue`,`fatherCoreName`,`fatherInfo`,`coreName`,`refillData`,`reloadHandler`])]),_:1},8,[`title`,`modelValue`,`onClose`])}var C=s(x,[[`render`,S]]);export{C as t};