capital-modal.55dca938.js 3.2 KB

1
  1. import{_ as U,d as L,E as u,aI as R,a5 as I,a7 as M,x as d,aA as O,o as v,N as C,K as p,b as _,y as n,O as T,u as z,bj as j,c as H,M as q,L as K,W as x,bs as W}from"./index.743f0c80.js";import{h as G}from"./index.8212cab4.js";import{i as J}from"./configs.80dd5359.js";const Q={flex:"","mb-2":""},X={flex:"","flex-1":"",gap:"5",pr:"20px"},Y={flex:"",width:"120px"},Z=x("\u641C\u7D22"),$=x("\u91CD\u7F6E"),ee={flex:"","justify-between":"","mt-2":""},ae=x("\u786E\u5B9A"),te=L({__name:"capital-modal",emits:["on-add-order"],setup(oe,{expose:w,emit:h}){const b=u([]),f=u([]),o=u({invNo:"",inv_out:"",inv_company:""}),g=u(!1),c=u(!1),y=u(null),k=R(),{currentCompany:S}=I(),t=M({pageSize:10,currentPage:1,total:0});async function m(){const{pageSize:l,currentPage:e}=t;g.value=!0;const{code:s,message:i,data:r}=await G({status:"3",inv_out:S.value.companyNo,size:l,page:e,...o.value});k({code:s,message:i,handler:()=>{t.total=r.count,b.value=r.list}}),g.value=!1}function F(){c.value=!1,h("on-add-order",z(f.value[0]))}function D(l){if(l.length>1){const e=l.pop();y.value.clearSelection(),y.value.toggleRowSelection(e,!0),f.value=[e]}else f.value=[l[0]]}function N(){t.currentPage=1,m()}function V(l=!1){l&&(o.value={invNo:"",inv_out:"",inv_company:""}),t.currentPage=1,m()}return w({onDisplay:()=>c.value=!0}),(l,e)=>{const s=d("el-input"),i=d("el-button"),r=d("el-table-column"),P=d("el-pagination"),E=d("el-dialog"),A=O("loading");return v(),C(E,{modelValue:c.value,"onUpdate:modelValue":e[7]||(e[7]=a=>c.value=a),title:"\u53D1\u7968",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>m())},{default:p(()=>[_("div",Q,[_("div",X,[n(s,{placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7",size:"small",modelValue:o.value.invNo,"onUpdate:modelValue":e[0]||(e[0]=a=>o.value.invNo=a)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7",size:"small",modelValue:o.value.inv_out,"onUpdate:modelValue":e[1]||(e[1]=a=>o.value.inv_out=a)},null,8,["modelValue"]),n(s,{placeholder:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",size:"small",modelValue:o.value.inv_company,"onUpdate:modelValue":e[2]||(e[2]=a=>o.value.inv_company=a)},null,8,["modelValue"])]),_("div",Y,[n(i,{size:"small",type:"primary",onClick:e[3]||(e[3]=()=>V())},{default:p(()=>[Z]),_:1}),n(i,{size:"small",onClick:e[4]||(e[4]=()=>V(!0))},{default:p(()=>[$]),_:1})])]),T((v(),C(z(j),{border:"",ref_key:"tableRef",ref:y,data:b.value,size:"small","row-key":"id",onSelectionChange:D},{default:p(()=>[n(r,{type:"selection",width:"55"}),(v(!0),H(K,null,q(z(J),(a,B)=>(v(),C(r,W({key:B},a,{"show-overflow-tooltip":""}),null,16))),128))]),_:1},8,["data"])),[[A,g.value]]),_("div",ee,[n(P,{"current-page":t.currentPage,"onUpdate:current-page":e[5]||(e[5]=a=>t.currentPage=a),"page-size":t.pageSize,"onUpdate:page-size":e[6]||(e[6]=a=>t.pageSize=a),total:t.total,onCurrentChange:m,onSizeChange:N,layout:"sizes, prev, pager, next","page-sizes":[15,50,100]},null,8,["current-page","page-size","total"]),n(i,{type:"primary",size:"small",onClick:F},{default:p(()=>[ae]),_:1})])]),_:1},8,["modelValue"])}}});var se=U(te,[["__scopeId","data-v-6b3c49fd"],["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/returnTicket/components/create-return-ticket/capital-modal.vue"]]);export{se as default};