1 |
- import{af as I,ce as j,dS as V,dT as P,dg as y,dh as x,_ as H,d as U,k as q,n as A,d3 as L,ab as M,c9 as W,r as h,o as c,A as C,y as d,h as k,i as n,H as B,a as D,D as $,cC as G,cm as J}from"./index.js";import{u as i,w}from"./xlsx.ed122d16.js";import{a as K,b as Q}from"./index.508e122e.js";import{t as X}from"./template.140ed259.js";const b=[{value:0,label:"\u672A\u5BF9\u8D26",type:"warning"},{value:1,label:"\u5DF2\u5BF9\u8D26",type:"success"}],Y=[{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 r;return I(j,{type:((r=b.find(({value:o})=>Number(o)===Number(u.status)))==null?void 0:r.type)||"info",size:"small"},{default:()=>{var o;return((o=b.find(({value:p})=>Number(p)===Number(u.status)))==null?void 0:o.label)||"--"}})}},{"min-width":"80px",label:"\u4F9B\u5E94\u5546\u7AEF",...V(P,"has_account")},{width:"80px",label:"\u8BA2\u5355\u6765\u6E90",cellRenderer({row:u}){var r;return((r=y.find(({value:o})=>o===u.fhdChild.order_source))==null?void 0:r.label)||"--"}},{width:"80px",label:"\u5546\u54C1\u7C7B\u578B",cellRenderer({row:u}){var r;return((r=x.find(({value:o})=>o===u.fhdChild.order_type))==null?void 0:r.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}],Z={columns:Y,companyProp:"supplierNo",apis:{httpList:K}},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: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:x},{field:"companyNo",type:"business-query",placeholder:"\u4E1A\u52A1\u516C\u53F8"}]},v="supSendOrder",ee=U({__name:"index",setup(u){const{push:r}=q(),o=A(null),p=A([]),S={pageSearchHook:()=>G(void 0,void 0,N)},{run:R,loading:ue}=L({success:()=>o.value.onSearch()}),{isSuperUser:g}=M(),{hasPermissionWithCode:f}=W(v);function O(){const l=i.book_new(),t=i.json_to_sheet([X]);i.book_append_sheet(l,t,"sheet"),w(l,"\u53D1\u8D27\u8FD0\u5355\u6A21\u677F.xlsx",{bookType:"xlsx"})}function T(){var a,F,m,_;if(p.value.length===0){J.warning("\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761\u53D1\u8D27\u8FD0\u5355");return}const l=[];for(const e of p.value)l.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:((a=b.find(({value:s})=>Number(s)===Number(e.status)))==null?void 0:a.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:((_=x.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 t=i.book_new(),E=i.json_to_sheet(l);i.book_append_sheet(t,E,"sheet"),w(t,"\u53D1\u8D27\u8FD0\u5355.xlsx",{bookType:"xlsx"})}const z=async({id:l})=>R(Q({id:l}));return(l,t)=>{const E=h("ElButton"),a=h("el-button"),F=h("ElPopconfirm"),m=h("PageContainer"),_=h("PageAuth");return c(),C(_,{pageName:v},{default:d(()=>[k(m,{hooks:S,contentConfig:n(Z),searchConfig:n(N),"get-content-ref":e=>o.value=e,onContentSelectChange:t[1]||(t[1]=e=>p.value=e)},{content_header:d(()=>[n(f)("048")?(c(),C(E,{key:0,type:"primary",onClick:T,size:"small"},{default:d(()=>t[2]||(t[2]=[B("\u5BFC\u51FA")])),_:1})):D("v-if",!0),n(f)("051")?(c(),C(a,{key:1,type:"primary",size:"small",onClick:O},{default:d(()=>t[3]||(t[3]=[B("\u4E0B\u8F7D\u6A21\u677F")])),_:1})):D("v-if",!0),n(f)("050")&&!n(g)?(c(),C(a,{key:2,size:"small",onClick:t[0]||(t[0]=()=>n(r)("/postSupplierOrder/batchImportSendOrder"))},{default:d(()=>t[4]||(t[4]=[B("\u6279\u91CF\u5BFC\u5165")])),_:1})):D("v-if",!0)]),content_action:d(e=>[n(f)("006")&&Number(e.status)===0&&!n(g)?(c(),C(F,{key:0,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onConfirm:s=>z(e)},{reference:d(()=>[k(a,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:n($)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):D("v-if",!0)]),_:1},8,["contentConfig","searchConfig","get-content-ref"])]),_:1})}}});var le=H(ee,[["__file","D:/work/jiesuan/settle-vue3/src/views/supplierOrder/sendOrder/index.vue"]]);export{le as default};
|