import{_ as L,d as $,p as q,n as G,x as f,ah as H,aP as M,aM as Q,ai as z,bc as F,z as W,r as n,o as a,c as k,l as r,D as s,m as e,ar as Y,a as o,G as i,F as J,M as A,c8 as K,cx as X,dH as Z,dI as ee}from"./index.js";import{u as te}from"./useDetail.d77f98f9.js";import{D as oe}from"./default.86fd4980.js";/* empty css */import{R as ae}from"./index.8ad79f80.js";import{h as se}from"./export.fc82d641.js";import{P as ue}from"./index.d0ff6d35.js";import"./global.9ad647c8.js";import"./orderRecord.4d98a397.js";import"./porder.9a85976d.js";import"./xlsx.ed122d16.js";import"./print-style.0cc9588c.js";const re={class:"padding__container"},le={key:0,style:{position:"absolute",top:"15px",right:"15px"}},ne=$({__name:"detail",setup(ie){const{push:g}=q(),{query:x}=G(),D=f({}),v=f(null),h=H(()=>{var u;return((u=v.value)==null?void 0:u.detail.status)||""}),_=f(null),b="orderRecordDetail",p=M(!1),{hasPermissionWithCode:c}=Q(b),{id:d,title:P,isDetail:y,collapses:E}=te({baseName:"\u8BA2\u5355\u5BF9\u8D26",collapseLen:3}),{isSuperUser:N}=z(),C=f(!0),{run:V}=F({success:async()=>{v.value.refresh(),C.value=!1,W(()=>C.value=!0)}}),{run:S,loading:T}=F({success:()=>g(`/purchase/${x.isQuery?"orderRecordQuery":"orderRecord"}`)});function O(u){const t={...u,payNo:d.value},m=d.value.slice(3,9),R=Number(m)p.value=!0,onSuccess:()=>p.value=!1,onFail:()=>p.value=!1,params:{payNo:d.value}})}return(u,t)=>{const m=n("ElCollapseItem"),R=n("ElCollapse"),U=n("ElTabPane"),j=n("ElTabs"),B=n("ElButton");return a(),k("div",re,[r(j,null,{default:s(()=>[r(U,{label:e(P)},{default:s(()=>[r(R,{modelValue:e(E),"onUpdate:modelValue":t[1]||(t[1]=l=>Y(E)?E.value=l:null)},{default:s(()=>[o(" \u8BE6\u60C5 or \u521B\u5EFA "),r(m,{name:"1",title:e(P)},{default:s(()=>[C.value?(a(),i(e(ae),{key:0,id:e(d),ref_key:"formRef",ref:v,loading:e(T),readonly:e(y),onCreate:w,onGetRecord:t[0]||(t[0]=l=>D.value=l),isPurch:""},null,8,["id","loading","readonly"])):o("v-if",!0)]),_:1},8,["title"]),o(" \u8BE6\u60C5 - \u5BA1\u6279\u8282\u70B9 "),e(y)&&!e(N)?(a(),k(J,{key:0},[String(e(h))==="1"&&e(c)("039")?(a(),i(m,{key:0,name:"2",title:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838"},{default:s(()=>[r(e(oe),{approveValue:"2",rejectValue:"3",onApproval:O})]),_:1})):o("v-if",!0)],64)):o("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1}),e(y)?(a(),k("div",le,[e(c)("047")?(a(),i(B,{key:0,onClick:t[2]||(t[2]=l=>_.value.print(!0))},{default:s(()=>[A(" \u6253\u5370\u51FA\u5E93\u5355 ")]),_:1})):o("v-if",!0),e(c)("046")?(a(),i(B,{key:1,onClick:t[3]||(t[3]=l=>_.value.print())},{default:s(()=>[A(" \u6253\u5370\u5BF9\u8D26\u5355 ")]),_:1})):o("v-if",!0),e(c)("038")?(a(),i(B,{key:2,loading:e(p),type:"primary",onClick:t[4]||(t[4]=()=>I())},{default:s(()=>[A(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):o("v-if",!0)])):o("v-if",!0),r(e(ue),{record:D.value,ref_key:"PrintOrderRecordRef",ref:_},null,8,["record"])])}}});var ke=L(ne,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/orderRecord/detail.vue"]]);export{ke as default};