@idmwx/idmui-report 4.5.6 → 4.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7361,7 +7361,7 @@ const NT = {
7361
7361
  let b = g.type.charAt(0);
7362
7362
  ["N", "M", "E"].includes(b) && (M = !0, c.dailyAvgCf = g.dailyAvgCf, c.avgSpdCalc = g.avgSpdCalc, c.distanceCalc = g.distanceCalc, c.noon && (c.noon.foCons = g.noon.foCons, c.noon.dgoCons = g.noon.dgoCons)), g.abbrev = b, b = b === "M" ? "*" : b === "A" ? "" : b, g.time = `${b} ${this.computeUTCTime(g.utc, "MMM-DD/HHmm[Z]")}`, g._lng = zt.lng2pretty(g.lng), g._lat = zt.lat2pretty(g.lat), g.cp = d, g.goodWx = g.type === "BOSP" ? !1 : g.goodWx, i.push(g);
7363
7363
  });
7364
- }), i.sort((D, d) => D.date - d.date), this.inventory = i;
7364
+ }), i.sort((D, d) => D.positionTime - d.positionTime), this.inventory = i;
7365
7365
  }
7366
7366
  }
7367
7367
  };
@@ -7401,7 +7401,7 @@ function gT(i, l, s, D, d, r) {
7401
7401
  }, null, 8, ["report", "voyage-emails"])) : u("", !0)
7402
7402
  ], 2);
7403
7403
  }
