1 |
- import{_ as G,__tla as L}from"./Dialog-7bb778a5.js";import{d as R,P as T,r as s,x as D,d0 as U,d1 as X,o as v,C as M,A as d,f as n,a as o,eh as $,c as q,a3 as O,D as H,E as J,a2 as K,B as Q,aG as S,bj as W,ei as Z,X as aa,Y as ea,_ as ta,__tla as sa}from"./index-54aa57d8.js";import{f as la,__tla as oa}from"./formatTime-e6197688.js";import{u as na,__tla as ra}from"./useMessage-f56cafbb.js";let Y,ia=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ra}catch{}})()]).then(async()=>{let y,g,m;y=Q("div",{class:"el-upload__text"}," \u62D6\u62FD\u6587\u4EF6\u81F3\u6B64\u6216\u8005\u70B9\u51FB\u4E0A\u4F20 ",-1),g={key:0,class:"error-list"},m=".pdf, .Pdf, .PDf",Y=ta(R({name:"ImportPayMent",__name:"ImportPayMent",emits:["success"],setup(ca,{expose:z,emit:I}){T();const u=na(),k=s(),p=s([]),x=s([]),P=s(0),N=s("https://zxpt.newfeifan.cn/admin-api/distri/pt-settlement/import"),i=D({list:[]}),w=D({id:void 0}),V=s({Authorization:"Bearer "+U(),"tenant-id":X()});function A(a,t){}function B(a){const t=a.type==="application/pdf"||m.includes(a.name.slice(-4).toLowerCase());return t||u.error("\u53EA\u80FD\u4E0A\u4F20 PDF \u6587\u4EF6!"),t}function C(a,t,e){if(console.log(a),a.code===0&&a.data.length===0){u.success("\u4E0A\u4F20\u6210\u529F"),_("success");const l=e.value.findIndex(f=>{var r;return((r=f.response)==null?void 0:r.data)===a.data});e.value.splice(l,1),p.value.push({name:a.data,url:a.data}),p.value.length==P.value&&(e.value.push(...p.value),p.value=[],P.value=0),c.value=!1}else if(a.code===0&&a.data.length!==0){u.error("\u90E8\u5206\u8F6C\u8D26\u5931\u8D25\uFF0C\u8BE6\u60C5\u770B\u5217\u8868");const l=e.indexOf(t);l!==-1&&e.splice(l,1),i.list=a.data,_("success")}else{u.error(a.msg);const l=e.indexOf(t);l!==-1&&e.splice(l,1),i.list=[],_("success")}}const j=a=>{const t=x.value.map(e=>e.name).indexOf(a.name);t>-1&&x.value.splice(t,1)},c=s(!1),b=s("");s(),s(0),z({open:(a,t,e)=>{c.value=!0,b.value=`\u5BFC\u5165${la(e.createTime,"YYYY\u5E74MM\u6708DD\u65E5")}\u51ED\u8BC1`,w.id=e.id,i.list=[]}});const _=I;return(a,t)=>{const e=S,l=W,f=Z,r=aa,E=ea,F=G;return v(),M(F,{title:o(b),modelValue:o(c),"onUpdate:modelValue":t[0]||(t[0]=h=>K(c)?c.value=h:null),width:"80%",class:"shopsettlement-dialog"},{default:d(()=>[n(l,{ref_key:"uploadRef",ref:k,class:"upload-demo",drag:"",action:o(N),multiple:"",headers:o(V),data:o(w),"on-change":A,"before-upload":B,accept:m,"on-success":C,"on-remove":j,limit:1},{default:d(()=>[n(e,{class:"el-icon--upload"},{default:d(()=>[n(o($))]),_:1}),y]),_:1},8,["action","headers","data"]),o(i).list.length?(v(),q("div",g,[n(f,{title:"\u5BFC\u5165\u5931\u8D25",type:"error",description:"\u4EE5\u4E0B\u6570\u636E\u5BFC\u5165\u5931\u8D25","show-icon":""})])):O("",!0),o(i).list.length?(v(),M(E,{key:1,data:o(i).list,style:{width:"100%"}},{default:d(()=>[n(r,{prop:"accountName",label:"\u8D26\u6237\u540D\u79F0"}),n(r,{prop:"accountNumber",label:"\u94F6\u884C\u8D26\u53F7"}),n(r,{prop:"money",label:"\u91D1\u989D"},{default:d(h=>[H(" \uFFE5"+J(h.row.money),1)]),_:1}),n(r,{prop:"orderNO",label:"\u56DE\u6267\u5355\u6D41\u6C34\u53F7"})]),_:1},8,["data"])):O("",!0)]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/ptsettlement/ImportPayMent.vue"]])});export{ia as __tla,Y as default};
|