index.ba141f.js 3.2 KB

1
  1. import{_ as M,d as T,n as U,bt as z,aw as H,w as p,Z as Q,bR as N,x as O,ad as V,r as h,o as g,c as j,j as i,C as l,l as u,aW as G,J as C,M as k,G as I,a as Y,bA as q}from"./index.js";import{useColumns as J}from"./columns.a56136.js";import{a as W}from"./index.2af5966b.js";import{D as y,a as Z}from"./query.8064326f.js";import K from"./search-modal.36d5eb.js";import"./purchase.c44647.js";import"./types.ebfbff8f.js";import"./porder.e713a9fe.js";import"./tootip.e1d72495.js";import"./status.151ccddb.js";import"./basic-descriptions.64fbdf9d.js";import"./context.bdf6d636.js";import"./reconciliation.87b67a.js";import"./orderRecord.fc407fbf.js";import"./calc.850c7422.js";import"./sale.623406.js";import"./sale.848959cc.js";import"./payment.9ad14f.js";import"./ticket-return.5c359b.js";import"./tradelog.c7969f.js";import"./trade.51e46b.js";import"./refund.1d19ae.js";import"./inv-return.418b0f.js";import"./inv-open.387bde.js";const X={class:"main"},$={name:"standBook"},ee=T({...$,setup(ae){const{push:w}=U(),{columns:b}=J(),D=z(),{setSearchParams:E,searchParams:m}=H(),f=p(null),d=p(!1),_=p([]),v=p([]),a=p(m.basic?{...m.basic}:{...y}),c=Q(m.pagination?{...m.pagination}:{...Z});async function B(e){a.value.page=e,await s()}async function R(e){a.value.size=e,a.value.page=1,await s()}async function x(e){a.value={...u(a),...e},await s()}async function P(){a.value={...y},f.value.onClear(),await s()}function S(e){w({path:"/search/standBookDetail",query:{id:e}})}N(({path:e})=>{const o=e.indexOf("Detail")>=0,n=o?a.value:null;E(n,o?c:null)});async function s(){if(d.value)return;d.value=!0;const{code:e,data:o,message:n}=await W(u(a));D({code:e,message:n,handler:()=>{const{list:r,count:t}=o;_.value=r!=null?r:[],c.total=t!=null?t:0,c.pageSize=a.value.size,c.currentPage=a.value.page}}),d.value=!1}return O(()=>{const e=V().getMenuActions("standBook");v.value=e,e.some(o=>o==="001")&&s()}),(e,o)=>{const n=h("el-button"),r=h("PureTable");return g(),j("div",X,[i(q,{"is-show":v.value.some(t=>t==="001")},{default:l(()=>[i(u(G),{title:"\u6570\u636E\u6E90",loading:d.value,dataList:_.value,onRefresh:s},{buttons:l(()=>[i(n,{type:"primary",icon:u(C)("add"),onClick:o[0]||(o[0]=()=>f.value.onDisplay())},{default:l(()=>[k(" \u6DFB\u52A0\u641C\u7D22\u6761\u4EF6 ")]),_:1},8,["icon"]),i(n,{onClick:P},{default:l(()=>[k("\u91CD\u7F6E\u67E5\u8BE2\u6761\u4EF6")]),_:1})]),default:l(({size:t,checkList:A})=>[i(r,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:t,data:_.value,columns:u(b),checkList:A,pagination:c,paginationSmall:t==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSizeChange:R,onCurrentChange:B},{operation:l(({row:L})=>[v.value.some(F=>F==="007")?(g(),I(n,{key:0,class:"reset-margin",link:"",type:"primary",size:t,onClick:()=>S(L.id),icon:u(C)("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"]),i(K,{ref_key:"searchModalRef",ref:f,onConfirmBtnClick:x},null,512)])}}});var Be=M(ee,[["__scopeId","data-v-72e9dd56"],["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/search/standBook/index.vue"]]);export{Be as default};