mg-ocr-invoice 0.2.7 → 0.2.9

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" | "warning" | "ok" | "default";
6
+ export declare const setClass: (type: any) => "error" | "ok" | "default" | "warning";
7
7
  export declare const VerificationOfTruth: (obj: any) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mg-ocr-invoice",
3
3
  "private": false,
4
- "version": "0.2.7",
4
+ "version": "0.2.9",
5
5
  "type": "module",
6
6
  "types": "dist/types/index.d.ts",
7
7
  "module": "dist/index.es.js",
@@ -331,7 +331,8 @@ const isEdit = computed(() => {
331
331
  props.invoiceData.realStatus === 'noNeed' ||
332
332
  props.invoiceData.invoiceExceptionInfo === 'abnormal' ||
333
333
  props.invoiceData.manualModify ||
334
- props.invoiceData.rerealStatus === 'checkFail'
334
+ props.invoiceData.realStatus === 'checkFail'||
335
+ props.invoiceData.realStatus === 'notCheck'
335
336
  )
336
337
  })
337
338
  const submit = async () => {
@@ -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
 
@@ -292,6 +296,9 @@ const selectStatus = (item: any) => {
292
296
  }
293
297
  const selectedAll: any = ref(false)
294
298
  const changeSelectAll = (v: any) => {
299
+ if (selectedAll.value) {
300
+ showToast('存在已使用或异常发票, 已自动过滤')
301
+ }
295
302
  list.value.forEach((item: any) => {
296
303
  item.selected = selectStatus(item) && selectedAll.value
297
304
  })