sales-modal.984fa51b.js 6.2 KB

12345678910111213
  1. import{_ as $,d as ee,w as V,W as le,bv as ae,x as te,r as i,aC as oe,o as s,G as d,C as a,l as t,u,c as S,F as q,D as w,bw as E,a as D,b as B,M as m,H as ue,bn as se,L as z}from"./index.0bc83371.js";import{b as ne}from"./index.e48cc546.js";import{s as re}from"./configs.8033f554.js";import{x as P,b as A,s as ie,u as de}from"./status.d6b2a53d.js";import{D as pe}from"./date-range.96fed5ff.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:T,emit:L}){const v=V(!1),o=V({timer:[],sequenceNo:"",qrdtype:"",qrdsource:"",customer:"",platName:"",cxCode:"",platform_type:"1"}),{currentCompany:O}=le(),R=V(null),x=V([]),j={pageSize:15,currentPage:1,total:0},{loading:M,run:h,data:G,pagination:p}=ae({initalData:[],isList:!0,initalPagination:j}),H=f=>x.value=f,g=()=>{const{currentPage:f,pageSize:l}=p,{timer:n,..._}=o.value;h(ne({pay_status:"0",size:l,page:f,companyNo:O.value.companyNo,start:n[0],end:n[1],..._}))};function I(){L("save-click-button",u(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 W(){p.currentPage=1,g()}return T({onDisplay:f=>{v.value=!0,g()}}),te(()=>g()),(f,l)=>{const n=i("el-col"),_=i("el-input"),U=i("el-option"),F=i("el-select"),k=i("el-row"),J=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 s(),d(X,{"close-on-click-modal":!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(k,{gutter:10,style:{"margin-bottom":"10px"}},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(u(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(F,{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(()=>[(s(!0),S(q,null,w(u(P),e=>(s(),d(U,E({key:e.value},e),null,16))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(k,{gutter:10,style:{"margin-bottom":"10px"}},{default:a(()=>[t(n,{span:8},{default:a(()=>[t(F,{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(()=>[(s(!0),S(q,null,w(u(A),e=>(s(),d(U,E({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(k,{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(J,{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"]),D(` <el-select\r
  2. v-model="data.platform_type"\r
  3. size="small"\r
  4. placeholder="\u5E73\u53F0\u7C7B\u578B"\r
  5. style="width: 100%"\r
  6. >\r
  7. <el-option\r
  8. v-for="opt in useTypeOptions"\r
  9. :value="opt.value"\r
  10. :label="opt.label"\r
  11. :key="opt.value"\r
  12. />\r
  13. </el-select> `)]),_:1})]),_:1}),B("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})]),ue((s(),d(u(se),{data:u(G),onSelectionChange:H,ref_key:"tableRef",ref:R,border:"",size:"small","row-key":"sequenceNo","max-height":"520px"},{default:a(()=>[(s(!0),S(q,null,w(u(re),(e,Z)=>(s(),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:C})=>[e.field==="qrdType"?(s(),d(b,{key:0,size:"small"},{default:a(()=>{var r;return[m(z(((r=u(A).find(c=>c.value===C.qrdType))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):e.field==="qrdSource"?(s(),d(b,{key:1,size:"small"},{default:a(()=>{var r;return[m(z(((r=u(P).find(c=>c.value===C.qrdSource))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):e.field==="sendStatus"?(s(),d(b,{key:2},{default:a(()=>{var r;return[m(z((r=u(ie).find(c=>String(C.sendStatus)===c.value))==null?void 0:r.label),1)]}),_:2},1024)):D("v-if",!0),e.field==="platform_type"?(s(),d(b,{key:3,size:"small"},{default:a(()=>{var r;return[m(z(((r=u(de).find(c=>c.value===C.platform_type))==null?void 0:r.label)||"--"),1)]}),_:2},1024)):D("v-if",!0)]),_:2},1032,["prop","label","width","fixed","type"]))),128))]),_:1},8,["data"])),[[Y,u(M)]]),B("div",fe,[t(Q,{"current-page":u(p).currentPage,"onUpdate:currentPage":l[10]||(l[10]=e=>u(p).currentPage=e),"page-size":u(p).pageSize,"onUpdate:pageSize":l[11]||(l[11]=e=>u(p).pageSize=e),total:u(p).total,"page-sizes":[15,50,100],onSizeChange:W,layout:"sizes, prev, pager, next",onCurrentChange:g,size:"small"},null,8,["current-page","page-size","total"]),B("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 Ve=$(ce,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/basic-claim/sales-modal.vue"]]);export{Ve as default};