mg-ocr-invoice 0.2.1 → 0.2.3-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +10229 -9899
- package/dist/index.umd.js +39 -45
- package/dist/style.css +1 -1
- package/dist/types/api/invoice.d.ts +1 -0
- package/dist/types/components/Invoice/const.d.ts +4 -0
- package/dist/types/components/Invoice/index.vue.d.ts +11 -20
- package/dist/types/components/Invoice copy/index.vue.d.ts +23 -0
- package/dist/types/components/InvoiceList/const.d.ts +3 -1
- package/dist/types/components/InvoiceList/index.vue.d.ts +5 -7
- package/dist/types/components/OCRInvoice/const.d.ts +66 -0
- package/dist/types/utils/number.d.ts +1 -0
- package/package.json +2 -1
- package/src/components/Invoice/const.ts +4 -0
- package/src/components/Invoice/index.vue +422 -224
- package/src/components/Invoice copy/index.vue +343 -0
- package/src/components/InvoiceList/const.ts +9 -1
- package/src/components/InvoiceList/index.vue +80 -47
- package/src/components/OCRInvoice/const.ts +70 -0
- package/src/components/OCRInvoice/index.vue +11 -4
- package/src/components/PaymentMode/index.vue +0 -1
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<InvoiceList
|
|
11
11
|
:multiple="multiple"
|
|
12
12
|
:listId="listId"
|
|
13
|
+
:catchList="catchList"
|
|
13
14
|
@ok="submit"
|
|
14
15
|
@edit="edit">
|
|
15
16
|
</InvoiceList>
|
|
@@ -31,6 +32,8 @@ import Cookies from 'js-cookie'
|
|
|
31
32
|
// import eruda from 'eruda'
|
|
32
33
|
// eruda.init()
|
|
33
34
|
import VConsole from 'vconsole'
|
|
35
|
+
// import { data as dataObj } from './const'
|
|
36
|
+
|
|
34
37
|
const setLog = () => {
|
|
35
38
|
if (getUrlParams(window.location.href).log == 1) {
|
|
36
39
|
const vConsole = new VConsole()
|
|
@@ -55,15 +58,15 @@ const { token, multiple, Base_URL, OCR_AuthDomain, batchId } = defineProps({
|
|
|
55
58
|
},
|
|
56
59
|
batchId: {
|
|
57
60
|
required: false,
|
|
61
|
+
|
|
58
62
|
},
|
|
59
63
|
})
|
|
60
64
|
|
|
61
65
|
const initToken = () => {
|
|
62
|
-
activePage.value =
|
|
66
|
+
activePage.value = 1
|
|
63
67
|
const params = getUrlParams(window.location.href)
|
|
64
68
|
const linkToken = params.token
|
|
65
69
|
Cookies.set('token', linkToken || token)
|
|
66
|
-
;('1690993442433269760')
|
|
67
70
|
}
|
|
68
71
|
const init_Base_URL = () => {
|
|
69
72
|
const params = getUrlParams(window.location.href)
|
|
@@ -77,13 +80,16 @@ const activePage = ref(0)
|
|
|
77
80
|
const listId: any = ref(null)
|
|
78
81
|
const ids = ref({})
|
|
79
82
|
const invoiceData = ref({})
|
|
83
|
+
// invoiceData.value = dataObj
|
|
80
84
|
const uploadSuccess = (id: any) => {
|
|
81
85
|
listId.value = id
|
|
82
86
|
activePage.value = 2
|
|
83
87
|
}
|
|
84
|
-
const
|
|
88
|
+
const catchList: any = ref(null)
|
|
89
|
+
const edit = (id: object, row: any, list: any) => {
|
|
85
90
|
ids.value = id
|
|
86
91
|
invoiceData.value = row
|
|
92
|
+
catchList.value = list
|
|
87
93
|
activePage.value = 3
|
|
88
94
|
}
|
|
89
95
|
const saveSuccess = (id: object) => {
|
|
@@ -100,10 +106,11 @@ onMounted(() => {
|
|
|
100
106
|
<style lang="scss" scoped>
|
|
101
107
|
.OCRInvoice {
|
|
102
108
|
width: 100%;
|
|
103
|
-
height:
|
|
109
|
+
height: 100vh;
|
|
104
110
|
.box {
|
|
105
111
|
width: 100%;
|
|
106
112
|
min-height: 100%;
|
|
113
|
+
height: 100%;
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
</style>
|
|
@@ -65,7 +65,6 @@ const handleClickText = async (text: any) => {
|
|
|
65
65
|
if (props.batchId) {
|
|
66
66
|
fd.append('batchId', props.batchId)
|
|
67
67
|
}
|
|
68
|
-
console.log(props.batchId,'props.batchIdprops.batchIdprops.batchId')
|
|
69
68
|
showLoading.value = true
|
|
70
69
|
try {
|
|
71
70
|
const res: any = await __uploadInvoice(fd)
|