batch.04a77d.js 4.8 KB

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