import{_ as T,d as M,k as z,cb as H,aq as Q,n as c,Q as U,fg as N,p as O,a6 as V,r as g,o as h,c as j,h as r,y as l,i as u,cZ as q,D as k,H as y,A as I,a as Y,dj as G}from"./index.js";import{useColumns as Z}from"./columns.a56136.js";import{a as J}from"./index.a26ed54d.js";import{D as C,a as K}from"./query.84cca6d5.js";import W from"./search-modal.5a3940.js";import"./index.d978a290.js";import"./purchase.a458fd.js";import"./types.c098f8fe.js";import"./porder.827c74bc.js";import"./context.bdf6d636.js";import"./reconciliation.d12955.js";import"./index.6004c99e.js";import"./orderRecord.92bbc10f.js";import"./index.904472d8.js";import"./sale.7d96b8.js";import"./sale.3efcc247.js";import"./index.cfc78b88.js";import"./payment.8b683a.js";import"./purchPay.bf9ab6ff.js";import"./index.9c129b93.js";import"./ticket-return.0235fd.js";import"./ticketReturn.e53d6b17.js";import"./index.3c216f3c.js";import"./tradelog.044756.js";import"./tragelog.6608fb39.js";import"./index.afe5f4bc.js";import"./trade.0c5ec1.js";import"./index.3dfad87f.js";import"./refund.e1b6d4.js";import"./index.eed3ef73.js";import"./inv-return.bad4c4.js";import"./inv-return.96a2864f.js";import"./inv-open.c8a829.js";import"./inv-open.b2ee78c0.js";const X={class:"main"},$={name:"standBook"},ee=M({...$,setup(ae){const{push:w}=z(),{columns:D}=Z(),b=H(),{setSearchParams:E,searchParams:m}=Q(),f=c(null),d=c(!1),_=c([]),v=c([]),o=c(m.basic?{...m.basic}:{...C}),p=U(m.pagination?{...m.pagination}:{...K});async function B(e){o.value.page=e,await s()}async function R(e){o.value.size=e,o.value.page=1,await s()}async function x(e){o.value={...u(o),...e},await s()}async function P(){o.value={...C},f.value.onClear(),await s()}function S(e){w({path:"/search/standBookDetail",query:{id:e}})}N(({path:e})=>{const a=e.indexOf("Detail")>=0,n=a?o.value:null;E(n,a?p:null)});async function s(){if(d.value)return;d.value=!0;const{code:e,data:a,message:n}=await J(u(o));b({code:e,message:n,handler:()=>{const{list:i,count:t}=a;_.value=i!=null?i:[],p.total=t!=null?t:0,p.pageSize=o.value.size,p.currentPage=o.value.page}}),d.value=!1}return O(()=>{const e=V().getMenuActions("standBook");v.value=e,e.some(a=>a==="001")&&s()}),(e,a)=>{const n=g("el-button"),i=g("PureTable");return h(),j("div",X,[r(G,{"is-show":v.value.some(t=>t==="001")},{default:l(()=>[r(u(q),{title:"\u6570\u636E\u6E90",loading:d.value,dataList:_.value,onRefresh:s},{buttons:l(()=>[r(n,{type:"primary",icon:u(k)("add"),onClick:a[0]||(a[0]=()=>f.value.onDisplay())},{default:l(()=>a[1]||(a[1]=[y(" \u6DFB\u52A0\u641C\u7D22\u6761\u4EF6 ")])),_:1},8,["icon"]),r(n,{onClick:P},{default:l(()=>a[2]||(a[2]=[y("\u91CD\u7F6E\u67E5\u8BE2\u6761\u4EF6")])),_:1})]),default:l(({size:t,checkList:L})=>[r(i,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:t,data:_.value,columns:u(D),checkList:L,pagination:p,paginationSmall:t==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSizeChange:R,onCurrentChange:B},{operation:l(({row:A})=>[v.value.some(F=>F==="007")?(h(),I(n,{key:0,class:"reset-margin",link:"",type:"primary",size:t,onClick:()=>S(A.id),icon:u(k)("eye-view")},null,8,["size","onClick","icon"])):Y("v-if",!0)]),_:2},1032,["size","data","columns","checkList","pagination","paginationSmall"])]),_:1},8,["loading","dataList"])]),_:1},8,["is-show"]),r(W,{ref_key:"searchModalRef",ref:f,onConfirmBtnClick:x},null,512)])}}});var ze=T(ee,[["__scopeId","data-v-72e9dd56"],["__file","D:/work/jiesuan/settle-vue3/src/views/search/standBook/index.vue"]]);export{ze as default};
