upperModal.5ff69b.js 5.3 KB

1
  1. import{_ as N,d as I,bs as R,w as B,z as T,r as s,aC as M,o as b,G as g,C as l,H as S,l as c,b1 as j,h as r,j as e,M as d,L as i,c as O,F as L,D as z,aq as G}from"./index.js";import{h as H,u as P,n as $,q as J}from"./index.13ae5653.js";import{u as A}from"./useTask.8a645393.js";import{c as K}from"./validator.92b8f4b2.js";const Q={class:"flex flex-col"},W={class:"flex"},X=r("div",{class:"w-[30px] p-[5px] border-r-1 border-b-1 border-[#ccc]"},"\u4F01\u4E1A\u4FE1\u606F",-1),Y={class:"flex-1 border-b-1 border-[#ccc]"},Z={class:"flex"},ee=r("div",{class:"w-[30px] p-[5px] border-r-1 border-[#ccc]"},"\u5F00\u7968\u4FE1\u606F",-1),le={class:"flex-1"},ue={class:"flex w-full justify-end"},ae=I({__name:"upperModal",props:{visible:{type:Boolean,required:!0},code:{type:String,required:!0}},emits:["refresh"],setup(q,{emit:w}){const E=q,_=R(E,"visible"),u=B({}),k=B("0"),D=B(null),y=A({success(){_.value=!1,w("refresh")}}),h=A({initialData:{},success(v){const{id:a,name:n,nature:t,registercode:m,legaler:p,registertime:F,contactor:C,addr:f,scope:V,license_img:x}=v;u.value={id:a||"",code:E.code,company:n||"",type:t||"",inv_code:m||"",inv_legaler:p||"",inv_time:K(F)||"",inv_addr:"",inv_bank:"",inv_bankNo:"",contactor:C||"",invoice_mobile:"",addr:f||"",inv_scope:V||"",license_img:x||"",invoice_title:"",invoice_mobile:"",inv_bank:"",inv_bankNo:"",inv_addr:""}}});async function U(){try{await D.value.validate(),y.run(J(u.value))}catch{}}return T(()=>_.value,v=>{!v||h.run(H({code:E.code}))},{immediate:!0}),(v,a)=>{const n=s("ElFormItem"),t=s("ElCol"),m=s("ElRow"),p=s("ElInput"),F=s("ElOption"),C=s("ElSelect"),f=s("ElButton"),V=s("ElDialog"),x=M("loading");return b(),g(V,{title:"\u4F9B\u5E94\u5546\u5347\u7EA7\u4E1A\u52A1\u516C\u53F8",center:"",modelValue:c(_),"onUpdate:modelValue":a[7]||(a[7]=o=>G(_)?_.value=o:null),top:"10px"},{default:l(()=>[S((b(),g(c(j),{"label-width":"100px",rules:c(P),model:u.value,ref_key:"formRef",ref:D},{default:l(()=>[r("div",Q,[r("div",W,[X,r("div",Y,[e(m,null,{default:l(()=>[e(t,{span:6},{default:l(()=>[e(n,{label:"\u6CD5\u4EBA",required:""},{default:l(()=>[d(i(u.value.inv_legaler),1)]),_:1})]),_:1}),e(t,{span:6},{default:l(()=>[e(n,{label:"\u8425\u4E1A\u6267\u7167",required:""})]),_:1}),e(t,{span:12},{default:l(()=>[e(n,{label:"\u4F01\u4E1A\u540D\u79F0",required:""},{default:l(()=>[d(i(u.value.company),1)]),_:1})]),_:1}),e(t,{span:8},{default:l(()=>[e(n,{label:"\u7EB3\u7A0E\u8BC6\u522B\u53F7",required:""},{default:l(()=>[d(i(u.value.inv_code),1)]),_:1})]),_:1}),e(t,{span:8},{default:l(()=>[e(n,{label:"\u6210\u7ACB\u65E5\u671F",required:""},{default:l(()=>[d(i(u.value.inv_time),1)]),_:1})]),_:1}),e(t,{span:8},{default:l(()=>[e(n,{label:"\u516C\u53F8\u7C7B\u578B",required:""},{default:l(()=>[d(i(u.value.type),1)]),_:1})]),_:1}),e(t,{span:18},{default:l(()=>[e(n,{label:"\u8BE6\u7EC6\u5730\u5740",required:""},{default:l(()=>[d(i(u.value.addr),1)]),_:1})]),_:1}),e(t,{span:6},{default:l(()=>[e(n,{label:"\u8054\u7CFB\u4EBA",required:""},{default:l(()=>[d(i(u.value.contactor),1)]),_:1})]),_:1}),e(t,{span:24},{default:l(()=>[e(n,{label:"\u8425\u4E1A\u8303\u56F4",required:""},{default:l(()=>[d(i(u.value.inv_scope),1)]),_:1})]),_:1})]),_:1})])]),r("div",Z,[ee,r("div",le,[e(m,{class:"p-[10px]"},{default:l(()=>[e(t,{span:12},{default:l(()=>[e(n,{label:"\u516C\u53F8\u62AC\u5934",prop:"invoice_title"},{default:l(()=>[e(p,{placeholder:"\u516C\u53F8\u62AC\u5934",modelValue:u.value.invoice_title,"onUpdate:modelValue":a[0]||(a[0]=o=>u.value.invoice_title=o),maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(t,{span:12},{default:l(()=>[e(n,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"invoice_mobile"},{default:l(()=>[e(p,{modelValue:u.value.invoice_mobile,"onUpdate:modelValue":a[2]||(a[2]=o=>u.value.invoice_mobile=o)},{prepend:l(()=>[e(C,{style:{width:"115px"},modelValue:k.value,"onUpdate:modelValue":a[1]||(a[1]=o=>k.value=o)},{default:l(()=>[(b(!0),O(L,null,z(c($),o=>(b(),g(F,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(t,{span:12},{default:l(()=>[e(n,{label:"\u94F6\u884C\u540D\u79F0",prop:"inv_bank"},{default:l(()=>[e(p,{placeholder:"\u94F6\u884C\u540D\u79F0",modelValue:u.value.inv_bank,"onUpdate:modelValue":a[3]||(a[3]=o=>u.value.inv_bank=o),maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(t,{span:12},{default:l(()=>[e(n,{label:"\u94F6\u884C\u5361\u53F7",prop:"inv_bankNo"},{default:l(()=>[e(p,{placeholder:"\u94F6\u884C\u5361\u53F7",modelValue:u.value.inv_bankNo,"onUpdate:modelValue":a[4]||(a[4]=o=>u.value.inv_bankNo=o),maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(t,{span:24},{default:l(()=>[e(n,{label:"\u8054\u7CFB\u5730\u5740",prop:"inv_addr"},{default:l(()=>[e(p,{placeholder:"\u8054\u7CFB\u5730\u5740",modelValue:u.value.inv_addr,"onUpdate:modelValue":a[5]||(a[5]=o=>u.value.inv_addr=o),maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(t,{span:24},{default:l(()=>[r("div",ue,[e(f,{onClick:a[6]||(a[6]=o=>_.value=!1)},{default:l(()=>[d("\u53D6\u6D88")]),_:1}),e(f,{type:"primary",onClick:U,loading:c(y).loading},{default:l(()=>[d("\u4FDD\u5B58")]),_:1},8,["loading"])])]),_:1})]),_:1})])])])]),_:1},8,["rules","model"])),[[x,c(h).loading]])]),_:1},8,["modelValue"])}}});var se=N(ae,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/supplier/upperModal.vue"]]);export{se as default};