You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

confirmDialog.d31deb2b.js 4.4KB

преди 2 месеца
1
  1. var G=Object.defineProperty,M=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var $=(a,t,e)=>t in a?G(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,p=(a,t)=>{for(var e in t||(t={}))U.call(t,e)&&$(a,e,t[e]);if(L)for(var e of L(t))q.call(t,e)&&$(a,e,t[e]);return a},A=(a,t)=>M(a,R(t));var w=(a,t,e)=>new Promise((h,B)=>{var l=o=>{try{i(e.next(o))}catch(x){B(x)}},_=o=>{try{i(e.throw(o))}catch(x){B(x)}},i=o=>o.done?h(o.value):Promise.resolve(o.value).then(l,_);i((e=e.apply(a,t)).next())});import{c as D}from"./settlementDocManage.16fa02c0.js";import{h as P,a as Y,f as H}from"./uploadAction.46257434.js";import{d as J,z as K,r as T,A as Q,f as O,g as W,p as X,w as d,e as c,x as V,h as j,b as Z,i as ee}from"./index.6d448f34.js";const te=j("\u4E0A\u4F20\u9644\u4EF6"),ae=Z("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),le=j(" \u63D0\u4EA4 "),ie=j(" \u5173\u95ED "),ne=J({name:"confirmDialog"}),fe=Object.assign(ne,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(a,{emit:t}){const e=a,{proxy:h}=ee(),B=K.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"}},_=T(),i=T({}),o=T({}),x=v=>w(this,null,function*(){!v||(yield v.validate(n=>w(this,null,function*(){var s,f,m,r,N,g,S,u;if(n){const b=A(p({},i.value),{examineStatus:(f=l[(s=e==null?void 0:e.data)==null?void 0:s.examineStatus])==null?void 0:f.nextState});b[(r=l[(m=e==null?void 0:e.data)==null?void 0:m.examineStatus])==null?void 0:r.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[(S=e==null?void 0:e.data)==null?void 0:S.examineStatus])==null?void 0:u.field].map(F=>F.response.data.id).join(","):void 0,yield D(b),h.$message.success("\u786E\u8BA4\u6210\u529F\uFF01"),t("close",!0)}})))});return Q(()=>e.visible,v=>w(this,null,function*(){var n,s,f,m,r;v?(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[(r=l[(m=e==null?void 0:e.data)==null?void 0:m.examineStatus])==null?void 0:r.field]=[{required:!0,message:"\u8BF7\u4E0A\u4F20\u6587\u4EF6",trigger:"change"}]):_.value.resetFields()})),(v,n)=>{var g,S;const s=O("el-button"),f=O("el-upload"),m=O("el-form-item"),r=O("el-form"),N=O("el-dialog");return W(),X(N,{"model-value":a.visible,title:(S=l[(g=e==null?void 0:e.data)==null?void 0:g.examineStatus])==null?void 0:S.title,width:"560px","destroy-on-close":"",onClose:n[3]||(n[3]=u=>t("close"))},{footer:d(()=>[c(s,{type:"primary",size:"small",onClick:n[1]||(n[1]=u=>x(_.value))},{default:d(()=>[le]),_:1}),c(s,{type:"info",size:"small",onClick:n[2]||(n[2]=u=>t("close"))},{default:d(()=>[ie]),_:1})]),default:d(()=>[c(r,{ref_key:"formRef",ref:_,model:i.value,rules:o.value,"label-suffix":":",size:"small"},{default:d(()=>{var u,b,F,k;return[c(m,{label:(b=l[(u=e==null?void 0:e.data)==null?void 0:u.examineStatus])==null?void 0:b.formLabel,prop:(k=l[(F=e==null?void 0:e.data)==null?void 0:F.examineStatus])==null?void 0:k.field},{default:d(()=>{var z,E;return[c(f,{"file-list":i.value[(E=l[(z=e==null?void 0:e.data)==null?void 0:z.examineStatus])==null?void 0:E.field],"onUpdate:file-list":n[0]||(n[0]=y=>{var C,I;return i.value[(I=l[(C=e==null?void 0:e.data)==null?void 0:C.examineStatus])==null?void 0:I.field]=y}),class:"w-full",action:V(B),limit:10,"on-success":y=>{var C,I;return V(P)(y,i.value[(I=l[(C=e==null?void 0:e.data)==null?void 0:C.examineStatus])==null?void 0:I.field],!0)},"on-error":V(Y),"before-upload":y=>V(H)(y,{types:["application/pdf","image/jpeg","image/png","image/gif"],size:2048})},{tip:d(()=>[ae]),default:d(()=>[c(s,{type:"primary"},{default:d(()=>[te]),_: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"])}}});export{fe as default};