index.2de90ed3.js 5.5 KB

1
  1. import{al as R,aS as T,_ as z,d as j,n as I,w as A,ah as U,aL as V,r as f,o as C,G as F,C as p,l as L,u as n,M as x,a as E,aY as M}from"./index.56c69f5a.js";import{u as d,w}from"./xlsx.ed122d16.js";import{a as q}from"./index.1e0c26b5.js";import{x as g,b as y,h as N}from"./status.2df4810d.js";import{a as G}from"./columnRenderHelper.6c05b86e.js";import{t as H}from"./template.f1513dc2.js";import{u as W}from"./use-page-search.27df6d7f.js";const m=[{value:0,label:"\u672A\u5BF9\u8D26",type:"warning"},{value:1,label:"\u5DF2\u5BF9\u8D26",type:"success"}],Y=[{prop:"TrackCode",width:"150px",label:"\u53D1\u8D27\u8FD0\u5355\u7F16\u53F7"},{prop:"outChildCode",width:"150px",label:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7"},{prop:"TODO",width:"150px",label:"\u53D1\u8D27\u5355\u7F16\u53F7",cellRenderer({row:u}){return u.fhdChild.outCode}},{prop:"orderCode",width:"150px",label:"\u9500\u552E\u8BA2\u5355\u7F16\u53F7"},{prop:"cgdNo",width:"150px",label:"\u91C7\u8D2D\u5355\u7F16\u53F7"},{prop:"status",width:"90px",label:"\u72B6\u6001",cellRenderer({row:u}){var t;return R(T,{type:((t=m.find(({value:o})=>Number(o)===Number(u.status)))==null?void 0:t.type)||"info",size:"small"},{default:()=>{var o;return((o=m.find(({value:_})=>Number(_)===Number(u.status)))==null?void 0:o.label)||"--"}})}},{"min-width":"80px",label:"\u4F9B\u5E94\u5546\u7AEF",...G(N,"has_account")},{width:"80px",label:"\u8BA2\u5355\u6765\u6E90",cellRenderer({row:u}){var t;return((t=g.find(({value:o})=>o===u.fhdChild.order_source))==null?void 0:t.label)||"--"}},{width:"80px",label:"\u5546\u54C1\u7C7B\u578B",cellRenderer({row:u}){var t;return((t=y.find(({value:o})=>o===u.fhdChild.order_type))==null?void 0:t.label)||"--"}},{width:"120px",label:"\u5546\u54C1\u540D\u79F0",cellRenderer({row:u}){return u.fhdChild.good_name}},{width:"120px",label:"\u7269\u6D41\u4F9B\u5E94\u5546",cellRenderer({row:u}){return u.fhdChild.supplierName}},{width:"120px",label:"\u4E1A\u52A1\u516C\u53F8",cellRenderer({row:u}){return u.fhdChild.companyName}},{width:"100px",label:"\u7269\u6D41\u8D39\u7528",prop:"post_fee"},{prop:"apply_name",width:"80px",label:"\u521B\u5EFA\u4EBA"},{prop:"create_time",width:"120px",label:"\u521B\u5EFA\u65F6\u95F4"}],J={columns:Y,companyProp:"supplierNo",apis:{httpList:q}},k={formItems:[{field:"status",type:"select",placeholder:"\u72B6\u6001",options:m},{field:"order_source",type:"select",placeholder:"\u8BA2\u5355\u6765\u6E90",options:g},{field:"create_time",type:"date_picker",otherOptions:{type:"daterange",startProp:"create_start",endProp:"create_end",startPlaceholder:"\u521B\u5EFA\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u521B\u5EFA\u7ED3\u675F\u65F6\u95F4"}},{type:"select",field:"order_type",placeholder:"\u5546\u54C1\u7C7B\u578B",options:y},{field:"companyNo",type:"business-query",placeholder:"\u4E1A\u52A1\u516C\u53F8"}]},K=j({__name:"index",setup(u){const t="supSendOrder",{push:o}=I(),_=A(null),D=A([]),v={pageSearchHook:()=>W(void 0,void 0,k)},{isSuperUser:P}=U(),{hasPermissionWithCode:b}=V(t);function S(){const a=d.book_new(),r=d.json_to_sheet([H]);d.book_append_sheet(a,r,"sheet"),w(a,"\u53D1\u8D27\u8FD0\u5355\u6A21\u677F.xlsx",{bookType:"xlsx"})}function O(){var i,h,c,s;if(D.value.length===0){M.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u53D1\u8D27\u8FD0\u5355");return}const a=[];for(const e of D.value)a.push({\u53D1\u8D27\u8FD0\u5355\u7F16\u53F7:e.TrackCode,\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7:e.outChildCode,\u53D1\u8D27\u5355\u7F16\u53F7:e.fhdChild?e.fhdChild.outCode:"--",\u9500\u552E\u8BA2\u5355\u7F16\u53F7:e.orderCode,\u91C7\u8D2D\u5355\u7F16\u53F7:e.cgdNo,\u72B6\u6001:((i=m.find(({value:l})=>Number(l)===Number(e.status)))==null?void 0:i.label)||"--",\u4F9B\u5E94\u5546\u65AD:((h=N.find(({value:l})=>Number(l)===Number(e.has_account)))==null?void 0:h.label)||"--",\u8BA2\u5355\u6765\u6E90:((c=g.find(({value:l})=>String(l)===String(e.fhdChild?e.fhdChild.order_source:"")))==null?void 0:c.label)||"--",\u5546\u54C1\u7C7B\u578B:((s=y.find(({value:l})=>String(l)===String(e.fhdChild?e.fhdChild.order_type:"")))==null?void 0:s.label)||"--",\u5546\u54C1\u7F16\u53F7:e.fhdChild?e.fhdChild.spuCode:"--",\u5546\u54C1\u540D\u79F0:e.fhdChild?e.fhdChild.good_name:"--",\u7269\u6D41\u4F9B\u5E94\u5546\u7F16\u53F7:e.fhdChild?e.fhdChild.supplierNo:"--",\u7269\u6D41\u4F9B\u5E94\u5546\u540D\u79F0:e.fhdChild?e.fhdChild.supplierName:"--",\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7:e.fhdChild?e.fhdChild.companyNo:"--",\u4E1A\u52A1\u516C\u53F8\u540D\u79F0:e.fhdChild?e.fhdChild.companyName:"--",\u7269\u6D41\u8D39\u7528:e.post_fee,\u521B\u5EFA\u4EBA:e.apply_name,\u521B\u5EFA\u65F6\u95F4:e.create_time});const r=d.book_new(),B=d.json_to_sheet(a);d.book_append_sheet(r,B,"sheet"),w(r,"\u53D1\u8D27\u8FD0\u5355.xlsx",{bookType:"xlsx"})}return(a,r)=>{const B=f("ElButton"),i=f("el-button"),h=f("PageContainer"),c=f("PageAuth");return C(),F(c,{pageName:t},{default:p(()=>[L(h,{hooks:v,contentConfig:n(J),searchConfig:n(k),"get-content-ref":s=>_.value=s,onContentSelectChange:r[1]||(r[1]=s=>D.value=s)},{content_header:p(()=>[n(b)("048")?(C(),F(B,{key:0,type:"primary",onClick:O,size:"small"},{default:p(()=>[x("\u5BFC\u51FA")]),_:1})):E("v-if",!0),n(b)("051")?(C(),F(i,{key:1,type:"primary",size:"small",onClick:S},{default:p(()=>[x("\u4E0B\u8F7D\u6A21\u677F")]),_:1})):E("v-if",!0),n(b)("050")&&!n(P)?(C(),F(i,{key:2,size:"small",onClick:r[0]||(r[0]=()=>n(o)("/postSupplierOrder/batchImportSendOrder"))},{default:p(()=>[x("\u6279\u91CF\u5BFC\u5165")]),_:1})):E("v-if",!0)]),_:1},8,["contentConfig","searchConfig","get-content-ref"])]),_:1})}}});var oe=z(K,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supplierOrder/sendOrder/index.vue"]]);export{oe as default};