|
|
@@ -35,6 +35,14 @@
|
|
|
>批量删除</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled || form.operatingStatus == 3 || form.status == 3"
|
|
|
+ @click="allClick('清除未对账')"
|
|
|
+ style="color: #409eff"
|
|
|
+ >清除未对账</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
size="small"
|
|
|
type="text"
|
|
|
:disabled="selectionList.length == 0 || form.status == 3 || disabled"
|
|
|
@@ -66,7 +74,13 @@
|
|
|
style="color: #000"
|
|
|
>撤销签收
|
|
|
</el-button>
|
|
|
- <!-- <el-button type="success" size="small" plain :disabled="selectionList.length == 0 || form.status == 3" @click="allClick('生成开票')"
|
|
|
+ <!--
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ :disabled="selectionList.length == 0 || form.status == 3"
|
|
|
+ @click="allClick('生成开票')"
|
|
|
>生成开票</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -76,11 +90,27 @@
|
|
|
:disabled="!form.id || selectionList.length == 0 || form.status == 3"
|
|
|
@click="allClick('撤销开票')"
|
|
|
>撤销开票</el-button
|
|
|
- > -->
|
|
|
- <el-tag type="danger" style="margin-right: 2px">应收(CNY):{{ amountDSubSum || 0 }}</el-tag>
|
|
|
- <el-tag type="danger" style="margin-right: 2px">应收(USD):{{ amountDSubUsdSum || 0 }}</el-tag>
|
|
|
- <el-tag type="success" style="margin-right: 2px; color: #000000">应付(CNY):{{ amountCSubSum || 0 }}</el-tag>
|
|
|
- <el-tag type="success" style="margin-right: 2px; color: #000000">应付(USD):{{ amountCSubUsdSum || 0 }}</el-tag>
|
|
|
+ >
|
|
|
+ -->
|
|
|
+ <el-tag type="danger" style="margin-right: 2px; color: #f56c6c">应收(CNY):{{ amountDSubSum || 0 }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-right: 2px; color: #f56c6c">应收(USD):{{ amountDSubUsdSum || 0 }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-right: 2px; color: #000000">应付(CNY):{{ amountCSubSum || 0 }}</el-tag>
|
|
|
+ <el-tag type="danger" style="margin-right: 2px; color: #000000">应付(USD):{{ amountCSubUsdSum || 0 }}</el-tag>
|
|
|
+ <el-tag type="success" style="margin-right: 2px; color: #f56c6c">应收(CNY):{{ amountDSubSum2 || 0 }}</el-tag>
|
|
|
+ <el-tag type="success" style="margin-right: 2px; color: #f56c6c">应收(USD):{{ amountDSubUsdSum2 || 0 }}</el-tag>
|
|
|
+ <el-tag type="success" style="margin-right: 2px; color: #000000">应付(CNY):{{ amountCSubSum2 || 0 }}</el-tag>
|
|
|
+ <el-tag type="success" style="margin-right: 2px; color: #000000">应付(USD):{{ amountCSubUsdSum2 || 0 }}</el-tag>
|
|
|
+ </template>
|
|
|
+ <template slot="page">
|
|
|
+ <el-tag style="margin-right: 2px; color: #f56c6c">应收(CNY):{{ form.amountDr || 0 }}</el-tag>
|
|
|
+ <el-tag style="margin-right: 2px; color: #f56c6c">应收(USD):{{ form.amountDrUsd || 0 }}</el-tag>
|
|
|
+ <el-tag style="margin-right: 2px; color: #f56c6c">应收合计(CNY):{{ form.amountDrLoc || 0 }}</el-tag>
|
|
|
+ <el-tag style="margin-right: 2px; color: #000000">应付(CNY):{{ form.amountCr || 0 }}</el-tag>
|
|
|
+ <el-tag style="margin-right: 2px; color: #000000">应付(USD):{{ form.amountCrUsd || 0 }}</el-tag>
|
|
|
+ <el-tag style="margin-right: 2px; color: #000000">应付合计(CNY):{{ form.amountCrLoc || 0 }}</el-tag>
|
|
|
+ </template>
|
|
|
+ <template slot="customSelected" slot-scope="{ row }">
|
|
|
+ <el-checkbox v-model="row.customSelected" @change="customSelection(row)"> </el-checkbox>
|
|
|
</template>
|
|
|
<template slot="currentStlAmountRMB" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
@@ -163,6 +193,8 @@ import {
|
|
|
batchRevokeReconciliation,
|
|
|
generateFinInvoicesDetail,
|
|
|
revokeFinInvoicesDetail,
|
|
|
+ unclearedUnverified,
|
|
|
+ getMergeDetail,
|
|
|
} from "@/api/iosBasicData/finstlbills";
|
|
|
import { getListAll } from "@/api/iosBasicData/finstlbills";
|
|
|
import feeInfo from "./feeInfo.vue";
|
|
|
@@ -173,6 +205,10 @@ export default {
|
|
|
amountDSubUsdSum: 0,
|
|
|
amountCSubSum: 0,
|
|
|
amountCSubUsdSum: 0,
|
|
|
+ amountDSubSum2: 0,
|
|
|
+ amountDSubUsdSum2: 0,
|
|
|
+ amountCSubSum2: 0,
|
|
|
+ amountCSubUsdSum2: 0,
|
|
|
rlaData: [],
|
|
|
rlaOption: {
|
|
|
header: false,
|
|
|
@@ -230,19 +266,32 @@ export default {
|
|
|
rowKey: "accBillId",
|
|
|
reserveSelection: true, // 翻页时,已选的行不丢失
|
|
|
selection: true,
|
|
|
+ showSummary: true,
|
|
|
+ sumColumnList: [
|
|
|
+ {
|
|
|
+ name: "currentStlAmountRMB",
|
|
|
+ type: "sum",
|
|
|
+ decimals: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "currentStlAmountUSD",
|
|
|
+ type: "sum",
|
|
|
+ decimals: 2,
|
|
|
+ },
|
|
|
+ ],
|
|
|
column: [
|
|
|
{
|
|
|
label: "账单编号",
|
|
|
prop: "accBillNo",
|
|
|
width: 120,
|
|
|
- sortable:true,
|
|
|
+ sortable: true,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "业务编号",
|
|
|
prop: "billNo",
|
|
|
width: 120,
|
|
|
- sortable:true,
|
|
|
+ sortable: true,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
@@ -255,14 +304,20 @@ export default {
|
|
|
label: "对账单位",
|
|
|
prop: "corpCnName",
|
|
|
width: 140,
|
|
|
- sortable:true,
|
|
|
+ sortable: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "选择",
|
|
|
+ prop: "customSelected",
|
|
|
+ width: 60,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "主单号",
|
|
|
prop: "mblno",
|
|
|
width: 100,
|
|
|
- sortable:true,
|
|
|
+ sortable: true,
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
@@ -480,8 +535,10 @@ export default {
|
|
|
},
|
|
|
pageData: [],
|
|
|
selectionList: [],
|
|
|
+ customselectList: [],
|
|
|
isShiftPressed: false, // 键盘状态
|
|
|
lastSelectedRowIndex: null,
|
|
|
+ lastCustomSelectedRowIndex: null,
|
|
|
};
|
|
|
},
|
|
|
components: { feeInfo },
|
|
|
@@ -527,23 +584,43 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleRowClick(row, event, column) {
|
|
|
+ // const currentIndex = this.pageData.indexOf(row); // 获取当前行索引
|
|
|
+ // if (this.isShiftPressed && this.lastSelectedRowIndex != null) {
|
|
|
+ // const start = Math.min(this.lastSelectedRowIndex, currentIndex);
|
|
|
+ // const end = Math.max(this.lastSelectedRowIndex, currentIndex);
|
|
|
+ // this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
+ // setTimeout(() => {
|
|
|
+ // for (let i = start; i <= end; i++) {
|
|
|
+ // this.$refs.crud.toggleRowSelection(this.pageData[i], true);
|
|
|
+ // }
|
|
|
+ // }, 10);
|
|
|
+ // this.lastSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
+ // } else {
|
|
|
+ // // 普通点击:清空选中并设置起始行
|
|
|
+ // // this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
+ // this.$refs.crud.toggleRowSelection(row, true); // 选中当前行
|
|
|
+ // this.lastSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ customSelection(row) {
|
|
|
+ // lastCustomSelectedRowIndex
|
|
|
const currentIndex = this.pageData.indexOf(row); // 获取当前行索引
|
|
|
- if (this.isShiftPressed && this.lastSelectedRowIndex != null) {
|
|
|
- const start = Math.min(this.lastSelectedRowIndex, currentIndex);
|
|
|
- const end = Math.max(this.lastSelectedRowIndex, currentIndex);
|
|
|
- this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
+ if (this.isShiftPressed && this.lastCustomSelectedRowIndex != null) {
|
|
|
+ const start = Math.min(this.lastCustomSelectedRowIndex, currentIndex);
|
|
|
+ const end = Math.max(this.lastCustomSelectedRowIndex, currentIndex);
|
|
|
+ this.pageData.forEach((item) => {
|
|
|
+ item.customSelected = false;
|
|
|
+ });
|
|
|
setTimeout(() => {
|
|
|
for (let i = start; i <= end; i++) {
|
|
|
- this.$refs.crud.toggleRowSelection(this.pageData[i], true);
|
|
|
+ this.$set(this.pageData[i], "customSelected", true);
|
|
|
}
|
|
|
+ this.customselectList = this.pageData.filter((item) => item.customSelected == true);
|
|
|
}, 10);
|
|
|
-
|
|
|
- this.lastSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
+ this.lastCustomSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
} else {
|
|
|
- // 普通点击:清空选中并设置起始行
|
|
|
- // this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
- this.$refs.crud.toggleRowSelection(row, true); // 选中当前行
|
|
|
- this.lastSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
+ this.lastCustomSelectedRowIndex = currentIndex; // 更新起始行索引
|
|
|
+ this.customselectList = this.pageData.filter((item) => item.customSelected == true);
|
|
|
}
|
|
|
},
|
|
|
select(list, row) {
|
|
|
@@ -595,11 +672,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
refreshData() {
|
|
|
- if (this.tableData.length) {
|
|
|
- this.page.currentPage = 1;
|
|
|
- this.pageData = [];
|
|
|
- this.getList();
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.pageData = [];
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ if (!this.form.id) {
|
|
|
+ return this.$message.error("请保存数据再进行查询");
|
|
|
}
|
|
|
+ let obj = {
|
|
|
+ billId: this.form.id,
|
|
|
+ billNo: this.form.duizhangNo,
|
|
|
+ };
|
|
|
+ getMergeDetail(obj).then((res) => {
|
|
|
+ if (res.data.data.finStlBillsItemsList.length == 0) {
|
|
|
+ this.$message.success("当前检索暂无数据!");
|
|
|
+ } else {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
+ this.$emit("update", this.form.id);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
armbChange(row) {
|
|
|
if (Number(row.amount - row.reconciliationAmount) > 0) {
|
|
|
@@ -640,7 +733,7 @@ export default {
|
|
|
allClick(name) {
|
|
|
if (name == "一键编辑") {
|
|
|
for (let row of this.tableData) {
|
|
|
- if (row.isChecked == 0 && row.status == 0) {
|
|
|
+ if (row.isSignfor != 1 && row.status == 0) {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
}
|
|
|
@@ -701,6 +794,32 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ if (name == "清除未对账") {
|
|
|
+ this.$confirm("是否继续操作?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ billId: this.form.id,
|
|
|
+ };
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)",
|
|
|
+ });
|
|
|
+ unclearedUnverified(obj)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
+ this.$emit("update", this.form.id);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
if (name == "批量对账") {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.error("请选择至少一条数据");
|
|
|
@@ -735,6 +854,7 @@ export default {
|
|
|
batchConfirmReconciliation(obj)
|
|
|
.then((res) => {
|
|
|
this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
this.$emit("update", this.form.id, "对账");
|
|
|
})
|
|
|
.finally(() => {
|
|
|
@@ -779,6 +899,7 @@ export default {
|
|
|
batchRevokeReconciliation(obj)
|
|
|
.then((res) => {
|
|
|
this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
this.$emit("update", this.form.id, "对账");
|
|
|
})
|
|
|
.finally(() => {
|
|
|
@@ -823,6 +944,7 @@ export default {
|
|
|
finstlbillsConfirmSignFor(obj)
|
|
|
.then((res) => {
|
|
|
this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
this.$emit("update", this.form.id);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
@@ -864,6 +986,7 @@ export default {
|
|
|
finstlbillsRevokeSignFor(obj)
|
|
|
.then((res) => {
|
|
|
this.$message.success("操作成功");
|
|
|
+ this.$refs.crud.selectClear(); // 清空历史选中
|
|
|
this.$emit("update", this.form.id);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
@@ -1012,7 +1135,7 @@ export default {
|
|
|
let rowName = "",
|
|
|
findRow = this.selectionList.find((c) => c.$index === rowIndex);
|
|
|
if (findRow) {
|
|
|
- rowName = "current-row"; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
|
|
|
+ rowName = "selected-row";
|
|
|
}
|
|
|
return rowName; //也可以再加上其他类名 如果有需求的话
|
|
|
},
|
|
|
@@ -1070,6 +1193,29 @@ export default {
|
|
|
deep: true, // 深度监听
|
|
|
immediate: true, // 第一次改变就执行
|
|
|
},
|
|
|
+ customselectList: {
|
|
|
+ // 执行方法
|
|
|
+ handler(oldValue, newValue) {
|
|
|
+ this.amountDSubSum2 = 0;
|
|
|
+ this.amountDSubUsdSum2 = 0;
|
|
|
+ this.amountCSubSum2 = 0;
|
|
|
+ this.amountCSubUsdSum2 = 0;
|
|
|
+ if (oldValue.length) {
|
|
|
+ oldValue.forEach((e) => {
|
|
|
+ if (e.dc == "D") {
|
|
|
+ this.amountDSubSum2 += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
+ this.amountDSubUsdSum2 += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
+ }
|
|
|
+ if (e.dc == "C") {
|
|
|
+ this.amountCSubSum2 += Number(e.currentStlAmountRMB ? e.currentStlAmountRMB : 0);
|
|
|
+ this.amountCSubUsdSum2 += Number(e.currentStlAmountUSD ? e.currentStlAmountUSD : 0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true, // 深度监听
|
|
|
+ immediate: true, // 第一次改变就执行
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -1078,7 +1224,7 @@ export default {
|
|
|
.el-button--text.is-disabled {
|
|
|
color: #c0c4cc !important;
|
|
|
}
|
|
|
-.current-row {
|
|
|
- background: #a0cfff !important;
|
|
|
+::v-deep .el-table .selected-row td {
|
|
|
+ background-color: #e1f3d8 !important;
|
|
|
}
|
|
|
</style>
|