结算导出修改
This commit is contained in:
parent
d4cd5e7382
commit
1fccf4e792
|
|
@ -70,7 +70,7 @@
|
||||||
<div class="tabelAllTopFour">
|
<div class="tabelAllTopFour">
|
||||||
<div class="costTopOne">说明</div>
|
<div class="costTopOne">说明</div>
|
||||||
<div class="costRightTwo">
|
<div class="costRightTwo">
|
||||||
{{ '本协议一式三份,甲方一份,乙方一份,经双方签字后生效。' }}
|
{{ '本协议一式两份,甲方一份,乙方一份,经双方签字后生效。' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelAllTopFour">
|
<div class="tabelAllTopFour">
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@
|
||||||
<td>{{ item.endTime }}</td>
|
<td>{{ item.endTime }}</td>
|
||||||
<td v-if="item.leaseDays">{{ Number(item.leaseDays).toFixed(2) }}</td>
|
<td v-if="item.leaseDays">{{ Number(item.leaseDays).toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
<td>{{ item.costs ? item.costs.toFixed(3) : '0' }}</td>
|
<td>{{ item.costs ? item.costs.toFixed(2) : '0' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -214,8 +214,7 @@
|
||||||
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
||||||
>
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">费用小计:</td>
|
<td style="text-align: center">费用小计: {{ leaseCost }}</td>
|
||||||
<td colspan="9" style="text-align: center">{{ leaseCost }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -323,7 +322,7 @@
|
||||||
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
<td>{{ item.partType }}</td>
|
<td>{{ item.partType }}</td>
|
||||||
<td v-if="item.costs">{{ item.costs.toFixed(3) }}</td>
|
<td v-if="item.costs">{{ item.costs.toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -338,8 +337,7 @@
|
||||||
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
||||||
>
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">费用小计:</td>
|
<td style="text-align: center">费用小计: {{ repairCost }}</td>
|
||||||
<td colspan="6" style="text-align: center">{{ repairCost }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -403,16 +401,18 @@
|
||||||
<col style="width: 180px;">
|
<col style="width: 180px;">
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
|
<col style="width: 120px;">
|
||||||
<col style="width: 140px;">
|
<col style="width: 140px;">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">丢失费用明细</th>
|
<th colspan="7">丢失费用明细</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>规格型号</th>
|
<th>规格型号</th>
|
||||||
<th>计量单位</th>
|
<th>计量单位</th>
|
||||||
|
<th>扣款单价</th>
|
||||||
<th>丢失数量</th>
|
<th>丢失数量</th>
|
||||||
<th>丢失费用(元)</th>
|
<th>丢失费用(元)</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -421,13 +421,14 @@
|
||||||
|
|
||||||
<!-- 滚动数据区域 -->
|
<!-- 滚动数据区域 -->
|
||||||
<div class="table-body">
|
<div class="table-body">
|
||||||
<table border="1" cellspacing="0" cellpadding="6" class="data-table">
|
<table border="1" cellspacing="0" cellpadding="7" class="data-table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 80px;">
|
<col style="width: 80px;">
|
||||||
<col style="width: 180px;">
|
<col style="width: 180px;">
|
||||||
<col style="width: 180px;">
|
<col style="width: 180px;">
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
<col style="width: 120px;">
|
<col style="width: 120px;">
|
||||||
|
<col style="width: 120px;">
|
||||||
<col style="width: 140px;">
|
<col style="width: 140px;">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr v-for="(item, index) in loseList" :key="index">
|
<tr v-for="(item, index) in loseList" :key="index">
|
||||||
|
|
@ -435,9 +436,11 @@
|
||||||
<td>{{ item.typeName }}</td>
|
<td>{{ item.typeName }}</td>
|
||||||
<td>{{ item.modelName }}</td>
|
<td>{{ item.modelName }}</td>
|
||||||
<td>{{ item.mtUnitName }}</td>
|
<td>{{ item.mtUnitName }}</td>
|
||||||
|
<td v-if="item.buyPrice">{{ item.buyPrice.toFixed(2) }}</td>
|
||||||
|
<td v-else></td>
|
||||||
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
<td v-if="item.costs">{{ item.costs.toFixed(3) }}</td>
|
<td v-if="item.costs">{{ item.costs.toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -452,8 +455,7 @@
|
||||||
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
||||||
>
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">费用小计:</td>
|
<td style="text-align: center">费用小计: {{ loseCost }}</td>
|
||||||
<td colspan="5" style="text-align: center">{{ loseCost }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -523,10 +525,11 @@
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
|
<col style="width: 100px;">
|
||||||
<col style="width: 140px;">
|
<col style="width: 140px;">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="7">报废费用明细</th>
|
<th colspan="8">报废费用明细</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
|
|
@ -534,6 +537,7 @@
|
||||||
<th>规格型号</th>
|
<th>规格型号</th>
|
||||||
<th>计量单位</th>
|
<th>计量单位</th>
|
||||||
<th>报废数量</th>
|
<th>报废数量</th>
|
||||||
|
<th>扣款单价</th>
|
||||||
<th>是否收费</th>
|
<th>是否收费</th>
|
||||||
<th>报废费用(元)</th>
|
<th>报废费用(元)</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -550,6 +554,7 @@
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
<col style="width: 100px;">
|
<col style="width: 100px;">
|
||||||
|
<col style="width: 100px;">
|
||||||
<col style="width: 140px;">
|
<col style="width: 140px;">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr v-for="(item, index) in scrapList" :key="index">
|
<tr v-for="(item, index) in scrapList" :key="index">
|
||||||
|
|
@ -559,6 +564,8 @@
|
||||||
<td>{{ item.mtUnitName }}</td>
|
<td>{{ item.mtUnitName }}</td>
|
||||||
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
<td v-if="item.num">{{ item.num.toFixed(2) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
|
<td v-if="item.buyPrice">{{ item.buyPrice.toFixed(2) }}</td>
|
||||||
|
<td v-else></td>
|
||||||
<td>{{ item.partType }}</td>
|
<td>{{ item.partType }}</td>
|
||||||
<td v-if="item.costs">{{ item.costs.toFixed(3) }}</td>
|
<td v-if="item.costs">{{ item.costs.toFixed(3) }}</td>
|
||||||
<td v-else></td>
|
<td v-else></td>
|
||||||
|
|
@ -575,8 +582,7 @@
|
||||||
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
||||||
>
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">费用小计:</td>
|
<td style="text-align: center">费用小计: {{ scrapCost }}</td>
|
||||||
<td colspan="6" style="text-align: center">{{ scrapCost }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -736,12 +742,10 @@
|
||||||
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
style="width: 100%; border-collapse: collapse; text-align: center; margin-top: -1px;"
|
||||||
>
|
>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">费用小计:</td>
|
<td style="text-align: center">费用小计: {{ reducCost }}</td>
|
||||||
<td colspan="10" style="text-align: center">{{ reducCost }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center">合计:</td>
|
<td style="text-align: center">合计: {{ costAll.toFixed(2) }}</td>
|
||||||
<td colspan="10" style="text-align: center">{{ costAll.toFixed(2) }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 协议单弹窗 -->
|
<!-- 协议书弹窗 -->
|
||||||
<el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
|
<el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
|
||||||
<div id="checkId">
|
<div id="checkId">
|
||||||
<div style="height: 600px; overflow-y: scroll">
|
<div style="height: 600px; overflow-y: scroll">
|
||||||
|
|
@ -200,7 +200,7 @@
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 20%">说明:</div>
|
<div class="columnLabel" style="width: 20%">说明:</div>
|
||||||
<div class="columnContent" style="width: 80%">
|
<div class="columnContent" style="width: 80%">
|
||||||
本协议一式三份,甲方一份,乙方一份,经双方签字后生效。
|
本协议一式两份,甲方一份,乙方一份,经双方签字后生效。
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn" style="border: 1px solid #9c9c9c">
|
<div class="tabelColumn" style="border: 1px solid #9c9c9c">
|
||||||
|
|
@ -235,6 +235,7 @@
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="print">打 印</el-button>
|
<el-button type="primary" @click="print">打 印</el-button>
|
||||||
|
<el-button type="success" @click="handleExportAgreement">导 出</el-button>
|
||||||
<el-button @click="openPrint = false">关 闭</el-button>
|
<el-button @click="openPrint = false">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -322,6 +323,7 @@ import vueEasyPrint from 'vue-easy-print'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import printJS from 'print-js'
|
import printJS from 'print-js'
|
||||||
|
import ExcelJS from 'exceljs'
|
||||||
export default {
|
export default {
|
||||||
name: 'ApplyHome',
|
name: 'ApplyHome',
|
||||||
dicts: ['cost_status'],
|
dicts: ['cost_status'],
|
||||||
|
|
@ -616,6 +618,176 @@ export default {
|
||||||
this.$refs.remarksPrintRef.print()
|
this.$refs.remarksPrintRef.print()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 导出协议书
|
||||||
|
async handleExportAgreement() {
|
||||||
|
try {
|
||||||
|
const workbook = new ExcelJS.Workbook()
|
||||||
|
const worksheet = workbook.addWorksheet('协议书')
|
||||||
|
|
||||||
|
// 设置列宽
|
||||||
|
worksheet.columns = [
|
||||||
|
{ header: '', key: 'col1', width: 30 },
|
||||||
|
{ header: '', key: 'col2', width: 30 },
|
||||||
|
{ header: '', key: 'col3', width: 20 },
|
||||||
|
{ header: '', key: 'col4', width: 30 }
|
||||||
|
]
|
||||||
|
|
||||||
|
// 定义边框样式
|
||||||
|
const borderStyle = {
|
||||||
|
top: { style: 'thin', color: { argb: 'FF000000' } },
|
||||||
|
bottom: { style: 'thin', color: { argb: 'FF000000' } },
|
||||||
|
left: { style: 'thin', color: { argb: 'FF000000' } },
|
||||||
|
right: { style: 'thin', color: { argb: 'FF000000' } }
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标题 - 跨行展示
|
||||||
|
const titleRow = worksheet.addRow(['机具设备有偿使用费结算协议书', '', '', ''])
|
||||||
|
titleRow.height = 30
|
||||||
|
// 先合并单元格
|
||||||
|
worksheet.mergeCells('A1:D1')
|
||||||
|
// 然后设置合并后的单元格样式
|
||||||
|
const titleCell = worksheet.getCell('A1')
|
||||||
|
titleCell.value = '机具设备有偿使用费结算协议书'
|
||||||
|
titleCell.font = { bold: true, size: 16 }
|
||||||
|
titleCell.alignment = { horizontal: 'center', vertical: 'center' }
|
||||||
|
titleCell.border = borderStyle
|
||||||
|
// 为其他单元格也设置边框
|
||||||
|
titleRow.getCell(2).border = borderStyle
|
||||||
|
titleRow.getCell(3).border = borderStyle
|
||||||
|
titleRow.getCell(4).border = borderStyle
|
||||||
|
|
||||||
|
// 协议号行 - 单独一行
|
||||||
|
const agreementCode = this.agreementContent.agreementCode || ''
|
||||||
|
const agreementRow = worksheet.addRow(['协议号:', agreementCode, '', ''])
|
||||||
|
agreementRow.getCell(1).alignment = { horizontal: 'right', vertical: 'center' }
|
||||||
|
agreementRow.getCell(2).alignment = { horizontal: 'left', vertical: 'center' }
|
||||||
|
agreementRow.getCell(3).alignment = { horizontal: 'center', vertical: 'center' }
|
||||||
|
agreementRow.getCell(4).alignment = { horizontal: 'center', vertical: 'center' }
|
||||||
|
agreementRow.height = 25
|
||||||
|
agreementRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
// 工程名称
|
||||||
|
const projectName = this.agreementContent.projectName || ''
|
||||||
|
const projectRow = worksheet.addRow(['工程名称:', projectName, '', ''])
|
||||||
|
projectRow.getCell(1).alignment = { horizontal: 'right', vertical: 'center' }
|
||||||
|
projectRow.getCell(2).alignment = { horizontal: 'left', vertical: 'center' }
|
||||||
|
projectRow.height = 25
|
||||||
|
projectRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
worksheet.mergeCells('B3:D3')
|
||||||
|
worksheet.mergeCells('B4:D4')
|
||||||
|
|
||||||
|
// 承租单位和日期
|
||||||
|
const unitName = this.agreementContent.unitName || ''
|
||||||
|
const applyDate = this.agreementContent.applyTime || this.newData || ''
|
||||||
|
const unitRow = worksheet.addRow(['承租单位:', unitName, '日期:', applyDate])
|
||||||
|
unitRow.getCell(1).alignment = { horizontal: 'right', vertical: 'center' }
|
||||||
|
unitRow.getCell(2).alignment = { horizontal: 'left', vertical: 'center' }
|
||||||
|
unitRow.getCell(3).alignment = { horizontal: 'right', vertical: 'center' }
|
||||||
|
unitRow.getCell(4).alignment = { horizontal: 'left', vertical: 'center' }
|
||||||
|
unitRow.height = 25
|
||||||
|
unitRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
// 结算项目及金额
|
||||||
|
const headerRow = worksheet.addRow(['结算项目及金额(元)'])
|
||||||
|
headerRow.font = { bold: true }
|
||||||
|
headerRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
// 费用项目
|
||||||
|
const leaseCost = this.agreementContent.leaseCost ? Number(this.agreementContent.leaseCost).toFixed(2) : '0.00'
|
||||||
|
const leaseRow = worksheet.addRow(['一、施工机具有偿使用费:', leaseCost, '', ''])
|
||||||
|
leaseRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
leaseRow.getCell(2).alignment = { horizontal: 'right' }
|
||||||
|
leaseRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
const repairCost = this.agreementContent.repairCost ? Number(this.agreementContent.repairCost).toFixed(2) : '0.00'
|
||||||
|
const repairRow = worksheet.addRow(['二、施工机具维修费:', repairCost, '', ''])
|
||||||
|
repairRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
repairRow.getCell(2).alignment = { horizontal: 'right' }
|
||||||
|
repairRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
const loseCost = this.agreementContent.loseCost ? Number(this.agreementContent.loseCost).toFixed(2) : '0.00'
|
||||||
|
const loseRow = worksheet.addRow(['三、施工机具丢失费:', loseCost, '', ''])
|
||||||
|
loseRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
loseRow.getCell(2).alignment = { horizontal: 'right' }
|
||||||
|
loseRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
const scrapCost = this.agreementContent.scrapCost ? Number(this.agreementContent.scrapCost).toFixed(2) : '0.00'
|
||||||
|
const scrapRow = worksheet.addRow(['四、施工机具损坏赔偿费:', scrapCost, '', ''])
|
||||||
|
scrapRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
scrapRow.getCell(2).alignment = { horizontal: 'right' }
|
||||||
|
scrapRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
const reductionCost = this.agreementContent.reductionCost ? Number(this.agreementContent.reductionCost).toFixed(2) : '0.00'
|
||||||
|
const reductionRow = worksheet.addRow(['五、施工机具租赁减免费:', reductionCost, '', ''])
|
||||||
|
reductionRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
reductionRow.getCell(2).alignment = { horizontal: 'right' }
|
||||||
|
reductionRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
// 合计
|
||||||
|
const costAllUpper = this.agreementContent.costAllUpper || ''
|
||||||
|
const costAll = this.agreementContent.costAll ? Number(this.agreementContent.costAll).toFixed(2) : '0.00'
|
||||||
|
const totalRow = worksheet.addRow(['费用合计金额(大写):', costAllUpper, '¥', costAll])
|
||||||
|
totalRow.font = { bold: true }
|
||||||
|
totalRow.getCell(1).alignment = { horizontal: 'left' }
|
||||||
|
totalRow.getCell(2).alignment = { horizontal: 'left' }
|
||||||
|
totalRow.getCell(3).alignment = { horizontal: 'center' }
|
||||||
|
totalRow.getCell(4).alignment = { horizontal: 'right' }
|
||||||
|
totalRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
// 说明
|
||||||
|
const remarkHeaderRow = worksheet.addRow(['说明: 本协议一式两份,甲方一份,乙方一份,经双方签字后生效。'])
|
||||||
|
remarkHeaderRow.font = { bold: true }
|
||||||
|
remarkHeaderRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
worksheet.mergeCells('A13:D13')
|
||||||
|
|
||||||
|
// 备注
|
||||||
|
const noteHeaderRow = worksheet.addRow(['备注: 此费用仅为在机具设备分公司发生费用,未计从项目部领用机具费用。'])
|
||||||
|
noteHeaderRow.font = { bold: true }
|
||||||
|
noteHeaderRow.eachCell((cell) => {
|
||||||
|
cell.border = borderStyle
|
||||||
|
})
|
||||||
|
|
||||||
|
worksheet.mergeCells('A14:D14')
|
||||||
|
|
||||||
|
|
||||||
|
// 导出
|
||||||
|
const buffer = await workbook.xlsx.writeBuffer()
|
||||||
|
const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = `协议书_${this.agreementContent.agreementCode}_${new Date().getTime()}.xlsx`
|
||||||
|
link.click()
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
this.$message.success('导出成功')
|
||||||
|
} catch (error) {
|
||||||
|
console.error('导出失败:', error)
|
||||||
|
this.$message.error('导出失败')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// const agreementId = row.agreementId;
|
// const agreementId = row.agreementId;
|
||||||
|
|
|
||||||
|
|
@ -168,32 +168,32 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%;">一、施工机具有偿使用费:</div>
|
<div class="columnLabel" style="width: 60%;">一、施工机具有偿使用费:</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.leaseCost }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.leaseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%;">二、施工机具维修费:</div>
|
<div class="columnLabel" style="width: 60%;">二、施工机具维修费:</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.repairCost }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.repairCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%;">三、施工机具丢失费:</div>
|
<div class="columnLabel" style="width: 60%;">三、施工机具丢失费:</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.loseCost }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.loseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%;">四、施工机具损坏赔偿费:</div>
|
<div class="columnLabel" style="width: 60%;">四、施工机具损坏赔偿费:</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.scrapCost }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.scrapCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%;">五、施工机具租赁减免费:</div>
|
<div class="columnLabel" style="width: 60%;">五、施工机具租赁减免费:</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.reductionCost }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.reductionCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 20%;">费用合计金额(大写):</div>
|
<div class="columnLabel" style="width: 20%;">费用合计金额(大写):</div>
|
||||||
<div class="columnContent" style="width: 40%;">{{ agreementContent.costAllUpper }}</div>
|
<div class="columnContent" style="width: 40%;">{{ agreementContent.costAllUpper }}</div>
|
||||||
<div class="columnContent" style="width: 40%;">¥ {{ agreementContent.costAll }}</div>
|
<div class="columnContent" style="width: 40%;">¥ {{ Number(agreementContent.costAll).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 20%;">说明:</div>
|
<div class="columnLabel" style="width: 20%;">说明:</div>
|
||||||
<div class="columnContent" style="width: 80%;">本协议一式三份,甲方一份,乙方一份,经双方签字后生效。</div>
|
<div class="columnContent" style="width: 80%;">本协议一式两份,甲方一份,乙方一份,经双方签字后生效。</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
||||||
<div class="columnLabel" style="width: 20%;">备注:</div>
|
<div class="columnLabel" style="width: 20%;">备注:</div>
|
||||||
|
|
|
||||||
|
|
@ -419,8 +419,8 @@ export default {
|
||||||
{ header: '设备类型数', key: 'equipmentTypeCount', width: 12 },
|
{ header: '设备类型数', key: 'equipmentTypeCount', width: 12 },
|
||||||
{ header: '设备总数量', key: 'totalEquipmentCount', width: 12 },
|
{ header: '设备总数量', key: 'totalEquipmentCount', width: 12 },
|
||||||
{ header: '总租赁天数', key: 'totalLeaseDays', width: 12 },
|
{ header: '总租赁天数', key: 'totalLeaseDays', width: 12 },
|
||||||
{ header: '总租赁费用(元)', key: 'totalLeaseCost', width: 15 },
|
{ header: '总租赁费用(元)', key: 'totalLeaseCost', width: 18 },
|
||||||
{ header: '日均租金(元)', key: 'avgDailyRent', width: 15 },
|
{ header: '日均租金(元)', key: 'avgDailyRent', width: 18 },
|
||||||
{ header: '查询开始日期', key: 'queryStartDate', width: 15 },
|
{ header: '查询开始日期', key: 'queryStartDate', width: 15 },
|
||||||
{ header: '查询结束日期', key: 'queryEndDate', width: 15 },
|
{ header: '查询结束日期', key: 'queryEndDate', width: 15 },
|
||||||
{ header: '最早租赁时间', key: 'earliestLeaseTime', width: 15 },
|
{ header: '最早租赁时间', key: 'earliestLeaseTime', width: 15 },
|
||||||
|
|
@ -463,7 +463,7 @@ export default {
|
||||||
// 添加数据行
|
// 添加数据行
|
||||||
this.tableList.forEach((row, index) => {
|
this.tableList.forEach((row, index) => {
|
||||||
const dataRow = {
|
const dataRow = {
|
||||||
index: index + 1,
|
index: String(index + 1), // 转换为字符串,避免被格式化为小数
|
||||||
agreementCode: row.agreementCode || '',
|
agreementCode: row.agreementCode || '',
|
||||||
unitName: row.unitName || '',
|
unitName: row.unitName || '',
|
||||||
projectName: row.projectName || '',
|
projectName: row.projectName || '',
|
||||||
|
|
@ -617,7 +617,7 @@ export default {
|
||||||
// 添加数据行
|
// 添加数据行
|
||||||
this.detailTableList.forEach((row, index) => {
|
this.detailTableList.forEach((row, index) => {
|
||||||
const dataRow = {
|
const dataRow = {
|
||||||
index: index + 1,
|
index: String(index + 1), // 转换为字符串,避免被格式化为小数
|
||||||
agreementCode: row.agreementCode || '',
|
agreementCode: row.agreementCode || '',
|
||||||
typeName: row.typeName || '',
|
typeName: row.typeName || '',
|
||||||
modelName: row.modelName || '',
|
modelName: row.modelName || '',
|
||||||
|
|
|
||||||
|
|
@ -1012,7 +1012,7 @@ export default {
|
||||||
const dataRows = this.pushReviewList.slice(0, -1);
|
const dataRows = this.pushReviewList.slice(0, -1);
|
||||||
dataRows.forEach((row, index) => {
|
dataRows.forEach((row, index) => {
|
||||||
const dataRow = {
|
const dataRow = {
|
||||||
index: index + 1,
|
index: String(index + 1), // 转换为字符串,避免被格式化为小数
|
||||||
agreementCode: row.agreementCode || '',
|
agreementCode: row.agreementCode || '',
|
||||||
unitName: row.unitName || '',
|
unitName: row.unitName || '',
|
||||||
projectName: row.projectName || '',
|
projectName: row.projectName || '',
|
||||||
|
|
|
||||||
|
|
@ -180,32 +180,32 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">一、施工机具有偿使用费:</div>
|
<div class="columnLabel" style="width: 60%">一、施工机具有偿使用费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.leaseCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.leaseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">二、施工机具维修费:</div>
|
<div class="columnLabel" style="width: 60%">二、施工机具维修费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.repairCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.repairCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">三、施工机具丢失费:</div>
|
<div class="columnLabel" style="width: 60%">三、施工机具丢失费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.loseCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.loseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">四、施工机具损坏赔偿费:</div>
|
<div class="columnLabel" style="width: 60%">四、施工机具损坏赔偿费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.scrapCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.scrapCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">五、施工机具租赁减免费:</div>
|
<div class="columnLabel" style="width: 60%">五、施工机具租赁减免费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.reductionCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.reductionCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 20%">费用合计金额(大写):</div>
|
<div class="columnLabel" style="width: 20%">费用合计金额(大写):</div>
|
||||||
<div class="columnContent" style="width: 40%">{{ agreementContent.costAllUpper }}</div>
|
<div class="columnContent" style="width: 40%">{{ agreementContent.costAllUpper }}</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.costAll }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.costAll).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
||||||
<div class="columnLabel" style="width: 20%">说明:</div>
|
<div class="columnLabel" style="width: 20%">说明:</div>
|
||||||
<div class="columnContent" style="width: 80%">本协议一式三份,甲方一份,乙方一份,经双方签字后生效。</div>
|
<div class="columnContent" style="width: 80%">本协议一式两份,甲方一份,乙方一份,经双方签字后生效。</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
|
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
|
||||||
|
|
|
||||||
|
|
@ -149,32 +149,32 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">一、施工机具有偿使用费:</div>
|
<div class="columnLabel" style="width: 60%">一、施工机具有偿使用费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.leaseCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.leaseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">二、施工机具维修费:</div>
|
<div class="columnLabel" style="width: 60%">二、施工机具维修费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.repairCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.repairCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">三、施工机具丢失费:</div>
|
<div class="columnLabel" style="width: 60%">三、施工机具丢失费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.loseCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.loseCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">四、施工机具损坏赔偿费:</div>
|
<div class="columnLabel" style="width: 60%">四、施工机具损坏赔偿费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.scrapCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.scrapCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 60%">五、施工机具租赁减免费:</div>
|
<div class="columnLabel" style="width: 60%">五、施工机具租赁减免费:</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.reductionCost }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.reductionCost).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn">
|
<div class="tabelColumn">
|
||||||
<div class="columnLabel" style="width: 20%">费用合计金额(大写):</div>
|
<div class="columnLabel" style="width: 20%">费用合计金额(大写):</div>
|
||||||
<div class="columnContent" style="width: 40%">{{ agreementContent.costAllUpper }}</div>
|
<div class="columnContent" style="width: 40%">{{ agreementContent.costAllUpper }}</div>
|
||||||
<div class="columnContent" style="width: 40%">¥ {{ agreementContent.costAll }}</div>
|
<div class="columnContent" style="width: 40%">¥ {{ Number(agreementContent.costAll).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
<div class="tabelColumn" style="border: 1px solid #9c9c9c;">
|
||||||
<div class="columnLabel" style="width: 20%">说明:</div>
|
<div class="columnLabel" style="width: 20%">说明:</div>
|
||||||
<div class="columnContent" style="width: 80%">本协议一式三份,甲方一份,乙方一份,经双方签字后生效。</div>
|
<div class="columnContent" style="width: 80%">本协议一式两份,甲方一份,乙方一份,经双方签字后生效。</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
|
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue