mg-ocr-invoice 0.2.6 → 0.2.8
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.
|
@@ -3,5 +3,5 @@ export declare const const_realStatus: any;
|
|
|
3
3
|
export declare const const_invoiceExceptionInfo: any;
|
|
4
4
|
export declare const const_manualModify: any;
|
|
5
5
|
export declare const const_taskStatus: any;
|
|
6
|
-
export declare const setClass: (type: any) => "error" | "
|
|
6
|
+
export declare const setClass: (type: any) => "error" | "ok" | "default" | "warning";
|
|
7
7
|
export declare const VerificationOfTruth: (obj: any) => any;
|
package/package.json
CHANGED
|
@@ -34,9 +34,9 @@ export const setClass = (type: any) => {
|
|
|
34
34
|
case 'invalid':
|
|
35
35
|
return 'error'
|
|
36
36
|
case 'unused':
|
|
37
|
-
return 'warning'
|
|
38
|
-
case 'using':
|
|
39
37
|
return 'ok'
|
|
38
|
+
case 'using':
|
|
39
|
+
return 'error'
|
|
40
40
|
case 'used':
|
|
41
41
|
return 'default'
|
|
42
42
|
case 'noNeed':
|
|
@@ -49,8 +49,6 @@ export const setClass = (type: any) => {
|
|
|
49
49
|
return 'error'
|
|
50
50
|
case 'abnormal':
|
|
51
51
|
return 'error'
|
|
52
|
-
case 'invalid':
|
|
53
|
-
return 'error'
|
|
54
52
|
default:
|
|
55
53
|
return 'ok'
|
|
56
54
|
}
|
|
@@ -250,6 +250,10 @@ const getList = async () => {
|
|
|
250
250
|
})
|
|
251
251
|
}
|
|
252
252
|
const clickItem = (row: any) => {
|
|
253
|
+
console.log(row.invoiceStatus)
|
|
254
|
+
if (row.invoiceStatus !== 'unused') {
|
|
255
|
+
return showToast('发票已被使用!')
|
|
256
|
+
}
|
|
253
257
|
row.selected = !row.selected
|
|
254
258
|
}
|
|
255
259
|
|
|
@@ -269,18 +273,32 @@ const openDetails = (row: any) => {
|
|
|
269
273
|
}
|
|
270
274
|
const selectStatus = (item: any) => {
|
|
271
275
|
// 未使用&& (验真通过||无需验真|| 手工录入||验真异常) && 发票推断状态错误值为空 && 发票识别任务已完成
|
|
272
|
-
if (item.invoiceStatus) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
if (item.invoiceStatus === 'unused') {
|
|
277
|
+
if (item.manualModify) {
|
|
278
|
+
return true
|
|
279
|
+
}
|
|
280
|
+
if (!item.invoiceExceptionInfo) {
|
|
281
|
+
return true
|
|
282
|
+
}
|
|
283
|
+
return false
|
|
278
284
|
} else {
|
|
279
285
|
return false
|
|
280
286
|
}
|
|
287
|
+
// if (item.invoiceStatus==='unused') {
|
|
288
|
+
// return true
|
|
289
|
+
// } else if (item.manualModify) {
|
|
290
|
+
// return true
|
|
291
|
+
// } else if (!item.invoiceExceptionInfo) {
|
|
292
|
+
// return true
|
|
293
|
+
// } else {
|
|
294
|
+
// return false
|
|
295
|
+
// }
|
|
281
296
|
}
|
|
282
297
|
const selectedAll: any = ref(false)
|
|
283
298
|
const changeSelectAll = (v: any) => {
|
|
299
|
+
if (selectedAll.value) {
|
|
300
|
+
showToast('存在已使用或异常发票, 已自动过滤')
|
|
301
|
+
}
|
|
284
302
|
list.value.forEach((item: any) => {
|
|
285
303
|
item.selected = selectStatus(item) && selectedAll.value
|
|
286
304
|
})
|