Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

cancelOrderDialog.6462d36c.js 3.4KB

3 månader sedan
1
  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.fe83d1aa.js";import{h as q,a as S,f as A}from"./uploadAction.69ee4a64.js";import{d as D,z as I,r as h,A as M,f as d,g as T,p as E,w as n,e as c,x as g,h as x,b as G,i as H}from"./index.551f5afa.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=D({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=I.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 M(()=>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 T(),E(k,{"model-value":o.visible,title:"\u53D6\u6D88\u8BA2\u5355",width:"560px","destroy-on-close":"",onClose:a[4]||(a[4]=s=>l("close"))},{footer:n(()=>[c(y,{type:"primary",size:"small",onClick:a[2]||(a[2]=s=>i(u.value))},{default:n(()=>[L]),_:1}),c(y,{type:"info",size:"small",onClick:a[3]||(a[3]=s=>l("close"))},{default:n(()=>[P]),_:1})]),default:n(()=>[c(j,{ref_key:"formRef",ref:u,model:t.value,rules:p,"label-width":"90px","label-suffix":":",size:"small"},{default:n(()=>[c(_,{label:"\u53D6\u6D88\u539F\u56E0",prop:"cancelReason"},{default:n(()=>[c(m,{modelValue:t.value.cancelReason,"onUpdate:modelValue":a[0]||(a[0]=s=>t.value.cancelReason=s),type:"textarea",placeholder:"\u8BF7\u8F93\u5165",maxlength:"200"},null,8,["modelValue"])]),_:1}),c(_,{label:"\u9644\u4EF6",prop:"cancelFile"},{default:n(()=>[c(R,{"file-list":t.value.cancelFile,"onUpdate:file-list":a[1]||(a[1]=s=>t.value.cancelFile=s),class:"w-full",action:g(f),limit:10,"on-success":s=>g(q)(s,t.value.cancelFile),"on-error":g(S),"before-upload":s=>g(A)(s,{types:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/pdf","image/jpeg","image/png","image/gif"],size:2048}),multiple:""},{tip:n(()=>[K]),default:n(()=>[c(y,{type:"primary"},{default:n(()=>[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};