index-73b887c3.js 3.4 KB

1
  1. import{m as u,a as s,W as v,X as b,Y as y,u as z,Z as g,aa as I,a5 as P}from"./vue-74beb2f3.js";import{b as j,_ as N,A as V}from"./index-3887ab05.js";var D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584zM639.5 414h-45c-3 0-5.8 1.7-7.1 4.4L514 563.8h-2.8l-73.4-145.4a8 8 0 00-7.1-4.4h-46c-1.3 0-2.7.3-3.8 1-3.9 2.1-5.3 7-3.2 10.9l89.3 164h-48.6c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1v33.7h-65.1c-4.4 0-8 3.6-8 8v21.3c0 4.4 3.6 8 8 8h65.1V752c0 4.4 3.6 8 8 8h41.3c4.4 0 8-3.6 8-8v-53.8h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-65.4v-33.7h65.4c4.4 0 8-3.6 8-8v-21.3c0-4.4-3.6-8-8-8h-49.1l89.3-164.1c.6-1.2 1-2.5 1-3.8.1-4.4-3.4-8-7.9-8z"}}]},name:"account-book",theme:"outlined"};const H=D;function k(a){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){M(a,o,e[o])})}return a}function M(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}var m=function(t,e){var n=k({},t,e.attrs);return u(j,k({},n,{icon:H}),null)};m.displayName="AccountBookOutlined";m.inheritAttrs=!1;const $=m;const E=["onClick"],U={__name:"index",props:{param:Object,dataSource:Array},emits:["onSelect"],setup(a,{emit:t}){const e=a,n=s(!1),o=s(""),_=s(0),i=s([]),x=s([{title:"抬头",dataIndex:"enterprisename",key:"enterprisename",width:250},{title:"开票银行",dataIndex:"bank",key:"bank"},{title:"银行卡号",dataIndex:"bankcardno",key:"bankcardno",width:250},{title:"开票地址",dataIndex:"address",key:"address"},{title:"操作",dataIndex:"operation",key:"operation",fixed:"right"}]),S=()=>{n.value=!0,e.param?d():i.value=e.dataSource},O=(c,r,h,{currentDataSource:f})=>{e.param.content.pageNumber=c.current,e.param.content.pageSize=c.pageSize,d()},d=async()=>{const c=await V.requested(e.param);i.value=c.data,_.value=c.total},w=()=>{e.param.content.where.condition=o.value,e.param.content.pageNumber=1,d()},C=(c,r)=>{t("onSelect",r),n.value=!1},A=()=>{o.value=""};return(c,r)=>{const h=v("a-input"),f=v("a-table"),B=v("a-modal");return b(),y("div",null,[u(z($),{onClick:S}),u(B,{open:n.value,"onUpdate:open":r[1]||(r[1]=l=>n.value=l),title:"选择账户",bodyStyle:{padding:"10px"},width:"900px",footer:null,afterClose:A},{default:g(()=>[u(h,{class:"search-panel",value:o.value,"onUpdate:value":r[0]||(r[0]=l=>o.value=l),placeholder:"搜索内容",onKeyup:I(w,["enter"]),allowClear:""},null,8,["value","onKeyup"]),u(f,{class:"ant-table-striped","row-class-name":(l,p)=>p%2===1?"table-striped":null,dataSource:i.value,columns:x.value,size:"small",pagination:{defaultPageSize:20,total:_.value},scroll:{x:"max-content"},onChange:O},{bodyCell:g(({column:l,record:p})=>[l.key==="operation"?(b(),y("a",{key:0,onClick:q=>C(l,p)},"选 择",8,E)):P("",!0)]),_:1},8,["row-class-name","dataSource","columns","pagination"])]),_:1},8,["open"])])}}},L=N(U,[["__scopeId","data-v-451c57d2"]]);export{L as S};