|
@@ -1,5 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { ref } from "vue";
|
|
|
+import { ref, reactive } from "vue";
|
|
|
import contentConfig from "./config/content.config";
|
|
|
import searchConfig from "./config/search.config";
|
|
|
import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
|
|
@@ -23,16 +23,21 @@ const invStatus = ["4", "10"];
|
|
|
// { code: "017", name: "导出回票数据" },
|
|
|
// { code: "018", name: "批量导入认证结果" },
|
|
|
// { code: "019", name: "下载回票批量申请模板" },
|
|
|
-const { hasPermissionWithCode } = usePermission(PageName);
|
|
|
+
|
|
|
const { isSuperUser } = useUserInfo();
|
|
|
+const { hasPermissionWithCode } = usePermission(PageName);
|
|
|
const pageContentRef = ref<InstanceType<typeof PageContent> | null>(null);
|
|
|
-
|
|
|
+const loading = ref(false);
|
|
|
const { push } = useRouter();
|
|
|
const { currentCompany } = useCompany();
|
|
|
-const loading = ref(false);
|
|
|
const invoiceModalRef = ref<InstanceType<typeof InvoiceModal>>(null);
|
|
|
const execelUploadRef = ref<InstanceType<typeof ExeclUpoad>>(null);
|
|
|
|
|
|
+const statistics = reactive({
|
|
|
+ inv_subtotal_amount: "",
|
|
|
+ total: ""
|
|
|
+});
|
|
|
+
|
|
|
async function handleDownload() {
|
|
|
await httpRequsetExport({
|
|
|
url: "ile",
|
|
@@ -54,7 +59,12 @@ const hooks: PageHooks = {
|
|
|
const events: PageEvents = {
|
|
|
content: {
|
|
|
preview: ({ hpNo }) => push(`${baseUrl}?id=${hpNo}`),
|
|
|
- create: () => push(baseUrl)
|
|
|
+ create: () => push(baseUrl),
|
|
|
+ result: data => {
|
|
|
+ const { inv_subtotal_amount, total } = data;
|
|
|
+ statistics.inv_subtotal_amount = inv_subtotal_amount;
|
|
|
+ statistics.total = total;
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -64,7 +74,6 @@ function onDownloadTemplate() {
|
|
|
const workBook = utils.book_new();
|
|
|
const workSheet = utils.json_to_sheet([template]);
|
|
|
utils.book_append_sheet(workBook, workSheet, "sheet");
|
|
|
-
|
|
|
//导出模板
|
|
|
writeFile(workBook, "回票批量导入模板.xlsx", {
|
|
|
bookType: "xlsx"
|
|
@@ -117,6 +126,13 @@ function onDownloadTemplate() {
|
|
|
@click="() => invoiceModalRef.onDisplay(row)"
|
|
|
/>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template #content_table_bottom>
|
|
|
+ <p v-if="statistics.inv_subtotal_amount" style="font-weight: 500">
|
|
|
+ 合计: 发票税前金额:{{ statistics.inv_subtotal_amount }}, 价税合计:
|
|
|
+ {{ statistics.total }}
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
</PageContainer>
|
|
|
|
|
|
<InvoiceModal ref="invoiceModalRef" />
|