choose-modal.f4d17a.js 5.6 KB

1234567891011121314151617181920212223242526
  1. import{_ as G,d as J,x as p,Z as W,aO as Q,W as X,r as u,aD as Y,o as r,G as f,D as o,l as t,m as i,a as y,M as _,H as $,bz as ee,c as S,F as le,E as oe,bJ as te,L as x,d5 as ae,de as ne,dO as ue,h as A,aZ as se}from"./index.js";import{c as re}from"./_details.cf1fada8.js";import{f as pe}from"./index.ff7eb665.js";import{D as T}from"./date-range.4010f801.js";const ie={key:3},ce={flex:""},me={"w-full":"",flex:"","justify-end":"","mt-2":""},de=J({__name:"choose-modal",emits:["choose"],setup(fe,{expose:O,emit:R}){const h=p(!1),E=p([]),B=p([]),n=W({total:0,size:15,page:1,background:!0}),c=p({apply_name:"",currentValue:"",supplierNo:"",checkApi:"",timer:[],openTimer:[]}),F=p(null),U=p("hpNo"),V=p(!1),L=Q(),{currentCompany:M}=X();async function C(){const{size:a,page:e}=n;V.value=!0;const{currentValue:v,timer:m,openTimer:D,...z}=c.value,{code:w,message:b,data:d}=await pe({status:"4",[U.value]:v,supplierNo:M.value.companyNo,open_start:D[0],open_end:D[1],start:m[0],end:m[1],...z,page:e,size:a});L({code:w,message:b,handler:()=>{n.total=d.count,E.value=d.list}}),V.value=!1}function P(){const[a]=B.value;if(!a)return se.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u53D1\u7968\u5173\u8054");R("choose",{hpNo:a.hpNo,InvCode:a.payNo}),h.value=!1}function H(a){if(a.length>1){const e=a.pop();F.value.clearSelection(),F.value.toggleRowSelection(e,!0),B.value=[e]}else B.value=[a[0]]}function I(){n.page=1,C()}function N(a){a&&(c.value={is_comon:"0",apply_name:"",currentValue:"",checkApi:"",openTimer:[],timer:[]}),n.page=1,C()}return O({onDisplay:()=>h.value=!0}),(a,e)=>{const v=u("el-col"),m=u("el-button"),D=u("el-form-item"),z=u("el-row"),w=u("el-form"),b=u("el-table-column"),d=u("el-tag"),j=u("el-pagination"),q=u("el-dialog"),K=Y("loading");return r(),f(q,{"close-on-click-modal":!1,modelValue:h.value,"onUpdate:modelValue":e[6]||(e[6]=l=>h.value=l),title:"\u4E70\u5165\u53D1\u7968\u5173\u8054\u7BA1\u7406",center:"",width:"1040px",onOpen:e[7]||(e[7]=()=>C())},{default:o(()=>[t(w,{size:"small"},{default:o(()=>[t(z,{gutter:10},{default:o(()=>[t(v,{span:8},{default:o(()=>[t(i(T),{prefix:"\u7533\u8BF7",modelValue:c.value.timer,"onUpdate:modelValue":e[0]||(e[0]=l=>c.value.timer=l)},null,8,["modelValue"])]),_:1}),t(v,{span:8},{default:o(()=>[t(i(T),{prefix:"\u5F00\u7968",modelValue:c.value.openTimer,"onUpdate:modelValue":e[1]||(e[1]=l=>c.value.openTimer=l)},null,8,["modelValue"])]),_:1}),y(` <el-col :span="8">\r
  2. <supplier-query v-model="formData.supplierNo" placeholder="\u5356\u51FA\u65B9\u516C\u53F8\u540D\u79F0" />\r
  3. </el-col> `),y(` <el-col :span="8">\r
  4. <el-form-item>\r
  5. <el-input clearable v-model="formData.currentValue" placeholder="\u5173\u952E\u5B57">\r
  6. <template #prepend>\r
  7. <el-select v-model="currentKey" style="width: 140px">\r
  8. <el-option label="\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7\u7F16\u7801" value="hpNo" />\r
  9. <el-option label="\u5BF9\u8D26\u7F16\u7801" value="payNo" />\r
  10. </el-select>\r
  11. </template>\r
  12. </el-input>\r
  13. </el-form-item>\r
  14. </el-col> `),y(` <el-col :span="6">\r
  15. <el-select style="width: 100%" v-model="formData.checkApi" placeholder="\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F">\r
  16. <el-option v-for="opt in checkTypeOptions" :key="opt.value" :value="opt.value" :label="opt.label" />\r
  17. </el-select>\r
  18. </el-col> `),y(` <el-col :span="4">\r
  19. <el-form-item>\r
  20. <el-input placeholder="\u7533\u8BF7\u4EBA" v-model="formData.apply_name" />\r
  21. </el-form-item>\r
  22. </el-col> `),y(` <el-col :span="6">\r
  23. <el-select v-model="formData.is_comon" style="width: 155px" placeholder="\u4E1A\u52A1\u7C7B\u578B" @change="() => handleSearch(false)">\r
  24. <el-option v-for="option in orderTypeCgOptions_2" :label="option.label" :value="option.value" />\r
  25. </el-select>\r
  26. </el-col> `),t(v,{span:4},{default:o(()=>[t(D,null,{default:o(()=>[t(m,{type:"primary",onClick:e[2]||(e[2]=()=>N())},{default:o(()=>[_("\u641C\u7D22")]),_:1}),t(m,{onClick:e[3]||(e[3]=()=>N(!0))},{default:o(()=>[_("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),$((r(),f(i(ee),{border:"",ref_key:"tableRef",ref:F,data:E.value,size:"small","row-key":"id",onSelectionChange:H,"mb-2":"","max-height":"520px"},{default:o(()=>[t(b,{type:"selection",width:"40",align:"center",fixed:"left"}),(r(!0),S(le,null,oe(i(re),(l,Z)=>(r(),f(b,te({key:Z},l,{"show-overflow-tooltip":""}),{default:o(({row:k})=>[l.prop==="pay_status"?(r(),f(d,{key:0,size:"small"},{default:o(()=>{var s;return[_(x((s=i(ae).find(g=>g.value===String(k.pay_status)))==null?void 0:s.label),1)]}),_:2},1024)):l.prop==="checkApi"?(r(),f(d,{key:1,size:"small"},{default:o(()=>{var s;return[_(x((s=i(ne).find(g=>g.value===String(k.checkApi)))==null?void 0:s.label),1)]}),_:2},1024)):l.prop==="is_comon"?(r(),f(d,{key:2},{default:o(()=>{var s;return[_(x((s=i(ue).find(g=>g.value===k.is_comon))==null?void 0:s.label),1)]}),_:2},1024)):(r(),S("span",ie,x(k[l.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[K,V.value]]),A("div",ce,[t(j,{"current-page":n.page,"onUpdate:currentPage":e[4]||(e[4]=l=>n.page=l),"page-size":n.size,"onUpdate:pageSize":e[5]||(e[5]=l=>n.size=l),total:n.total,onCurrentChange:C,"page-sizes":[15,50,100],onSizeChange:I,layout:"sizes, prev, pager, next"},null,8,["current-page","page-size","total"]),A("div",me,[t(m,{type:"primary",onClick:P},{default:o(()=>[_("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var he=G(de,[["__scopeId","data-v-231a3fab"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/unInvoiceRelation/components/choose-modal.vue"]]);export{he as default};