choose-modal.f763593c.js 3.4 KB

1
  1. import{c as I}from"./_details.d60a3d8b.js";import{_ as J,r as O,D as u,ak as W,aD as G,a5 as Q,v as s,as as X,o as i,M as v,J as n,q as d,w as l,N as Y,x as g,bh as Z,p as E,L as $,K as ee,W as y,aP as te,bq as ae,R as N}from"./index.7dc8262e.js";import{p as oe}from"./reconciliation.cbdffdbd.js";import{d as ne}from"./index.392fde8d.js";import"./tootip.07dabc22.js";import"./_opitons.5f0545b5.js";const le={flex:"","justify-between":"","mb-2":""},se={flex:"","gap-2":""},ue=y("\u641C\u7D22"),ie=y("\u91CD\u7F6E"),re={key:1},pe={flex:""},de={"w-full":"",flex:"","justify-end":"","mt-2":""},ce=y("\u4FDD\u5B58"),_e=O({__name:"choose-modal",emits:["choose"],setup(me,{expose:B,emit:S}){const c=u(!1),k=u([]),h=u([]),o=W({total:0,size:15,page:1,background:!0}),_=u({currentValue:""}),b=u(null),C=u("hpNo"),D=u(!1),L=G(),{currentCompany:R}=Q();async function m(){const{size:a,page:e}=o;D.value=!0;const{currentValue:f,...x}=_.value,{code:V,message:r,data:p}=await ne({status:"4",[C.value]:f,supplierNo:R.value.companyNo,...x,page:e,size:a});L({code:V,message:r,handler:()=>{o.total=p.count,k.value=p.list}}),D.value=!1}function U(){const[a]=h.value;if(!a)return te.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");S("choose",g(a.hpNo)),c.value=!1}function M(a){if(a.length>1){const e=a.pop();b.value.clearSelection(),b.value.toggleRowSelection(e,!0),h.value=[e]}else h.value=[a[0]]}function P(){o.page=1,m()}function w(a){a&&(_.value={}),o.page=1,m()}return B({onDisplay:()=>c.value=!0}),(a,e)=>{const f=s("el-option"),x=s("el-select"),V=s("el-input"),r=s("el-button"),p=s("el-table-column"),q=s("el-tag"),j=s("el-pagination"),H=s("el-dialog"),K=X("loading");return i(),v(H,{modelValue:c.value,"onUpdate:modelValue":e[6]||(e[6]=t=>c.value=t),title:"\u91C7\u8D2D\u56DE\u7968",center:"",width:"1040px",onOpen:e[7]||(e[7]=()=>m())},{default:n(()=>[d("div",le,[d("div",se,[l(V,{clearable:"",modelValue:_.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=t=>_.value.currentValue=t),placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{prepend:n(()=>[l(x,{modelValue:C.value,"onUpdate:modelValue":e[0]||(e[0]=t=>C.value=t),style:{width:"130px"}},{default:n(()=>[l(f,{label:"\u56DE\u7968\u7F16\u53F7",value:"hpNo"}),l(f,{label:"\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",value:"companyNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),d("div",null,[l(r,{type:"primary",onClick:e[2]||(e[2]=()=>w())},{default:n(()=>[ue]),_:1}),l(r,{onClick:e[3]||(e[3]=()=>w(!0))},{default:n(()=>[ie]),_:1})])]),Y((i(),v(g(Z),{border:"",ref_key:"tableRef",ref:b,data:k.value,size:"small","row-key":"id",onSelectionChange:M,"mb-2":"","max-height":"520px"},{default:n(()=>[l(p,{type:"selection",width:"55"}),(i(!0),E(ee,null,$(g(I),(t,T)=>(i(),v(p,ae({key:T},t,{"show-overflow-tooltip":""}),{default:n(({row:F})=>[t.prop==="pay_status"?(i(),v(q,{key:0},{default:n(()=>{var z;return[y(N((z=g(oe).find(A=>A.value===String(F.pay_status)))==null?void 0:z.label),1)]}),_:2},1024)):(i(),E("span",re,N(F[t.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[K,D.value]]),d("div",pe,[l(j,{"current-page":o.page,"onUpdate:current-page":e[4]||(e[4]=t=>o.page=t),"page-size":o.size,"onUpdate:page-size":e[5]||(e[5]=t=>o.size=t),total:o.total,onCurrentChange:m,"page-sizes":[15,50,100],onSizeChange:P,layout:"sizes, prev, pager, next"},null,8,["current-page","page-size","total"]),d("div",de,[l(r,{type:"primary",onClick:U},{default:n(()=>[ce]),_:1})])])]),_:1},8,["modelValue"])}}});var Ce=J(_e,[["__scopeId","data-v-8abb15da"]]);export{Ce as default};