Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

enterpriseDialog.a1260389.js 6.0KB

3 miesięcy temu
1
  1. import{d as B,r as m,J as O,c as u,e as V,G as x,i as a,h as e,j as y,f as j,F as z,H as A,q as F}from"./index.a2494fc2.js";const Z=B({name:"enterpriseDialog"}),R=Object.assign(Z,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(p,{emit:k}){const{proxy:_}=F(),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 l=>{l&&(i.data&&i.data.id?_.$message.success("\u7F16\u8F91\u6210\u529F\uFF01"):_.$message.success("\u65B0\u589E\u6210\u529F\uFF01"),f("close",!0))})};return O(()=>i.visible,async s=>{s||g.value.resetFields()}),(s,l)=>{const d=u("el-input"),n=u("el-form-item"),r=u("el-col"),b=u("el-row"),q=u("el-tree-select"),v=u("el-option"),c=u("el-select"),I=u("el-form"),P=u("el-button"),T=u("el-dialog");return V(),x(T,{"model-value":p.visible,title:`${p.data&&p.data.id?"\u7F16\u8F91":"\u65B0\u589E"}\u4F01\u4E1A`,width:"840px","destroy-on-close":"",onClose:l[14]||(l[14]=o=>f("close"))},{footer:a(()=>[e(P,{type:"primary",onClick:l[12]||(l[12]=o=>C(g.value))},{default:a(()=>l[15]||(l[15]=[y(" \u63D0\u4EA4 ")])),_:1}),e(P,{onClick:l[13]||(l[13]=o=>f("close"))},{default:a(()=>l[16]||(l[16]=[y(" \u5173\u95ED ")])),_:1})]),default:a(()=>[e(I,{ref_key:"formRef",ref:g,model:t.value,rules:$,"label-width":"115px","label-suffix":":"},{default:a(()=>[e(b,{gutter:30},{default:a(()=>[e(r,{span:12},{default:a(()=>[e(n,{label:"\u4F01\u4E1A\u540D\u79F0",prop:"name"},{default:a(()=>[e(d,{modelValue:t.value.name,"onUpdate:modelValue":l[0]||(l[0]=o=>t.value.name=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(b,{gutter:30},{default:a(()=>[e(r,{span:12},{default:a(()=>[e(n,{label:"\u4F20\u771F",prop:"fax"},{default:a(()=>[e(d,{modelValue:t.value.fax,"onUpdate:modelValue":l[1]||(l[1]=o=>t.value.fax=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u90AE\u7BB1",prop:"email"},{default:a(()=>[e(d,{modelValue:t.value.email,"onUpdate:modelValue":l[2]||(l[2]=o=>t.value.email=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u5730\u5740",prop:"address"},{default:a(()=>[e(d,{modelValue:t.value.address,"onUpdate:modelValue":l[3]||(l[3]=o=>t.value.address=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u6240\u5C5E\u533A\u57DF",prop:"region"},{default:a(()=>[e(q,{modelValue:t.value.region,"onUpdate:modelValue":l[4]||(l[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:a(()=>[e(n,{label:"\u8054\u7CFB\u4EBA",prop:"contactPerson"},{default:a(()=>[e(d,{modelValue:t.value.contactPerson,"onUpdate:modelValue":l[5]||(l[5]=o=>t.value.contactPerson=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"contactPhone"},{default:a(()=>[e(d,{modelValue:t.value.contactPhone,"onUpdate:modelValue":l[6]||(l[6]=o=>t.value.contactPhone=o),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u6CD5\u4EBA",prop:"legalPerson"},{default:a(()=>[e(d,{modelValue:t.value.legalPerson,"onUpdate:modelValue":l[7]||(l[7]=o=>t.value.legalPerson=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u6CD5\u4EBA\u8054\u7CFB\u7535\u8BDD",prop:"legalPersonPhone"},{default:a(()=>[e(d,{modelValue:t.value.legalPersonPhone,"onUpdate:modelValue":l[8]||(l[8]=o=>t.value.legalPersonPhone=o),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(n,{label:"\u4F01\u4E1A\u7C7B\u578B",prop:"enterpriseType"},{default:a(()=>[e(c,{modelValue:t.value.enterpriseType,"onUpdate:modelValue":l[9]||(l[9]=o=>t.value.enterpriseType=o),placeholder:"\u8BF7\u9009\u62E9",clearable:"",class:"w-full"},{default:a(()=>[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:a(()=>[e(n,{label:"\u8FD0\u8425\u5546",prop:"operatorId"},{default:a(()=>[e(c,{modelValue:t.value.operatorId,"onUpdate:modelValue":l[10]||(l[10]=o=>t.value.operatorId=o),placeholder:"\u8BF7\u9009\u62E9",class:"w-full"},{default:a(()=>[(V(!0),j(z,null,A(w.value,o=>(V(),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:a(()=>[e(n,{label:"\u5907\u6CE8",prop:"remark"},{default:a(()=>[e(d,{modelValue:t.value.remark,"onUpdate:modelValue":l[11]||(l[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{R as default};