From 5cb9610349b750d03e13eec7f6eb84d603979ab6 Mon Sep 17 00:00:00 2001
From: xyc <3422692813@qq.com>
Date: Mon, 11 Aug 2025 09:54:37 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B00811?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/base/file/file.vue | 41 +++++++++++++++++++++++++++-
src/views/inspection/staff/index.vue | 12 ++++++--
2 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/src/views/base/file/file.vue b/src/views/base/file/file.vue
index 1ac5e9c..a8d53d0 100644
--- a/src/views/base/file/file.vue
+++ b/src/views/base/file/file.vue
@@ -105,6 +105,28 @@
>
全屏
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -809,8 +890,9 @@
+ style="width: 100%">
@@ -943,6 +1025,7 @@
placeholder="请输入实付金额"
v-model="settleForm.realPayMoney"
:precision="2"
+ disabled
:min="0"
controls-position="right"
style="width: 100%"
@@ -1020,7 +1103,7 @@ import {
getWeorkNodesById,
getCustomerSource,
batchSettlement,
- getBatchList,
+ getBatchList, settlement,
} from "./api/workOrder";
import print from "vue-print-nb";
import moment from "moment";
@@ -1029,6 +1112,7 @@ import DictTag from "@/components/DictTagOld/index.vue";
import CashierConfirmForm from "@/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue";
import InspectionCashierConfirmForm from "@/views/partner/form/InspectionCashierConfirmForm.vue";
import FileUpload from "@/components/FileUpload/index.vue";
+import PrintButton from "@/components/PrintButton/index.vue";
export default {
name: "Info",
@@ -1043,6 +1127,7 @@ export default {
print,
},
components: {
+ PrintButton,
InspectionCashierConfirmForm,
CashierConfirmForm,
DictTag,
@@ -1127,13 +1212,18 @@ export default {
],
goodsPrice: 0,
- reduceMoney: "",
- payMoney: "",
+ reduceMoney: 0,
+ payMoney: 0,
payType: "",
receivablesAccount: "",
payRemark: "",
fileUrls: "",
inspectionId: "",
+ settlementForm: {
+ settlementAmount: 0,
+ goodsPrice: 0,
+ settlementReduceMoney: 0,
+ },
size: "",
workId: "",
// workerList:[],
@@ -1168,8 +1258,10 @@ export default {
// 是否显示弹出层
open: false,
openxin: false,
+ openSettlementWork: false,
opendetail: false,
openhe: false,
+ tableHtml: undefined,
htmlStr: null,
detailForm: [],
selectInspectionProject: [],
@@ -1191,7 +1283,7 @@ export default {
rescueStatus: null,
rescueAmount: null,
businessChannel: null,
- dateType:'jcTime'
+ dateType: 'jcTime'
},
// 表单参数
form: {},
@@ -1308,7 +1400,7 @@ export default {
pageNum: this.batchQueryParams.pageNum || 1,
pageSize: this.batchQueryParams.pageSize || 100,
accountingConfirm: '1',
- dateType:'jcTime'
+ dateType: 'jcTime'
};
if (this.selectBatchType == "cn") {
listWorkOrder(params).then((response) => {
@@ -1461,6 +1553,13 @@ export default {
}
this.payMoney = this.goodsPrice / 100 - this.reduceMoney;
},
+ jisuanSetlementMoney() {
+ console.log('执行了算')
+ if (this.settlementForm.settlementReduceMoney > this.settlementForm.goodsPrice / 100) {
+ this.settlementForm.settlementReduceMoney = this.settlementForm.goodsPrice / 100;
+ }
+ this.settlementForm.settlementAmount = this.settlementForm.goodsPrice / 100 - this.settlementForm.settlementReduceMoney;
+ },
batchJisuan() {
if (this.settleForm.reduceMoney > this.settleForm.goodsPrice) {
this.settleForm.reduceMoney = this.settleForm.goodsPrice;
@@ -1484,6 +1583,14 @@ export default {
};
offlineCharging(data).then((res) => {
this.openxin = false;
+ this.$message.success("收款成功");
+ this.getList();
+ });
+ },
+ submitSettlementForm() {
+
+ settlement(this.settlementForm).then((res) => {
+ this.openSettlementWork = false;
this.$message.success("结算成功");
this.getList();
});
@@ -1531,14 +1638,35 @@ export default {
inspectionDetail(row.id).then((res) => {
this.offline = res.data;
this.goodsPrice = res.data.goodsPrice;
- this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : null;
+ if (res.data.payMoney) {
+ this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : 0;
+ console.log('执行哈哈哈哈',res.data.payMoney)
+ } else {
+ this.payMoney = res.data.settlementAmount ? res.data.settlementAmount / 100 : 0;
+ console.log('kukuku',res.data.settlementAmount)
+ }
+ if (res.data.settlementReduceMoney && res.data.settlementReduceMoney != 0) {
+ this.reduceMoney = res.data.settlementReduceMoney ? res.data.settlementReduceMoney / 100 : 0;
+ } else {
+ this.reduceMoney = res.data.reduceMoney ? res.data.reduceMoney / 100 : 0;
+ }
this.payType = res.data.payType ? res.data.payType : null;
+ this.receivablesAccount = res.data.receivablesAccount ? res.data.receivablesAccount : null;
this.fileUrls = res.data.files ? res.data.files : [];
this.payRemark = res.data.payRemark ? res.data.payRemark : null;
- console.log(res);
+ console.log(this.payMoney);
});
this.openxin = true;
},
+ async settlementWork(row) {
+ this.settlementForm.inspectionId = row.id;
+ this.settlementForm.settlementReduceMoney = 0
+ await inspectionDetail(row.id).then((res) => {
+ this.settlementForm.goodsPrice = res.data.goodsPrice;
+ this.settlementForm.settlementAmount = res.data.goodsPrice / 100;
+ });
+ this.openSettlementWork = true;
+ },
detail(row) {
console.log("点击详情", row);
//根据id查询详情
@@ -1820,6 +1948,32 @@ export default {
`info_${new Date().getTime()}.xls`
);
},
+ getTableHtml() {
+ // 获取当前表格 DOM
+ const tableRef = this.selectBatchType === 'cn' ? this.$refs.batchTableCn : this.$refs.batchTableKj;
+ if (!tableRef) return '';
+
+ // 获取表格外层 HTML
+ const tableDom = tableRef.$el.cloneNode(true);
+
+ // 获取样式表(Element UI 样式)
+ let styles = '';
+ document.querySelectorAll('link[rel="stylesheet"]').forEach(link => {
+ styles += ``;
+ });
+ console.log('styles', styles)
+
+ return styles + tableDom.outerHTML;
+ },
+ beforePrint() {
+ this.tableHtml = this.getTableHtml(); // 打印前生成 HTML
+ console.log('tableHtml', this.tableHtml)
+ // 如果要打印全量数据,可以这里先拉数据
+ return Promise.resolve();
+ },
+ afterPrint() {
+ console.log('打印完成');
+ }
},
};