1 |
- import{am as j,aR as M,cs as U,bS as E,bT as x,ct as S,_ as V,d as G,p as H,x as A,bG as q,aM as J,ai as L,r as h,aD as W,H as Z,m as r,o as c,G as C,D as a,l as w,M as B,a as D,J as $,bd as K,aZ as Q}from"./index.js";import{u as i,w as v}from"./xlsx.ed122d16.js";import{a as X,b as Y}from"./index.b3c071be.js";import{t as ee}from"./template.1fabfb8e.js";const b=[{value:0,label:"\u672A\u5BF9\u8D26",type:"warning"},{value:1,label:"\u5DF2\u5BF9\u8D26",type:"success"}],ue=[{width:40,type:"selection",align:"center",fixed:"left"},{prop:"TrackCode",width:"150px",label:"\u53D1\u8D27\u8FD0\u5355\u7F16\u53F7"},{prop:"outChildCode",width:"150px",label:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7"},{width:"150px",label:"\u53D1\u8D27\u5355\u7F16\u53F7",cellRenderer({row:u}){return u.fhdChild?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 o;return j(M,{type:((o=b.find(({value:l})=>Number(l)===Number(u.status)))==null?void 0:o.type)||"info",size:"small"},{default:()=>{var l;return((l=b.find(({value:p})=>Number(p)===Number(u.status)))==null?void 0:l.label)||"--"}})}},{"min-width":"80px",label:"\u4F9B\u5E94\u5546\u7AEF",...U(S,"has_account")},{width:"80px",label:"\u8BA2\u5355\u6765\u6E90",cellRenderer({row:u}){var o;return((o=E.find(({value:l})=>String(l)===String(u.fhdChild?u.fhdChild.order_source:"")))==null?void 0:o.label)||"--"}},{width:"80px",label:"\u5546\u54C1\u7C7B\u578B",cellRenderer({row:u}){var o;return((o=x.find(({value:l})=>String(l)===String(u.fhdChild?u.fhdChild.order_type:"")))==null?void 0:o.label)||"--"}},{width:"120px",label:"\u5546\u54C1\u540D\u79F0",cellRenderer({row:u}){return u.fhdChild?u.fhdChild.good_name:"--"}},{width:"120px",label:"\u7269\u6D41\u4F9B\u5E94\u5546",prop:"supplierName"},{width:"120px",label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName"},{width:"90px",label:"\u5546\u54C1\u6570\u91CF",cellRenderer({row:u}){return u.fhdChild?u.fhdChild.num:"--"}},{width:"100px",label:"\u7269\u6D41\u8D39\u7528",prop:"post_fee"},{prop:"remark",width:"120px",label:"\u5907\u6CE8"},{prop:"apply_name",width:"80px",label:"\u521B\u5EFA\u4EBA"},{prop:"create_time",width:"120px",label:"\u521B\u5EFA\u65F6\u95F4"},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:50}],te={columns:ue,apis:{httpList:X}},N={formItems:[{type:"input",field:"outChildCode",placeholder:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7"},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:b},{field:"order_source",type:"select",placeholder:"\u8BA2\u5355\u6765\u6E90",options:E},{field:"post_supplier_code",type:"supplier-query",placeholder:"\u7269\u6D41\u4F9B\u5E94\u5546\u516C\u53F8"},{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:x}]},oe=G({__name:"index",setup(u){const o="sendOrder",{push:l}=H(),p=A([]),y=A(null),{run:P,loading:R}=q({success:()=>y.value.onSearch()}),O={pageSearchHook:()=>K(void 0,void 0,N)},{hasPermissionWithCode:f}=J(o),{isSuperUser:k}=L();function T(){const s=i.book_new(),n=i.json_to_sheet([ee]);i.book_append_sheet(s,n,"sheet"),v(s,"\u53D1\u8D27\u8FD0\u5355\u6A21\u677F.xlsx",{bookType:"xlsx"})}function z(){var d,F,m,_;if(p.value.length===0){Q.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u53D1\u8D27\u8FD0\u5355");return}const s=[];for(const e of p.value)s.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:((d=b.find(({value:t})=>Number(t)===Number(e.status)))==null?void 0:d.label)||"--",\u4F9B\u5E94\u5546\u7AEF:((F=S.find(({value:t})=>Number(t)===Number(e.has_account)))==null?void 0:F.label)||"--",\u8BA2\u5355\u6765\u6E90:((m=E.find(({value:t})=>String(t)===String(e.fhdChild?e.fhdChild.order_source:"")))==null?void 0:m.label)||"--",\u5546\u54C1\u7C7B\u578B:((_=x.find(({value:t})=>String(t)===String(e.fhdChild?e.fhdChild.order_type:"")))==null?void 0:_.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:"--",\u5546\u54C1\u6570\u91CF:e.fhdChild?e.fhdChild.num:"--",\u7269\u6D41\u8D39\u7528:e.post_fee,\u521B\u5EFA\u4EBA:e.apply_name,\u521B\u5EFA\u65F6\u95F4:e.create_time,\u5907\u6CE8:e.remark});const n=i.book_new(),g=i.json_to_sheet(s);i.book_append_sheet(n,g,"sheet"),v(n,"\u53D1\u8D27\u8FD0\u5355.xlsx",{bookType:"xlsx"})}const I=async({id:s})=>P(Y({id:s}));return(s,n)=>{const g=h("ElButton"),d=h("el-button"),F=h("ElPopconfirm"),m=h("PageContainer"),_=h("PageAuth"),e=W("loading");return Z((c(),C(_,{pageName:o},{default:a(()=>[w(m,{hooks:O,contentConfig:r(te),searchConfig:r(N),"get-content-ref":t=>y.value=t,onContentSelectChange:n[1]||(n[1]=t=>p.value=t)},{content_header:a(()=>[r(f)("048")?(c(),C(g,{key:0,type:"primary",onClick:z,size:"small"},{default:a(()=>[B("\u5BFC\u51FA")]),_:1})):D("v-if",!0),r(f)("051")?(c(),C(d,{key:1,type:"primary",size:"small",onClick:T},{default:a(()=>[B("\u4E0B\u8F7D\u6A21\u677F")]),_:1})):D("v-if",!0),r(f)("050")&&!r(k)?(c(),C(d,{key:2,size:"small",onClick:n[0]||(n[0]=()=>r(l)("/postSupplierOrder/batchImportSendOrder"))},{default:a(()=>[B("\u6279\u91CF\u5BFC\u5165")]),_:1})):D("v-if",!0)]),content_action:a(t=>[r(f)("006")&&Number(t.status)===0&&!r(k)?(c(),C(F,{key:0,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onConfirm:re=>I(t)},{reference:a(()=>[w(d,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:r($)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):D("v-if",!0)]),_:1},8,["contentConfig","searchConfig","get-content-ref"])]),_:1})),[[e,r(R)]])}}});var de=V(oe,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/postSupplierOrder/sendOrder/index.vue"]]);export{de as default};
|