diff --git a/src/views/contract/components/printMeetingApproval.vue b/src/views/contract/components/printMeetingApproval.vue new file mode 100644 index 0000000..d339c74 --- /dev/null +++ b/src/views/contract/components/printMeetingApproval.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/src/views/contract/components/printReceptionApproval.vue b/src/views/contract/components/printReceptionApproval.vue new file mode 100644 index 0000000..62cf1cd --- /dev/null +++ b/src/views/contract/components/printReceptionApproval.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/contract/components/printReceptionSettlement.vue b/src/views/contract/components/printReceptionSettlement.vue new file mode 100644 index 0000000..c361325 --- /dev/null +++ b/src/views/contract/components/printReceptionSettlement.vue @@ -0,0 +1,193 @@ + + + + + \ No newline at end of file diff --git a/src/views/contract/components/printReimbursement.vue b/src/views/contract/components/printReimbursement.vue new file mode 100644 index 0000000..d07a835 --- /dev/null +++ b/src/views/contract/components/printReimbursement.vue @@ -0,0 +1,263 @@ + + + + + \ No newline at end of file diff --git a/src/views/contract/components/printTravelExpense.vue b/src/views/contract/components/printTravelExpense.vue index d4a0cc9..e3167af 100644 --- a/src/views/contract/components/printTravelExpense.vue +++ b/src/views/contract/components/printTravelExpense.vue @@ -11,6 +11,9 @@
{{ fillDepartment('河道管理处') }}
+
+ {{ fillPersonName('林勇') }} +
@@ -53,6 +56,11 @@ export default { const spaces = ' '.repeat(maxLength - departmentName.length); return departmentName + spaces; }, + fillPersonName(name) { + const maxLength = 15; // 根据实际空间调整 + const spaces = ' '.repeat(maxLength - name.length); + return name + spaces; + }, } } @@ -83,9 +91,20 @@ img { .department-field { position: absolute; - top: 62px; /* 再往上调整10px */ - left: 100px; /* 保持水平位置不变 */ - font-size: 15px; + top: 60px; + left: 100px; + font-size: 16px; + font-family: SimSun, serif; + white-space: pre; + color: #000; + line-height: 1; +} + +.person-name-field { + position: absolute; + top: 60px; + left: 400px; + font-size: 16px; font-family: SimSun, serif; white-space: pre; color: #000; diff --git a/src/views/contract/components/printUtilityBill.vue b/src/views/contract/components/printUtilityBill.vue new file mode 100644 index 0000000..5a53e20 --- /dev/null +++ b/src/views/contract/components/printUtilityBill.vue @@ -0,0 +1,204 @@ + + + + + \ No newline at end of file diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue index 3cc48c0..32d46e1 100644 --- a/src/views/contract/paymentRegistrationList.vue +++ b/src/views/contract/paymentRegistrationList.vue @@ -150,6 +150,11 @@ + + + + + @@ -165,10 +170,21 @@ import { getBudget } from "@/api/budget/budget"; import {getparameter} from "@/api/system/dictionary"; import {getToken} from "@/utils/auth"; import printTravelExpense from "./components/printTravelExpense"; +import printMeetingApproval from "./components/printMeetingApproval"; +import printReceptionApproval from "./components/printReceptionApproval"; +import printReceptionSettlement from "./components/printReceptionSettlement"; +import printReimbursement from "./components/printReimbursement"; +import printUtilityBill from "./components/printUtilityBill"; + export default { components: { printRegistration, - printTravelExpense, // 添加这个 + printTravelExpense, + printMeetingApproval, + printReceptionApproval, + printReceptionSettlement, + printReimbursement, + printUtilityBill, detailPaymentRegistration, }, data() { @@ -524,9 +540,8 @@ export default { this.getFundLogs(); }); }, - handlePrint(row) { + async handlePrint(row) { try { - // 获取当前行在表格数据中的索引 const rowIndex = this.list.findIndex(item => item.id === row.id); console.log('当前行号:', rowIndex); @@ -536,6 +551,21 @@ export default { } else if(rowIndex === 1) { // 第二行 this.$refs['printTravelExpense'].getDetailFundLog(row.id); this.$refs['printTravelExpense'].isShow = true; + } else if(rowIndex === 2) { // 第三行 + this.$refs['printMeetingApproval'].getMeetingData(row.id); + this.$refs['printMeetingApproval'].isShow = true; + } else if(rowIndex === 3) { // 第四行 + this.$refs['printReceptionApproval'].getReceptionData(row.id); + this.$refs['printReceptionApproval'].isShow = true; + } else if(rowIndex === 4) { // 第五行 + this.$refs['printReceptionSettlement'].getSettlementData(row.id); + this.$refs['printReceptionSettlement'].isShow = true; + } else if(rowIndex === 5) { // 第六行 + this.$refs['printReimbursement'].getReimbursementData(row.id); + this.$refs['printReimbursement'].isShow = true; + } else if(rowIndex === 6) { // 第七行 + this.$refs['printUtilityBill'].getUtilityData(row.id); + this.$refs['printUtilityBill'].isShow = true; } else { this.$Message.warning('该行不支持打印功能'); }