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