import{_ as q,d as j,x as k,bG as z,m as a,ah as w,cD as V,bO as G,a0 as H,r as E,aD as J,o as v,c as b,H as U,a as h,l,D as s,h as e,N as $,L as n,M as i,F as B,E as O,G as Q,cE as W,cF as X,Q as K,R as Y}from"./index.js";const Z={title:"title",code:"inv_code",number:"inv_number",openTime:"open_date",checkNumber:"check_code",buyerTitle:"buyer_title",buyerCode:"buyer_id",buyerAddr:"buyer_addr",buyerMobile:"buyer_mobile",buyerBank:"buyer_bank",buyerBankNo:"buyer_bankNo",sellerTitle:"seller_title",sellerCode:"seller_id",sellerAddr:"seller_addr",sellerMobile:"seller_mobile",sellerBank:"seller_bank",sellerBankNo:"seller_bankNo",goodList:"item",listInfo:{name:"XMMC",spec:"",unit:"DW",num:"SPSL",goodPrice:"DJ",totalPrice:"JE",taxRate:"SL",tax:"SE",cat_code:"SPBM"},amountTax:"tax_fee",amountPrice:"inv_subtotal",TotalIncludingTax_C:"total_in_words",TotalIncludingTax_L:"inv_total",payee:"reciver",reviewer:"reviewer",drawer:"issuer",seller:"",remarks:"remark"},ee={title:"title",code:"code",number:"number",openTime:"issue_date",checkNumber:"check_code",buyerTitle:"buyer_name",buyerCode:"buyer_id",buyerAddr:"buyer_address",buyerMobile:"",buyerBank:"buyer_bank",buyerBankNo:"",sellerTitle:"seller_name",sellerCode:"seller_id",sellerAddr:"seller_address",sellerMobile:"",sellerBank:"seller_bank",sellerBankNo:"",goodList:"item_list",listInfo:{name:"name",spec:"specification",unit:"unit",num:"quantity",goodPrice:"unit_price",totalPrice:"amount",taxRate:"tax_rate",tax:"tax",cat_code:"license_plate_number"},amountTax:"subtotal_tax",amountPrice:"subtotal_amount",TotalIncludingTax_C:"total_in_words",TotalIncludingTax_L:"total",payee:"receiver",reviewer:"reviewer",drawer:"issuer",seller:"",remarks:"remarks"},se={purchase:ee,sale:Z};const u=F=>(K("data-v-3c24aa05"),F=F(),Y(),F),te={key:0,"w-full":"","h-200px":""},le={key:1,class:"InvoiceTmpDiv"},ae={class:"flex justify-center w-full"},ne=u(()=>e("span",{class:"label title-label"},"\u53D1\u7968\u4EE3\u7801",-1)),oe={class:"content"},ue=u(()=>e("span",{class:"label title-label"},"\u53D1\u7968\u53F7\u7801",-1)),ce={class:"content"},ie=u(()=>e("span",{class:"label title-label"},"\u5F00\u7968\u65E5\u671F",-1)),de={class:"content"},re=u(()=>e("span",{class:"label title-label"},"\u6821\u9A8C\u7801",-1)),_e={class:"content"},pe=u(()=>e("ul",{class:"tc"},[e("li",null,"\u8D2D"),e("li",null,"\u4E70"),e("li",null,"\u65B9")],-1)),ve={flex:"","mb-1":""},be=u(()=>e("div",{class:"label",style:{width:"75px"}},"\u540D\u79F0",-1)),fe={class:"content",style:{display:"flex","justify-content":"space-between",width:"100%"}},he={flex:"","mb-1":""},ye=u(()=>e("div",{class:"label"},"\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",-1)),Fe={class:"content"},me={flex:"","mb-1":""},xe=u(()=>e("div",{class:"label",style:{width:"75px"}},"\u5730\u5740\u3001\u7535\u8BDD",-1)),Ae={class:"content"},De={flex:"","mb-1":""},Ee=u(()=>e("div",{class:"label",style:{width:"105px"}},"\u5F00\u6237\u884C\u53CA\u8D26\u53F7",-1)),Be={class:"content"},ke=u(()=>e("ul",{class:"tc",style:{height:"30px"}},[e("li",null,"\u9500"),e("li",null,"\u552E"),e("li",null,"\u65B9")],-1)),we={flex:"","mb-1":""},Ce=u(()=>e("div",{class:"label",style:{width:"75px"}},"\u540D\u79F0",-1)),ge={class:"content",style:{display:"flex","justify-content":"space-between",width:"100%"}},Ie={flex:"","mb-1":""},Te=u(()=>e("div",{class:"label"},"\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",-1)),Ne={class:"content"},Se={flex:"","mb-1":""},Me=u(()=>e("div",{class:"label",style:{width:"75px"}},"\u5730\u5740\u3001\u7535\u8BDD",-1)),Le={class:"content"},Pe={flex:"","mb-1":""},Re=u(()=>e("div",{class:"label",style:{width:"95px"}},"\u5F00\u6237\u884C\u53CA\u8D26\u53F7",-1)),qe={class:"content"},je={class:"row-div"},ze=u(()=>e("div",{class:"tc"},"\u8D27\u7269\u6216\u5E94\u7A0E\u52B3\u52A1\u3001\u670D\u52A1\u540D\u79F0",-1)),Ve=u(()=>e("div",{class:"tc"},"\u7A0E\u76EE\u7F16\u7801",-1)),Ge=u(()=>e("div",{class:"tc"},"\u89C4\u683C\u578B\u53F7",-1)),He=u(()=>e("div",{class:"tc"},"\u5355\u4F4D",-1)),Je=u(()=>e("div",{class:"tc"},"\u6570\u91CF",-1)),Ue=u(()=>e("div",{class:"tc"},"\u5355\u4EF7",-1)),$e=u(()=>e("div",{class:"tc"},"\u91D1\u989D",-1)),Oe=u(()=>e("div",{class:"tc"},"\u7A0E\u7387",-1)),Qe=u(()=>e("div",{class:"tc"},"\u7A0E\u989D",-1)),We={key:0,style:{"border-bottom":"1px solid #b16363"}},Xe={class:"tc"},Ke={class:"tc"},Ye={class:"tc"},Ze={class:"tc"},es={class:"tc"},ss={class:"tc"},ts={class:"tc"},ls={class:"tc"},as={class:"tc"},ns=u(()=>e("div",{class:"tc"},"\u5408\u8BA1",-1)),os=u(()=>e("div",{class:"tc"},"\xA0",-1)),us=u(()=>e("div",{class:"tc"},"\xA0",-1)),cs=u(()=>e("div",{class:"tc"},"\xA0",-1)),is=u(()=>e("div",{class:"tc"},"\xA0",-1)),ds={class:"tc"},rs=u(()=>e("div",{class:"tc"},"\xA0",-1)),_s={class:"tc"},ps=u(()=>e("ul",{class:"tc"},[e("li",null,"\u5907"),e("li",null,"\u6CE8")],-1)),vs={key:2,"text-xl":"","font-bold":"","text-center":"","w-full":""},bs=j({__name:"index",props:{type:{type:String,required:!0},invNo:{type:String,required:!1},invNumber:{type:[String,null],required:!0}},emits:["getInvoiceData"],setup(F,{emit:C}){const f=F,o=k({}),x=k(!1),A=k(!1),{isError:m,data:c,run:g,loading:D,setData:I}=z({initalData:{},noMessage:!0,success:(_=[])=>{_.length===0&&m.value===!1&&(m.value=!0),C("getInvoiceData",a(c))}}),T=w(()=>{var t;const _={0:"\u5F85\u9A8C\u8BC1",1:"\u6B63\u5E38",2:"\u4F5C\u5E9F",3:"\u5DF2\u7EA2\u51B2"},d=(t=c.value)==null?void 0:t.status;return _[String(d)]}),N=w(()=>{var t;const _={0:"#dedfe0",1:"#67c23a",2:"#909399",3:"#f56c6c"},d=(t=c.value)==null?void 0:t.status;return _[String(d)]}),S=w(()=>{var t,p;const{type:_}=f,d=a(c);return _==="sale"?((t=V.find(y=>y.value===d.inv_type))==null?void 0:t.label)||"\u7535\u5B50\u53D1\u7968\uFF08\u589E\u503C\u7A0E\u666E\u901A\u53D1\u7968\uFF09":(p=G.find(y=>y.value===d.type))==null?void 0:p.label});function M(){const _=f.type==="purchase"?W:X;o.value=se[f.type],g(_({number:f.invNumber,...f.invNo?{invNo:f.invNo}:{}}))}return H(()=>{if(I({}),!f.invNumber)return m.value=!0;M()}),(_,d)=>{const t=E("el-col"),p=E("el-row"),y=E("ElButton"),L=E("el-scrollbar"),P=J("loading");return v(),b(B,null,[a(D)?U((v(),b("div",te,null,512)),[[P,a(D)]]):h("v-if",!0),!a(m)&&!a(D)?(v(),b("div",le,[l(p,null,{default:s(()=>[l(t,{span:6},{default:s(()=>[e("div",ae,[e("p",{style:$([{"font-size":"27px"},{color:a(N)}]),class:"font-bold"},n(a(T)),5)])]),_:1}),l(t,{span:12,class:"title no-border"},{default:s(()=>[i(n(a(S)),1)]),_:1}),l(t,{span:6,class:"extra no-border"},{default:s(()=>[e("div",null,[ne,i("\uFF1A"),e("span",oe,n(a(c)[o.value.code]),1)]),e("div",null,[ue,i("\uFF1A"),e("span",ce,n(a(c)[o.value.number]),1)]),e("div",null,[ie,i("\uFF1A"),e("span",de,n(a(c)[o.value.openTime]),1)]),e("div",null,[re,i("\uFF1A"),e("span",_e,n(a(c)[o.value.checkNumber]),1)])]),_:1})]),_:1}),l(p,{class:"row height84"},{default:s(()=>[l(t,{span:1,class:"no-border"},{default:s(()=>[pe]),_:1}),l(t,{span:11,style:{padding:"5px"}},{default:s(()=>[e("div",ve,[be,i("\uFF1A"),e("div",fe,[e("span",null,n(a(c)[o.value.buyerTitle]),1),l(y,{link:"",size:"small",type:"primary",onClick:d[0]||(d[0]=r=>x.value=!x.value)},{default:s(()=>[i(n(x.value?"\u6536\u8D77":"\u5C55\u793A\u66F4\u591A"),1)]),_:1})])]),e("div",he,[ye,i("\uFF1A"),e("span",Fe,n(a(c)[o.value.buyerCode]),1)]),x.value?(v(),b(B,{key:0},[e("div",me,[xe,i("\uFF1A"),e("span",Ae,n(a(c)[o.value.buyerAddr])+" "+n(a(c)[o.value.buyerMobile]),1)]),e("div",De,[Ee,i("\uFF1A"),e("span",Be,n(a(c)[o.value.buyerBank])+" "+n(a(c)[o.value.buyerBankNo]),1)])],64)):h("v-if",!0)]),_:1}),l(t,{span:1,class:"no-border"},{default:s(()=>[ke]),_:1}),l(t,{span:11,style:{padding:"5px"}},{default:s(()=>[e("div",we,[Ce,i("\uFF1A"),e("div",ge,[e("span",null,n(a(c)[o.value.sellerTitle]),1),l(y,{link:"",size:"small",type:"primary",onClick:d[1]||(d[1]=r=>A.value=!A.value)},{default:s(()=>[i(n(A.value?"\u6536\u8D77":"\u5C55\u793A\u66F4\u591A"),1)]),_:1})])]),e("div",Ie,[Te,i("\uFF1A"),e("span",Ne,n(a(c)[o.value.sellerCode]),1)]),A.value?(v(),b(B,{key:0},[e("div",Se,[Me,i("\uFF1A"),e("span",Le,n(a(c)[o.value.sellerAddr])+" "+n(a(c)[o.value.sellerMobile]),1)]),e("div",Pe,[Re,i("\uFF1A"),e("span",qe,n(a(c)[o.value.sellerBank])+" "+n(a(c)[o.value.sellerBankNo]),1)])],64)):h("v-if",!0)]),_:1})]),_:1}),e("div",je,[l(p,null,{default:s(()=>[l(t,{span:5,class:"no-border"},{default:s(()=>[ze]),_:1}),l(t,{span:4,class:"no-border"},{default:s(()=>[Ve]),_:1}),l(t,{span:2},{default:s(()=>[Ge]),_:1}),l(t,{span:1},{default:s(()=>[He]),_:1}),l(t,{span:2},{default:s(()=>[Je]),_:1}),l(t,{span:3},{default:s(()=>[Ue]),_:1}),l(t,{span:3},{default:s(()=>[$e]),_:1}),l(t,{span:1},{default:s(()=>[Oe]),_:1}),l(t,{span:3},{default:s(()=>[Qe]),_:1})]),_:1}),a(c)&&a(c)[o.value.goodList]?(v(),b("div",We,[l(L,{"max-height":"200px",always:""},{default:s(()=>[(v(!0),b(B,null,O(a(c)[o.value.goodList],(r,R)=>(v(),Q(p,{key:R},{default:s(()=>[l(t,{span:5,class:"no-border"},{default:s(()=>[e("div",Xe,n(r[o.value.listInfo.name]),1)]),_:2},1024),l(t,{span:4,class:"no-border"},{default:s(()=>[e("div",Ke,n(r[o.value.listInfo.cat_code]),1)]),_:2},1024),l(t,{span:2},{default:s(()=>[e("div",Ye,n(r[o.value.listInfo.spec]),1)]),_:2},1024),l(t,{span:1},{default:s(()=>[e("div",Ze,n(r[o.value.listInfo.unit]),1)]),_:2},1024),l(t,{span:2},{default:s(()=>[e("div",es,n(r[o.value.listInfo.num]),1)]),_:2},1024),l(t,{span:3},{default:s(()=>[e("div",ss,n(r[o.value.listInfo.goodPrice]),1)]),_:2},1024),l(t,{span:3},{default:s(()=>[e("div",ts,n(r[o.value.listInfo.totalPrice]),1)]),_:2},1024),l(t,{span:1},{default:s(()=>[e("div",ls,n(r[o.value.listInfo.taxRate]),1)]),_:2},1024),l(t,{span:3},{default:s(()=>[e("div",as,n(r[o.value.listInfo.tax]),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})])):h("v-if",!0),l(p,null,{default:s(()=>[l(t,{span:8,class:"no-border"},{default:s(()=>[ns]),_:1}),l(t,{span:3},{default:s(()=>[os]),_:1}),l(t,{span:1},{default:s(()=>[us]),_:1}),l(t,{span:2},{default:s(()=>[cs]),_:1}),l(t,{span:3},{default:s(()=>[is]),_:1}),l(t,{span:3},{default:s(()=>[e("div",ds,n(a(c)[o.value.amountPrice]),1)]),_:1}),l(t,{span:1},{default:s(()=>[rs]),_:1}),l(t,{span:3},{default:s(()=>[e("div",_s,n(a(c)[o.value.amountTax]),1)]),_:1})]),_:1})]),l(p,{class:"row con"},{default:s(()=>[l(t,{span:8,class:"no-border tc"},{default:s(()=>[i(" \u4EF7\u7A0E\u5408\u8BA1\uFF08\u5927\u5199\uFF09 ")]),_:1}),l(t,{span:9,class:"no-border tl"},{default:s(()=>[i(n(a(c)[o.value.TotalIncludingTax_C]),1)]),_:1}),l(t,{span:7,class:"no-border tc"},{default:s(()=>[i("\uFF08\u5C0F\u5199\uFF09"),e("span",null,n(a(c)[o.value.TotalIncludingTax_L]),1)]),_:1})]),_:1}),l(p,{class:"row height84",style:{"border-bottom":"1px solid #b15b16"}},{default:s(()=>[l(t,{span:1},{default:s(()=>[ps]),_:1}),l(t,{span:23},{default:s(()=>[i(n(a(c)[o.value.remarks]),1)]),_:1})]),_:1}),h(` \r \r \u6536\u6B3E\u4EBA\uFF1A\r {{ invoiceDetail[prop.payee] }}\r \r \r \u590D\u6838\uFF1A\r {{ invoiceDetail[prop.reviewer] }}\r \r \r \u5F00\u7968\u4EBA\uFF1A\r {{ invoiceDetail[prop.drawer] }}\r \r \r \u9500\u552E\u65B9\uFF1A\r {{ invoiceDetail[prop.seller] }}\r \r `)])):h("v-if",!0),a(m)&&!a(D)?(v(),b("div",vs," \u672A\u627E\u5230\u53D1\u7968\u6570\u636E ")):h("v-if",!0)],64)}}});var hs=q(bs,[["__scopeId","data-v-3c24aa05"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/Invoice/src/index.vue"]]);export{hs as I};