import{_ as M,d as W,x as w,bc as G,r as n,aD as H,o as v,c as b,l as o,aY as Y,D as l,F as B,E as Z,H as J,m as h,G as Q,M as r,L as s,a as X,bz as uu,h as ou,aZ as C}from"./index.js";import{h as eu}from"./index.31497729.js";const tu={class:"flex justify-end w-full mt-[10px]"},lu=W({__name:"batch",props:{platformType:{type:String,required:!0},customerNo:{type:null,required:!0},companyNo:{type:String,required:!0}},emits:["list"],setup(D,{emit:y}){const E=D,p=w(""),x=w(null),{run:A,data:d,loading:N}=G({isList:!0,success:a=>m.value.total=a.count}),T={page:1,size:100,total:0,pay_status:"1",status:[0],good_status:2},q=[{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),S=w([]),m=w({...T});function V(){if(!d.value||d.value.length===0){C.warning("\u81F3\u5C11\u6DFB\u52A0\u4E00\u6761\u901A\u7528\u8BA2\u5355");return}y("list",d.value),d.value=[]}const k=async a=>A(eu({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})),F=" ",g=`
`;function L(a=""){if(!a)return"";let t=a;const i=t.includes(F),_=t.includes(g);return i&&(t=t.split(F).join("")),_&&(t=t.split(g).join("")),t}async function z(){const a=L(p.value),t=a.replace(/[，。；、; .]/g,",").replace(/(^,*)|(,*$)/g,""),i=t.split(",");if(t.length===0||i.length===0){C.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),p.value=a;return}await k(i),p.value=""}const j=[{value:1,label:"\u5DF2\u56DE\u6B3E"},{value:-1,label:"\u65E0\u56DE\u6B3E\u9650\u5236"}];return(a,t)=>{const i=n("ElInput"),_=n("ElOption"),O=n("ElSelect"),P=n("ElCol"),e=n("ElTableColumn"),$=n("el-tag"),I=n("ElTag"),K=n("ElButton"),R=H("loading");return v(),b(B,null,[o(i,{rows:4,modelValue:p.value,"onUpdate:modelValue":t[0]||(t[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:Y(z,["enter"])},null,8,["modelValue","onKeydown"]),o(P,{span:4,style:{width:"100%"}},{default:l(()=>[o(O,{modelValue:f.value,"onUpdate:modelValue":t[1]||(t[1]=u=>f.value=u),size:"small",placeholder:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001"},{default:l(()=>[(v(),b(B,null,Z(j,({label:u,value:c})=>o(_,{label:u,value:c,key:c},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),J((v(),Q(h(uu),{ref_key:"tableRef",ref:x,border:"",size:"small",data:h(d),class:"mt-[10px]",onSelectionChange:t[2]||(t[2]=u=>S.value=u),"max-height":"500px"},{default:l(()=>[o(e,{label:"\u901A\u7528\u8BA2\u5355\u7F16\u53F7","min-width":"160",prop:"tyCode","show-overflow-tooltip":""}),o(e,{label:"\u786E\u8BA4\u5355\u7F16\u53F7","min-width":"160",prop:"orderCode","show-overflow-tooltip":""}),o(e,{label:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7","min-width":"160",prop:"cxCode","show-overflow-tooltip":""}),o(e,{label:"\u5546\u54C1\u7F16\u53F7","min-width":"160",prop:"goodNo","show-overflow-tooltip":""}),o(e,{label:"\u5546\u54C1\u540D\u79F0","min-width":"160",prop:"goodName","show-overflow-tooltip":""}),o(e,{label:"\u91C7\u8D2D\u5355\u72B6\u6001","min-width":"130","show-overflow-tooltip":""},{default:l(u=>[o($,null,{default:l(()=>{var c;return[r(s(((c=q.find(({value:U})=>U===u.row.cgd.cgd_status))==null?void 0:c.label)||"--"),1)]}),_:2},1024)]),_:1}),o(e,{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(e,{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(e,{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(e,{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(e,{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"100px","show-overflow-tooltip":""}),o(e,{label:"\u4E70\u5165\u65B9\u516C\u53F8","min-width":"160",prop:"customerName","show-overflow-tooltip":""}),o(e,{label:"\u5356\u51FA\u65B9\u516C\u53F8","min-width":"160",prop:"companyName","show-overflow-tooltip":""}),o(e,{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(e,{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}),X(` \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(e,{label:"\u5173\u8054\u5DF2\u56DE\u6B3E\u72B6\u6001",width:"110",prop:"pay_status","show-overflow-tooltip":""},{default:l(u=>[o(I,null,{default:l(()=>[r(s(String(u.row.status)==="-1"?"\u672A\u56DE\u6B3E":"\u5DF2\u56DE\u6B3E"),1)]),_:2},1024)]),_:1}),o(e,{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(e,{label:"\u4E0B\u5355\u65F6\u95F4",width:"100",prop:"addtime","show-overflow-tooltip":""})]),_:1},8,["data"])),[[R,h(N)]]),ou("div",tu,[o(K,{type:"primary",size:"small",onClick:V},{default:l(()=>[r("\u6DFB\u52A0")]),_:1})])],64)}}});var su=M(lu,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/currentcyOrderRecord/components/batch.vue"]]);export{su as default};
