Browse Source

Merge branch 'v3.0' into sit

snow 8 months ago
parent
commit
dc4776fbdc

+ 17 - 0
src/api/InvoiceSales/inspectTicketBill/index.ts

@@ -0,0 +1,17 @@
+import { http } from "/@/utils/http"
+import { loadEnv } from "@build/index";
+
+const { VITE_PROXY_USER_REAL } = loadEnv();
+
+const baseUrl = `${VITE_PROXY_USER_REAL}/admin/`;
+
+interface ResponseType extends Promise<any> {
+  message?: string
+  code?: number
+  data?: any
+}
+
+// 列表
+export const httpList = (data: any): ResponseType => {
+  return http.request('post', `${baseUrl}company/OcrTotalList`, { data: { ...data } })
+}

+ 25 - 0
src/views/InvoiceSales/inspectTicketBill/components/invoice-modal.vue

@@ -0,0 +1,25 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import Invoice from "/@/components/Invoice";
+
+const visible = ref(false);
+const invoiceNumber = ref("");
+
+defineExpose({
+  onDisplay: _invoiceNumber => {
+    visible.value = true;
+    invoiceNumber.value = _invoiceNumber;
+  }
+});
+</script>
+
+<template>
+  <el-dialog
+    v-model="visible"
+    :close-on-click-modal="false"
+    width="1040px"
+    @close="invoiceNumber = ''"
+  >
+    <Invoice :inv-number="invoiceNumber" type="sale" />
+  </el-dialog>
+</template>

+ 67 - 0
src/views/InvoiceSales/inspectTicketBill/config/content.config.ts

@@ -0,0 +1,67 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/InvoiceSales/inspectTicketBill";
+import { addition, multiplication } from "/@/utils/calc";
+
+
+const columns = [
+  {
+    label: "账单日期",
+    prop: "daydate",
+    width: 100
+  },
+  {
+    label: "采购对账回票验票次数",
+    width: 150,
+    cellRenderer({ row }){
+      const { pay_success, pay_fail } = row
+      return addition(pay_success, pay_fail)
+    }
+  },
+  {
+    label: "销售开票申请验票次数",
+    width: 150,
+    cellRenderer({ row }){
+      const { ocr_success, ocr_fail } = row
+      return addition(ocr_success, ocr_fail)
+    }
+  },
+  {
+    label: "合计验票次数",
+    prop: 'total',
+    width: 100
+  },
+  {
+    label: "业务公司编号",
+    prop: "companyNo",
+    'min-width': 150
+  },
+  {
+    label: "业务公司名称",
+    prop: "companyName",
+    'min-width': 150
+  },
+  {
+    label: "应付金额",
+    prop: "ocr_price",
+    width: 80,
+    cellRenderer({ row }){
+      return Number(multiplication(row.total, row.ocr_price)).toFixed(2)
+    }
+  },
+  {
+    label: "账单生成日期",
+    prop: "addtime",
+    'min-width': 100
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "验票账单",
+  // mockData: [{}],
+  columns,
+  apis: {
+    httpList
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/InvoiceSales/inspectTicketBill/config/modal.config.ts

@@ -0,0 +1,40 @@
+import { ModalConfig } from "../../../../components/PageModal/src/types";
+
+const modalConfig: ModalConfig = {
+  title: "客户",
+  itemStyle: {},
+  formItems: [
+    {
+      field: "companyNo",
+      type: "input",
+      label: "客户编码",
+      labelWidth: "120px"
+    },
+    {
+      field: "companyName",
+      type: "input",
+      labelWidth: "120px",
+      label: "客户名称"
+    },
+    {
+      field: "parent",
+      type: "input",
+      labelWidth: "120px",
+      label: "归属集团"
+    },
+    {
+      field: "contactor",
+      type: "input",
+      labelWidth: "120px",
+      label: "联系人"
+    },
+    {
+      field: "createTime",
+      type: "input",
+      labelWidth: "120px",
+      label: "创建时间"
+    }
+  ]
+};
+
+export default modalConfig;

+ 26 - 0
src/views/InvoiceSales/inspectTicketBill/config/search.config.ts

@@ -0,0 +1,26 @@
+import { FormConfig } from "/@/components/PageSearch";
+import {
+  xs_inv_type_list,
+  useTypeOptions,
+  invoiceTypeList
+} from "/@/utils/status";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "timer",
+      type: "date_picker",
+      span: 7,
+      label:' 账单日期',
+      otherOptions: {
+        type: "daterange",
+        startProp: "start",
+        endProp: "end",
+        startPlaceholder: "开始时间",
+        endPlaceholder: "结束时间"
+      }
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 32 - 0
src/views/InvoiceSales/inspectTicketBill/index.vue

@@ -0,0 +1,32 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+import InvoiceModal from "./components/invoice-modal.vue";
+
+const PageName = "invoicePool";
+const invoiceModalRef = ref<InstanceType<typeof InvoiceModal> | null>(null);
+
+const hooks: PageHooks = {
+  pageSearchHook: () => usePageSearch(undefined, undefined, searchConfig)
+};
+
+const events: PageEvents = {
+  content: {
+    preview: ({ inv_number }) => invoiceModalRef.value.onDisplay(inv_number)
+  }
+};
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :events="events"
+      :contentConfig="contentConfig"
+      :search-config="searchConfig"
+    />
+    <InvoiceModal ref="invoiceModalRef" />
+  </PageAuth>
+</template>

+ 0 - 0
src/views/InvoiceSales/inspectTicketBill/验票账单.md