|
@@ -26,8 +26,7 @@ import { cloneVNode } from "vue";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const props = defineProps({
|
|
|
rowData: Object,
|
|
|
- activeName: String,
|
|
|
- tabsCard: Number,
|
|
|
+ tabValues: Object,
|
|
|
});
|
|
|
const loading = ref(false);
|
|
|
const tableData = ref([]);
|
|
@@ -42,13 +41,15 @@ const getAggregate = (data) => {
|
|
|
}
|
|
|
return total;
|
|
|
};
|
|
|
+const tabsCard = ref();
|
|
|
watch(
|
|
|
- () => props.activeName,
|
|
|
+ () => props.tabValues,
|
|
|
(val) => {
|
|
|
- if (val === "order" && !(tableData.value && tableData.value.length > 0)) {
|
|
|
+ if (val.activeName === "order" && val.tabsCard != tabsCard.value) {
|
|
|
+ tabsCard.value = val.tabsCard;
|
|
|
if (props.rowData && props.rowData.id) {
|
|
|
loading.value = true;
|
|
|
- proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id }).then(
|
|
|
+ proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
|
|
|
(res) => {
|
|
|
let total = getAggregate(proxy.deepClone(res));
|
|
|
let list = [];
|
|
@@ -128,7 +129,7 @@ const clickCancel = () => {
|
|
|
};
|
|
|
const deriveExcel = () => {
|
|
|
loading.value = true;
|
|
|
- proxy.getFile("/statementOfAccount/exportDocumentByOrder", { id: props.rowData.id }).then(
|
|
|
+ proxy.getFile("/statementOfAccount/exportDocumentByOrder", { id: props.rowData.id, orderClassify: props.tabValues.tabsCard }).then(
|
|
|
() => {
|
|
|
emit("clickCancel", true);
|
|
|
// proxy.downloadFile(res, "订单对账单.xlsx");
|