import{_ as H,d as I,n as w,cB as Y,p as $,r as n,aw as J,o as c,c as B,h as o,y as l,a as F,F as y,z as K,H as a,B as Q,i as E,A as W,G as s,cY as X,e as Z,cm as ee}from"./index.js";import{h as oe}from"./index.43fba9db.js";const te={class:"flex justify-between w-full mt-[10px]"},le=I({__name:"single",props:{platformType:{type:String,required:!0},customerNo:{type:null,required:!0},companyNo:{type:String,required:!0}},emits:["list"],setup(C,{expose:D,emit:S}){const x=S,f=C,g=w(null),A=[{value:"0",label:"\u5F85\u4E0E\u4F9B\u5E94\u5546\u786E\u8BA4"},{value:"1",label:"\u5F85\u5165\u5E93"},{value:"2",label:"\u90E8\u5206\u5165\u5E93"},{value:"3",label:"\u5165\u5E93\u5B8C\u6210"},{value:"4",label:"\u5DF2\u53D6\u6D88\u8BA2\u5355"}],{run:N,data:z,loading:T}=Y({isList:!0,success:p=>r.value.total=p.count}),_={page:1,size:15,total:0,good_status:2,status:[0]},m=w(1),v=w([]),r=w({..._});function k(){var p;if(v.value.length===0){ee.warning("\u8BF7\u9009\u62E9\u901A\u7528\u8BA2\u5355");return}x("list",v.value),(p=g.value)==null||p.clearSelection()}const i=()=>{N(oe({...r.value,platform_type:f.platformType,customerNo:f.customerNo,companyNo:f.companyNo,status:Number(m.value)===-1?[-1,...r.value.status]:r.value.status}))},q=[{value:1,label:"\u5DF2\u56DE\u6B3E"},{value:-1,label:"\u65E0\u56DE\u6B3E\u9650\u5236"}];return $(()=>i()),D({search:()=>i()}),(p,u)=>{const P=n("ElOption"),V=n("ElSelect"),b=n("ElCol"),h=n("el-button"),O=n("ElRow"),t=n("ElTableColumn"),L=n("el-tag"),R=n("ElTag"),j=n("ElPagination"),U=n("ElButton"),M=J("loading");return c(),B(y,null,[o(O,{class:"mb-[10px]"},{default:l(()=>[F(` <ElCol :span="4" style="margin-right: 10px">\r
      <ElSelect style="width:100%" :modelValue="String(params.status[0])" size="small" disabled>\r
        <ElOption v-for="{ label, value } in tyStatusOptions" :label="label" :value="value" :key="value" />\r
      </ElSelect>\r
    </ElCol> `),o(b,{span:4,style:{width:"100%"}},{default:l(()=>[o(V,{modelValue:m.value,"onUpdate:modelValue":u[0]||(u[0]=e=>m.value=e),size:"small",placeholder:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001"},{default:l(()=>[(c(),B(y,null,K(q,({label:e,value:d})=>o(P,{label:e,value:d,key:d},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),o(b,{span:19,class:"fr"},{default:l(()=>[o(h,{style:{float:"right"},size:"small",type:"primary",onClick:u[1]||(u[1]=()=>{i()})},{default:l(()=>u[6]||(u[6]=[a("\u641C\u7D22")])),_:1}),o(h,{style:{float:"right","margin-right":"10px"},size:"small",onClick:u[2]||(u[2]=()=>{r.value=_,m.value=1,i()})},{default:l(()=>u[7]||(u[7]=[a("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1}),Q((c(),W(E(X),{ref_key:"tableRef",ref:g,border:"",size:"small",data:E(z),class:"mt-[10px]",onSelectionChange:u[3]||(u[3]=e=>v.value=e)},{default:l(()=>[o(t,{type:"selection",fixed:"left"}),o(t,{label:"\u901A\u7528\u8BA2\u5355\u7F16\u53F7","min-width":"160",prop:"tyCode","show-overflow-tooltip":""}),o(t,{label:"\u786E\u8BA4\u5355\u7F16\u53F7","min-width":"160",prop:"orderCode","show-overflow-tooltip":""}),o(t,{label:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7","min-width":"160",prop:"cxCode","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u7F16\u53F7","min-width":"160",prop:"goodNo","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u540D\u79F0","min-width":"160",prop:"goodName","show-overflow-tooltip":""}),o(t,{label:"\u91C7\u8D2D\u5355\u72B6\u6001","min-width":"130","show-overflow-tooltip":""},{default:l(e=>[o(L,null,{default:l(()=>{var d;return[a(s(((d=A.find(({value:G})=>G===e.row.cgd.cgd_status))==null?void 0:d.label)||"--"),1)]}),_:2},1024)]),_:1}),o(t,{label:"\u7C7B\u76EE\u7F16\u7801","min-width":"130","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.good?e.row.good.inv_cat_code:""),1)]),_:1}),o(t,{label:"\u8D27\u7269\u548C\u52B3\u52A1\u540D\u79F0","min-width":"130","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.good?e.row.good.inv_cat_name:""),1)]),_:1}),o(t,{label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0","min-width":"160","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.good?e.row.good.inv_good_name:""),1)]),_:1}),o(t,{label:"\u5F00\u7968\u7A0E\u7387","min-width":"80","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.good?e.row.good.inv_tax:""),1)]),_:1}),o(t,{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"100px","show-overflow-tooltip":""}),o(t,{label:"\u4E70\u5165\u65B9\u516C\u53F8","min-width":"160",prop:"customerName","show-overflow-tooltip":""}),o(t,{label:"\u5356\u51FA\u65B9\u516C\u53F8","min-width":"160",prop:"companyName","show-overflow-tooltip":""}),o(t,{label:"\u4E0B\u5355\u6570\u91CF",width:"80",prop:"goodNum","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.qrd?e.row.qrd.goodNum:""),1)]),_:1}),o(t,{label:"\u9500\u552E\u5355\u4EF7",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.qrd?e.row.qrd.goodPrice:""),1)]),_:1}),o(t,{label:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001",width:"110",prop:"pay_status","show-overflow-tooltip":""},{default:l(e=>[o(R,null,{default:l(()=>[a(s(String(e.row.status)==="-1"?"\u672A\u56DE\u6B3E":"\u5DF2\u56DE\u6B3E"),1)]),_:2},1024)]),_:1}),F(` <ElTableColumn label="\u5BF9\u8D26\u72B6\u6001" width="80" prop="status" show-overflow-tooltip>\r
\r
      <template #default="scope">\r
        <ElTag>\r
          {{ tyStatusOptions.find(c => c.value == scope.row.status)?.label || '--' }}\r
        </ElTag>\r
      </template>\r
    </ElTableColumn> `),o(t,{label:"\u7A0E\u7387",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:l(e=>[a(s(e.row.qrd?`${e.row.qrd.tax}%`:""),1)]),_:1}),o(t,{label:"\u4E0B\u5355\u65F6\u95F4",width:"100",prop:"addtime","show-overflow-tooltip":""})]),_:1},8,["data"])),[[M,E(T)]]),Z("div",te,[o(j,{currentPage:r.value.page,"onUpdate:currentPage":u[4]||(u[4]=e=>r.value.page=e),pageSize:r.value.size,"onUpdate:pageSize":u[5]||(u[5]=e=>r.value.size=e),layout:"total,prev, pager, next, jumper",total:r.value.total,background:!0,small:!0,onSizeChange:i,onCurrentChange:i},null,8,["currentPage","pageSize","total"]),o(U,{type:"primary",size:"small",onClick:k},{default:l(()=>u[8]||(u[8]=[a("\u6DFB\u52A0")])),_:1})])],64)}}});var re=H(le,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/currentcyOrderRecord/components/single.vue"]]);export{re as default};
