import{a1 as w,a2 as F,Z as N,r as C,_ as I,a5 as V,bO as b}from"./index-design-C8wrC2s6.js";import{d as y,ao as $,X as E,O as k,Y as t,a4 as l,ab as d}from"./vue-BQyCGvUQ.js";import{d as v,a7 as D,A as B,B as H,k as A}from"./element-plus-DXXGg0hD.js";function i(){return{showFlag:!1,componentName:"enum-field-manage",mainList:[],selectedItem:{},activeRow:{},showAddFlag:!1,showEditFlag:!1,showVersionFlag:!1,showBatchEditFlag:!1}}const L=y({name:"enum-field-manage",model:{prop:"showFlag",event:"toggle"},data(){return i()},props:{modelValue:{type:Boolean,default:!1},selectedFatherItem:{type:Object,default:()=>({})}},computed:{...N},components:{...F},mounted(){},watch:{modelValue(e){this.showFlag=e},showFlag(e){e?this.loadData():Object.assign(this.$data,i())}},methods:{...w,loadData(e){this.selectedFatherItem?.generalFieldId&&C({method:"post",url:`/zxl_pm/request/fieldDict.svc?cmd=getByGeneralFieldId&zxlPrdId=${this.$route.query.productId}`,data:{generalFieldId:this.selectedFatherItem.generalFieldId}}).then(a=>{this.mainList=a,this.$nextTick(()=>{e instanceof Function&&e()})})},closeHandler(){this.$emit("toggle",!1),this.$emit("update:modelValue",!1),this.showFlag=!1}}});function T(e,a,U,O,R,c){const r=v,n=H,u=B,p=D,s=V,f=b,h=$("batch-add"),g=A;return k(),E(g,{title:`${e.selectedFatherItem[e.fatherCoreName+"Name"]}(${e.selectedFatherItem[e.fatherCoreName+"No"]||e.selectedFatherItem.fieldNo})的枚举管理`,modelValue:e.showFlag,"onUpdate:modelValue":a[6]||(a[6]=o=>e.showFlag=o),width:"800px",onClose:e.closeHandler,"append-to-body":""},{default:t(()=>[l(r,{type:"primary",onClick:a[0]||(a[0]=o=>e.showAddFlag=!0)},{default:t(()=>[...a[7]||(a[7]=[d("新增",-1)])]),_:1}),l(r,{type:"primary",disabled:e.mainList.length==0,onClick:a[1]||(a[1]=o=>e.showBatchEditFlag=!0)},{default:t(()=>[...a[8]||(a[8]=[d("批量编辑",-1)])]),_:1},8,["disabled"]),l(p,null,{default:t(()=>[l(u,{ref:"mainTable",data:e.mainList,"row-class-name":e.tableRowClassName},{default:t(()=>[l(n,{label:"编号",prop:"sn"}),l(n,{label:"枚举名称",prop:e.coreName+"Name"},null,8,["prop"]),l(n,{label:"英文名称",prop:"value"}),l(n,{label:"操作"},{default:t(o=>[l(r,{type:"primary",link:"",onClick:m=>e.show(o.row,"Edit")},{default:t(()=>[...a[9]||(a[9]=[d("修改",-1)])]),_:1},8,["onClick"]),l(r,{type:"primary",link:"",onClick:m=>e.show(o.row,"Version")},{default:t(()=>[...a[10]||(a[10]=[d("版本",-1)])]),_:1},8,["onClick"]),l(r,{type:"primary",link:"",onClick:m=>e.show(o.row,"Delete")},{default:t(()=>[...a[11]||(a[11]=[d("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","row-class-name"])]),_:1}),l(s,{modelValue:e.showAddFlag,"onUpdate:modelValue":a[2]||(a[2]=o=>e.showAddFlag=o),fatherCoreName:e.fatherCoreName,fatherId:e.selectedFatherItem[e.fatherCoreName+"Id"],coreName:e.coreName,reloadHandler:e.loadData},null,8,["modelValue","fatherCoreName","fatherId","coreName","reloadHandler"]),l(s,{modelValue:e.showEditFlag,"onUpdate:modelValue":a[3]||(a[3]=o=>e.showEditFlag=o),fatherCoreName:e.fatherCoreName,fatherId:e.selectedFatherItem[e.fatherCoreName+"Id"],primaryKey:{fieldName:"hid",value:e.activeRow.hid},coreName:e.coreName,reloadHandler:e.loadData},null,8,["modelValue","fatherCoreName","fatherId","primaryKey","coreName","reloadHandler"]),l(f,{modelValue:e.showVersionFlag,"onUpdate:modelValue":a[4]||(a[4]=o=>e.showVersionFlag=o),fatherSelectedItem:e.activeRow,coreName:e.coreName,description:e.description},null,8,["modelValue","fatherSelectedItem","coreName","description"]),l(h,{modelValue:e.showBatchEditFlag,"onUpdate:modelValue":a[5]||(a[5]=o=>e.showBatchEditFlag=o),fatherCoreName:e.fatherCoreName,fatherInfo:e.selectedFatherItem,coreName:e.coreName,refillData:e.mainList,reloadHandler:e.loadData},null,8,["modelValue","fatherCoreName","fatherInfo","coreName","refillData","reloadHandler"])]),_:1},8,["title","modelValue","onClose"])}const K=I(L,[["render",T]]);export{K as E};
