mg-ocr-invoice 0.1.8 → 0.1.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.
@@ -13,6 +13,9 @@ declare const _default: import("vue").DefineComponent<{
13
13
  OCR_AuthDomain: {
14
14
  required: false;
15
15
  };
16
+ batchId: {
17
+ required: false;
18
+ };
16
19
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
20
  token: {
18
21
  required: false;
@@ -28,6 +31,9 @@ declare const _default: import("vue").DefineComponent<{
28
31
  OCR_AuthDomain: {
29
32
  required: false;
30
33
  };
34
+ batchId: {
35
+ required: false;
36
+ };
31
37
  }>> & {
32
38
  onSubmit?: ((...args: any[]) => any) | undefined;
33
39
  }, {
@@ -1,11 +1,14 @@
1
1
  import '@/utils/disableZoom';
2
2
  declare const _default: import("vue").DefineComponent<Readonly<{
3
3
  multiple?: any;
4
+ batchId?: any;
4
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "uploadSuccess"[], "uploadSuccess", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
5
6
  multiple?: any;
7
+ batchId?: any;
6
8
  }>>> & {
7
9
  onUploadSuccess?: ((...args: any[]) => any) | undefined;
8
10
  }, {
9
11
  readonly multiple?: any;
12
+ readonly batchId?: any;
10
13
  }, {}>;
11
14
  export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mg-ocr-invoice",
3
3
  "private": false,
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "type": "module",
6
6
  "types": "dist/types/index.d.ts",
7
7
  "module": "dist/index.es.js",
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div class="OCRInvoice">
3
3
  <PaymentMode
4
+ :batchId="batchId"
4
5
  :multiple="multiple"
5
6
  @uploadSuccess="uploadSuccess"
6
7
  v-if="activePage === 1"></PaymentMode>
@@ -34,7 +35,7 @@ const setLog = () => {
34
35
  }
35
36
  setLog()
36
37
  const emit = defineEmits(['submit'])
37
- const { token, multiple, Base_URL, OCR_AuthDomain } = defineProps({
38
+ const { token, multiple, Base_URL, OCR_AuthDomain, batchId } = defineProps({
38
39
  token: {
39
40
  required: false,
40
41
  type: String,
@@ -49,6 +50,9 @@ const { token, multiple, Base_URL, OCR_AuthDomain } = defineProps({
49
50
  OCR_AuthDomain: {
50
51
  required: false,
51
52
  },
53
+ batchId: {
54
+ required: false,
55
+ },
52
56
  })
53
57
  const tempToken =
54
58
  'z7v5gIDRD-sMhb9lRaspBmrWU8y--e5YK2xqWxMCIMTqBReMcoHNTJQ3XyNBdHmLVHiwommCp-HtP4wWSiK9oZDwTWvCW9CZswjLNNL4nGM'
@@ -32,7 +32,7 @@ import '@/utils/disableZoom'
32
32
  import { selectPhoto, takePhoto } from '@/utils/upload'
33
33
  import { __uploadInvoice } from '@/api/invoice'
34
34
  import { showToast, Overlay, Loading, showFailToast } from 'vant'
35
- const { multiple } = defineProps(['multiple'])
35
+ const props = defineProps(['multiple', 'batchId'])
36
36
  const emit = defineEmits(['uploadSuccess'])
37
37
  const payList: any = [
38
38
  {
@@ -60,8 +60,12 @@ const handleClickText = async (text: any) => {
60
60
  fd = await takePhoto()
61
61
  }
62
62
  if (text == '相册') {
63
- fd = await selectPhoto(multiple)
63
+ fd = await selectPhoto(props.multiple)
64
64
  }
65
+ if (props.batchId) {
66
+ fd.append('batchId', props.batchId)
67
+ }
68
+ console.log(props.batchId,'props.batchIdprops.batchIdprops.batchId')
65
69
  showLoading.value = true
66
70
  try {
67
71
  const res: any = await __uploadInvoice(fd)