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