mg-ocr-invoice 0.4.0 → 0.4.2
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 +1304 -1300
- package/dist/index.umd.js +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/InvoiceList/index.vue +20 -8
package/package.json
CHANGED
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
class="title"
|
|
37
37
|
:class="{
|
|
38
38
|
company: item.invoiceCompanyType === '公司',
|
|
39
|
-
err:
|
|
39
|
+
err:
|
|
40
|
+
item.invoiceCompanyType === '异常抬头' ||
|
|
41
|
+
item.invoiceCompanyType === '异常税号',
|
|
40
42
|
}">
|
|
41
43
|
{{ item.invoiceCompanyType }}
|
|
42
44
|
</div>
|
|
@@ -201,6 +203,7 @@ import {
|
|
|
201
203
|
VerificationOfTruth,
|
|
202
204
|
} from './const'
|
|
203
205
|
import Cookies from 'js-cookie'
|
|
206
|
+
import { onUnmounted } from 'vue'
|
|
204
207
|
const emit = defineEmits(['edit', 'ok'])
|
|
205
208
|
const $props = defineProps({
|
|
206
209
|
listId: {
|
|
@@ -248,7 +251,7 @@ const getList = async () => {
|
|
|
248
251
|
// 保持选择状态
|
|
249
252
|
return {
|
|
250
253
|
...item,
|
|
251
|
-
selected: data.selected
|
|
254
|
+
selected: data.selected,
|
|
252
255
|
// ...Object.assign(data, item),
|
|
253
256
|
}
|
|
254
257
|
})
|
|
@@ -435,11 +438,13 @@ const ok = () => {
|
|
|
435
438
|
return obj
|
|
436
439
|
})
|
|
437
440
|
const filterTitleErr = selectData.some(
|
|
438
|
-
(item) =>
|
|
441
|
+
(item) =>
|
|
442
|
+
item.invoiceCompanyType === '异常抬头' ||
|
|
443
|
+
item.invoiceCompanyType === '异常税号'
|
|
439
444
|
)
|
|
440
|
-
console.log(filterTitleErr,'filterTitleErr')
|
|
445
|
+
console.log(filterTitleErr, 'filterTitleErr')
|
|
441
446
|
if (filterTitleErr) {
|
|
442
|
-
console.log(Cookies.get('teleport'),'teleport')
|
|
447
|
+
console.log(Cookies.get('teleport'), 'teleport')
|
|
443
448
|
showConfirmDialog({
|
|
444
449
|
title: '提醒',
|
|
445
450
|
message: '存在异常抬头发票,请确认是否继续提交?',
|
|
@@ -453,11 +458,12 @@ const ok = () => {
|
|
|
453
458
|
.catch((error) => {
|
|
454
459
|
console.log(error)
|
|
455
460
|
})
|
|
456
|
-
|
|
461
|
+
return
|
|
457
462
|
}
|
|
458
463
|
emit('ok', selectData, batchId.value)
|
|
459
464
|
}
|
|
460
465
|
const timeID: any = ref(null)
|
|
466
|
+
const timeID2: any = ref(null)
|
|
461
467
|
const setTimeGetList = () => {
|
|
462
468
|
getList()
|
|
463
469
|
.then((res: any) => {
|
|
@@ -466,17 +472,23 @@ const setTimeGetList = () => {
|
|
|
466
472
|
item.taskStatus === 'ocr_doing' || item.taskStatus === 'ocr_success'
|
|
467
473
|
)
|
|
468
474
|
if (!flag) {
|
|
475
|
+
clearTimeout(timeID.value)
|
|
476
|
+
clearTimeout(timeID2.value)
|
|
469
477
|
return
|
|
470
478
|
}
|
|
471
|
-
setTimeout(setTimeGetList, 2000)
|
|
479
|
+
timeID.value = setTimeout(setTimeGetList, 2000)
|
|
472
480
|
})
|
|
473
481
|
.catch((err) => {
|
|
474
|
-
setTimeout(setTimeGetList, 2000)
|
|
482
|
+
timeID2.value = setTimeout(setTimeGetList, 2000)
|
|
475
483
|
})
|
|
476
484
|
}
|
|
477
485
|
onMounted(() => {
|
|
478
486
|
setTimeGetList()
|
|
479
487
|
})
|
|
488
|
+
onUnmounted(() => {
|
|
489
|
+
clearTimeout(timeID.value)
|
|
490
|
+
clearTimeout(timeID2.value)
|
|
491
|
+
})
|
|
480
492
|
</script>
|
|
481
493
|
<style lang="scss" scoped>
|
|
482
494
|
.disabledColor {
|