25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
3.4KB

  1. var z=Object.defineProperty,B=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var w=(o,l,e)=>l in o?z(o,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[l]=e,C=(o,l)=>{for(var e in l||(l={}))$.call(l,e)&&w(o,e,l[e]);if(F)for(var e of F(l))N.call(l,e)&&w(o,e,l[e]);return o},V=(o,l)=>B(o,U(l));var v=(o,l,e)=>new Promise((b,f)=>{var u=i=>{try{p(e.next(i))}catch(r){f(r)}},t=i=>{try{p(e.throw(i))}catch(r){f(r)}},p=i=>i.done?b(i.value):Promise.resolve(i.value).then(u,t);p((e=e.apply(o,l)).next())});import{i as O}from"./orderManage.83f936be.js";import{h as q,a as S,f as D}from"./uploadAction.9c148b89.js";import{d as I,y as M,r as h,z as T,f as d,g as A,n as E,w as s,e as c,v as g,h as x,b as G,i as H}from"./index.56ad3315.js";const J=x("\u4E0A\u4F20\u9644\u4EF6"),K=G("div",{class:"el-upload__tip"},"\u652F\u6301.pdf,.doc,.docx,.png,.jpg,.gif\u683C\u5F0F,\u4E0D\u8D85\u8FC72MB\u6587\u4EF6,\u6700\u591A10\u4E2A\u6587\u4EF6",-1),L=x(" \u63D0\u4EA4 "),P=x(" \u5173\u95ED "),Q=I({name:"cancelOrderDialog"}),ee=Object.assign(Q,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(o,{emit:l}){const e=o,{proxy:b}=H(),f=M.dictStore.uploadUrl,u=h(),t=h({cancelFile:[]}),p={cancelReason:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D6\u6D88\u539F\u56E0",trigger:"blur"}]},i=r=>v(this,null,function*(){!r||(yield r.validate(a=>v(this,null,function*(){var m;a&&(yield O(V(C({},t.value),{cancelFile:(m=t.value.cancelFile)!=null&&m.length?t.value.cancelFile.map(_=>_.response.data.id).join(","):void 0})),b.$message.success("\u53D6\u6D88\u6210\u529F\uFF01"),l("close",!0))})))});return T(()=>e.visible,r=>v(this,null,function*(){var a;r?(a=e.data)!=null&&a.id&&(t.value.id=e.data.id):u.value.resetFields()})),(r,a)=>{const m=d("el-input"),_=d("el-form-item"),y=d("el-button"),R=d("el-upload"),j=d("el-form"),k=d("el-dialog");return A(),E(k,{"model-value":o.visible,title:"\u53D6\u6D88\u8BA2\u5355",width:"560px","destroy-on-close":"",onClose:a[4]||(a[4]=n=>l("close"))},{footer:s(()=>[c(y,{type:"primary",size:"small",onClick:a[2]||(a[2]=n=>i(u.value))},{default:s(()=>[L]),_:1}),c(y,{type:"info",size:"small",onClick:a[3]||(a[3]=n=>l("close"))},{default:s(()=>[P]),_:1})]),default:s(()=>[c(j,{ref_key:"formRef",ref:u,model:t.value,rules:p,"label-width":"90px","label-suffix":":",size:"small"},{default:s(()=>[c(_,{label:"\u53D6\u6D88\u539F\u56E0",prop:"cancelReason"},{default:s(()=>[c(m,{modelValue:t.value.cancelReason,"onUpdate:modelValue":a[0]||(a[0]=n=>t.value.cancelReason=n),type:"textarea",placeholder:"\u8BF7\u8F93\u5165",maxlength:"200"},null,8,["modelValue"])]),_:1}),c(_,{label:"\u9644\u4EF6",prop:"cancelFile"},{default:s(()=>[c(R,{"file-list":t.value.cancelFile,"onUpdate:file-list":a[1]||(a[1]=n=>t.value.cancelFile=n),class:"w-full",action:g(f),limit:10,"on-success":n=>g(q)(n,t.value.cancelFile),"on-error":g(S),"before-upload":n=>g(D)(n,{types:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/pdf","image/jpeg","image/png","image/gif"],size:2048}),multiple:""},{tip:s(()=>[K]),default:s(()=>[c(y,{type:"primary"},{default:s(()=>[J]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{ee as default};