7404
- const IT = /* @__PURE__ */ Xt(NT, [["render", gT], ["__scopeId", "data-v-ab1dc384"]]), QS = {
7404
+ const IT = /* @__PURE__ */ Xt(NT, [["render", gT], ["__scopeId", "data-v-4d206d4b"]]), QS = {
7405
7405
  install(i) {
7406
7406
  i.component("FliVoyageReport", Qu), i.component("OrmVoyageReport", IT);
7407
7407
  }
@@ -48,7 +48,7 @@
48
48
  <div class="vrpt-from">From: ${t.from}</div>
49
49
  <div class="vrpt-to">To: ${t.to}</div>
50
50
  <div class="vrpt-subject">Subject: ${t.subject}</div>
51
- <br/>`;N=N+d+"</div>",i.insertAdjacentHTML("beforeend",N)}})}}},cV={class:"report-email"};function NV(o,t,l,d,a,i){return e.openBlock(),e.createElementBlock("div",cV,t[0]||(t[0]=[e.createStaticVNode('<div class="section email-section" data-v-0dbac70b><div class="header-block flex-center" data-v-0dbac70b><i class="iconfont" data-v-0dbac70b></i><div class="title" data-v-0dbac70b>Emails</div></div><div class="content-box" data-v-0dbac70b><div id="col1" class="col col1" data-v-0dbac70b></div><div id="col2" class="col col2" data-v-0dbac70b></div></div></div>',1)]))}const DV=Re(rV,[["render",NV],["__scopeId","data-v-0dbac70b"]]),wY="",MV={name:"OrmVoyageIndex",components:{Brand:ql,VoySummary:aA,Inventory:UA,Chart:dV,Email:DV,Loading:Hn},props:{report:{type:Object,default:()=>({})},voyageEmails:{type:Array,default:()=>[]}},emits:["commit"],data(){return{inventory:[],loading:!0}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${G(o).utc().format(t)}`}}},watch:{report:{handler(o,t){o!=null&&o.id&&(this.loading=!1,this.$nextTick(()=>{this.prepare()}))},immediate:!0}},methods:{commit(o){this.$emit("commit",o)},prepare(){var t,l;const o=[];(l=(t=this.report)==null?void 0:t.segments)==null||l.forEach(d=>{const a=d.extend.cp;let i,D,s=!1;d.inventory.sample.hours.forEach((c,m)=>{i||(i=c),(!D||s)&&(D=c,s=!1),i.segIndex===c.segIndex?i.segLength=(i.segLength||0)+1:(i=c,i.segLength=1),D.noonLength=(D.noonLength||0)+1;let p=c.type.charAt(0);["N","M","E"].includes(p)&&(s=!0,D.dailyAvgCf=c.dailyAvgCf,D.avgSpdCalc=c.avgSpdCalc,D.distanceCalc=c.distanceCalc,D.noon&&(D.noon.foCons=c.noon.foCons,D.noon.dgoCons=c.noon.dgoCons)),c.abbrev=p,p=p==="M"?"*":p==="A"?"":p,c.time=`${p} ${this.computeUTCTime(c.utc,"MMM-DD/HHmm[Z]")}`,c._lng=se.LngLatHelper.lng2pretty(c.lng),c._lat=se.LngLatHelper.lat2pretty(c.lat),c.cp=a,c.goodWx=c.type==="BOSP"?!1:c.goodWx,o.push(c)})}),o.sort((d,a)=>d.date-a.date),this.inventory=o}}};function gV(o,t,l,d,a,i){var M,x,y;const D=e.resolveComponent("Brand"),s=e.resolveComponent("Loading"),c=e.resolveComponent("VoySummary"),m=e.resolveComponent("Inventory"),p=e.resolveComponent("Chart"),N=e.resolveComponent("Email");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass((x=(M=l.report)==null?void 0:M.weather)!=null&&x.referenceOnly?"report-section watermark":"report-section")},[e.createVNode(D,{name:"Voyage Analysis Report",issued:l.report.createdAt},null,8,["issued"]),e.createVNode(s,{loading:a.loading,onTimeout:t[0]||(t[0]=V=>a.loading=!1)},null,8,["loading"]),e.createVNode(c,{report:l.report,class:"main",onCommit:i.commit},null,8,["report","onCommit"]),e.createVNode(m,{report:l.report,inventory:a.inventory,class:"main"},null,8,["report","inventory"]),e.createVNode(p,{report:l.report,inventory:a.inventory,class:"main"},null,8,["report","inventory"]),((y=l.voyageEmails)==null?void 0:y.length)>0?(e.openBlock(),e.createBlock(N,{key:0,report:l.report,"voyage-emails":l.voyageEmails},null,8,["report","voyage-emails"])):e.createCommentVNode("",!0)],2)}const cs=Re(MV,[["render",gV],["__scopeId","data-v-ab1dc384"]]),mV={install(o){o.component("FliVoyageReport",rs),o.component("OrmVoyageReport",cs)}},YY="",hY="",QY="",EV={name:"IdmTropical",components:{TropicalReport:Jd.TropicalReport},props:{token:{type:String,default:""},report:{type:Object,default:()=>{}},model:{type:String,default:""},ts:{type:String,default:""}},emits:["center"],data(){return{center:void 0}},computed:{},watch:{},methods:{handleHurricanceCenter(o){this.center=o}}},yV={class:"typhoon-report-container"};function IV(o,t,l,d,a,i){const D=e.resolveComponent("TropicalReport");return e.openBlock(),e.createElementBlock("div",yV,[l.report?(e.openBlock(),e.createBlock(D,{key:0,report:l.report,model:l.model,ts:l.ts,token:l.token,onCenter:i.handleHurricanceCenter},null,8,["report","model","ts","token","onCenter"])):e.createCommentVNode("",!0)])}const Ns=Re(EV,[["render",IV],["__scopeId","data-v-a14ce9ba"]]),pV={install(o){o.component("TropicalReport",Ns)}},BY="",AV={name:"OrmInvoice",components:{IdmBrand:ql},props:{report:{type:Object,default:()=>({})}},data(){return{account:{CNY:{title:"正权海事服务(青岛)有限公司",taxId:"91370203MADE2L8TX4",address:"山东省青岛市市北区山东路171号乙万科中心1号楼1805户",tel:"15192665266",bank:"中国银行股份有限公司青岛城阳支行",number:"220850858281"},USD:{title:"Ocean Right Marine Service Co., Ltd.",taxId:"91370203MADE2L8TX4",address:"Rm1805, B Technology Innovation Bldg. No. 171 Shandong Rd, Qingdao, China",tel:"15192665266",bank:"Bank of China Qingdao Chengyang Sub-Branch",number:"216950903845",swift:"BKCHCNBJ50A",bankAddr:"198 Zhengyang road Chengyang District, Qingdao, China",intermediaryBank:"Bank of China New York Branch",intermediaryBankSwift:"BKCHUS33XXX",intermediaryBankAbaNo:"326"}},reservations4Route:[],reservations4Point:[],maxColspans:8,totalInUS:0}},computed:{computeTime(){return function(o,t="YYYY, MMM-DD/HHmm[LT]"){return o!=="-"?`${G(o).utcOffset(8).format(t)}`:"-"}}},watch:{report:{handler(){var o,t,l,d,a,i,D;this.reservations4Route=(t=(o=this.report)==null?void 0:o.reservations)==null?void 0:t.filter(s=>s.props),this.reservations4Point=(d=(l=this.report)==null?void 0:l.reservations)==null?void 0:d.filter(s=>!s.props),this.totalInUS=(i=(a=this.report)==null?void 0:a.reservations)==null?void 0:i.reduce((s,c)=>Math.round((s+c.amount)*100)/100,0),(D=this.reservations4Route)!=null&&D.length?this.maxColspans=8:this.maxColspans=2},immediate:!0}}},VV={class:"invoice-report"},TV={class:"section items-section"},xV={class:"flex-start"},zV=["innerHTML"],SV={class:"flex-space"},CV={class:"invoice-item"},kV={key:0,class:"invoice-item"},fV=["colspan"],jV=["colspan"],bV=["colspan"],UV={class:"total"},OV=["colspan"],wV={class:"total"},YV=["colspan"],hV={class:"total"},QV={key:1},BV=["colspan"],RV={class:"total"},FV={key:0,class:"memo-block"},PV=["innerHTML"],LV={class:"section company-section"},GV={class:"company-item"},WV={class:"company-item"},ZV={class:"company-item"},HV={class:"company-item"},JV={class:"company-item"},_V={class:"company-item"},XV={class:"company-item"},KV={class:"company-item"},uV={class:"company-item"},qV={class:"company-item"},$V={class:"company-item"},vV={class:"company-item"},e2={class:"company-item"},t2={class:"company-item"};function l2(o,t,l,d,a,i){var s,c,m,p,N,M,x,y,V,T,A,S,z,C,E,j,B,F,L,g,b,U,O,R,w,P,Q,Y,v,ee,te,le,oe,n,Z,u,q,$,ne,ae,J,Ne;const D=e.resolveComponent("IdmBrand");return e.openBlock(),e.createElementBlock("div",VV,[e.createVNode(D,{name:"INVOICE",issued:l.report.createdAt},null,8,["issued"]),e.createElementVNode("div",TV,[e.createElementVNode("div",xV,[t[0]||(t[0]=e.createElementVNode("div",{class:"invoice-item"},"Bill To:",-1)),e.createElementVNode("div",{class:"invoice-item",style:{"font-weight":"500","margin-left":"4px"},innerHTML:(m=(c=(s=l.report)==null?void 0:s.invoiceTitle)==null?void 0:c.name)==null?void 0:m.replace(`
51
+ <br/>`;N=N+d+"</div>",i.insertAdjacentHTML("beforeend",N)}})}}},cV={class:"report-email"};function NV(o,t,l,d,a,i){return e.openBlock(),e.createElementBlock("div",cV,t[0]||(t[0]=[e.createStaticVNode('<div class="section email-section" data-v-0dbac70b><div class="header-block flex-center" data-v-0dbac70b><i class="iconfont" data-v-0dbac70b></i><div class="title" data-v-0dbac70b>Emails</div></div><div class="content-box" data-v-0dbac70b><div id="col1" class="col col1" data-v-0dbac70b></div><div id="col2" class="col col2" data-v-0dbac70b></div></div></div>',1)]))}const DV=Re(rV,[["render",NV],["__scopeId","data-v-0dbac70b"]]),wY="",MV={name:"OrmVoyageIndex",components:{Brand:ql,VoySummary:aA,Inventory:UA,Chart:dV,Email:DV,Loading:Hn},props:{report:{type:Object,default:()=>({})},voyageEmails:{type:Array,default:()=>[]}},emits:["commit"],data(){return{inventory:[],loading:!0}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${G(o).utc().format(t)}`}}},watch:{report:{handler(o,t){o!=null&&o.id&&(this.loading=!1,this.$nextTick(()=>{this.prepare()}))},immediate:!0}},methods:{commit(o){this.$emit("commit",o)},prepare(){var t,l;const o=[];(l=(t=this.report)==null?void 0:t.segments)==null||l.forEach(d=>{const a=d.extend.cp;let i,D,s=!1;d.inventory.sample.hours.forEach((c,m)=>{i||(i=c),(!D||s)&&(D=c,s=!1),i.segIndex===c.segIndex?i.segLength=(i.segLength||0)+1:(i=c,i.segLength=1),D.noonLength=(D.noonLength||0)+1;let p=c.type.charAt(0);["N","M","E"].includes(p)&&(s=!0,D.dailyAvgCf=c.dailyAvgCf,D.avgSpdCalc=c.avgSpdCalc,D.distanceCalc=c.distanceCalc,D.noon&&(D.noon.foCons=c.noon.foCons,D.noon.dgoCons=c.noon.dgoCons)),c.abbrev=p,p=p==="M"?"*":p==="A"?"":p,c.time=`${p} ${this.computeUTCTime(c.utc,"MMM-DD/HHmm[Z]")}`,c._lng=se.LngLatHelper.lng2pretty(c.lng),c._lat=se.LngLatHelper.lat2pretty(c.lat),c.cp=a,c.goodWx=c.type==="BOSP"?!1:c.goodWx,o.push(c)})}),o.sort((d,a)=>d.positionTime-a.positionTime),this.inventory=o}}};function gV(o,t,l,d,a,i){var M,x,y;const D=e.resolveComponent("Brand"),s=e.resolveComponent("Loading"),c=e.resolveComponent("VoySummary"),m=e.resolveComponent("Inventory"),p=e.resolveComponent("Chart"),N=e.resolveComponent("Email");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass((x=(M=l.report)==null?void 0:M.weather)!=null&&x.referenceOnly?"report-section watermark":"report-section")},[e.createVNode(D,{name:"Voyage Analysis Report",issued:l.report.createdAt},null,8,["issued"]),e.createVNode(s,{loading:a.loading,onTimeout:t[0]||(t[0]=V=>a.loading=!1)},null,8,["loading"]),e.createVNode(c,{report:l.report,class:"main",onCommit:i.commit},null,8,["report","onCommit"]),e.createVNode(m,{report:l.report,inventory:a.inventory,class:"main"},null,8,["report","inventory"]),e.createVNode(p,{report:l.report,inventory:a.inventory,class:"main"},null,8,["report","inventory"]),((y=l.voyageEmails)==null?void 0:y.length)>0?(e.openBlock(),e.createBlock(N,{key:0,report:l.report,"voyage-emails":l.voyageEmails},null,8,["report","voyage-emails"])):e.createCommentVNode("",!0)],2)}const cs=Re(MV,[["render",gV],["__scopeId","data-v-4d206d4b"]]),mV={install(o){o.component("FliVoyageReport",rs),o.component("OrmVoyageReport",cs)}},YY="",hY="",QY="",EV={name:"IdmTropical",components:{TropicalReport:Jd.TropicalReport},props:{token:{type:String,default:""},report:{type:Object,default:()=>{}},model:{type:String,default:""},ts:{type:String,default:""}},emits:["center"],data(){return{center:void 0}},computed:{},watch:{},methods:{handleHurricanceCenter(o){this.center=o}}},yV={class:"typhoon-report-container"};function IV(o,t,l,d,a,i){const D=e.resolveComponent("TropicalReport");return e.openBlock(),e.createElementBlock("div",yV,[l.report?(e.openBlock(),e.createBlock(D,{key:0,report:l.report,model:l.model,ts:l.ts,token:l.token,onCenter:i.handleHurricanceCenter},null,8,["report","model","ts","token","onCenter"])):e.createCommentVNode("",!0)])}const Ns=Re(EV,[["render",IV],["__scopeId","data-v-a14ce9ba"]]),pV={install(o){o.component("TropicalReport",Ns)}},BY="",AV={name:"OrmInvoice",components:{IdmBrand:ql},props:{report:{type:Object,default:()=>({})}},data(){return{account:{CNY:{title:"正权海事服务(青岛)有限公司",taxId:"91370203MADE2L8TX4",address:"山东省青岛市市北区山东路171号乙万科中心1号楼1805户",tel:"15192665266",bank:"中国银行股份有限公司青岛城阳支行",number:"220850858281"},USD:{title:"Ocean Right Marine Service Co., Ltd.",taxId:"91370203MADE2L8TX4",address:"Rm1805, B Technology Innovation Bldg. No. 171 Shandong Rd, Qingdao, China",tel:"15192665266",bank:"Bank of China Qingdao Chengyang Sub-Branch",number:"216950903845",swift:"BKCHCNBJ50A",bankAddr:"198 Zhengyang road Chengyang District, Qingdao, China",intermediaryBank:"Bank of China New York Branch",intermediaryBankSwift:"BKCHUS33XXX",intermediaryBankAbaNo:"326"}},reservations4Route:[],reservations4Point:[],maxColspans:8,totalInUS:0}},computed:{computeTime(){return function(o,t="YYYY, MMM-DD/HHmm[LT]"){return o!=="-"?`${G(o).utcOffset(8).format(t)}`:"-"}}},watch:{report:{handler(){var o,t,l,d,a,i,D;this.reservations4Route=(t=(o=this.report)==null?void 0:o.reservations)==null?void 0:t.filter(s=>s.props),this.reservations4Point=(d=(l=this.report)==null?void 0:l.reservations)==null?void 0:d.filter(s=>!s.props),this.totalInUS=(i=(a=this.report)==null?void 0:a.reservations)==null?void 0:i.reduce((s,c)=>Math.round((s+c.amount)*100)/100,0),(D=this.reservations4Route)!=null&&D.length?this.maxColspans=8:this.maxColspans=2},immediate:!0}}},VV={class:"invoice-report"},TV={class:"section items-section"},xV={class:"flex-start"},zV=["innerHTML"],SV={class:"flex-space"},CV={class:"invoice-item"},kV={key:0,class:"invoice-item"},fV=["colspan"],jV=["colspan"],bV=["colspan"],UV={class:"total"},OV=["colspan"],wV={class:"total"},YV=["colspan"],hV={class:"total"},QV={key:1},BV=["colspan"],RV={class:"total"},FV={key:0,class:"memo-block"},PV=["innerHTML"],LV={class:"section company-section"},GV={class:"company-item"},WV={class:"company-item"},ZV={class:"company-item"},HV={class:"company-item"},JV={class:"company-item"},_V={class:"company-item"},XV={class:"company-item"},KV={class:"company-item"},uV={class:"company-item"},qV={class:"company-item"},$V={class:"company-item"},vV={class:"company-item"},e2={class:"company-item"},t2={class:"company-item"};function l2(o,t,l,d,a,i){var s,c,m,p,N,M,x,y,V,T,A,S,z,C,E,j,B,F,L,g,b,U,O,R,w,P,Q,Y,v,ee,te,le,oe,n,Z,u,q,$,ne,ae,J,Ne;const D=e.resolveComponent("IdmBrand");return e.openBlock(),e.createElementBlock("div",VV,[e.createVNode(D,{name:"INVOICE",issued:l.report.createdAt},null,8,["issued"]),e.createElementVNode("div",TV,[e.createElementVNode("div",xV,[t[0]||(t[0]=e.createElementVNode("div",{class:"invoice-item"},"Bill To:",-1)),e.createElementVNode("div",{class:"invoice-item",style:{"font-weight":"500","margin-left":"4px"},innerHTML:(m=(c=(s=l.report)==null?void 0:s.invoiceTitle)==null?void 0:c.name)==null?void 0:m.replace(`
52
52
  `,"<br/>")},null,8,zV)]),e.createElementVNode("div",SV,[e.createElementVNode("div",CV,"Invoice No. "+e.toDisplayString(l.report.number),1),(p=l.report)!=null&&p.paymentDate?(e.openBlock(),e.createElementBlock("div",kV,"Paid: "+e.toDisplayString(i.computeTime(l.report.paymentDate)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("table",null,[(N=a.reservations4Route)!=null&&N.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[1]||(t[1]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,"NO."),e.createElementVNode("td",null,"VoyNum."),e.createElementVNode("td",null,"Vessel"),e.createElementVNode("td",null,"Load Condition"),e.createElementVNode("td",null,"Departure"),e.createElementVNode("td",null,"ATD"),e.createElementVNode("td",null,"Destination"),e.createElementVNode("td",null,"ATA"),e.createElementVNode("td",null,"Amounts")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.reservations4Route,(X,re)=>{var De,Me,de,ge,me,Ee,ye,Ie,Te,xe,ze,Se,Ce,ke,fe,je,be,pe,Ye,he,Oe,k,Ve,Qe;return e.openBlock(),e.createElementBlock("tr",{key:re},[e.createElementVNode("td",null,e.toDisplayString((de=(Me=(De=X.props)==null?void 0:De[0])==null?void 0:Me.voyage)==null?void 0:de.number),1),e.createElementVNode("td",null,e.toDisplayString(((Ee=(me=(ge=X.props)==null?void 0:ge[0])==null?void 0:me.voyage)==null?void 0:Ee.voyNum)||"-"),1),e.createElementVNode("td",null,e.toDisplayString((Te=(Ie=(ye=X.props)==null?void 0:ye[0])==null?void 0:Ie.vessel)==null?void 0:Te.name),1),e.createElementVNode("td",null,e.toDisplayString((Se=(ze=(xe=X.props)==null?void 0:xe[0])==null?void 0:ze.voyage)==null?void 0:Se.loadCondition),1),e.createElementVNode("td",null,e.toDisplayString((fe=(ke=(Ce=X.props)==null?void 0:Ce[0])==null?void 0:ke.departure)==null?void 0:fe.name),1),e.createElementVNode("td",null,e.toDisplayString((pe=(be=(je=X.props)==null?void 0:je[0])==null?void 0:be.departure)==null?void 0:pe.atd),1),e.createElementVNode("td",null,e.toDisplayString((Oe=(he=(Ye=X.props)==null?void 0:Ye[0])==null?void 0:he.destination)==null?void 0:Oe.name),1),e.createElementVNode("td",null,e.toDisplayString((Qe=(Ve=(k=X.props)==null?void 0:k[0])==null?void 0:Ve.destination)==null?void 0:Qe.ata),1),e.createElementVNode("td",null,"$"+e.toDisplayString(X.amount),1)])}),128))])],64)):e.createCommentVNode("",!0),(M=a.reservations4Point)!=null&&M.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[2]||(t[2]=e.createElementVNode("td",null,"NO.",-1)),e.createElementVNode("td",{colspan:a.maxColspans-1},"Items.",8,fV),t[3]||(t[3]=e.createElementVNode("td",null,"Amounts",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.reservations4Point,(X,re)=>(e.openBlock(),e.createElementBlock("tr",{key:re},[e.createElementVNode("td",null,e.toDisplayString(X.number),1),e.createElementVNode("td",{colspan:a.maxColspans-1},e.toDisplayString(X.items),9,jV),e.createElementVNode("td",null,"$"+e.toDisplayString(X.amount),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[((x=l.report)==null?void 0:x.paymentType)==="CNY"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},t[4]||(t[4]=[e.createElementVNode("span",null,"Total in USD",-1)]),8,bV),e.createElementVNode("td",UV,[e.createElementVNode("span",null,e.toDisplayString(`$${a.totalInUS}`),1)])]),e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},t[5]||(t[5]=[e.createElementVNode("span",null,"Exchange Rate",-1)]),8,OV),e.createElementVNode("td",wV,[e.createElementVNode("span",null,e.toDisplayString((y=l.report)==null?void 0:y.rate),1)])]),e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},"Total in CNY",8,YV),e.createElementVNode("td",hV,"¥"+e.toDisplayString((V=l.report)==null?void 0:V.paymentAmount),1)])],64)):(e.openBlock(),e.createElementBlock("tr",QV,[e.createElementVNode("td",{colspan:a.maxColspans},t[6]||(t[6]=[e.createElementVNode("span",null,"Total in USD",-1)]),8,BV),e.createElementVNode("td",RV,[e.createElementVNode("span",null,e.toDisplayString(`$${(T=l.report)==null?void 0:T.paymentAmount}`),1)])]))])]),(A=l.report)!=null&&A.memo?(e.openBlock(),e.createElementBlock("div",FV,[t[7]||(t[7]=e.createElementVNode("div",{class:"invoice-item",style:{"font-weight":"600"}},"MEMO",-1)),e.createElementVNode("div",{class:"invoice-item",innerHTML:(z=(S=l.report)==null?void 0:S.memo)==null?void 0:z.replace(`
53
53
  `,"<br/>")},null,8,PV)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",LV,[t[22]||(t[22]=e.createElementVNode("div",{class:"company-item",style:{"font-weight":"600","font-size":"16px","margin-bottom":"10px"}},"Bank Information",-1)),((C=l.report)==null?void 0:C.paymentType)==="CNY"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",GV,[t[8]||(t[8]=e.createElementVNode("label",null,"Bank",-1)),e.createElementVNode("span",null,e.toDisplayString((j=a.account[(E=l.report)==null?void 0:E.paymentType])==null?void 0:j.bank),1)]),e.createElementVNode("div",WV,[t[9]||(t[9]=e.createElementVNode("label",null,"Account",-1)),e.createElementVNode("span",null,e.toDisplayString((F=a.account[(B=l.report)==null?void 0:B.paymentType])==null?void 0:F.number),1)]),e.createElementVNode("div",ZV,[t[10]||(t[10]=e.createElementVNode("label",null,"Title",-1)),e.createElementVNode("span",null,e.toDisplayString((g=a.account[(L=l.report)==null?void 0:L.paymentType])==null?void 0:g.title),1)]),e.createElementVNode("div",HV,[t[11]||(t[11]=e.createElementVNode("label",null,"Addr",-1)),e.createElementVNode("span",null,e.toDisplayString((U=a.account[(b=l.report)==null?void 0:b.paymentType])==null?void 0:U.address),1)]),e.createElementVNode("div",JV,[t[12]||(t[12]=e.createElementVNode("label",null,"Tel",-1)),e.createElementVNode("span",null,e.toDisplayString((R=a.account[(O=l.report)==null?void 0:O.paymentType])==null?void 0:R.tel),1)]),e.createElementVNode("div",_V,[t[13]||(t[13]=e.createElementVNode("label",null,"Tax ID",-1)),e.createElementVNode("span",null,e.toDisplayString((P=a.account[(w=l.report)==null?void 0:w.paymentType])==null?void 0:P.taxId),1)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",XV,[t[14]||(t[14]=e.createElementVNode("label",null,"Beneficiary's Name",-1)),e.createElementVNode("span",null,e.toDisplayString((Y=a.account[(Q=l.report)==null?void 0:Q.paymentType])==null?void 0:Y.title),1)]),e.createElementVNode("div",KV,[t[15]||(t[15]=e.createElementVNode("label",null,"Bank Name",-1)),e.createElementVNode("span",null,e.toDisplayString((ee=a.account[(v=l.report)==null?void 0:v.paymentType])==null?void 0:ee.bank),1)]),e.createElementVNode("div",uV,[t[16]||(t[16]=e.createElementVNode("label",null,"Bank Address",-1)),e.createElementVNode("span",null,e.toDisplayString((le=a.account[(te=l.report)==null?void 0:te.paymentType])==null?void 0:le.bankAddr),1)]),e.createElementVNode("div",qV,[t[17]||(t[17]=e.createElementVNode("label",null,"Account No.",-1)),e.createElementVNode("span",null,e.toDisplayString((n=a.account[(oe=l.report)==null?void 0:oe.paymentType])==null?void 0:n.number),1)]),e.createElementVNode("div",$V,[t[18]||(t[18]=e.createElementVNode("label",null,"SWIFT",-1)),e.createElementVNode("span",null,e.toDisplayString((u=a.account[(Z=l.report)==null?void 0:Z.paymentType])==null?void 0:u.swift),1)]),e.createElementVNode("div",vV,[t[19]||(t[19]=e.createElementVNode("label",null,"Intermediary Bank",-1)),e.createElementVNode("span",null,e.toDisplayString(($=a.account[(q=l.report)==null?void 0:q.paymentType])==null?void 0:$.intermediaryBank),1)]),e.createElementVNode("div",e2,[t[20]||(t[20]=e.createElementVNode("label",null,"SWIFT",-1)),e.createElementVNode("span",null,e.toDisplayString((ae=a.account[(ne=l.report)==null?void 0:ne.paymentType])==null?void 0:ae.intermediaryBankSwift),1)]),e.createElementVNode("div",t2,[t[21]||(t[21]=e.createElementVNode("label",null,"ABA NO.",-1)),e.createElementVNode("span",null,e.toDisplayString((Ne=a.account[(J=l.report)==null?void 0:J.paymentType])==null?void 0:Ne.intermediaryBankAbaNo),1)])],64))]),t[23]||(t[23]=e.createStaticVNode('<div class="section sign-section" data-v-95c80c22><div class="flex-space" data-v-95c80c22><div class="sign-block" data-v-95c80c22><div data-v-95c80c22>Finance Team</div><div data-v-95c80c22>Ocean Right Marine Service Co., Ltd.</div><div data-v-95c80c22>Email: <a href="mailto:op@ormwx.com" data-v-95c80c22>op@ormwx.com</a></div><div data-v-95c80c22>Address: Rm1805, B Technology Innovation Bldg, No. 171 Shandong Road, Qingdao, China.</div></div><div class="thank-block" data-v-95c80c22>Thank You</div></div></div>',1))])}const Ds=Re(AV,[["render",l2],["__scopeId","data-v-95c80c22"]]),RY="",o2={name:"FliInvoice",props:{report:{type:Object,default:()=>({})}},data(){return{reservations4Route:[],reservations4Point:[],maxColspans:8,totalInUS:0}},computed:{computeTime(){return function(o,t="YYYY, MMM-DD/HHmm[LT]"){return o!=="-"?`${G(o).utcOffset(8).format(t)}`:"-"}}},watch:{report:{handler(){var o,t,l,d,a,i,D;this.reservations4Route=(t=(o=this.report)==null?void 0:o.reservations)==null?void 0:t.filter(s=>s.props),this.reservations4Point=(d=(l=this.report)==null?void 0:l.reservations)==null?void 0:d.filter(s=>!s.props),this.totalInUS=(i=(a=this.report)==null?void 0:a.reservations)==null?void 0:i.reduce((s,c)=>Math.round((s+c.amount)*100)/100,0),(D=this.reservations4Route)!=null&&D.length?this.maxColspans=8:this.maxColspans=2},immediate:!0}},mounted(){}},n2={class:"invoice-report"},a2={class:"section items-section"},i2={class:"flex-start"},s2=["innerHTML"],d2={class:"flex-space"},r2={class:"invoice-item"},c2={key:0,class:"invoice-item"},N2=["colspan"],D2=["colspan"],M2=["colspan"],g2={class:"total"},m2=["colspan"],E2={class:"total"},y2=["colspan"],I2={class:"total"},p2={key:1},A2=["colspan"],V2={class:"total"},T2={key:0,class:"memo-block"},x2=["innerHTML"];function z2(o,t,l,d,a,i){var D,s,c,m,p,N,M,x,y,V,T,A,S;return e.openBlock(),e.createElementBlock("div",n2,[e.createElementVNode("div",a2,[e.createElementVNode("div",i2,[t[0]||(t[0]=e.createElementVNode("div",{class:"invoice-item"},"Bill To:",-1)),e.createElementVNode("div",{class:"invoice-item",style:{"font-weight":"500","margin-left":"4px"},innerHTML:(c=(s=(D=l.report)==null?void 0:D.invoiceTitle)==null?void 0:s.name)==null?void 0:c.replace(`
54
54
  `,"<br/>")},null,8,s2)]),e.createElementVNode("div",d2,[e.createElementVNode("div",r2,"Invoice No. "+e.toDisplayString(l.report.number),1),(m=l.report)!=null&&m.paymentDate?(e.openBlock(),e.createElementBlock("div",c2,"Paid: "+e.toDisplayString(i.computeTime(l.report.paymentDate)),1)):e.createCommentVNode("",!0)]),e.createElementVNode("table",null,[(p=a.reservations4Route)!=null&&p.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t[1]||(t[1]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,"NO."),e.createElementVNode("td",null,"VoyNum."),e.createElementVNode("td",null,"Vessel"),e.createElementVNode("td",null,"Load Condition"),e.createElementVNode("td",null,"Departure"),e.createElementVNode("td",null,"ATD"),e.createElementVNode("td",null,"Destination"),e.createElementVNode("td",null,"ATA"),e.createElementVNode("td",null,"Amounts")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.reservations4Route,(z,C)=>{var E,j,B,F,L,g,b,U,O,R,w,P,Q,Y,v,ee,te,le,oe,n,Z,u,q,$;return e.openBlock(),e.createElementBlock("tr",{key:C},[e.createElementVNode("td",null,e.toDisplayString((B=(j=(E=z.props)==null?void 0:E[0])==null?void 0:j.voyage)==null?void 0:B.number),1),e.createElementVNode("td",null,e.toDisplayString(((g=(L=(F=z.props)==null?void 0:F[0])==null?void 0:L.voyage)==null?void 0:g.voyNum)||"-"),1),e.createElementVNode("td",null,e.toDisplayString((O=(U=(b=z.props)==null?void 0:b[0])==null?void 0:U.vessel)==null?void 0:O.name),1),e.createElementVNode("td",null,e.toDisplayString((P=(w=(R=z.props)==null?void 0:R[0])==null?void 0:w.voyage)==null?void 0:P.loadCondition),1),e.createElementVNode("td",null,e.toDisplayString((v=(Y=(Q=z.props)==null?void 0:Q[0])==null?void 0:Y.departure)==null?void 0:v.name),1),e.createElementVNode("td",null,e.toDisplayString((le=(te=(ee=z.props)==null?void 0:ee[0])==null?void 0:te.departure)==null?void 0:le.atd),1),e.createElementVNode("td",null,e.toDisplayString((Z=(n=(oe=z.props)==null?void 0:oe[0])==null?void 0:n.destination)==null?void 0:Z.name),1),e.createElementVNode("td",null,e.toDisplayString(($=(q=(u=z.props)==null?void 0:u[0])==null?void 0:q.destination)==null?void 0:$.ata),1),e.createElementVNode("td",null,"$"+e.toDisplayString(z.amount),1)])}),128))])],64)):e.createCommentVNode("",!0),(N=a.reservations4Point)!=null&&N.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[2]||(t[2]=e.createElementVNode("td",null,"NO.",-1)),e.createElementVNode("td",{colspan:a.maxColspans-1},"Items.",8,N2),t[3]||(t[3]=e.createElementVNode("td",null,"Amounts",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.reservations4Point,(z,C)=>(e.openBlock(),e.createElementBlock("tr",{key:C},[e.createElementVNode("td",null,e.toDisplayString(z.number),1),e.createElementVNode("td",{colspan:a.maxColspans-1},e.toDisplayString(z.items),9,D2),e.createElementVNode("td",null,"$"+e.toDisplayString(z.amount),1)]))),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("tfoot",null,[((M=l.report)==null?void 0:M.paymentType)==="CNY"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},t[4]||(t[4]=[e.createElementVNode("span",null,"Total in USD",-1)]),8,M2),e.createElementVNode("td",g2,[e.createElementVNode("span",null,e.toDisplayString(`$${a.totalInUS}`),1)])]),e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},t[5]||(t[5]=[e.createElementVNode("span",null,"Exchange Rate",-1)]),8,m2),e.createElementVNode("td",E2,[e.createElementVNode("span",null,e.toDisplayString((x=l.report)==null?void 0:x.rate),1)])]),e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:a.maxColspans},"Total in CNY",8,y2),e.createElementVNode("td",I2,"¥"+e.toDisplayString((y=l.report)==null?void 0:y.paymentAmount),1)])],64)):(e.openBlock(),e.createElementBlock("tr",p2,[e.createElementVNode("td",{colspan:a.maxColspans},t[6]||(t[6]=[e.createElementVNode("span",null,"Total in USD",-1)]),8,A2),e.createElementVNode("td",V2,[e.createElementVNode("span",null,e.toDisplayString(`$${(V=l.report)==null?void 0:V.paymentAmount}`),1)])]))])]),(T=l.report)!=null&&T.memo?(e.openBlock(),e.createElementBlock("div",T2,[t[7]||(t[7]=e.createElementVNode("div",{class:"invoice-item",style:{"font-weight":"600"}},"MEMO",-1)),e.createElementVNode("div",{class:"invoice-item",innerHTML:(S=(A=l.report)==null?void 0:A.memo)==null?void 0:S.replace(`