DeductShowCheck-739e91e0.js 2.39 KB
var _=(k,o,a)=>new Promise((p,l)=>{var c=e=>{try{n(a.next(e))}catch(t){l(t)}},d=e=>{try{n(a.throw(e))}catch(t){l(t)}},n=e=>e.done?p(e.value):Promise.resolve(e.value).then(c,d);n((a=a.apply(k,o)).next())});import{d as B,k as f,a8 as h,_ as g,a9 as D,aa as m,f as y,ac as w,$ as x,a0 as E,E as I,a1 as C,ad as P,u as v}from"./vue-5a35c3f5.js";import{b as S,B as U}from"./index-c1c2669a.js";import{v as $}from"./invoice-f64ec395.js";import{v as j}from"./pdfShow-13fe577e.js";import{_ as N}from"./index.js";import"./antd-6b087f69.js";import"./useWindowSizeFn-cc2fb57c.js";import"./order-eff5d778.js";import"./message-c4c6f446.js";const V=["onClick"],M=["src"],O=["onClick"],L=B({__name:"DeductShowCheck",setup(k){f(),f();const o=f([]),[a,{closeModal:p}]=S(e=>_(this,null,function*(){o.value=[];const t=yield $({id:e.data.id});for(let s in t){const i=t[s],u=s;o.value.push({name:u,url:i})}}));function l(){return _(this,null,function*(){o.value=[],p()})}function c(e){const t=["png","jpg","jpeg","gif","bmp","svg"],s=e.split("?")[0];return t.some(i=>s.toLowerCase().endsWith(i))}function d(e){return e.toLowerCase().endsWith(".pdf")}function n(e){const t=e.split("?")[0];c(t)?window.open("","","").document.write(`<!DOCTYPE html>
      <html>
        <body style="display: flex; justify-content: center; align-items: center;">
          <img src='${e}' width="300px" height="auto"/>
        </body>
      </html>`):d(t)?j(e):console.log("不支持的文件类型")}return(e,t)=>{const s=h("a-list-item-meta"),i=h("a-list-item"),u=h("a-list");return g(),D(v(U),P(e.$attrs,{onRegister:v(a),title:"扣款单",width:"700px",bodyStyle:{height:"240px"},onOk:l}),{default:m(()=>[y(u,{"item-layout":"horizontal","data-source":o.value},{renderItem:m(({item:r})=>[y(i,null,{default:m(()=>[y(s,null,{title:m(()=>[w(' <a :href="item.url" target="_blank" rel="noopener noreferrer">{{ item.name }}</a> '),c(r.url)?(g(),x("a",{key:0,onClick:b=>n(r.url),style:{display:"flex","align-items":"center"}},[E("img",{src:r.url,alt:"Image",style:{"max-width":"150px","max-height":"150px","margin-right":"10px"}},null,8,M),I(" "+C(r.name),1)],8,V)):(g(),x("a",{key:1,onClick:b=>n(r.url)},C(r.name),9,O)),w(' <a @click="openPic(item.url)">{{ item.name }}</a> ')]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])]),_:1},16,["onRegister"])}}}),J=N(L,[["__file","E:/allcode/erp/test7901/order-erp-front/src/views/project/finance/payBack/DeductShowCheck.vue"]]);export{J as default};