Browse Source

2026-11-10

优化出货报告打印报表
master
fengyuan_yang 1 week ago
parent
commit
bf2bf30a96
  1. 14
      src/views/modules/report/shipment_report.vue

14
src/views/modules/report/shipment_report.vue

@ -3,12 +3,12 @@
<!-- 顶部操作栏 -->
<div class="toolbar">
<el-button type="warning" @click="openTemplateDialog">选择模板</el-button>
<el-button type="primary" @click="openSelectDialog">选择检验单</el-button>
<el-button type="primary" :disabled="!selectedTemplateCode" @click="openSelectDialog">选择检验单</el-button>
<el-button type="success" @click="printReport">打印</el-button>
</div>
<!-- 报表主体 -->
<div class="report-content" v-if="selectedTemplateCode || reportData.inspectionNo">
<div class="report-content" v-if="selectedTemplateCode">
<!-- 上半部分:基本信息表格 -->
<div class="report-header">
<h2 style="text-align: center; margin-bottom: 10px;">出货报告打印报表</h2>
@ -17,7 +17,7 @@
<tr>
<td class="label-cell">选择检验单:</td>
<td class="value-cell">
<el-button size="small" @click="openSelectDialog">{{ reportData.inspectionNo || '请选择' }}</el-button>
<el-button size="small" :disabled="!selectedTemplateCode" @click="openSelectDialog">{{ reportData.inspectionNo || '请选择' }}</el-button>
</td>
<td class="label-cell">报告日期</td>
<td class="value-cell">{{ currentDate }}</td>
@ -491,6 +491,10 @@ export default {
// 确认选择检验单:填充报表数据("结果"列改由主表行"选择"检验明细项目赋值)
confirmSelectionlection() {
if (!this.selectedTemplateCode) {
this.$message.warning('请先选择属性模板')
return
}
if (this.selectedRow) {
this.reportData = { ...this.selectedRow }
this.selectDialogVisible = false
@ -766,6 +770,10 @@ export default {
// 打印报表(仅打印主页面报表内容)
printReport() {
if (!this.selectedTemplateCode) {
this.$message.warning('请先选择属性模板')
return
}
if (!this.reportData.inspectionNo) {
this.$message.warning('请先选择检验单')
return

Loading…
Cancel
Save