index.73b69e.js 6.2 KB

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