import{_ as $,d as ee,x as V,W as le,bG as ae,y as te,r as i,aD as oe,o as u,G as d,D as a,l as t,m as s,c as k,F as q,E as D,bS as F,bJ as P,bT as T,a as B,h as w,M as m,H as se,bz as ue,L as C,b3 as ne,bP as re}from"./index.js";import{b as ie}from"./index.56c49c99.js";import{s as de}from"./configs.34665744.js";import{D as pe}from"./date-range.019e953f.js";const me={flex:"","gap-2":"","justify-end":"","mb-1":""},fe={flex:"","justify-between":"","mt-2":""},ce=ee({__name:"sales-modal",emits:["save-click-button"],setup(_e,{expose:A,emit:L}){const v=V(!1),o=V({timer:[],sequenceNo:"",qrdtype:"",qrdsource:"",customer:"",platName:"",cxCode:"",platform_type:"1",is_comon:"0"}),{currentCompany:O}=le(),R=V(null),x=V([]),h={pageSize:15,currentPage:1,total:0},{loading:j,run:M,data:G,pagination:p}=ae({initalData:[],isList:!0,initalPagination:h}),H=f=>x.value=f,g=()=>{const{currentPage:f,pageSize:l}=p,{timer:n,..._}=o.value;M(ie({pay_status:"0",size:l,page:f,companyNo:O.value.companyNo,start:n[0],end:n[1],status:"3",..._}))};function I(){L("save-click-button",s(x)),v.value=!1}const N=f=>{p.currentPage=1,f&&(o.value={timer:[],sequenceNo:"",qrdtype:"",qrdsource:"",customer:"",platName:"",cxCode:"",platform_type:"1"}),g()};function J(){p.currentPage=1,g()}return A({onDisplay:f=>{v.value=!0,g()}}),te(()=>g()),(f,l)=>{const n=i("el-col"),_=i("el-input"),U=i("el-option"),E=i("el-select"),S=i("el-row"),W=i("el-switch"),y=i("el-button"),b=i("el-tag"),K=i("el-table-column"),Q=i("el-pagination"),X=i("el-dialog"),Y=oe("loading");return u(),d(X,{"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:v.value,"onUpdate:modelValue":l[13]||(l[13]=e=>v.value=e),title:"\u9500\u552E\u8BA2\u5355",width:"1040px",onClose:l[14]||(l[14]=()=>x.value=[]),center:""},{default:a(()=>[t(S,{gutter:10,style:{"margin-bottom":"10px"}},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(s(pe),{size:"small",modelValue:o.value.timer,"onUpdate:modelValue":l[0]||(l[0]=e=>o.value.timer=e)},null,8,["modelValue"])]),_:1}),t(n,{span:8},{default:a(()=>[t(_,{modelValue:o.value.sequenceNo,"onUpdate:modelValue":l[1]||(l[1]=e=>o.value.sequenceNo=e),placeholder:"\u8BA2\u5355\u7F16\u7801",size:"small"},null,8,["modelValue"])]),_:1}),t(n,{span:8},{default:a(()=>[t(E,{class:"w-full",size:"small",clearable:"",modelValue:o.value.qrdsource,"onUpdate:modelValue":l[2]||(l[2]=e=>o.value.qrdsource=e),placeholder:"\u8BA2\u5355\u6765\u6E90"},{default:a(()=>[(u(!0),k(q,null,D(s(F),e=>(u(),d(U,P({key:e.value},e),null,16))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(S,{gutter:10,style:{"margin-bottom":"10px"}},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(E,{class:"w-full",size:"small",clearable:"",modelValue:o.value.qrdtype,"onUpdate:modelValue":l[3]||(l[3]=e=>o.value.qrdtype=e),placeholder:"\u5546\u54C1\u7C7B\u578B"},{default:a(()=>[(u(!0),k(q,null,D(s(T),e=>(u(),d(U,P({key:e.value},e),null,16))),128))]),_:1},8,["modelValue"])]),_:1}),t(n,{span:8},{default:a(()=>[t(_,{placeholder:"\u5BA2\u6237\u540D\u79F0",size:"small",modelValue:o.value.customer,"onUpdate:modelValue":l[4]||(l[4]=e=>o.value.customer=e)},null,8,["modelValue"])]),_:1}),t(n,{span:8},{default:a(()=>[t(_,{placeholder:"\u5E73\u53F0\u540D\u79F0",size:"small",modelValue:o.value.platName,"onUpdate:modelValue":l[5]||(l[5]=e=>o.value.platName=e)},null,8,["modelValue"])]),_:1})]),_:1}),t(S,{gutter:10},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(_,{placeholder:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u7801",size:"small",modelValue:o.value.cxCode,"onUpdate:modelValue":l[6]||(l[6]=e=>o.value.cxCode=e)},null,8,["modelValue"])]),_:1}),t(n,{span:8},{default:a(()=>[t(W,{modelValue:o.value.platform_type,"onUpdate:modelValue":l[7]||(l[7]=e=>o.value.platform_type=e),size:"small","active-text":"toC","inactive-text":"toB","active-value":"2","inactive-value":"1"},null,8,["modelValue"]),B(` <el-select\r
          v-model="data.platform_type"\r
          size="small"\r
          placeholder="\u5E73\u53F0\u7C7B\u578B"\r
          style="width: 100%"\r
        >\r
          <el-option\r
            v-for="opt in useTypeOptions"\r
            :value="opt.value"\r
            :label="opt.label"\r
            :key="opt.value"\r
          />\r
        </el-select> `)]),_:1})]),_:1}),w("div",me,[t(y,{size:"small",type:"primary",onClick:l[8]||(l[8]=()=>N())},{default:a(()=>[m("\u641C\u7D22")]),_:1}),t(y,{size:"small",onClick:l[9]||(l[9]=()=>N(!0))},{default:a(()=>[m("\u91CD\u7F6E")]),_:1})]),se((u(),d(s(ue),{data:s(G),onSelectionChange:H,ref_key:"tableRef",ref:R,border:"",size:"small","row-key":"sequenceNo","max-height":"520px"},{default:a(()=>[(u(!0),k(q,null,D(s(de),(e,Z)=>(u(),d(K,{prop:e.field,label:e.label,key:Z,width:e.width+"px",fixed:e.fixed,type:e.type,"show-overflow-tooltip":""},{default:a(({row:z})=>[e.field==="qrdType"?(u(),d(b,{key:0,size:"small"},{default:a(()=>{var r;return[m(C(((r=s(T).find(c=>c.value===z.qrdType))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):e.field==="qrdSource"?(u(),d(b,{key:1,size:"small"},{default:a(()=>{var r;return[m(C(((r=s(F).find(c=>c.value===z.qrdSource))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):e.field==="sendStatus"?(u(),d(b,{key:2},{default:a(()=>{var r;return[m(C((r=s(ne).find(c=>String(z.sendStatus)===c.value))==null?void 0:r.label),1)]}),_:2},1024)):B("v-if",!0),e.field==="platform_type"?(u(),d(b,{key:3,size:"small"},{default:a(()=>{var r;return[m(C(((r=s(re).find(c=>c.value===z.platform_type))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):B("v-if",!0)]),_:2},1032,["prop","label","width","fixed","type"]))),128))]),_:1},8,["data"])),[[Y,s(j)]]),w("div",fe,[t(Q,{"current-page":s(p).currentPage,"onUpdate:currentPage":l[10]||(l[10]=e=>s(p).currentPage=e),"page-size":s(p).pageSize,"onUpdate:pageSize":l[11]||(l[11]=e=>s(p).pageSize=e),total:s(p).total,"page-sizes":[15,50,100],onSizeChange:J,layout:"sizes, prev, pager, next",onCurrentChange:g,size:"small"},null,8,["current-page","page-size","total"]),w("div",null,[t(y,{type:"primary",onClick:I,size:"small"},{default:a(()=>[m("\u4FDD\u5B58")]),_:1}),t(y,{onClick:l[12]||(l[12]=()=>v.value=!1),size:"small"},{default:a(()=>[m("\u53D6\u6D88")]),_:1})])])]),_:1},8,["modelValue"])}}});var ze=$(ce,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/capitalClaim/components/basic-claim/sales-modal.vue"]]);export{ze as default};
