mg-ocr-invoice 0.3.9 → 0.4.0
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 +3077 -2934
- package/dist/index.umd.js +35 -35
- package/dist/style.css +1 -1
- package/dist/types/components/OCRInvoice/index.vue.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/Invoice/index.vue +2 -1
- package/src/components/InvoiceList/index.vue +13 -10
- package/src/components/OCRInvoice/index.vue +8 -2
- package/src/components/PaymentMode/index.vue +2 -1
|
@@ -22,6 +22,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
taxCode: {
|
|
23
23
|
required: false;
|
|
24
24
|
};
|
|
25
|
+
teleport: {
|
|
26
|
+
required: false;
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
25
29
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
30
|
submit: (...args: any[]) => void;
|
|
27
31
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -48,6 +52,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
52
|
taxCode: {
|
|
49
53
|
required: false;
|
|
50
54
|
};
|
|
55
|
+
teleport: {
|
|
56
|
+
required: false;
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
};
|
|
51
59
|
}>> & {
|
|
52
60
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
53
61
|
}, {
|
package/package.json
CHANGED
|
@@ -278,6 +278,7 @@ import { RowAttribute } from './const'
|
|
|
278
278
|
import { filterNumber } from '@/utils/number'
|
|
279
279
|
import { computed } from 'vue'
|
|
280
280
|
import Decimal from 'decimal.js'
|
|
281
|
+
import Cookies from 'js-cookie'
|
|
281
282
|
const props = defineProps(['ids', 'invoiceData'])
|
|
282
283
|
const formData = ref({
|
|
283
284
|
codeReq: {
|
|
@@ -337,7 +338,7 @@ const submit = async () => {
|
|
|
337
338
|
showToast({
|
|
338
339
|
type: 'success',
|
|
339
340
|
message: '保存成功',
|
|
340
|
-
teleport:'
|
|
341
|
+
teleport: Cookies.get('teleport') || null,
|
|
341
342
|
})
|
|
342
343
|
emit('saveSuccess')
|
|
343
344
|
}
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</div>
|
|
158
158
|
<Popup
|
|
159
159
|
v-model:show="showPopup"
|
|
160
|
-
teleport="
|
|
160
|
+
:teleport="Cookies.get('teleport') || null"
|
|
161
161
|
position="bottom"
|
|
162
162
|
closeable>
|
|
163
163
|
<div class="boxPopup">
|
|
@@ -200,6 +200,7 @@ import {
|
|
|
200
200
|
setClass,
|
|
201
201
|
VerificationOfTruth,
|
|
202
202
|
} from './const'
|
|
203
|
+
import Cookies from 'js-cookie'
|
|
203
204
|
const emit = defineEmits(['edit', 'ok'])
|
|
204
205
|
const $props = defineProps({
|
|
205
206
|
listId: {
|
|
@@ -271,7 +272,7 @@ const clickItem = (row: any) => {
|
|
|
271
272
|
if (row.invoiceStatus !== 'unused') {
|
|
272
273
|
return showToast({
|
|
273
274
|
type: 'text',
|
|
274
|
-
teleport: '
|
|
275
|
+
teleport: Cookies.get('teleport') || null,
|
|
275
276
|
message: '发票已被使用!',
|
|
276
277
|
})
|
|
277
278
|
}
|
|
@@ -312,7 +313,7 @@ const changeSelectAll = (v: any) => {
|
|
|
312
313
|
showToast({
|
|
313
314
|
type: 'text',
|
|
314
315
|
message: '存在已使用或异常发票, 已自动过滤',
|
|
315
|
-
teleport: '
|
|
316
|
+
teleport: Cookies.get('teleport') || null,
|
|
316
317
|
})
|
|
317
318
|
}
|
|
318
319
|
list.value.forEach((item: any) => {
|
|
@@ -330,14 +331,14 @@ const deleteSelectItem = () => {
|
|
|
330
331
|
showToast({
|
|
331
332
|
type: 'text',
|
|
332
333
|
message: '请先选择发票',
|
|
333
|
-
teleport: '
|
|
334
|
+
teleport: Cookies.get('teleport') || null,
|
|
334
335
|
})
|
|
335
336
|
return
|
|
336
337
|
}
|
|
337
338
|
showConfirmDialog({
|
|
338
339
|
title: '提醒',
|
|
339
340
|
message: '请确认是否需要移除选中项,移除后不可恢复!',
|
|
340
|
-
teleport: '
|
|
341
|
+
teleport: Cookies.get('teleport') || null,
|
|
341
342
|
})
|
|
342
343
|
.then(async () => {
|
|
343
344
|
var urlencoded = new URLSearchParams()
|
|
@@ -349,7 +350,7 @@ const deleteSelectItem = () => {
|
|
|
349
350
|
showToast({
|
|
350
351
|
type: 'success',
|
|
351
352
|
message: '移除成功',
|
|
352
|
-
teleport: '
|
|
353
|
+
teleport: Cookies.get('teleport') || null,
|
|
353
354
|
})
|
|
354
355
|
getList()
|
|
355
356
|
}
|
|
@@ -380,7 +381,7 @@ const selectImg = async (type: number) => {
|
|
|
380
381
|
showToast({
|
|
381
382
|
type: 'success',
|
|
382
383
|
message: '上传成功',
|
|
383
|
-
teleport: '
|
|
384
|
+
teleport: Cookies.get('teleport') || null,
|
|
384
385
|
})
|
|
385
386
|
setTimeGetList()
|
|
386
387
|
}
|
|
@@ -413,7 +414,7 @@ const ok = () => {
|
|
|
413
414
|
showToast({
|
|
414
415
|
type: 'text',
|
|
415
416
|
message: '请先选择发票',
|
|
416
|
-
teleport: '
|
|
417
|
+
teleport: Cookies.get('teleport') || null,
|
|
417
418
|
})
|
|
418
419
|
return
|
|
419
420
|
}
|
|
@@ -421,7 +422,7 @@ const ok = () => {
|
|
|
421
422
|
showToast({
|
|
422
423
|
type: 'text',
|
|
423
424
|
message: '发票无效或已被使用,请进行确认',
|
|
424
|
-
teleport: '
|
|
425
|
+
teleport: Cookies.get('teleport') || null,
|
|
425
426
|
})
|
|
426
427
|
return
|
|
427
428
|
}
|
|
@@ -438,10 +439,11 @@ const ok = () => {
|
|
|
438
439
|
)
|
|
439
440
|
console.log(filterTitleErr,'filterTitleErr')
|
|
440
441
|
if (filterTitleErr) {
|
|
442
|
+
console.log(Cookies.get('teleport'),'teleport')
|
|
441
443
|
showConfirmDialog({
|
|
442
444
|
title: '提醒',
|
|
443
445
|
message: '存在异常抬头发票,请确认是否继续提交?',
|
|
444
|
-
teleport: '
|
|
446
|
+
teleport: Cookies.get('teleport') || null,
|
|
445
447
|
cancelButtonText: '返回修改',
|
|
446
448
|
confirmButtonText: '继续提交',
|
|
447
449
|
})
|
|
@@ -451,6 +453,7 @@ const ok = () => {
|
|
|
451
453
|
.catch((error) => {
|
|
452
454
|
console.log(error)
|
|
453
455
|
})
|
|
456
|
+
return
|
|
454
457
|
}
|
|
455
458
|
emit('ok', selectData, batchId.value)
|
|
456
459
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="OCRInvoice"
|
|
2
|
+
<div class="OCRInvoice">
|
|
3
3
|
<div v-if="activePage === 1" class="box">
|
|
4
4
|
<PaymentMode
|
|
5
5
|
:batchId="$props.batchId"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<script lang="ts" setup>
|
|
35
|
-
import { ref, onMounted, computed } from 'vue'
|
|
35
|
+
import { ref, onMounted, computed, watch } from 'vue'
|
|
36
36
|
import { PaymentMode, Invoice, InvoiceList } from '@/components/index'
|
|
37
37
|
import { getUrlParams } from '@/utils/getUrlParams'
|
|
38
38
|
import Cookies from 'js-cookie'
|
|
@@ -68,6 +68,10 @@ const $props = defineProps({
|
|
|
68
68
|
taxCode: {
|
|
69
69
|
required: false,
|
|
70
70
|
},
|
|
71
|
+
teleport: {
|
|
72
|
+
required: false,
|
|
73
|
+
type: String,
|
|
74
|
+
},
|
|
71
75
|
})
|
|
72
76
|
const computed_params = computed(() => {
|
|
73
77
|
return getUrlParams(window.location.href)
|
|
@@ -110,6 +114,8 @@ const submit = (data: any, id: string) => {
|
|
|
110
114
|
emit('submit', data, id)
|
|
111
115
|
}
|
|
112
116
|
onMounted(() => {
|
|
117
|
+
console.log($props.teleport, 'teleport')
|
|
118
|
+
Cookies.set('teleport', $props.teleport || '')
|
|
113
119
|
initToken()
|
|
114
120
|
init_Base_URL()
|
|
115
121
|
})
|
|
@@ -32,6 +32,7 @@ import '@/utils/disableZoom'
|
|
|
32
32
|
import { selectPhoto, takePhoto } from '@/utils/upload'
|
|
33
33
|
import { __uploadInvoice } from '@/api/invoice'
|
|
34
34
|
import { showToast, Overlay, Loading, showFailToast } from 'vant'
|
|
35
|
+
import Cookies from 'js-cookie'
|
|
35
36
|
const props = defineProps(['multiple', 'batchId', 'taxCode','businessLicense'])
|
|
36
37
|
const emit = defineEmits(['uploadSuccess'])
|
|
37
38
|
const payList: any = [
|
|
@@ -74,7 +75,7 @@ const handleClickText = async (text: any) => {
|
|
|
74
75
|
showToast({
|
|
75
76
|
type: 'success',
|
|
76
77
|
message: '上传成功',
|
|
77
|
-
teleport: '
|
|
78
|
+
teleport: Cookies.get('teleport') || null,
|
|
78
79
|
})
|
|
79
80
|
emit('uploadSuccess', res.data)
|
|
80
81
|
}
|