1 |
- import{_ as Z,r as ee,D as F,aY as A,a5 as ue,ad as le,ae as S,G as I,v as n,o as B,M as V,J as t,w as u,x as c,p as ae,L as te,K as oe,q as _,aH as re,W as s}from"./index.93d58d1e.js";import{U as ne}from"./unit.73d154e5.js";import{h as se}from"./index.15b93c51.js";import{S as de}from"./super.1e9e5a0e.js";import{b as ie,a as me}from"./index.73d67811.js";const pe={company_name:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u4F01\u4E1A\u540D\u79F0"}],company_address:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u5730\u5740"}],company_license:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7"}],mobile:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u7535\u8BDD"}],bank_name:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}],bankNo:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C\u8D26\u6237"}],input_ticket:[{required:!0,trigger:"blur",message:"\u8BF7\u9009\u62E9\u9A8C\u7968\u65B9\u5F0F"}],out_ticket:[{required:!0,trigger:"blur",message:"\u8BF7\u9009\u62E9\u91D1\u7A0E\u5F00\u7968"}],ownerPlace:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F52\u5C5E\u5730"}],denomination:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u9762\u989D"}],invoiceType:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u53D1\u7968\u652F\u6301\u7C7B\u578B"}]},P={company_name:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u4F01\u4E1A\u540D\u79F0"}],company_address:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u5730\u5740"}],company_license:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7"}],mobile:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u7535\u8BDD"}],bank_name:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}],bankNo:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C\u8D26\u6237"}],input_ticket:[{required:!0,trigger:"blur",message:"\u8BF7\u9009\u62E9\u9A8C\u7968\u65B9\u5F0F"}],out_ticket:[{required:!0,trigger:"blur",message:"\u8BF7\u9009\u62E9\u91D1\u7A0E\u5F00\u7968"}],voider:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u53D1\u7968\u4F5C\u5E9F\u4EBA"}],payee:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA"}],reviewer:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u590D\u6838\u4EBA"}],drawer:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F00\u7968\u4EBA"}],ownerPlace:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u5F52\u5C5E\u5730"}],denomination:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u9762\u989D"}],invoiceType:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u53D1\u7968\u652F\u6301\u7C7B\u578B"}]};var m=(p=>(p[p.update=0]="update",p[p.preview=1]="preview",p[p.create=2]="create",p))(m||{});const ce=_("h1",{class:"text-xl font-[600] mb-2 text-[#000]"},"\u516C\u53F8\u8D22\u52A1\u8BBE\u7F6E",-1),Fe=_("h1",{class:"text-xl font-[600] mb-2 text-[#000]"},"\u8FDB\u9879\u7968\u8BBE\u7F6E",-1),_e=s("\u91D1\u7A0E\u9A8C\u7968"),ve=s("\u4EBA\u5DE5\u9A8C\u7968"),Ee=_("h1",{class:"text-xl font-[600] mb-2 text-[#000]"},"\u9500\u9879\u7968\u8BBE\u7F6E",-1),Be=s("\u652F\u6301"),be=s("\u4E0D\u652F\u6301"),fe=s("\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968"),ge=s(),De=_("br",null,null,-1),Ve=s("\u589E\u503C\u7A0E\u666E\u901A\u53D1\u7968"),Ce=s(),ye=_("br",null,null,-1),Ae=s("\u589E\u503C\u7A0E\u7535\u5B50\u4E13\u7528\u53D1\u7968"),ke=_("br",null,null,-1),we=s("\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968"),qe={class:"flex w-full justify-end"},xe=s("\u53D6\u6D88"),Ue=s("\u4FDD\u5B58"),Ne=ee({__name:"finance-modal",emits:["finance-save"],setup(p,{expose:L,emit:k}){const v=F(!1),E=F(m.create),b=F(null),i=F(),T=F(!0),{run:j,data:G}=A({initalData:[],isList:!0,success:()=>{const{address:o,name:e,registercode:y}=G.value[0];E.value===m.create&&(a.value.company_name=e,a.value.company_address=o,a.value.company_license=y)}}),w={company_name:"",company_address:"",company_license:"",bank_name:"",bankNo:"",mobile:"",input_ticket:"",out_ticket:"",voider:"",reviewer:"",drawer:"",payee:"",ownerPlace:"",denomination:"",invoiceType:[]},{companyList:C}=ue(),{isSuperUser:q}=le(),a=F({...w}),x=F(P),O=S(()=>{const o=C.value.findIndex(({companyNo:e})=>e==="");return o>=0?C.value.slice(o+1):C.value}),J=S(()=>{const o="\u516C\u53F8\u8D22\u52A1\u8BBE\u7F6E";switch(E.value){case m.create:return"\u521B\u5EFA"+o;case m.preview:return"\u67E5\u770B"+o;default:return"\u4FEE\u6539"+o}}),W=o=>{Object.keys(a.value).forEach(e=>{switch(e){case"invoiceType":a.value[e]=o[e].split(",");break;default:a.value[e]=o[e];break}})},{run:z,loading:H}=A({success:()=>{v.value=!1,k("finance-save")}}),{run:K,loading:Y}=A({success:()=>{v.value=!1,k("finance-save")}});function $(){b.value.validate(o=>{if(!o)return;const e={companyNo:i.value,...q.value?{}:{relaComNo:i.value},...a.value};switch(E.value){case m.create:z(me(e));break;case m.update:K(ie(e));break}})}const U=o=>j(se({companyNo:o}));return I(()=>a.value,({out_ticket:o})=>{const e=Number(o)===1?P:pe;x.value=e,b.value&&b.value.clearValidate()},{deep:!0,immediate:!0}),I(()=>i.value,o=>{E.value===m.create&&o&&U(o)}),L({onDisplay:(o,e)=>{a.value={...w},v.value=!0,E.value=e,i.value="",o&&(W(o),i.value=o.companyNo,U(o.companyNo))}}),(o,e)=>{const y=n("ElOption"),M=n("ElSelect"),r=n("ElFormItem"),d=n("ElInput"),f=n("ElCol"),N=n("ElRow"),g=n("ElRadio"),h=n("ElRadioGroup"),D=n("ElCheckbox"),Q=n("ElCheckboxGroup"),R=n("ElButton"),X=n("ElDialog");return B(),V(X,{center:"",modelValue:v.value,"onUpdate:modelValue":e[20]||(e[20]=l=>v.value=l),title:c(J),"destroy-on-close":"",onClose:e[21]||(e[21]=l=>T.value=!0),width:"1040px"},{default:t(()=>[u(c(re),{ref_key:"formRef",ref:b,labelWidth:"110px",model:a.value,rules:x.value,disabled:E.value===c(m).preview},{default:t(()=>[ce,u(N,{gutter:12},{default:t(()=>[u(f,{span:12},{default:t(()=>[u(r,{label:"\u516C\u53F8",prop:"company_name"},{default:t(()=>[c(q)?(B(),V(de,{key:1,code:i.value,"onUpdate:code":e[1]||(e[1]=l=>i.value=l),noAll:"",noSet:"",onChange:e[2]||(e[2]=l=>i.value=l.code)},null,8,["code"])):(B(),V(M,{key:0,style:{width:"100%"},modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.value=l),placeholder:"\u8BF7\u9009\u62E9\u516C\u53F8"},{default:t(()=>[(B(!0),ae(oe,null,te(c(O),l=>(B(),V(y,{key:l.companyNo,label:l.companyName,value:l.companyNo},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]))]),_:1}),u(r,{label:"\u7EB3\u7A0E\u53F7",prop:"company_license"},{default:t(()=>[u(d,{modelValue:a.value.company_license,"onUpdate:modelValue":e[3]||(e[3]=l=>a.value.company_license=l),placeholder:"\u7EB3\u7A0E\u53F7",disabled:""},null,8,["modelValue"])]),_:1}),u(r,{label:"\u62AC\u5934",prop:"company_name"},{default:t(()=>[u(d,{modelValue:a.value.company_name,"onUpdate:modelValue":e[4]||(e[4]=l=>a.value.company_name=l),placeholder:"\u8BF7\u8F93\u5165\u62AC\u5934"},null,8,["modelValue"])]),_:1}),u(r,{label:"\u5730\u5740",prop:"company_address"},{default:t(()=>[u(d,{modelValue:a.value.company_address,"onUpdate:modelValue":e[5]||(e[5]=l=>a.value.company_address=l),placeholder:"\u8BF7\u8F93\u5165\u5730\u5740"},null,8,["modelValue"])]),_:1})]),_:1}),u(f,{span:12},{default:t(()=>[u(r,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"mobile"},{default:t(()=>[u(d,{placeholder:"\u8054\u7CFB\u7535\u8BDD",modelValue:a.value.mobile,"onUpdate:modelValue":e[6]||(e[6]=l=>a.value.mobile=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u94F6\u884C\u540D\u79F0",prop:"bank_name"},{default:t(()=>[u(d,{placeholder:"\u94F6\u884C\u540D\u79F0",modelValue:a.value.bank_name,"onUpdate:modelValue":e[7]||(e[7]=l=>a.value.bank_name=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u94F6\u884C\u5361\u53F7",prop:"bankNo"},{default:t(()=>[u(d,{modelValue:a.value.bankNo,"onUpdate:modelValue":e[8]||(e[8]=l=>a.value.bankNo=l),placeholder:"\u94F6\u884C\u5361\u53F7"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),Fe,u(r,{label:"\u8FDB\u9879\u7968\u8BBE\u7F6E",prop:"input_ticket"},{default:t(()=>[u(h,{modelValue:a.value.input_ticket,"onUpdate:modelValue":e[9]||(e[9]=l=>a.value.input_ticket=l)},{default:t(()=>[u(g,{label:"1"},{default:t(()=>[_e]),_:1}),u(g,{label:"2"},{default:t(()=>[ve]),_:1})]),_:1},8,["modelValue"])]),_:1}),Ee,u(N,{gutter:10},{default:t(()=>[u(f,{span:12},{default:t(()=>[u(r,{label:"\u91D1\u7A0E\u5F00\u7968",prop:"out_ticket"},{default:t(()=>[u(h,{modelValue:a.value.out_ticket,"onUpdate:modelValue":e[10]||(e[10]=l=>a.value.out_ticket=l)},{default:t(()=>[u(g,{label:"1"},{default:t(()=>[Be]),_:1}),u(g,{label:"2"},{default:t(()=>[be]),_:1})]),_:1},8,["modelValue"])]),_:1}),u(r,{label:"\u4F5C\u5E9F\u4EBA",prop:"voider"},{default:t(()=>[u(d,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u5E9F\u4EBA",modelValue:a.value.voider,"onUpdate:modelValue":e[11]||(e[11]=l=>a.value.voider=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u5F00\u7968\u4EBA",prop:"drawer"},{default:t(()=>[u(d,{placeholder:"\u8BF7\u8F93\u5165\u5F00\u7968\u4EBA",modelValue:a.value.drawer,"onUpdate:modelValue":e[12]||(e[12]=l=>a.value.drawer=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u6536\u6B3E\u4EBA",prop:"payee"},{default:t(()=>[u(d,{placeholder:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA",modelValue:a.value.payee,"onUpdate:modelValue":e[13]||(e[13]=l=>a.value.payee=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u590D\u6838\u4EBA",prop:"reviewer"},{default:t(()=>[u(d,{placeholder:"\u8BF7\u8F93\u5165\u590D\u6838\u4EBA",modelValue:a.value.reviewer,"onUpdate:modelValue":e[14]||(e[14]=l=>a.value.reviewer=l)},null,8,["modelValue"])]),_:1})]),_:1}),u(f,{span:12},{default:t(()=>[u(r,{label:"\u53D1\u7968\u5F52\u5C5E\u5730",prop:"ownerPlace"},{default:t(()=>[u(d,{placeholder:"\u8BF7\u9009\u62E9\u53D1\u7968\u5F52\u5C5E\u5730",modelValue:a.value.ownerPlace,"onUpdate:modelValue":e[15]||(e[15]=l=>a.value.ownerPlace=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u53D1\u7968\u9762\u989D",prop:"denomination"},{default:t(()=>[u(c(ne),{unit:"\u4E07\u5143",placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u9762\u989D",modelValue:a.value.denomination,"onUpdate:modelValue":e[16]||(e[16]=l=>a.value.denomination=l)},null,8,["modelValue"])]),_:1}),u(r,{label:"\u652F\u6301\u53D1\u7968\u7C7B\u578B",prop:"invoiceType"},{default:t(()=>[u(Q,{modelValue:a.value.invoiceType,"onUpdate:modelValue":e[17]||(e[17]=l=>a.value.invoiceType=l)},{default:t(()=>[u(D,{label:"04"},{default:t(()=>[fe]),_:1}),ge,De,u(D,{label:"07"},{default:t(()=>[Ve]),_:1}),Ce,ye,u(D,{label:"27"},{default:t(()=>[Ae]),_:1}),ke,u(D,{label:"26"},{default:t(()=>[we]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),u(r,null,{default:t(()=>[_("div",qe,[u(R,{type:"\u53D6\u6D88",onClick:e[18]||(e[18]=()=>v.value=!1)},{default:t(()=>[xe]),_:1}),u(R,{loading:c(H)||c(Y),type:"primary",onClick:e[19]||(e[19]=()=>$())},{default:t(()=>[Ue]),_:1},8,["loading"])])]),_:1})]),_:1},8,["model","rules","disabled"])]),_:1},8,["modelValue","title"])}}});var he=Z(Ne,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/system/finance/components/finance-modal.vue"]]),Te=Object.freeze(Object.defineProperty({__proto__:null,default:he},Symbol.toStringTag,{value:"Module"}));export{he as F,m as M,Te as f};
|