|
@@ -0,0 +1,90 @@
|
|
|
+<script setup lang="ts">
|
|
|
+import { watch, ref } from "vue"
|
|
|
+import { httpInvoiceDetail } from "/@/api/invoice"
|
|
|
+import { useTask } from "/@/hooks/core"
|
|
|
+
|
|
|
+const props = defineProps<{ code: string }>()
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+const state = ref({
|
|
|
+ positive: [], // 正数-明细
|
|
|
+ negative: [], // 负数-明细
|
|
|
+})
|
|
|
+
|
|
|
+const invoiceDetailTask = useTask<any>({ initialData: [], success(data = []) {
|
|
|
+ const positive = []
|
|
|
+ const negative = []
|
|
|
+ console.log(data)
|
|
|
+}})
|
|
|
+
|
|
|
+const refreshInvoiceDetail = () => invoiceDetailTask.run(httpInvoiceDetail({ code: props.code }))
|
|
|
+
|
|
|
+
|
|
|
+watch(() => props.code, () => {
|
|
|
+ if(!props.code){ return }
|
|
|
+ refreshInvoiceDetail()
|
|
|
+},{
|
|
|
+ immediate: true
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="flex flex-col border border-[#ebeef5]" v-loading="invoiceDetailTask.loading">
|
|
|
+ <div class="flex border-b-1 border-[#ebeef5]">
|
|
|
+ <div class="flex-1 border-r-1 border-[#ebeef5] p-[5px]">
|
|
|
+ <h3 class="font-bold">无需关联</h3>
|
|
|
+ <ElTable size="small" border>
|
|
|
+
|
|
|
+ </ElTable>
|
|
|
+ <h3 class="font-bold">关联结果</h3>
|
|
|
+
|
|
|
+ <ElTable size="small" border>
|
|
|
+ </ElTable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="flex-1 p-[5px]">
|
|
|
+ <h3 class="font-[700]">待关联明细</h3>
|
|
|
+ <ElTable border size="small"></ElTable>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="flex">
|
|
|
+ <div class="flex-1 border-r-1 border-[#ebeef5] p-[5px]">
|
|
|
+ <h3 class="font-bold">正数</h3>
|
|
|
+
|
|
|
+ <h3>已关联</h3>
|
|
|
+ <ElTable border size="small"></ElTable>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>未关联</h3>
|
|
|
+ <ElTable class="mb-[5px]" border size="small"></ElTable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="flex-1 py-[5px]">
|
|
|
+ <div class="px-[5px]">
|
|
|
+ <h3 class="font-bold">负数</h3>
|
|
|
+ <h3>已关联</h3>
|
|
|
+ <ElTable border size="small"></ElTable>
|
|
|
+ <h3>未关联</h3>
|
|
|
+ <ElTable class="mb-[5px]" border size="small"></ElTable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="border-t-1 border-[#ebeef5] p-[5px]">
|
|
|
+ <h3 class="font-bold">正在关联</h3>
|
|
|
+
|
|
|
+ <ElTable size="small" border></ElTable>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="flex justify-end mt-[5px]">
|
|
|
+ <ElButton type="primary" size="small">确认关联</ElButton>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|