index.d6e99556.js 3.2 KB

1
  1. import{e as V,q as a,m as R,a5 as q,r as g,ad as O,o as h,c as A,h as t,A as r,a as p,D as I,C as y,j as d,I as F,ao as M,F as j,L as D}from"./index.6ca3d92f.js";import U from"./capital-modal.97c98f21.js";import{B as z}from"./basic-descriptions.5eafb55f.js";import{b as H}from"./index.3add1d07.js";import{c as L}from"./index.74373b34.js";import{u as S}from"./use-response-handle.a7e28e5a.js";import{O as T}from"./inv-open.4f4ef7d4.js";import{I as $}from"./index.01648c7a.js";import G from"./red-dialog.dd16a6e4.js";import"./configs.80dd5359.js";import"./tootip.6f8763df.js";import"./hooks.ed4e148f.js";import"./invoice.4b8683bf.js";import"./status.b8063a0d.js";import"./index.d22d8141.js";const J=p("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u7968\u7533\u8BF7",-1),K={flex:"","justify-end":"","w-full":"","mb-2":""},P=D("\u9009\u62E9"),Q=D(" n "),W=p("div",{"mt-5":""},null,-1),X={flex:"","w-full":"","justify-end":""},Y=D("\u4FDD\u5B58"),_e=V({__name:"index",setup(Z){const c=a(""),k=a(""),x=a(null),b=a(null),f=a(null),_=a(null),w=S(),{push:C}=R(),v=a(!1),o=q({invNo:"",return_reason:"",remark:""}),B={invNo:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E00\u5F20\u53D1\u7968"}],return_reason:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u9000\u8D27\u539F\u56E0"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]};async function E({invNo:s,inv_number:e,open_date:l}){v.value=!0,c.value=e,k.value=l;const{code:u,message:i,data:m}=await L({invNo:s});w({code:u,message:i,handler:function(){f.value=m,o.invNo=m.invNo,_.value.validateField("logNo")}}),v.value=!1}function N(){_.value.validate(async s=>{if(!s)return;const{code:e,message:l}=await H(o);w({code:e,message:l,handler:()=>C("/InvoiceSales/returnTicket")})})}return(s,e)=>{const l=g("el-button"),u=g("el-form-item"),i=g("el-input"),m=O("loading");return h(),A(j,null,[J,t(d(M),{rules:B,model:o,ref_key:"formRef",ref:_,size:"small","label-width":"100px"},{default:r(()=>[t(u,{label:"\u53D1\u7968",prop:"invNo"},{default:r(()=>[p("div",K,[t(l,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>x.value.onDisplay())},{default:r(()=>[P]),_:1})]),f.value?I((h(),y(d(z),{key:0,"w-full":"",data:f.value,"col-number":2,columns:d(T)},null,8,["data","columns"])),[[m,v.value]]):F("",!0)]),_:1}),Q,c.value?(h(),y(d($),{key:0,"mt-5":"","inv-number":c.value,type:"sale"},null,8,["inv-number"])):F("",!0),W,t(u,{label:"\u9000\u7968\u539F\u56E0",prop:"return_reason","w-480px":""},{default:r(()=>[t(i,{type:"textarea",rows:6,maxlength:"2000",max:"","w-300px":"",modelValue:o.return_reason,"onUpdate:modelValue":e[1]||(e[1]=n=>o.return_reason=n),"show-word-limit":""},null,8,["modelValue"])]),_:1}),t(u,{label:"\u5907\u6CE8",prop:"remark","w-480px":""},{default:r(()=>[t(i,{type:"textarea",rows:6,maxlength:"2000",modelValue:o.remark,"onUpdate:modelValue":e[2]||(e[2]=n=>o.remark=n),placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u5907\u6CE8","show-word-limit":""},null,8,["modelValue"])]),_:1}),p("div",X,[t(l,{type:"primary",onClick:N},{default:r(()=>[Y]),_:1})])]),_:1},8,["model"]),t(U,{ref_key:"capitalModalRef",ref:x,onOnAddOrder:e[3]||(e[3]=n=>E(n))},null,512),t(G,{ref_key:"redDialog",ref:b},null,512)],64)}}});export{_e as default};