Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

2 linhas
6.0KB

  1. import{d as h,r as m,L as B,c as u,e as _,I as x,i as l,h as e,j as y,f as O,F as j,J as z,x as A}from"./index.8d65dd27.js";const F=h({name:"enterpriseDialog"}),L=Object.assign(F,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(p,{emit:k}){const{proxy:c}=A(),i=p,f=k,g=m(),w=m([]),U=m([]),t=m({name:void 0,fax:void 0,email:void 0,address:void 0,region:void 0,contactPerson:void 0,contactPhone:void 0,legalPerson:void 0,legalPersonPhone:void 0,enterpriseType:void 0,operatorId:void 0,remark:void 0}),$={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0",trigger:"blur"}],fax:[{pattern:/^(\d{3,4}-)?\d{7,8}$/,message:"\u4F20\u771F\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}],email:[{pattern:/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}],legalPerson:[{required:!0,message:"\u8BF7\u8F93\u5165\u6CD5\u4EBA",trigger:"blur"}],contactPhone:[{pattern:/^1[3456789]\d{9}$/,message:"\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}],legalPersonPhone:[{required:!0,pattern:/^1[3456789]\d{9}$/,message:"\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}],region:[{required:!0,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u533A\u57DF",trigger:"change"}],operatorId:[{required:!0,message:"\u8BF7\u9009\u62E9\u8FD0\u8425\u5546",trigger:"change"}]},C=async s=>{!s||await s.validate(async a=>{a&&(i.data&&i.data.id?c.$message.success("\u7F16\u8F91\u6210\u529F\uFF01"):c.$message.success("\u65B0\u589E\u6210\u529F\uFF01"),f("close",!0))})};return B(()=>i.visible,async s=>{s||g.value.resetFields()}),(s,a)=>{const d=u("el-input"),n=u("el-form-item"),r=u("el-col"),V=u("el-row"),I=u("el-tree-select"),v=u("el-option"),b=u("el-select"),q=u("el-form"),P=u("el-button"),T=u("el-dialog");return _(),x(T,{"model-value":p.visible,title:`${p.data&&p.data.id?"\u7F16\u8F91":"\u65B0\u589E"}\u4F01\u4E1A`,width:"840px","destroy-on-close":"",onClose:a[14]||(a[14]=o=>f("close"))},{footer:l(()=>[e(P,{type:"primary",onClick:a[12]||(a[12]=o=>C(g.value))},{default:l(()=>[y(" \u63D0\u4EA4 ")]),_:1}),e(P,{onClick:a[13]||(a[13]=o=>f("close"))},{default:l(()=>[y(" \u5173\u95ED ")]),_:1})]),default:l(()=>[e(q,{ref_key:"formRef",ref:g,model:t.value,rules:$,"label-width":"115px","label-suffix":":"},{default:l(()=>[e(V,{gutter:30},{default:l(()=>[e(r,{span:12},{default:l(()=>[e(n,{label:"\u4F01\u4E1A\u540D\u79F0",prop:"name"},{default:l(()=>[e(d,{modelValue:t.value.name,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value.name=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(V,{gutter:30},{default:l(()=>[e(r,{span:12},{default:l(()=>[e(n,{label:"\u4F20\u771F",prop:"fax"},{default:l(()=>[e(d,{modelValue:t.value.fax,"onUpdate:modelValue":a[1]||(a[1]=o=>t.value.fax=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u90AE\u7BB1",prop:"email"},{default:l(()=>[e(d,{modelValue:t.value.email,"onUpdate:modelValue":a[2]||(a[2]=o=>t.value.email=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u5730\u5740",prop:"address"},{default:l(()=>[e(d,{modelValue:t.value.address,"onUpdate:modelValue":a[3]||(a[3]=o=>t.value.address=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u6240\u5C5E\u533A\u57DF",prop:"region"},{default:l(()=>[e(I,{modelValue:t.value.region,"onUpdate:modelValue":a[4]||(a[4]=o=>t.value.region=o),data:U.value,filterable:"",props:{label:"name",value:"unionCode"},"check-strictly":"","render-after-expand":!1,class:"w-full"},null,8,["modelValue","data"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u8054\u7CFB\u4EBA",prop:"contactPerson"},{default:l(()=>[e(d,{modelValue:t.value.contactPerson,"onUpdate:modelValue":a[5]||(a[5]=o=>t.value.contactPerson=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"contactPhone"},{default:l(()=>[e(d,{modelValue:t.value.contactPhone,"onUpdate:modelValue":a[6]||(a[6]=o=>t.value.contactPhone=o),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u6CD5\u4EBA",prop:"legalPerson"},{default:l(()=>[e(d,{modelValue:t.value.legalPerson,"onUpdate:modelValue":a[7]||(a[7]=o=>t.value.legalPerson=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u6CD5\u4EBA\u8054\u7CFB\u7535\u8BDD",prop:"legalPersonPhone"},{default:l(()=>[e(d,{modelValue:t.value.legalPersonPhone,"onUpdate:modelValue":a[8]||(a[8]=o=>t.value.legalPersonPhone=o),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u4F01\u4E1A\u7C7B\u578B",prop:"enterpriseType"},{default:l(()=>[e(b,{modelValue:t.value.enterpriseType,"onUpdate:modelValue":a[9]||(a[9]=o=>t.value.enterpriseType=o),placeholder:"\u8BF7\u9009\u62E9",clearable:"",class:"w-full"},{default:l(()=>[e(v,{label:"\u7BA1\u7406\u5355\u4F4D",value:1}),e(v,{label:"\u4F01\u4E1A\u5355\u4F4D",value:2})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(n,{label:"\u8FD0\u8425\u5546",prop:"operatorId"},{default:l(()=>[e(b,{modelValue:t.value.operatorId,"onUpdate:modelValue":a[10]||(a[10]=o=>t.value.operatorId=o),placeholder:"\u8BF7\u9009\u62E9",class:"w-full"},{default:l(()=>[(_(!0),O(j,null,z(w.value,o=>(_(),x(v,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,{span:24},{default:l(()=>[e(n,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[e(d,{modelValue:t.value.remark,"onUpdate:modelValue":a[11]||(a[11]=o=>t.value.remark=o),maxlength:"200","show-word-limit":"",type:"textarea",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}});export{L as default};