index.cb2d1181.js 3.6 KB

1
  1. import{_ as U,d as z,E as v,D as W,x as p,o as n,N as B,K as i,u as f,a as C,y as h,c as _,M as H,L as j,W as y,aS as F,bx as x,bi as q,T as E,$ as L,a0 as M,b as O}from"./index.743f0c80.js";import{f as T}from"./index.52029f71.js";import{e as K}from"./execl-upload.acc3acaa.js";import"./xlsx.ed122d16.js";const b=["\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u53F7","\u6536\u6B3E\u65B9\u516C\u53F8\u540D\u79F0","\u8D44\u91D1\u7F16\u53F7","\u8BA2\u5355\u7F16\u53F7","\u8BA4\u9886\u8D44\u91D1"],$=["\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u53F7","\u8D44\u91D1\u7F16\u53F7","\u8BA2\u5355\u7F16\u53F7","\u8BA4\u9886\u8D44\u91D1"],G=["companyNo","tradNo","orderCode","trad_fee"],J=()=>[{type:"index",width:"50",fixed:"left",label:"\u5E8F\u53F7"},{prop:"companyNo",label:"\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u53F7"},{prop:"companyName",label:"\u6536\u6B3E\u65B9\u516C\u53F8\u540D\u79F0"},{prop:"tradNo",label:"\u8D44\u91D1\u7F16\u53F7"},{prop:"orderCode",label:"\u8BA2\u5355\u7F16\u53F7"},{prop:"trad_fee",label:"\u8BA4\u9886\u8D44\u91D1"}];const P=c=>(L("data-v-5811f155"),c=c(),M(),c),Q={key:0},R={key:1},X=P(()=>O("span",{style:{color:"#f56c6c","font-size":"14px"}},"* ",-1)),Y={key:1,flex:"","justify-end":"","gap-2":"",style:{padding:"10px 0 0 0"}},Z=y("\u53D6\u6D88"),ee=y("\u4FDD\u5B58"),ue=z({__name:"index",emits:["onSuccess"],setup(c,{expose:D,emit:g}){const d=v(!1),u=v(!1),t=v([]),N=J(),{logout:A}=W(),k=()=>{},w=({results:r,header:s})=>{if(u.value=!0,r.length===0){F.error("\u8868\u683C\u65E0\u6709\u6548\u6570\u636E\uFF01"),u.value=!1;return}let l=!0;if(s.length!==b.length?l=!1:b.forEach((o,e)=>{o!==s[e]&&(l=!1)}),!l){F.error("\u8868\u5934\u4E0E\u5BFC\u5165\u6A21\u677F\u4E0D\u5339\u914D\uFF01"),u.value=!1;return}t.value=[];try{r.forEach(o=>{const e=Object.values(o);let m={companyNo:e[0],companyName:e[1],tradNo:e[2],orderCode:e[3],trad_fee:e[4]};t.value.push(m)}),u.value=!1}catch{F.error("\u5BFC\u5165\u6570\u636E\u62FC\u63A5\u6709\u8BEF\uFF01"),u.value=!1}},S=async()=>{if(u.value)return;u.value=!0;let r=!0;if(t.value.forEach(o=>{for(let e in o)G.includes(e)&&!o[e]&&(r=!1)}),!r){x({title:"\u5FC5\u586B\u5B57\u6BB5\u7F3A\u5931\uFF01",type:"error"}),u.value=!1;return}const{code:s,message:l}=await T({list:f(t)});q({code:s,message:l,logout:A,handler:()=>{u.value=!1,F.success("\u8BA2\u5355\u8BA4\u6B3E\u6570\u636E\u5BFC\u5165\u6210\u529F\uFF01"),g("onSuccess"),d.value=!1},error:()=>{u.value=!1,x({title:l,type:"error"})}})},V=()=>{t.value=[]};return D({onDisplay:()=>(d.value=!0,t.value=[])}),(r,s)=>{const l=p("el-table-column"),o=p("el-table"),e=p("el-button"),m=p("el-dialog");return n(),B(m,{modelValue:d.value,"onUpdate:modelValue":s[0]||(s[0]=a=>d.value=a),title:"\u5BFC\u5165\u8BA2\u5355\u8BA4\u6B3E\u6570\u636E",width:"1040px",top:"8vh",center:"",onClose:k},{default:i(()=>[t.value.length===0?(n(),B(f(K),{key:0,onOnSuccess:w})):C("v-if",!0),h(o,{data:t.value,stripe:"",border:"","max-height":"500px",size:"small",style:{width:"100%"}},{default:i(()=>[(n(!0),_(j,null,H(f(N),(a,I)=>(n(),B(l,{type:a.type,minWidth:a.minWidth,fixed:a.fixed,key:I,prop:a.prop,"show-overflow-tooltip":""},{header:i(()=>[!f($).includes(a.label)||a.label==="\u5E8F\u53F7"?(n(),_("span",Q,E(a.label),1)):(n(),_("p",R,[X,y(" "+E(a.label),1)]))]),_:2},1032,["type","minWidth","fixed","prop"]))),128))]),_:1},8,["data"]),t.value.length!==0?(n(),_("div",Y,[h(e,{size:"small",onClick:V},{default:i(()=>[Z]),_:1}),h(e,{size:"small",type:"primary",loading:u.value,onClick:S},{default:i(()=>[ee]),_:1},8,["loading"])])):C("v-if",!0)]),_:1},8,["modelValue"])}}});var se=U(ue,[["__scopeId","data-v-5811f155"],["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/execl-capital-files-upload/index.vue"]]);export{se as default};