mg-ocr-invoice 0.3.2 → 0.3.4

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.
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
2
  export default _default;
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
4
4
  invoiceData?: any;
5
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  saveSuccess: (...args: any[]) => void;
7
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
8
8
  ids?: any;
9
9
  invoiceData?: any;
10
10
  }>>> & {
@@ -10,7 +10,7 @@ declare const _default: import("vue").DefineComponent<{
10
10
  };
11
11
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  saveSuccess: (...args: any[]) => void;
13
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  ids: {
15
15
  type: ObjectConstructor;
16
16
  required: true;
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
13
13
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  ok: (...args: any[]) => void;
15
15
  edit: (...args: any[]) => void;
16
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
17
  listId: {
18
18
  required: false;
19
19
  type: StringConstructor;
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  };
19
19
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
20
  submit: (...args: any[]) => void;
21
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  token: {
23
23
  required: false;
24
24
  type: StringConstructor;
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
4
4
  batchId?: any;
5
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  uploadSuccess: (...args: any[]) => void;
7
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
7
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
8
8
  multiple?: any;
9
9
  batchId?: any;
10
10
  }>>> & {
@@ -1,3 +1,4 @@
1
1
  export declare const processImage: (file: any) => Promise<unknown>;
2
2
  export declare const takePhoto: () => Promise<any>;
3
+ export declare const fileType: string[];
3
4
  export declare const selectPhoto: (multiple: boolean) => Promise<any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mg-ocr-invoice",
3
3
  "private": false,
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
5
  "type": "module",
6
6
  "types": "dist/types/index.d.ts",
7
7
  "module": "dist/index.es.js",
@@ -337,6 +337,7 @@ const submit = async () => {
337
337
  showToast({
338
338
  type: 'success',
339
339
  message: '保存成功',
340
+ teleport:'#iDOCRInvoice'
340
341
  })
341
342
  emit('saveSuccess')
342
343
  }
@@ -166,6 +166,8 @@ const submit = async () => {
166
166
  showToast({
167
167
  type: 'success',
168
168
  message: '保存成功',
169
+ teleport:'#iDOCRInvoice'
170
+
169
171
  })
170
172
  emit('saveSuccess')
171
173
  }
@@ -252,7 +252,11 @@ const getList = async () => {
252
252
  const clickItem = (row: any) => {
253
253
  console.log(row.invoiceStatus)
254
254
  if (row.invoiceStatus !== 'unused') {
255
- return showToast('发票已被使用!')
255
+ return showToast({
256
+ type: 'text',
257
+ teleport: '#iDOCRInvoice',
258
+ message: '发票已被使用!',
259
+ })
256
260
  }
257
261
  row.selected = !row.selected
258
262
  }
@@ -297,7 +301,11 @@ const selectStatus = (item: any) => {
297
301
  const selectedAll: any = ref(false)
298
302
  const changeSelectAll = (v: any) => {
299
303
  if (selectedAll.value) {
300
- showToast('存在已使用或异常发票, 已自动过滤')
304
+ showToast({
305
+ type: 'text',
306
+ message: '存在已使用或异常发票, 已自动过滤',
307
+ teleport: '#iDOCRInvoice',
308
+ })
301
309
  }
302
310
  list.value.forEach((item: any) => {
303
311
  item.selected = selectStatus(item) && selectedAll.value
@@ -311,7 +319,7 @@ const changeItemCheckbox = () => {
311
319
  }
312
320
  const deleteSelectItem = () => {
313
321
  if (selectId.value.length <= 0) {
314
- showToast({ type: 'text', message: '请先选择发票' })
322
+ showToast({ type: 'text', message: '请先选择发票' ,teleport: '#iDOCRInvoice',})
315
323
  return
316
324
  }
317
325
  showConfirmDialog({
@@ -325,7 +333,7 @@ const deleteSelectItem = () => {
325
333
  urlencoded.append('taskIds', idsStr)
326
334
  const res: any = await __deleteInvoice(urlencoded, token.value)
327
335
  if (res.code === 200) {
328
- showToast({ type: 'success', message: '移除成功' })
336
+ showToast({ type: 'success', message: '移除成功',teleport: '#iDOCRInvoice', })
329
337
  getList()
330
338
  }
331
339
  })
@@ -353,6 +361,7 @@ const selectImg = async (type: number) => {
353
361
  showToast({
354
362
  type: 'success',
355
363
  message: '上传成功',
364
+ teleport: '#iDOCRInvoice',
356
365
  })
357
366
  setTimeGetList()
358
367
  }
@@ -382,13 +391,14 @@ const openErrImg = (url: any) => {
382
391
  }
383
392
  const ok = () => {
384
393
  if (selectId.value.length <= 0) {
385
- showToast({ type: 'text', message: '请先选择发票' })
394
+ showToast({ type: 'text', message: '请先选择发票',teleport: '#iDOCRInvoice', })
386
395
  return
387
396
  }
388
397
  if (!submitBtn.value) {
389
398
  showToast({
390
399
  type: 'text',
391
400
  message: '发票无效或已被使用,请进行确认',
401
+ teleport: '#iDOCRInvoice',
392
402
  })
393
403
  return
394
404
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="OCRInvoice">
2
+ <div class="OCRInvoice" id="iDOCRInvoice">
3
3
  <div v-if="activePage === 1" class="box">
4
4
  <PaymentMode
5
5
  :batchId="batchId"
@@ -72,6 +72,7 @@ const handleClickText = async (text: any) => {
72
72
  showToast({
73
73
  type: 'success',
74
74
  message: '上传成功',
75
+ teleport: '#iDOCRInvoice',
75
76
  })
76
77
  emit('uploadSuccess', res.data)
77
78
  }