data-8d6dc406.js
6.78 KB
var m=(r,e,t)=>new Promise((d,i)=>{var a=o=>{try{n(t.next(o))}catch(c){i(c)}},s=o=>{try{n(t.throw(o))}catch(c){i(c)}},n=o=>o.done?d(o.value):Promise.resolve(o.value).then(a,s);n((t=t.apply(r,e)).next())});import{k as l,f as b}from"./vue-5a35c3f5.js";import{u as f,al as w}from"./index.js";import{u as F,q as I}from"./order-eff5d778.js";import{u as C}from"./order-007d1b19.js";import{bb as S}from"./antd-6b087f69.js";import"./message-c4c6f446.js";const T=f();l([]);const u=l([]),g=F(),{customerCode:k,productionDepartment:U}=C(g),E=[{field:"customerCode",label:"客户编码",component:"Select",colProps:{span:8},componentProps:{options:k,showSearch:!0,mode:"multiple"}},{field:"projectNo",label:"项目号",component:"Select",colProps:{span:8},componentProps:{options:u,showSearch:!0,mode:"multiple",onSearch:r=>m(void 0,null,function*(){u.value=yield I("projectNo",r)})}}],z=[{title:"客户编码",dataIndex:"customerCode",width:150},{title:"项目号",dataIndex:"projectNoPrefix",width:100},{title:"客户总金额¥",width:150,dataIndex:"customerTotalPrice",customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.customerRmbTotalPrice)==null?void 0:t.toFixed(2)}},{title:"客户总金额$",width:150,dataIndex:"customerTotalPrice",customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.customerTotalPrice)==null?void 0:t.toFixed(2)}},{title:"生产科总价合计价¥",dataIndex:"productionDepartmentTotalPrice",width:160,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.productionDepartmentTotalPrice)==null?void 0:t.toFixed(2)}},{title:"包装费用合计¥",dataIndex:"packetTotalPrice",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.packetTotalPrice)==null?void 0:t.toFixed(2)}},{title:"包装费用合计$",dataIndex:"packetTotalPrice",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.packetTotalPrice)==null?void 0:t.toFixed(2)}},{title:"研发复制费合计¥",dataIndex:"developmentCopyRmbTotalPrice",width:160,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.developmentCopyRmbTotalPrice)==null?void 0:t.toFixed(2)}},{title:"固定成本¥",dataIndex:"fixedCost",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.fixedCost)==null?void 0:t.toFixed(2)}},{title:"西班牙提成¥",dataIndex:"spainRmbCommission",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.spainRmbCommission)==null?void 0:t.toFixed(2)}},{title:"已发提成¥",dataIndex:"spainPaidRmbCommission",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.spainPaidRmbCommission)==null?void 0:t.toFixed(2)}},{title:"未发提成¥",dataIndex:"spainUnpaidRmbCommission",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.spainUnpaidRmbCommission)==null?void 0:t.toFixed(2)}},{title:"中国团队提成¥",dataIndex:"rmbCommission",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.rmbCommission)==null?void 0:t.toFixed(2)}},{title:"已发提成¥",dataIndex:"paidRmbCommission",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.paidRmbCommission)==null?void 0:t.toFixed(2)}},{title:"未发提成¥",dataIndex:"unpaidRmbCommission",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.unpaidRmbCommission)==null?void 0:t.toFixed(2)}},{title:"支出合计¥",dataIndex:"rmbTotalExpense",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.rmbTotalExpense)==null?void 0:t.toFixed(2)}},{title:"毛利润¥",dataIndex:"profit",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.profit)==null?void 0:t.toFixed(2)}},{title:"毛利率",dataIndex:"profitRate",width:120,customRender:r=>{var e,t,d,i,a;return(e=r.record)!=null&&e.profitRate?((d=(t=r.record)==null?void 0:t.profitRate)==null?void 0:d.toFixed(2))+"%":(a=(i=r.record)==null?void 0:i.profitRate)==null?void 0:a.toFixed(2)}},{title:"研发贸易净利润¥",dataIndex:"developmentProfit",width:160,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.developmentProfit)==null?void 0:t.toFixed(2)}},{title:"净利润率",dataIndex:"developmentProfitRate",width:120,customRender:r=>{var e,t,d,i,a;return(e=r.record)!=null&&e.developmentProfitRate?((d=(t=r.record)==null?void 0:t.developmentProfitRate)==null?void 0:d.toFixed(2))+"%":(a=(i=r.record)==null?void 0:i.developmentProfitRate)==null?void 0:a.toFixed(2)}},{title:"包装费用合计¥",dataIndex:"packetRmbTotalPrice",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.packetRmbTotalPrice)==null?void 0:t.toFixed(2)}},{title:"包装费用实际金额¥",dataIndex:"packetActualRmbTotalPrice",width:160,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.packetActualRmbTotalPrice)==null?void 0:t.toFixed(2)}},{title:"订单总数量",dataIndex:"orderCount",width:120,customRender:r=>{var e;return(e=r.record)==null?void 0:e.orderCount}},{title:"实际跟单单价¥",dataIndex:"actualOrderRmbPrice",width:160,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.actualOrderRmbPrice)==null?void 0:t.toFixed(2)}},{title:"实际跟单单价折算美金¥",dataIndex:"actualOrderPrice",width:190,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.actualOrderPrice)==null?void 0:t.toFixed(2)}},{title:"包装费用收益¥",dataIndex:"packetProfitRmbPrice",width:150,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.packetProfitRmbPrice)==null?void 0:t.toFixed(2)}},{title:"实际汇率¥",dataIndex:"actualExchangeRate",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.actualExchangeRate)==null?void 0:t.toFixed(2)}},{title:"汇率收益¥",dataIndex:"exchangeRateProfit",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.exchangeRateProfit)==null?void 0:t.toFixed(2)}},{title:"综合收益¥",dataIndex:"comprehensiveProfit",width:120,customRender:r=>{var e,t;return(t=(e=r.record)==null?void 0:e.comprehensiveProfit)==null?void 0:t.toFixed(2)}},{title:"文件",dataIndex:"fileUrl",width:120,customRender:r=>{const e=()=>{const t=T.getToken;w.post("/basic-api/project/businessProfit/export",{},{params:{projectNoPrefix:r.record.projectNoPrefix},headers:{Authorization:`${t}`},responseType:"blob"}).then(d=>{const i=new Blob([d.data],{type:"application/zip"}),s=(()=>{const o=new Date,c=o.getFullYear(),p=String(o.getMonth()+1).padStart(2,"0"),x=String(o.getDate()).padStart(2,"0"),R=String(o.getHours()).padStart(2,"0"),h=String(o.getMinutes()).padStart(2,"0"),P=String(o.getSeconds()).padStart(2,"0");return`${c}-${p}-${x} ${R}:${h}:${P}`})(),n=document.createElement("a");n.href=window.URL.createObjectURL(i),n.download=`${s}.xlsx`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}).catch(d=>{console.error(d)})};return b(S,{style:"font-size:25px",onClick:()=>e()},null)}}];export{z as COLUMNS,E as searchFormSchema};