|
@@ -1,27 +1,19 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, watchEffect } from "vue";
|
|
|
+import { ref } from "vue";
|
|
|
import { columns } from "../../config/configs";
|
|
|
import { ElTable } from "element-plus";
|
|
|
-
|
|
|
-const props = defineProps<{
|
|
|
- paymentList: Array<Record<string, string>>;
|
|
|
-}>();
|
|
|
+import AddOrderModal from "./add-order-modal.vue";
|
|
|
|
|
|
const emit = defineEmits(["change-payment-detail"]);
|
|
|
+const createOrderRef = ref(null);
|
|
|
const list = ref<Array<Record<string, string>>>([]);
|
|
|
const tableRef = ref<InstanceType<typeof ElTable>>(null);
|
|
|
-
|
|
|
-function handleCurrentChange(value) {
|
|
|
- value && emit("change-payment-detail", value);
|
|
|
-}
|
|
|
-
|
|
|
-//过滤审核成功的对账列表
|
|
|
-watchEffect(
|
|
|
- () => (list.value = props.paymentList.filter(item => item.status === "3"))
|
|
|
-);
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
+ <div flex w-full justify-end mb-2>
|
|
|
+ <el-button type="primary" @click="handleAdd">添加</el-button>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
border
|
|
|
ref="tableRef"
|
|
@@ -29,7 +21,6 @@ watchEffect(
|
|
|
:data="list"
|
|
|
highlight-current-row
|
|
|
size="small"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
>
|
|
|
<el-table-column
|
|
|
v-for="(col, index) in columns"
|
|
@@ -37,9 +28,7 @@ watchEffect(
|
|
|
v-bind="col"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
-
|
|
|
- <!-- <el-table-column label="金额" fixed="right">
|
|
|
- <el-input size="small" placeholder="" />
|
|
|
- </el-table-column> -->
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <AddOrderModal ref="createOrderRef" />
|
|
|
</template>
|