import{A as e,M as t,X as n,dt as r,et as i,k as a,t as o,w as s}from"./_plugin-vue_export-helper-9JxOV_6y.js";import{i as c,r as l}from"./GxPagination-1gJXbpdv.js";import{t as u}from"./button-CENWFHkZ.js";import{a as d}from"./css-C7OSowuz.js";import{t as f}from"./dialog-CTuQSeYb.js";import{r as p}from"./useStructurizedVersionDialog-Z2GQgiO7.js";import{n as m}from"./request-D0ipHUJ7.js";import{d as h,i as g,n as _,t as v}from"./view_base_options-tpLT5NKN.js";function y(){return{showFlag:!1,componentName:`enum-field-manage`,mainList:[],selectedItem:{},activeRow:{},showAddFlag:!1,showEditFlag:!1,showVersionFlag:!1,showBatchEditFlag:!1}}var b=t({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(t,o,m,g,_,v){let y=u,b=c,x=l,S=d,C=p,w=h,T=i(`batch-add`),E=f;return n(),s(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 S=o(b,[[`render`,x]]);export{S as t};