| 1 |
- import{m as u,a as c,W as p,X as f,Y as S,$ as P,Z as v,u as $,N as x,a2 as j,a9 as A,a3 as O}from"./vue-904e9482.js";import{a as D,A as E}from"./index-abf064a2.js";/* empty css */import{_ as L}from"./_plugin-vue_export-helper-c27b6911.js";var M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};const U=M;function w(a){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},t=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),t.forEach(function(o){q(a,o,n[o])})}return a}function q(a,e,n){return e in a?Object.defineProperty(a,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[e]=n,a}var b=function(e,n){var t=w({},e,n.attrs);return u(D,w({},t,{icon:U}),null)};b.displayName="HomeOutlined";b.inheritAttrs=!1;const K=b,W=["onClick"],X={__name:"index",props:{param:Object,columns:Array,disabled:Boolean},emits:["onSelect"],setup(a,{expose:e,emit:n}){const t=a,o=c(!1),i=c(""),h=c(0),_=c([]),C=c([{title:"经销商名称",dataIndex:"enterprisename",key:"enterprisename",width:250},{title:"经销商编码",dataIndex:"agentnum",key:"agentnum"},{title:"联系人",dataIndex:"contact",key:"contact"},{title:"联系电话",dataIndex:"phonenumber",key:"phonenumber"},{title:"操作",dataIndex:"operation",key:"operation"}]),k=()=>{o.value=!0,m()},H=(l,s,g,{currentDataSource:y})=>{t.param.content.pageNumber=l.current,t.param.content.pageSize=l.pageSize,m()},m=async()=>{const l=await E.requested(t.param);_.value=l.data,h.value=l.total},V=()=>{t.param.content.where.condition=i.value,t.param.content.pageNumber=1,m()},I=(l,s)=>{n("onSelect",s),o.value=!1},z=()=>{i.value=""};return e({visible:o}),(l,s)=>{const g=p("a-space"),y=p("a-input"),N=p("a-table"),B=p("a-modal");return f(),S("div",null,[P("div",{onClick:k},[u(g,null,{default:v(()=>[u($(K)),x(l.$slots,"text",{},void 0,!0)]),_:3})]),a.disabled?O("",!0):(f(),j(B,{key:0,open:o.value,"onUpdate:open":s[1]||(s[1]=r=>o.value=r),title:"选择经销商",bodyStyle:{padding:"10px"},width:"900px",footer:null,afterClose:z},{default:v(()=>[u(y,{class:"search-panel",value:i.value,"onUpdate:value":s[0]||(s[0]=r=>i.value=r),placeholder:"搜索内容",onKeyup:A(V,["enter"]),allowClear:""},null,8,["value","onKeyup"]),u(N,{class:"ant-table-striped","row-class-name":(r,d)=>d%2===1?"table-striped":null,scroll:{x:"max-content",y:"500px"},dataSource:_.value,columns:t.columns||C.value,size:"small",pagination:{defaultPageSize:20,total:h.value},onChange:H},{bodyCell:v(({column:r,record:d})=>[x(l.$slots,"tb_cell",{data:{column:r,record:d}},void 0,!0),r.dataIndex==="operation"?(f(),S("a",{key:0,onClick:Y=>I(r,d)},"选 择",8,W)):O("",!0)]),_:3},8,["row-class-name","dataSource","columns","pagination"])]),_:3},8,["open"]))])}}},Q=L(X,[["__scopeId","data-v-fd895bda"]]);export{Q as S};
|