import{_ as q,d as O,n as $,m as G,w as d,ag as Q,bs as L,ah as M,b2 as A,r as n,o as u,c as E,l as s,C as t,u as e,aq as W,a,F as z,G as c,M as B}from"./index.3f1ca816.js";import{u as H}from"./useDetail.ded17831.js";import{D as J}from"./default.c0cde4b6.js";/* empty css */import{h as K,a as X}from"./index.b8874ffe.js";import{R as Y}from"./index.61c4ab3f.js";import{h as Z}from"./export.12a5b455.js";import{P as ee}from"./index.bd7598aa.js";import"./global.9ad647c8.js";import"./basic-descriptions.78acbb1a.js";import"./tootip.1805b3e1.js";import"./porder.d16f24ea.js";import"./status.d6b2a53d.js";import"./xlsx.ed122d16.js";import"./calc.1104f430.js";const oe={class:"padding__container"},te={key:0,style:{position:"absolute",top:"15px",right:"15px"}},ae=O({__name:"detail",setup(re){const{push:F}=$(),{query:D}=G(),m=d(null),b=Q(()=>{var r;return((r=m.value)==null?void 0:r.detail.status)||""}),f=d(null),h="orderRecordDetail",i=d(!1),R=d({}),{hasPermissionWithCode:p}=L(h),{id:v,title:k,isDetail:_,collapses:y}=H({baseName:"\u8BA2\u5355\u5BF9\u8D26",collapseLen:3}),{isSuperUser:P}=M(),{run:x}=A({success:()=>m.value.refresh()}),{run:N,loading:V}=A({success:()=>F(`/purchase/${D.isQuery?"orderRecordQuery":"orderRecord"}`)});function w(r){const o={...r,payNo:v.value};x(K(o))}function S({cids:r}){const o={cids:r.join(",")};N(X(o))}async function T(){await Z({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>i.value=!0,onSuccess:()=>i.value=!1,onFail:()=>i.value=!1,params:{payNo:v.value}})}return(r,o)=>{const g=n("ElCollapseItem"),I=n("ElCollapse"),U=n("ElTabPane"),j=n("ElTabs"),C=n("ElButton");return u(),E("div",oe,[s(j,null,{default:t(()=>[s(U,{label:e(k)},{default:t(()=>[s(I,{modelValue:e(y),"onUpdate:modelValue":o[1]||(o[1]=l=>W(y)?y.value=l:null)},{default:t(()=>[a(" \u8BE6\u60C5 or \u521B\u5EFA "),s(g,{name:"1",title:e(k)},{default:t(()=>[s(e(Y),{id:e(v),ref_key:"formRef",ref:m,loading:e(V),readonly:e(_),onCreate:S,onGetRecord:o[0]||(o[0]=l=>R.value=l),isPurch:""},null,8,["id","loading","readonly"])]),_:1},8,["title"]),a(" \u8BE6\u60C5 - \u5BA1\u6279\u8282\u70B9 "),e(_)&&!e(P)?(u(),E(z,{key:0},[String(e(b))==="1"&&e(p)("039")?(u(),c(g,{key:0,name:"2",title:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838"},{default:t(()=>[s(e(J),{approveValue:"2",rejectValue:"3",onApproval:w})]),_:1})):a("v-if",!0)],64)):a("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1}),e(_)?(u(),E("div",te,[e(p)("047")?(u(),c(C,{key:0,onClick:o[2]||(o[2]=l=>f.value.print(!0))},{default:t(()=>[B(" \u6253\u5370\u51FA\u5E93\u5355 ")]),_:1})):a("v-if",!0),e(p)("046")?(u(),c(C,{key:1,onClick:o[3]||(o[3]=l=>f.value.print())},{default:t(()=>[B(" \u6253\u5370\u5BF9\u8D26\u5355 ")]),_:1})):a("v-if",!0),e(p)("038")?(u(),c(C,{key:2,loading:i.value,type:"primary",onClick:o[4]||(o[4]=()=>T())},{default:t(()=>[B(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):a("v-if",!0)])):a("v-if",!0),s(e(ee),{record:R.value,ref_key:"PrintOrderRecordRef",ref:f},null,8,["record"])])}}});var Be=q(ae,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/orderRecord/detail.vue"]]);export{Be as default};