榕晟科技环境服务报价系统

专业环境服务解决方案

服务项目

请选择您需要的服务项目:

供应商信息

请填写以下供应商信息:

客户信息

请填写以下信息,以便我们为您提供准确的报价:

税率与折扣设置

%
%

报价汇总

预估总费用:
¥0.00

环境咨询服务报价单

联系人:${document.getElementById('supplier-contact').value || '张先生'} 联系电话:${document.getElementById('supplier-phone').value || '13888888888'}

客户信息

${document.getElementById('customer-info-table').outerHTML}

服务报价

${serviceInfoTable.outerHTML}
${document.querySelector('.quote-summary').innerHTML}
`; // 写入打印窗口 printWindow.document.open(); printWindow.document.write(quoteHTML); printWindow.document.close(); // 打印报价单 printWindow.print(); } // 导出Word报价单 function exportWord() { // 确保已经计算了价格 if (totalPriceElement.textContent === '¥0.00') { alert('请先计算报价'); return; } // 重新生成服务表格,确保背景颜色被正确应用 const serviceInfoTable = document.createElement('table'); serviceInfoTable.style.width = '100%'; serviceInfoTable.style.borderCollapse = 'collapse'; serviceInfoTable.style.fontSize = '0.95rem'; // 创建表头 const thead = document.createElement('thead'); thead.innerHTML = ` 服务项目 百分比 金额(元) `; serviceInfoTable.appendChild(thead); // 创建表体 const tbody = document.createElement('tbody'); // 服务背景颜色 const serviceColors = [ '#f8f9fa', // 环境影响评价 '#e3f2fd', // 竣工环保验收 '#e8f5e8', // 环境应急预案 '#fff3e0', // 排污许可申请 '#f3e5f5' // 其他服务 ]; let colorIndex = 0; // 环境影响评价 const service1Checkbox = document.getElementById('service1'); if (service1Checkbox.checked) { const eiaScale = document.getElementById('eia-scale'); const eiaScaleText = eiaScale.options[eiaScale.selectedIndex].text; const price = parseFloat(service1Checkbox.dataset.price); const currentColor = serviceColors[colorIndex++]; // 添加主服务行 const mainRow = document.createElement('tr'); mainRow.style.backgroundColor = currentColor; mainRow.innerHTML = ` 环境影响评价 ${eiaScaleText} ¥${price.toFixed(2)} `; tbody.appendChild(mainRow); // 添加分项报价 const eiaDetails = [ { name: '环评报告编制费', ratio: 0.5 }, { name: '环境现状监测费', ratio: 0.35 }, { name: '专家评审费', ratio: 0.05 }, { name: '差旅打印及其他', ratio: 0.1 } ]; eiaDetails.forEach(detail => { const detailRow = document.createElement('tr'); detailRow.style.fontSize = '0.9rem'; detailRow.style.color = '#666'; detailRow.innerHTML = ` - ${detail.name} ${(detail.ratio * 100).toFixed(0)}% ¥${(price * detail.ratio).toFixed(2)} `; tbody.appendChild(detailRow); }); } // 竣工环保验收 const service2Checkbox = document.getElementById('service2'); if (service2Checkbox.checked) { const acceptanceType = document.getElementById('acceptance-type'); const acceptanceTypeText = acceptanceType.options[acceptanceType.selectedIndex].text; const price = parseFloat(service2Checkbox.dataset.price); const currentColor = serviceColors[colorIndex++]; // 添加主服务行 const mainRow = document.createElement('tr'); mainRow.style.backgroundColor = currentColor; mainRow.innerHTML = ` 竣工环保验收 ${acceptanceTypeText} ¥${price.toFixed(2)} `; tbody.appendChild(mainRow); // 添加分项报价 const acceptanceDetails = [ { name: '验收报告编制费', ratio: 0.3 }, { name: '验收监测费', ratio: 0.5 }, { name: '专家评审费', ratio: 0.1 }, { name: '差旅打印及其他', ratio: 0.1 } ]; acceptanceDetails.forEach(detail => { const detailRow = document.createElement('tr'); detailRow.style.fontSize = '0.9rem'; detailRow.style.color = '#666'; detailRow.innerHTML = ` - ${detail.name} ${(detail.ratio * 100).toFixed(0)}% ¥${(price * detail.ratio).toFixed(2)} `; tbody.appendChild(detailRow); }); } // 环境应急预案 const service3Checkbox = document.getElementById('service3'); if (service3Checkbox.checked) { const emergencyType = document.getElementById('emergency-type'); const emergencyTypeText = emergencyType.options[emergencyType.selectedIndex].text; const price = parseFloat(service3Checkbox.dataset.price); const currentColor = serviceColors[colorIndex++]; // 添加主服务行 const mainRow = document.createElement('tr'); mainRow.style.backgroundColor = currentColor; mainRow.innerHTML = ` 环境应急预案 ${emergencyTypeText} ¥${price.toFixed(2)} `; tbody.appendChild(mainRow); // 添加分项报价 const emergencyDetails = [ { name: '风险评估报告编制费', ratio: 0.3 }, { name: '应急资源调查报告编制费', ratio: 0.1 }, { name: '应急预案编制费', ratio: 0.3 }, { name: '评审费', ratio: 0.2 }, { name: '差旅打印及其他', ratio: 0.1 } ]; emergencyDetails.forEach(detail => { const detailRow = document.createElement('tr'); detailRow.style.fontSize = '0.9rem'; detailRow.style.color = '#666'; detailRow.innerHTML = ` - ${detail.name} ${(detail.ratio * 100).toFixed(0)}% ¥${(price * detail.ratio).toFixed(2)} `; tbody.appendChild(detailRow); }); } // 排污许可申请 const service4Checkbox = document.getElementById('service4'); if (service4Checkbox.checked) { const permitType = document.getElementById('permit-type'); const permitTypeText = permitType.options[permitType.selectedIndex].text; const price = parseFloat(service4Checkbox.dataset.price); const currentColor = serviceColors[colorIndex++]; // 添加主服务行 const mainRow = document.createElement('tr'); mainRow.style.backgroundColor = currentColor; mainRow.innerHTML = ` 排污许可申请 ${permitTypeText} ¥${price.toFixed(2)} `; tbody.appendChild(mainRow); // 添加分项报价 const permitDetails = [ { name: '填报', ratio: 0.8 }, { name: '审核与修改', ratio: 0.2 } ]; permitDetails.forEach(detail => { const detailRow = document.createElement('tr'); detailRow.style.fontSize = '0.9rem'; detailRow.style.color = '#666'; detailRow.innerHTML = ` - ${detail.name} ${(detail.ratio * 100).toFixed(0)}% ¥${(price * detail.ratio).toFixed(2)} `; tbody.appendChild(detailRow); }); } // 其他服务 const service5Checkbox = document.getElementById('service5'); if (service5Checkbox.checked) { const customName = document.getElementById('custom-service-name').value || '其他服务'; const customDesc = document.getElementById('custom-service-desc').value || ''; const price = parseFloat(service5Checkbox.dataset.price); const currentColor = serviceColors[colorIndex++]; const row = document.createElement('tr'); row.style.backgroundColor = currentColor; row.innerHTML = ` ${customName} ${customDesc} ¥${price.toFixed(2)} `; tbody.appendChild(row); } serviceInfoTable.appendChild(tbody); // 创建Word文档内容 const wordContent = ` 环境服务报价单

环境咨询服务报价单

联系人:${document.getElementById('supplier-contact').value || '张先生'} 联系电话:${document.getElementById('supplier-phone').value || '13888888888'}

客户信息

${document.getElementById('customer-info-table').outerHTML}

服务报价

${serviceInfoTable.outerHTML}
${document.querySelector('.quote-summary').innerHTML}
`; // 创建Blob对象并下载 const blob = new Blob([wordContent], { type: 'application/msword' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `环境服务报价单_${new Date().toISOString().slice(0, 10)}.doc`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // 初始化系统 init();