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