Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

confirmDialog.85cba7c0.js 4.8KB

il y a 5 mois
1
  1. var G=Object.defineProperty,P=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var M=(t,a,e)=>a in t?G(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,$=(t,a)=>{for(var e in a||(a={}))U.call(a,e)&&M(t,e,a[e]);if(L)for(var e of L(a))q.call(a,e)&&M(t,e,a[e]);return t},D=(t,a)=>P(t,R(a));var h=(t,a,e)=>new Promise((j,I)=>{var l=o=>{try{i(e.next(o))}catch(v){I(v)}},_=o=>{try{i(e.throw(o))}catch(v){I(v)}},i=o=>o.done?j(o.value):Promise.resolve(o.value).then(l,_);i((e=e.apply(t,a)).next())});import{N as T,d as A,y as Y,r as w,z as H,f as C,g as J,n as K,w as d,e as r,v as F,h as V,b as Q,i as W}from"./index.32194486.js";import{h as X,a as Z,f as ee}from"./uploadAction.25c9789a.js";const te={1:"/api/v1/settlement/accept",2:"/api/v1/settlement/on/pay",3:"/api/v1/settlement/on/invoicing",4:"/api/v1/settlement/invoicing"},ce=(t,a)=>T.get(te[t],{params:a}),ae=t=>T.put("/api/v1/settlement",t),re=t=>T.get("/api/v1/settlement/export",{params:t,responseType:"blob"}),_e=t=>T.post("api/v1/settlement/last/month",t),le=V("\u4E0A\u4F20\u9644\u4EF6"),ie=Q("div",{class:"el-upload__tip"},"\u8BF7\u4E0A\u4F20\u53CC\u65B9\u7B7E\u5B57\u76D6\u7AE0\u7684\u7ED3\u7B97\u5355\u626B\u63CF\u4EF6\uFF0C\u652F\u6301.pdf,.png,.jpg,.gif\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB",-1),ne=V(" \u63D0\u4EA4 "),oe=V(" \u5173\u95ED "),se=A({name:"confirmDialog"}),de=Object.assign(se,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(t,{emit:a}){const e=t,{proxy:j}=W(),I=Y.dictStore.uploadUrl,l={TO_BE_CONFIRM:{title:"\u786E\u8BA4\u7ED3\u7B97\u5355",formLabel:"\u53CC\u65B9\u7B7E\u5B57\u76D6\u7AE0\u7684\u7ED3\u7B97\u5355",field:"examineFile",nextState:"TO_BE_PAY"},TO_BE_PAY:{title:"\u786E\u8BA4\u6536\u6B3E",formLabel:"\u6536\u6B3E\u8BC1\u660E",field:"collectionFile",nextState:"TO_BE_INVOICING"},TO_BE_INVOICING:{title:"\u786E\u8BA4\u5F00\u7968",formLabel:"\u53D1\u7968",field:"invoiceFile",nextState:"INVOICING"}},_=w(),i=w({}),o=w({}),v=x=>h(this,null,function*(){!x||(yield x.validate(n=>h(this,null,function*(){var s,f,m,c,N,g,b,u;if(n){const S=D($({},i.value),{examineStatus:(f=l[(s=e==null?void 0:e.data)==null?void 0:s.examineStatus])==null?void 0:f.nextState});S[(c=l[(m=e==null?void 0:e.data)==null?void 0:m.examineStatus])==null?void 0:c.field]=i.value[(g=l[(N=e==null?void 0:e.data)==null?void 0:N.examineStatus])==null?void 0:g.field].length?i.value[(u=l[(b=e==null?void 0:e.data)==null?void 0:b.examineStatus])==null?void 0:u.field].map(B=>B.response.data.id).join(","):void 0,yield ae(S),j.$message.success("\u786E\u8BA4\u6210\u529F\uFF01"),a("close",!0)}})))});return H(()=>e.visible,x=>h(this,null,function*(){var n,s,f,m,c;x?(n=e.data)!=null&&n.id&&(i.value.id=e.data.id,i.value[(f=l[(s=e==null?void 0:e.data)==null?void 0:s.examineStatus])==null?void 0:f.field]=[],o.value[(c=l[(m=e==null?void 0:e.data)==null?void 0:m.examineStatus])==null?void 0:c.field]=[{required:!0,message:"\u8BF7\u4E0A\u4F20\u6587\u4EF6",trigger:"change"}]):_.value.resetFields()})),(x,n)=>{var g,b;const s=C("el-button"),f=C("el-upload"),m=C("el-form-item"),c=C("el-form"),N=C("el-dialog");return J(),K(N,{"model-value":t.visible,title:(b=l[(g=e==null?void 0:e.data)==null?void 0:g.examineStatus])==null?void 0:b.title,width:"560px","destroy-on-close":"",onClose:n[3]||(n[3]=u=>a("close"))},{footer:d(()=>[r(s,{type:"primary",size:"small",onClick:n[1]||(n[1]=u=>v(_.value))},{default:d(()=>[ne]),_:1}),r(s,{type:"info",size:"small",onClick:n[2]||(n[2]=u=>a("close"))},{default:d(()=>[oe]),_:1})]),default:d(()=>[r(c,{ref_key:"formRef",ref:_,model:i.value,rules:o.value,"label-suffix":":",size:"small"},{default:d(()=>{var u,S,B,z;return[r(m,{label:(S=l[(u=e==null?void 0:e.data)==null?void 0:u.examineStatus])==null?void 0:S.formLabel,prop:(z=l[(B=e==null?void 0:e.data)==null?void 0:B.examineStatus])==null?void 0:z.field},{default:d(()=>{var E,k;return[r(f,{"file-list":i.value[(k=l[(E=e==null?void 0:e.data)==null?void 0:E.examineStatus])==null?void 0:k.field],"onUpdate:file-list":n[0]||(n[0]=p=>{var y,O;return i.value[(O=l[(y=e==null?void 0:e.data)==null?void 0:y.examineStatus])==null?void 0:O.field]=p}),class:"w-full",action:F(I),limit:10,"on-success":p=>{var y,O;return F(X)(p,i.value[(O=l[(y=e==null?void 0:e.data)==null?void 0:y.examineStatus])==null?void 0:O.field],!0)},"on-error":F(Z),"before-upload":p=>F(ee)(p,{types:["application/pdf","image/jpeg","image/png","image/gif"],size:2048})},{tip:d(()=>[ie]),default:d(()=>[r(s,{type:"primary"},{default:d(()=>[le]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload"])]}),_:1},8,["label","prop"])]}),_:1},8,["model","rules"])]),_:1},8,["model-value","title"])}}}),ve=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"}));export{de as _,_e as a,ve as c,re as e,ce as l};