|
@@ -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;
|
|
|
//响应字段
|