|
@@ -22,6 +22,11 @@
|
|
|
]"
|
|
|
@get-list="getList"
|
|
|
>
|
|
|
+ <!-- {
|
|
|
+ text: '导出Excel',
|
|
|
+ disabled: false,
|
|
|
+ action: () => deriveExcel(),
|
|
|
+ }, -->
|
|
|
<template #contractCode="{ item }">
|
|
|
<div
|
|
|
style="cursor: pointer; color: #409eff"
|
|
@@ -201,7 +206,7 @@
|
|
|
|
|
|
<el-dialog
|
|
|
v-model="dialogVisibleOne"
|
|
|
- title="付款记录"
|
|
|
+ title="交易记录"
|
|
|
width="500"
|
|
|
append-to-body
|
|
|
destroy-on-close
|
|
@@ -227,15 +232,42 @@
|
|
|
>查看详情</el-button
|
|
|
>
|
|
|
</div>
|
|
|
- <div style="margin-top: 5px">
|
|
|
- 付款账号:
|
|
|
- {{ dictValueLabel(activity.payAccount, accountData) }}
|
|
|
+ <div v-if="activity.type == '1'">
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 类型: <span style="color: #8fe3a1">付款 </span>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 付款账号:
|
|
|
+ {{ dictValueLabel(activity.payAccount, accountData) }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 付款金额:{{ moneyFormat(activity.amount, 2) }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 付款时间: {{ activity.payDate }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 付款备注: {{ activity.remark }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="margin-top: 5px">
|
|
|
- 付款金额:{{ moneyFormat(activity.amount, 2) }}
|
|
|
+ <div v-if="activity.type == '2'">
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 类型: <span style="color: #fc0000">退款</span>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 退款账号:
|
|
|
+ {{ dictValueLabel(activity.payAccount, accountData) }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 退款金额:{{ moneyFormat(activity.amount, 2) }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 退款时间: {{ activity.payDate }}
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 5px">
|
|
|
+ 退款备注: {{ activity.remark }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="margin-top: 5px">付款时间: {{ activity.payDate }}</div>
|
|
|
- <div style="margin-top: 5px">付款备注: {{ activity.remark }}</div>
|
|
|
<div
|
|
|
style="width: 100%; margin-top: 5px"
|
|
|
v-if="activity.fileList && activity.fileList.length > 0"
|
|
@@ -870,6 +902,7 @@ const handlePayment = (type, data) => {
|
|
|
} else if (type === 20) {
|
|
|
}
|
|
|
formData.data = {
|
|
|
+ type: "1",
|
|
|
supplyName: selectData.value[0].supplyName,
|
|
|
amount: "",
|
|
|
payDate: "",
|
|
@@ -891,6 +924,7 @@ const handlePayment = (type, data) => {
|
|
|
|
|
|
const handleRefund = (row) => {
|
|
|
formData.dataOne = {
|
|
|
+ type: "2",
|
|
|
purchaseId: row.id,
|
|
|
supplyName: row.supplyName,
|
|
|
contractCode: row.contractCode,
|
|
@@ -1101,6 +1135,45 @@ const handleGetDtl = (row) => {
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+const deriveExcel = () => {
|
|
|
+ ElMessage({
|
|
|
+ message: "请稍后",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .postTwo("/purchase/purchasePayExcelExport", sourceList.value.pagination)
|
|
|
+ .then(
|
|
|
+ (res) => {
|
|
|
+ exportData(res, "采购付款.xlsx");
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ return ElMessage({
|
|
|
+ message: "请重试",
|
|
|
+ type: "info",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+const exportData = (res, name) => {
|
|
|
+ const content = res;
|
|
|
+ const blob = new Blob([content], { type: "application/ms-excel" });
|
|
|
+ const fileName = name;
|
|
|
+ if ("download" in document.createElement("a")) {
|
|
|
+ // 非IE下载
|
|
|
+ const elink = document.createElement("a");
|
|
|
+ elink.download = fileName;
|
|
|
+ elink.style.display = "none";
|
|
|
+ elink.href = URL.createObjectURL(blob);
|
|
|
+ document.body.appendChild(elink);
|
|
|
+ elink.click();
|
|
|
+ URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
|
+ document.body.removeChild(elink);
|
|
|
+ } else {
|
|
|
+ navigator.msSaveBlob(blob, fileName);
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|