mg-ocr-invoice 0.2.4-beta0.9 → 0.2.6
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.
|
@@ -4,3 +4,4 @@ export declare const const_invoiceExceptionInfo: any;
|
|
|
4
4
|
export declare const const_manualModify: any;
|
|
5
5
|
export declare const const_taskStatus: any;
|
|
6
6
|
export declare const setClass: (type: any) => "error" | "warning" | "ok" | "default";
|
|
7
|
+
export declare const VerificationOfTruth: (obj: any) => any;
|
package/package.json
CHANGED
|
@@ -55,3 +55,27 @@ export const setClass = (type: any) => {
|
|
|
55
55
|
return 'ok'
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
export const VerificationOfTruth = (obj: any) => {
|
|
60
|
+
// 验真状态 1,绿色 2,黄色, 3,红色
|
|
61
|
+
let data: any = {}
|
|
62
|
+
if (
|
|
63
|
+
obj.realStatus === 'checked' ||
|
|
64
|
+
(obj.realStatus === 'noNeed' && !obj.manualModify)
|
|
65
|
+
) {
|
|
66
|
+
data.verifyTruth = 1
|
|
67
|
+
} else if (obj.manualModify) {
|
|
68
|
+
data.verifyTruth = 2
|
|
69
|
+
} else {
|
|
70
|
+
data.verifyTruth = 3
|
|
71
|
+
}
|
|
72
|
+
// 验重状态 1,绿色 2,黄色, 3,红色
|
|
73
|
+
if (obj.invoiceStatus === 'unused') {
|
|
74
|
+
data.checkWeight = 1
|
|
75
|
+
} else if (obj.invoiceStatus === 'invalid') {
|
|
76
|
+
data.checkWeight = 2
|
|
77
|
+
} else {
|
|
78
|
+
data.checkWeight = 3
|
|
79
|
+
}
|
|
80
|
+
return data
|
|
81
|
+
}
|
|
@@ -192,6 +192,7 @@ import {
|
|
|
192
192
|
const_taskStatus,
|
|
193
193
|
const_invoiceExceptionInfo,
|
|
194
194
|
setClass,
|
|
195
|
+
VerificationOfTruth,
|
|
195
196
|
} from './const'
|
|
196
197
|
import { showImagePreview } from 'vant'
|
|
197
198
|
const emit = defineEmits(['edit', 'ok'])
|
|
@@ -268,17 +269,15 @@ const openDetails = (row: any) => {
|
|
|
268
269
|
}
|
|
269
270
|
const selectStatus = (item: any) => {
|
|
270
271
|
// 未使用&& (验真通过||无需验真|| 手工录入||验真异常) && 发票推断状态错误值为空 && 发票识别任务已完成
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
item.manualModify)
|
|
281
|
-
)
|
|
272
|
+
if (item.invoiceStatus) {
|
|
273
|
+
return true
|
|
274
|
+
} else if (item.manualModify) {
|
|
275
|
+
return true
|
|
276
|
+
} else if (!item.invoiceExceptionInfo) {
|
|
277
|
+
return true
|
|
278
|
+
} else {
|
|
279
|
+
return false
|
|
280
|
+
}
|
|
282
281
|
}
|
|
283
282
|
const selectedAll: any = ref(false)
|
|
284
283
|
const changeSelectAll = (v: any) => {
|
|
@@ -379,29 +378,11 @@ const ok = () => {
|
|
|
379
378
|
const selectData = list.value
|
|
380
379
|
.filter((item: any) => item.selected)
|
|
381
380
|
.map((item: any) => {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
item.realStatus === 'checked' ||
|
|
386
|
-
(item.realStatus === 'noNeed' && !item.manualModify)
|
|
387
|
-
) {
|
|
388
|
-
obj.verifyTruth = 1
|
|
389
|
-
} else if (item.manualModify) {
|
|
390
|
-
obj.verifyTruth = 2
|
|
391
|
-
} else {
|
|
392
|
-
obj.verifyTruth = 3
|
|
393
|
-
}
|
|
394
|
-
// 验重状态 1,绿色 2,黄色, 3,红色
|
|
395
|
-
if (item.invoiceStatus === 'unused') {
|
|
396
|
-
obj.checkWeight = 1
|
|
397
|
-
} else if (item.invoiceStatus === 'invalid') {
|
|
398
|
-
obj.checkWeight = 2
|
|
399
|
-
} else {
|
|
400
|
-
obj.checkWeight = 3
|
|
401
|
-
}
|
|
381
|
+
VerificationOfTruth
|
|
382
|
+
let data = VerificationOfTruth(item)
|
|
383
|
+
let obj: any = { ...item, ...data }
|
|
402
384
|
return obj
|
|
403
385
|
})
|
|
404
|
-
console.log(selectData, 'selectData')
|
|
405
386
|
emit('ok', selectData, batchId.value)
|
|
406
387
|
}
|
|
407
388
|
const timeID: any = ref(null)
|