choose-modal.7e70a6.js 5.5 KB

1
  1. import{_ as X,d as Y,x as _,W as $,Z as ee,aO as le,r as u,aD as ae,o as s,G as c,D as t,l as a,m as d,cS as te,c as C,F as h,E as N,cT as oe,dO as R,M as y,H as ue,bz as ne,bJ as se,L as S,h as T,d6 as ie,aZ as re}from"./index.js";import{c as de}from"./_details.2f15a3c7.js";import{D as pe}from"./date-range.4010f801.js";import{i as me}from"./_options.4d41f791.js";const _e={key:2},ce={flex:""},ve={"w-full":"",flex:"","justify-end":"","mt-2":""},fe=Y({__name:"choose-modal",emits:["choose"],setup(ge,{expose:L,emit:M}){const V=_(!1),D=_([]),U=_([]),{currentCompany:P}=$(),i=ee({background:!0,total:0,size:15,page:1}),o=_({is_comon:"0",currentValue:"",inv_status:"0",supplierNo:"",tag_id:"",timer:[]}),w=_(!1),B=_("payNo"),H=le(),k=_(null);async function b(){const{size:n,page:e}=i;w.value=!0;const{currentValue:p,timer:m,...E}=o.value,{code:v,message:r,data:f}=await ie({status:"2",inv_status:"0",[B.value]:p,companyNo:P.value.companyNo,startTime:m[0],endTime:m[1],...E,page:e,size:n});H({code:v,message:r,handler:()=>{i.total=f.count,U.value=f.list}}),w.value=!1}function j(){const[n]=D.value;if(!n)return re.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");M("choose",d(n.payNo)),V.value=!1}function Z(n){if(n.length>1){const e=n.pop();k.value.clearSelection(),k.value.toggleRowSelection(e,!0),D.value=[e]}else D.value=[n[0]]}function q(){i.page=1,b()}function x(n){n&&(o.value={is_comon:"0",inv_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),i.page=1,b()}return L({onDisplay:()=>V.value=!0}),(n,e)=>{const p=u("el-option"),m=u("el-select"),E=u("el-input"),v=u("el-form-item"),r=u("el-col"),f=u("el-button"),G=u("el-row"),I=u("el-form"),A=u("el-table-column"),O=u("el-tag"),J=u("el-pagination"),K=u("el-dialog"),Q=ae("loading");return s(),c(K,{"close-on-click-modal":!1,modelValue:V.value,"onUpdate:modelValue":e[12]||(e[12]=l=>V.value=l),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[13]||(e[13]=()=>b())},{default:t(()=>[a(I,{size:"small"},{default:t(()=>[a(G,{gutter:8},{default:t(()=>[a(r,{span:8},{default:t(()=>[a(v,null,{default:t(()=>[a(E,{clearable:"",modelValue:o.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.currentValue=l),placeholder:"\u8BF7\u8F93\u5165"},{prepend:t(()=>[a(m,{modelValue:B.value,"onUpdate:modelValue":e[0]||(e[0]=l=>B.value=l),style:{width:"130px"}},{default:t(()=>[a(p,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(r,{span:8},{default:t(()=>[a(d(pe),{modelValue:o.value.timer,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.timer=l)},null,8,["modelValue"])]),_:1}),a(r,{span:8},{default:t(()=>[a(d(te),{modelValue:o.value.supplierNo,"onUpdate:modelValue":e[3]||(e[3]=l=>o.value.supplierNo=l),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),a(r,{span:6},{default:t(()=>[a(v,null,{default:t(()=>[a(m,{"w-80":"",modelValue:o.value.inv_status,"onUpdate:modelValue":e[4]||(e[4]=l=>o.value.inv_status=l),placeholder:"\u5F00\u7968\u72B6\u6001"},{default:t(()=>[a(p,{value:"0",label:"\u672A\u56DE\u7968\u6216\u90E8\u5206\u56DE\u7968"}),a(p,{value:"1",label:"\u672A\u56DE\u7968"}),a(p,{value:"2",label:"\u90E8\u5206\u56DE\u7968"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(r,{span:6},{default:t(()=>[a(v,null,{default:t(()=>[a(m,{"w-80":"",modelValue:o.value.tag_id,"onUpdate:modelValue":e[5]||(e[5]=l=>o.value.tag_id=l),placeholder:"\u6807\u7B7E\u72B6\u6001"},{default:t(()=>[(s(!0),C(h,null,N(d(oe),l=>(s(),c(p,{key:l.value,value:l.value,label:l.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(r,{span:6},{default:t(()=>[a(m,{modelValue:o.value.is_comon,"onUpdate:modelValue":e[6]||(e[6]=l=>o.value.is_comon=l),style:{width:"155px"},placeholder:"\u4E1A\u52A1\u7C7B\u578B",onChange:e[7]||(e[7]=()=>x(!1))},{default:t(()=>[(s(!0),C(h,null,N(d(R),l=>(s(),c(p,{label:l.label,value:l.value},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1}),a(r,{span:12},{default:t(()=>[a(v,null,{default:t(()=>[a(f,{type:"primary",onClick:e[8]||(e[8]=()=>x())},{default:t(()=>[y("\u641C\u7D22")]),_:1}),a(f,{onClick:e[9]||(e[9]=()=>x(!0))},{default:t(()=>[y("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),ue((s(),c(d(ne),{border:"",ref_key:"tableRef",ref:k,data:U.value,size:"small","row-key":"id",onSelectionChange:Z,"mb-2":"","max-height":"520px"},{default:t(()=>[a(A,{type:"selection",align:"center",width:"40",fixed:"left"}),(s(!0),C(h,null,N(d(de),(l,W)=>(s(),c(A,se({key:W},l,{"show-overflow-tooltip":""}),{default:t(({row:z})=>[l.prop==="inv_status"?(s(),c(O,{key:0},{default:t(()=>{var g;return[y(S((g=d(me).find(F=>F.value===String(z.inv_status)))==null?void 0:g.label),1)]}),_:2},1024)):l.prop==="is_comon"?(s(),c(O,{key:1},{default:t(()=>{var g;return[y(S((g=d(R).find(F=>F.value===z.is_comon))==null?void 0:g.label),1)]}),_:2},1024)):(s(),C("span",_e,S(z[l.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[Q,w.value]]),T("div",ce,[a(J,{"current-page":i.page,"onUpdate:currentPage":e[10]||(e[10]=l=>i.page=l),"page-size":i.size,"onUpdate:pageSize":e[11]||(e[11]=l=>i.size=l),total:i.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:b,onSizeChange:q},null,8,["current-page","page-size","total"]),T("div",ve,[a(f,{type:"primary",size:"small",onClick:j},{default:t(()=>[y("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var De=X(fe,[["__scopeId","data-v-525489b0"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchaseNew/invoiceRelation/components/choose-modal.vue"]]);export{De as default};