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