|
@@ -1,110 +1,38 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { useColumns } from "./columns";
|
|
|
import { httpList } from "/@/api/InvoiceSales/invoiceApply";
|
|
|
import { reactive, ref, onMounted } from "vue";
|
|
|
|
|
|
-import { TableProBar } from "/@/components/ReTable";
|
|
|
-import { type PaginationProps } from "@pureadmin/table";
|
|
|
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
|
|
|
-import { useNav } from "/@/layout/hooks/nav";
|
|
|
-import { statusList, inv_type_list } from "./status";
|
|
|
-import { useRouter } from "vue-router";
|
|
|
-import { responseHandle } from "/@/utils/responseHandle";
|
|
|
+// import { useNav } from "/@/layout/hooks/nav";
|
|
|
import addEditForm from "./components/addEditForm.vue";
|
|
|
import examStatusForm from "./components/examStatusForm.vue";
|
|
|
-const { logout } = useNav();
|
|
|
+console.log("/@/components/examRecord");
|
|
|
+import { examRecord } from "/@/components/examRecord";
|
|
|
+// const { logout } = useNav();
|
|
|
defineOptions({
|
|
|
name: "InvoiceApplyDetail"
|
|
|
});
|
|
|
-
|
|
|
-const initform = {
|
|
|
- buy_id: "", //客户公司
|
|
|
- companyNo: "", //业务企业公司
|
|
|
- khNo: "", //申请人
|
|
|
- invtype: "",
|
|
|
- email: "",
|
|
|
- remark: "",
|
|
|
- orderArr: []
|
|
|
-};
|
|
|
-const id = ref("");
|
|
|
-const form = reactive({ ...initform });
|
|
|
-const startDisabledDate = (time: Date) => {
|
|
|
- const { end } = form;
|
|
|
- if (end ?? "") {
|
|
|
- return time.getTime() > Date.now(end).valueOf();
|
|
|
- }
|
|
|
-};
|
|
|
-const endDisabledDate = (time: Date) => {
|
|
|
- const { start } = form;
|
|
|
- if (start ?? "") {
|
|
|
- return time.getTime() < Date.now(start).valueOf();
|
|
|
- }
|
|
|
-};
|
|
|
-const { push } = useRouter();
|
|
|
-const dataList = ref([]);
|
|
|
+const activeName = ref("0");
|
|
|
+const collapseItem = ref(["0", "1", "2", "3"]);
|
|
|
const loading = ref(false);
|
|
|
-const { columns } = useColumns();
|
|
|
-
|
|
|
-const pagination = reactive<PaginationProps>({
|
|
|
- total: 0,
|
|
|
- pageSize: 15,
|
|
|
- currentPage: 1,
|
|
|
- background: true
|
|
|
-});
|
|
|
-
|
|
|
-async function handleCurrentChange(val: number) {
|
|
|
- form.page = val;
|
|
|
- await onSearch();
|
|
|
-}
|
|
|
-
|
|
|
-async function handleSizeChange(val: number) {
|
|
|
- form.size = val;
|
|
|
- form.page = 1;
|
|
|
- await onSearch();
|
|
|
-}
|
|
|
-
|
|
|
-function handleSelectionChange(val) {
|
|
|
- console.log("handleSelectionChange", val);
|
|
|
-}
|
|
|
+const examCode = ref("");
|
|
|
+const dataList = ref([]);
|
|
|
|
|
|
async function onSearch() {
|
|
|
if (loading.value) return;
|
|
|
- loading.value = true;
|
|
|
- const { code, data, message } = await httpList(form);
|
|
|
- responseHandle({
|
|
|
- code,
|
|
|
- message,
|
|
|
- logout,
|
|
|
- handler: () => {
|
|
|
- const { list, count } = data;
|
|
|
- dataList.value = list ?? [];
|
|
|
- pagination.total = count ?? 0;
|
|
|
- pagination.pageSize = form.size;
|
|
|
- pagination.currentPage = form.page;
|
|
|
- }
|
|
|
- });
|
|
|
+ // loading.value = true;
|
|
|
+ // const { code, data, message } = await httpList(form);
|
|
|
+ // responseHandle({
|
|
|
+ // code,
|
|
|
+ // message,
|
|
|
+ // logout,
|
|
|
+ // handler: () => {
|
|
|
+
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
loading.value = false;
|
|
|
}
|
|
|
-async function resetSearch() {
|
|
|
- form.page = 1;
|
|
|
- await onSearch();
|
|
|
-}
|
|
|
-//新建/详情页面
|
|
|
-function editItem(id) {
|
|
|
- push({
|
|
|
- path: "/InvoiceSales/invoiceApplyDeatil",
|
|
|
- query: {
|
|
|
- id
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-async function resetForm() {
|
|
|
- Object.keys(form.value).forEach(key => {
|
|
|
- form.value[key] = initform[key];
|
|
|
- });
|
|
|
- await onSearch();
|
|
|
-}
|
|
|
|
|
|
onMounted(() => {
|
|
|
onSearch();
|
|
@@ -113,8 +41,21 @@ onMounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div class="main bg-white">
|
|
|
- <addEditForm />
|
|
|
- <examStatusForm />
|
|
|
+ <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="新建发票申请" name="0">
|
|
|
+ <addEditForm />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="业务详情" name="1">
|
|
|
+ <el-collapse v-model="collapseItem">
|
|
|
+ <el-collapse-item title="审核" name="1">
|
|
|
+ <examStatusForm />
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="审批记录" name="2">
|
|
|
+ <examRecord :examCode="examCode" />
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
|