snow 8 months ago
parent
commit
a278060b60
3 changed files with 14 additions and 6 deletions
  1. BIN
      dist-zip/build.zip
  2. 4 6
      src/components/Invoice/src/index.vue
  3. 10 0
      src/utils/status.ts

BIN
dist-zip/build.zip


+ 4 - 6
src/components/Invoice/src/index.vue

@@ -3,7 +3,7 @@ import { watchEffect, ref, computed, unref } from "vue";
 import { useAsync } from "/@/hooks";
 import { mapInvoiceType, type InvoiceDetail } from "./configs";
 import { httpSaleInvoice, httpPurchaseInvoice } from "/@/api/invoice";
-import { invoiceTypeList } from "/@/utils/status";
+import { invoiceTypeList, xs_inv_type_options } from "/@/utils/status";
 
 type InvoiceType = "sale" | "purchase";
 const emit = defineEmits(["getInvoiceData"]);
@@ -37,7 +37,6 @@ const status = computed(() => {
   };
 
   const _status = (invoiceDetail.value as any)?.status;
-
   return statusMap[String(_status)];
 });
 
@@ -58,14 +57,13 @@ const title = computed(() => {
   const { type } = props;
   const invoiceData = unref(invoiceDetail) as any;
 
-  console.log(invoiceData.inv_type);
+  console.log(invoiceData)
+
   return type === "sale"
-    ? invoiceData.invtype_name
+    ? xs_inv_type_options.find(t => t.value === invoiceData.inv_type)?.label || '电子发票(增值税普通发票)'
     : invoiceTypeList.find(t => t.value === invoiceData.type)?.label;
 });
 
-// 09071550
-
 function requesetInvoiceData() {
   const api = props.type === "purchase" ? httpPurchaseInvoice : httpSaleInvoice;
   //响应字段

+ 10 - 0
src/utils/status.ts

@@ -136,6 +136,16 @@ export const xs_inv_type_list = [
   { label: "电子发票(增值税普通发票)", value: "fully_digitalized_normal_electronic", scanValue: "32" }
 ];
 
+
+export const xs_inv_type_options = [
+  { label: "增值税专用发票", value: "004" },
+  { label: "增值税普通发票", value: "007"},
+  { label: "增值税电子专用发票", value: "027" },
+  { label: "增值税电子普通发票", value: "026" },
+  { label: "电子发票(增值税专用发票)", value: "021" },
+  { label: "电子发票(增值税普通发票)", value: "" }
+];
+
 const send_status_list = [
   { value: "1", label: "未发货", type: "warning" },
   { value: "2", label: "部分已发", type: "primary" },