import{_ as G,d as H,n as w,cB as M,r as n,aw as Y,o as _,c as F,h as o,cl as J,y as l,F as g,z as Q,B as X,i as h,A as Z,H as r,G as s,a as uu,cY as ou,e as eu,cm as B}from"./index.js";import{h as tu}from"./index.43fba9db.js";const lu={class:"flex justify-end w-full mt-[10px]"},b=" ",C=`
`,au=H({__name:"batch",props:{platformType:{type:String,required:!0},customerNo:{type:null,required:!0},companyNo:{type:String,required:!0}},emits:["list"],setup(y,{emit:D}){const A=D,E=y,p=w(""),x=w(null),{run:N,data:d,loading:T}=M({isList:!0,success:a=>m.value.total=a.count}),q={page:1,size:100,total:0,pay_status:"1",status:[0],good_status:2},S=[{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"}],f=w(1),V=w([]),m=w({...q});function k(){if(!d.value||d.value.length===0){B.warning("\u81F3\u5C11\u6DFB\u52A0\u4E00\u6761\u901A\u7528\u8BA2\u5355");return}A("list",d.value),d.value=[]}const z=async a=>N(tu({orderCode:a,...m.value,platform_type:E.platformType,customerNo:E.customerNo,companyNo:E.companyNo,status:Number(f.value)===-1?[-1,...m.value.status]:m.value.status}));function L(a=""){if(!a)return"";let e=a;const i=e.includes(b),v=e.includes(C);return i&&(e=e.split(b).join("")),v&&(e=e.split(C).join("")),e}async function j(){const a=L(p.value),e=a.replace(/[，。；、; .]/g,",").replace(/(^,*)|(,*$)/g,""),i=e.split(",");if(e.length===0||i.length===0){B.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),p.value=a;return}await z(i),p.value=""}const O=[{value:1,label:"\u5DF2\u56DE\u6B3E"},{value:-1,label:"\u65E0\u56DE\u6B3E\u9650\u5236"}];return(a,e)=>{const i=n("ElInput"),v=n("ElOption"),P=n("ElSelect"),$=n("ElCol"),t=n("ElTableColumn"),I=n("el-tag"),R=n("ElTag"),K=n("ElButton"),U=Y("loading");return _(),F(g,null,[o(i,{rows:4,modelValue:p.value,"onUpdate:modelValue":e[0]||(e[0]=u=>p.value=u),style:{"margin-bottom":"10px"},placeholder:"\u9500\u552E\u5355\u7F16\u7801(\u5C0F\u4E8E100\u6761)\uFF0C\u7CFB\u7EDF\u652F\u6301\u7684\u5206\u5272\u7B26\u4E3A\u9017\u53F7(,)\u3001\u53E5\u53F7(.)\u3001\u5206\u53F7(;)\u3001\u987F\u53F7(\u3001)\uFF0C\u56DE\u8F66\u540E\u5F00\u59CB\u89E3\u6790\u3002",type:"textarea",onKeydown:J(j,["enter"])},null,8,["modelValue"]),o($,{span:4,style:{width:"100%"}},{default:l(()=>[o(P,{modelValue:f.value,"onUpdate:modelValue":e[1]||(e[1]=u=>f.value=u),size:"small",placeholder:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001"},{default:l(()=>[(_(),F(g,null,Q(O,({label:u,value:c})=>o(v,{label:u,value:c,key:c},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),X((_(),Z(h(ou),{ref_key:"tableRef",ref:x,border:"",size:"small",data:h(d),class:"mt-[10px]",onSelectionChange:e[2]||(e[2]=u=>V.value=u),"max-height":"500px"},{default:l(()=>[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(u=>[o(I,null,{default:l(()=>{var c;return[r(s(((c=S.find(({value:W})=>W===u.row.cgd.cgd_status))==null?void 0:c.label)||"--"),1)]}),_:2},1024)]),_:1}),o(t,{label:"\u7C7B\u76EE\u7F16\u7801","min-width":"130","show-overflow-tooltip":""},{default:l(u=>[r(s(u.row.good?u.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(u=>[r(s(u.row.good?u.row.good.inv_cat_name:""),1)]),_:1}),o(t,{label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0","min-width":"160","show-overflow-tooltip":""},{default:l(u=>[r(s(u.row.good?u.row.good.inv_good_name:""),1)]),_:1}),o(t,{label:"\u5F00\u7968\u7A0E\u7387","min-width":"80","show-overflow-tooltip":""},{default:l(u=>[r(s(u.row.good?u.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(u=>[r(s(u.row.qrd?u.row.qrd.goodNum:""),1)]),_:1}),o(t,{label:"\u9500\u552E\u5355\u4EF7",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:l(u=>[r(s(u.row.qrd?u.row.qrd.goodPrice:""),1)]),_:1}),uu(` \r
    <ElTableColumn label="\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001" width="110" prop="pay_status" show-overflow-tooltip>\r
      <template #default="scope">\r
        <ElTag>\r
          {{ retrun_status.find(c => c.value == scope.row.qrd.pay_status)?.label || '--' }}\r
        </ElTag>\r
      </template>\r
    </ElTableColumn> \r
    `),o(t,{label:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001",width:"110",prop:"pay_status","show-overflow-tooltip":""},{default:l(u=>[o(R,null,{default:l(()=>[r(s(String(u.row.status)==="-1"?"\u672A\u56DE\u6B3E":"\u5DF2\u56DE\u6B3E"),1)]),_:2},1024)]),_:1}),o(t,{label:"\u7A0E\u7387",width:"80",prop:"goodPrice","show-overflow-tooltip":""},{default:l(u=>[r(s(u.row.qrd?`${u.row.qrd.tax}%`:""),1)]),_:1}),o(t,{label:"\u4E0B\u5355\u65F6\u95F4",width:"100",prop:"addtime","show-overflow-tooltip":""})]),_:1},8,["data"])),[[U,h(T)]]),eu("div",lu,[o(K,{type:"primary",size:"small",onClick:k},{default:l(()=>e[3]||(e[3]=[r("\u6DFB\u52A0")])),_:1})])],64)}}});var nu=G(au,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/currentcyOrderRecord/components/batch.vue"]]);export{nu as default};
