mg-ocr-invoice 0.4.8 → 0.4.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.
Files changed (30) hide show
  1. package/dist/index.es.js +10587 -11509
  2. package/dist/index.umd.js +41 -41
  3. package/dist/style.css +9 -1
  4. package/dist/types/components/InoviceConfirmDialog/InoviceConfirmDialog.vue.d.ts +114 -0
  5. package/dist/types/components/Invoice/index.vue.d.ts +1 -0
  6. package/dist/types/components/InvoiceList/Skeleton.vue.d.ts +14 -0
  7. package/dist/types/components/InvoiceList/const.d.ts +1 -1
  8. package/dist/types/components/InvoiceList/index.vue.d.ts +1 -0
  9. package/dist/types/components/InvoicePopup/InvoicePopup.vue.d.ts +61 -0
  10. package/dist/types/components/Loading/index.vue.d.ts +11 -0
  11. package/dist/types/components/Message/index.vue.d.ts +32 -0
  12. package/dist/types/components/OCRInvoice/const.d.ts +0 -2
  13. package/dist/types/index.d.ts +0 -1
  14. package/dist/types/main.d.ts +0 -1
  15. package/dist/types/utils/common.d.ts +3 -0
  16. package/dist/types/utils/components.d.ts +35 -0
  17. package/dist/types/utils/upload.d.ts +0 -1
  18. package/package.json +3 -3
  19. package/src/components/InoviceConfirmDialog/InoviceConfirmDialog.vue +273 -0
  20. package/src/components/Invoice/index.vue +327 -271
  21. package/src/components/InvoiceList/Skeleton.vue +121 -0
  22. package/src/components/InvoiceList/index.vue +429 -401
  23. package/src/components/InvoicePopup/InvoicePopup.vue +217 -0
  24. package/src/components/Loading/index.vue +60 -0
  25. package/src/components/Message/index.vue +108 -0
  26. package/src/components/OCRInvoice/const.ts +0 -4
  27. package/src/components/OCRInvoice/index.vue +5 -7
  28. package/src/components/PaymentMode/index.vue +25 -38
  29. package/dist/types/styles/vantimpCss.d.ts +0 -15
  30. package/dist/types/utils/getUrlParams.d.ts +0 -1
@@ -11,128 +11,136 @@
11
11
  @change.self="changeSelectAll"
12
12
  v-model="selectedAll"
13
13
  @click.stop
14
- class="checkbox" />
14
+ class="inv-checkbox" />
15
15
  </div>
16
16
  </div>
17
17
  <div class="card">
18
- <ul>
19
- <li v-for="(item, index) in list" :key="index" @click="clickItem(item)">
20
- <div class="li">
21
- <div
22
- class="item-card"
23
- v-if="
24
- item.taskStatus === 'finish' || item.taskStatus === 'repeat'
25
- ">
26
- <div class="details-btn" @click.stop="openDetails(item)">
27
- 详情
18
+ <div class="li" v-for="(item, index) in list" :key="index">
19
+ <div
20
+ @click="clickItem(item)"
21
+ class="item-card"
22
+ v-if="item.taskStatus === 'finish' || item.taskStatus === 'repeat'">
23
+ <div class="details-btn" @click.stop="openDetails(item)">
24
+ <i class="gg-more-alt"></i>
25
+ </div>
26
+ <div
27
+ class="title"
28
+ :class="{
29
+ company: item.invoiceCompanyType === '公司',
30
+ err:
31
+ item.invoiceCompanyType === '异常抬头' ||
32
+ item.invoiceCompanyType === '异常税号',
33
+ }">
34
+ {{ item.invoiceCompanyType }}
35
+ </div>
36
+ <div class="storeName">
37
+ <div class="name">
38
+ <div class="left">{{ item.sellerName }}</div>
39
+ <div class="right" v-if="item.taskStatus === 'repeat'">
40
+ 已收录
28
41
  </div>
29
- <div
30
- class="title"
31
- :class="{
32
- company: item.invoiceCompanyType === '公司',
33
- err:
34
- item.invoiceCompanyType === '异常抬头' ||
35
- item.invoiceCompanyType === '异常税号',
36
- }">
37
- {{ item.invoiceCompanyType }}
42
+ </div>
43
+ <div class="tags">
44
+ <span v-if="item.manualModify" class="manual"> 手工录入 </span>
45
+ <div v-else-if="item.invoiceExceptionInfo">
46
+ <span :class="setClass(item.invoiceExceptionInfo)">{{
47
+ const_invoiceExceptionInfo[item.invoiceExceptionInfo]
48
+ }}</span>
38
49
  </div>
39
- <div class="storeName">
40
- <div class="name">
41
- <div class="left">{{ item.sellerName }}</div>
42
- <div class="right" v-if="item.taskStatus === 'repeat'">
43
- 已收录
44
- </div>
50
+ <span v-else :class="setClass(item.realStatus)">{{
51
+ const_realStatus[item.realStatus]
52
+ }}</span>
53
+ <span :class="setClass(item.invoiceStatus)">{{
54
+ const_invoiceStatus[item.invoiceStatus]
55
+ }}</span>
56
+ </div>
57
+ <div class="InvoiceInfo">
58
+ <div class="leftinfo">
59
+ <div class="item-info">
60
+ <span class="label">发票金额</span>
61
+ <span class="value price"
62
+ >¥{{
63
+ item.priceTaxTotalFigure || item.noTaxAmountTotal
64
+ }}</span
65
+ >
45
66
  </div>
46
- <div class="tags">
47
- <span v-if="item.manualModify" class="manual">
48
- 手工录入
49
- </span>
50
- <div v-else-if="item.invoiceExceptionInfo">
51
- <span :class="setClass(item.invoiceExceptionInfo)">{{
52
- const_invoiceExceptionInfo[item.invoiceExceptionInfo]
53
- }}</span>
54
- </div>
55
- <span v-else :class="setClass(item.realStatus)">{{
56
- const_realStatus[item.realStatus]
57
- }}</span>
58
- <span :class="setClass(item.invoiceStatus)">{{
59
- const_invoiceStatus[item.invoiceStatus]
67
+ <div class="item-info">
68
+ <span class="label">发票抬头</span>
69
+ <span class="value">{{ item.payerName }}</span>
70
+ </div>
71
+ <div class="item-info">
72
+ <span class="label">发票类型</span>
73
+ <span class="value">{{ item.invoiceRootType }}</span>
74
+ </div>
75
+ <div class="item-info">
76
+ <span class="label" style="flex-shrink: 0">发票号码</span>
77
+ <span class="value" v-if="item.invoiceNum">{{
78
+ item.invoiceNum
60
79
  }}</span>
80
+ <span class="value" style="color: red; font-size: 12px" v-else
81
+ >未识别出发票号码,不允许使用,请点击右上角,进入详情修改</span
82
+ >
61
83
  </div>
62
- <div class="InvoiceInfo">
63
- <div class="leftinfo">
64
- <div class="item-info">
65
- <span class="label">发票金额</span>
66
- <span class="value price"
67
- >¥{{
68
- item.priceTaxTotalFigure || item.noTaxAmountTotal
69
- }}</span
70
- >
71
- </div>
72
- <div class="item-info">
73
- <span class="label">发票抬头</span>
74
- <span class="value">{{ item.payerName }}</span>
75
- </div>
76
- <div class="item-info">
77
- <span class="label">发票类型</span>
78
- <span class="value">{{ item.invoiceRootType }}</span>
79
- </div>
80
- <div class="item-info">
81
- <span class="label">发票时间</span>
82
- <span class="value">{{ item.invoiceDate }}</span>
83
- </div>
84
- </div>
85
- <div class="rightCheckbox">
86
- <input
87
- @click.stop
88
- type="checkbox"
89
- class="checkbox"
90
- @change="changeItemCheckbox"
91
- v-model="item.selected"
92
- icon-size="22px" />
93
- </div>
84
+ <div class="item-info">
85
+ <span class="label">发票时间</span>
86
+ <span class="value">{{ item.invoiceDate }}</span>
94
87
  </div>
95
88
  </div>
96
- </div>
97
-
98
- <div
99
- v-else-if="
100
- item.taskStatus === 'ocr_doing' ||
101
- item.taskStatus === 'ocr_success'
102
- "
103
- style="
104
- background-color: #fff;
105
- padding: 21px 0 15px 12px;
106
- position: relative;
107
- width: 100%;
108
- ">
109
- <Loading class="loading" color="#0094ff">识别中...</Loading>
110
- <Skeleton :loading="true" title :row="6"></Skeleton>
111
- </div>
112
- <div class="err-card" v-else>
113
- <div class="left-img" @click="openErrImg(item.fileUrlKey)">
114
- <img :src="item.fileUrlKey" alt="" />
89
+ <div class="rightCheckbox">
90
+ <input
91
+ @click.stop
92
+ type="checkbox"
93
+ class="inv-checkbox"
94
+ @change="changeItemCheckbox"
95
+ v-model="item.selected"
96
+ icon-size="22px" />
115
97
  </div>
116
- <div class="right-errText">
117
- <div class="title"><span>识别失败</span></div>
118
- <div class="content">
119
- <div class="recognitionResult">
120
- <p class="errContent">OCR识别失败</p>
121
- <p>可以重新拍照识别,或手动添加信息导入</p>
122
- </div>
123
- <div>
124
- <input
125
- type="checkbox"
126
- class="checkbox"
127
- @click.stop
128
- v-model="item.selected" />
129
- </div>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <div
102
+ v-else-if="
103
+ item.taskStatus === 'ocr_doing' || item.taskStatus === 'ocr_success'
104
+ "
105
+ style="
106
+ background-color: #fff;
107
+ padding: 21px 0 15px 12px;
108
+ position: relative;
109
+ width: 100%;
110
+ ">
111
+ <Loading
112
+ class="loading"
113
+ style="background-color: rgba(255, 255, 255, 0.5)"
114
+ loadingText="识别中..."></Loading>
115
+ <Skeleton :loading="true" title :row="5"></Skeleton>
116
+ </div>
117
+ <div class="err-card" v-else>
118
+ <div class="left-img" @click="openErrImg(item.fileUrlKey)">
119
+ <img :src="item.fileUrlKey" alt="" />
120
+ </div>
121
+ <div class="right-errText">
122
+ <div class="title"><span>识别失败</span></div>
123
+ <div class="content">
124
+ <div class="recognitionResult">
125
+ <div v-if="item.statusInfo">
126
+ {{ item.statusInfo }}
130
127
  </div>
128
+ <div v-else>
129
+ <p class="errContent">OCR识别失败</p>
130
+ <p>可以重新拍照识别,或手动添加信息导入</p>
131
+ </div>
132
+ </div>
133
+ <div>
134
+ <input
135
+ type="checkbox"
136
+ class="inv-checkbox"
137
+ @click.stop
138
+ v-model="item.selected" />
131
139
  </div>
132
140
  </div>
133
141
  </div>
134
- </li>
135
- </ul>
142
+ </div>
143
+ </div>
136
144
  </div>
137
145
  <div class="btn-form">
138
146
  <div class="operate">
@@ -140,47 +148,54 @@
140
148
  <span>移除</span>
141
149
  </div>
142
150
  <div class="right-btn">
143
- <span class="add" @click="add">继续添加发票</span>
144
- <span class="ok" :class="{ disabledColor: !submitBtn }" @click="submitData"
151
+ <span class="add" @click.stop="add">继续添加发票</span>
152
+ <span
153
+ class="ok"
154
+ :class="{ disabledColor: !submitBtn }"
155
+ @click="submitData"
145
156
  >确定选择</span
146
157
  >
147
158
  </div>
148
159
  </div>
149
160
  </div>
161
+ <InvoicePopup
162
+ title="添加发票"
163
+ @onSelect="onSelect"
164
+ :options="options"
165
+ v-model="showPopup">
166
+ <template #OCR-action-sheet-item="{ item }: any">
167
+ <div class="select-item">
168
+ <span :class="[item.icon]"></span>
169
+ <span>{{ item.name }}</span>
170
+ </div>
171
+ </template>
172
+ </InvoicePopup>
173
+ <InvoicePopup
174
+ @onSelect="CardEdit"
175
+ :options="CardEditOptions"
176
+ v-model="showCardEdit">
177
+ <template #OCR-action-sheet-item="{ item }: any">
178
+ <div class="select-item">
179
+ <span :class="[item.icon]"></span>
180
+ <span>{{ item.name }}</span>
181
+ </div>
182
+ </template>
183
+ </InvoicePopup>
184
+ <!-- <ActionSheet
185
+ title="请选择操作"
186
+ cancel-text="取消"
187
+ v-if="showCardEdit"
188
+ close-on-click-action
189
+ :actions="actions"
190
+ v-model:show="showCardEdit"
191
+ @select="CardEdit"></ActionSheet> -->
150
192
  </div>
151
- <Popup
152
- :z-index="9527"
153
- v-model:show="showPopup"
154
- :teleport="Cookies.get('teleport') || null"
155
- position="bottom"
156
- closeable>
157
- <div class="boxPopup">
158
- <div class="title">
159
- <span>添加发票</span>
160
- </div>
161
- <div style="padding-bottom: 24px" @click="selectImg(1)">从相册中选择</div>
162
- <div @click="selectImg(2)">拍照上传</div>
163
- </div>
164
- </Popup>
165
- <Overlay
166
- :z-index="9527"
167
- style="display: flex; justify-content: center; align-items: center"
168
- :show="showLoading">
169
- <Loading class="loading" color="#0094ff">上传中...</Loading>
170
- </Overlay>
171
193
  </template>
172
194
  <!-- 异常发票, 已使用的, 使用中的, 识别失败 禁止提交 -->
173
195
  <script setup lang="ts">
174
196
  import { ref, onMounted, computed, h } from 'vue'
175
- import {
176
- Popup,
177
- Skeleton,
178
- Loading,
179
- showToast,
180
- showConfirmDialog,
181
- Overlay,
182
- showImagePreview,
183
- } from 'vant'
197
+ import InvoicePopup from '../InvoicePopup/InvoicePopup.vue'
198
+ import Skeleton from './Skeleton.vue'
184
199
  import '@/utils/disableZoom'
185
200
  import { selectPhoto, takePhoto } from '@/utils/upload'
186
201
  import {
@@ -197,7 +212,16 @@ import {
197
212
  } from './const'
198
213
  import Cookies from 'js-cookie'
199
214
  import { onUnmounted } from 'vue'
215
+ import { api as viewerApi } from 'v-viewer'
216
+ import 'viewerjs/dist/viewer.css'
217
+ import { OCR_getMaxZIndex } from '@/utils/common'
218
+ import {
219
+ CreateLoading,
220
+ showConfirmDialog,
221
+ showMessage,
222
+ } from '@/utils/components'
200
223
 
224
+ import Loading from '../Loading/index.vue'
201
225
  const emit = defineEmits(['edit', 'ok'])
202
226
  const $props = defineProps({
203
227
  listId: {
@@ -233,7 +257,6 @@ const $props = defineProps({
233
257
  },
234
258
  })
235
259
  const token: any = ref(sessionStorage.getItem('token'))
236
- const showLoading = ref(false)
237
260
  const showPopup = ref(false)
238
261
  const list: any = ref<Array<any>>([])
239
262
  if ($props.catchList) {
@@ -266,7 +289,6 @@ const getList = async () => {
266
289
  // ...Object.assign(data, item),
267
290
  }
268
291
  })
269
- console.log(list.value)
270
292
  batchId.value = res.data.batchId
271
293
  if (list.value.length <= 0) {
272
294
  selectedAll.value = false
@@ -281,24 +303,38 @@ const getList = async () => {
281
303
  }
282
304
  })
283
305
  }
306
+ const CardEditOptions = ref([{ name: '查看/编辑发票' }])
307
+ const activeRow: any = ref({})
308
+ const showCardEdit = ref(false)
309
+ const CardEdit = (val: any) => {
310
+ if (val.name === '查看/编辑发票') {
311
+ emit(
312
+ 'edit',
313
+ {
314
+ taskId: activeRow.value.taskId,
315
+ batchId: batchId.value,
316
+ },
317
+ activeRow.value,
318
+ list.value
319
+ )
320
+ }
321
+ }
284
322
  const clickItem = (row: any) => {
285
- console.log(row)
286
323
  if (!row.invoiceStatus) {
287
- return showToast({
288
- type: 'text',
324
+ return showMessage({
289
325
  teleport: Cookies.get('teleport') || null,
290
326
  message: '发票无效!',
291
- zIndex: 9527,
327
+ zIndex: OCR_getMaxZIndex() + 1,
292
328
  })
293
329
  }
294
330
  if (row.invoiceStatus !== 'unused') {
295
- return showToast({
296
- type: 'text',
297
- teleport: Cookies.get('teleport') || null,
331
+ return showMessage({
298
332
  message: '发票已被使用!',
299
- zIndex: 9527,
300
333
  })
301
334
  }
335
+ if (!row.invoiceNum) {
336
+ return
337
+ }
302
338
  row.selected = !row.selected
303
339
  }
304
340
 
@@ -306,18 +342,15 @@ const openDetails = (row: any) => {
306
342
  // if (!isEdit(row)) {
307
343
  // return
308
344
  // }
309
- emit(
310
- 'edit',
311
- {
312
- taskId: row.taskId,
313
- batchId: batchId.value,
314
- },
315
- row,
316
- list.value
317
- )
345
+ showCardEdit.value = true
346
+ activeRow.value = row
347
+ return
318
348
  }
319
349
  const selectStatus = (item: any) => {
320
350
  // 未使用&& (验真通过||无需验真|| 手工录入||验真异常) && 发票推断状态错误值为空 && 发票识别任务已完成
351
+ if (!item.invoiceNum) {
352
+ return false
353
+ }
321
354
  if (item.invoiceStatus === 'unused') {
322
355
  if (item.manualModify) {
323
356
  return true
@@ -333,11 +366,8 @@ const selectStatus = (item: any) => {
333
366
  const selectedAll: any = ref(false)
334
367
  const changeSelectAll = (v: any) => {
335
368
  if (selectedAll.value) {
336
- showToast({
337
- type: 'text',
369
+ showMessage({
338
370
  message: '已选择全部可用发票',
339
- teleport: Cookies.get('teleport') || null,
340
- zIndex: 9527,
341
371
  })
342
372
  }
343
373
  list.value.forEach((item: any) => {
@@ -348,63 +378,65 @@ const changeItemCheckbox = () => {
348
378
  const status = list.value
349
379
  .filter((item: any) => selectStatus(item))
350
380
  .every((item: any) => item.selected)
351
- selectedAll.value = status
381
+ selectedAll.value = status && selectId.value.length > 0
352
382
  }
353
383
  const deleteSelectItem = () => {
354
384
  if (selectId.value.length <= 0) {
355
- showToast({
356
- type: 'text',
385
+ showMessage({
357
386
  message: '请先选择发票',
358
- teleport: Cookies.get('teleport') || null,
359
- zIndex: 9527,
360
387
  })
361
388
  return
362
389
  }
363
390
  showConfirmDialog({
364
391
  title: '提醒',
365
392
  message: '请确认是否需要移除选中项,移除后不可恢复!',
366
- teleport: Cookies.get('teleport') || null,
367
- className: 'OCR-Zindex-OCR',
368
- overlayClass: 'OCR-Zindex-OCR',
393
+ }).then(async () => {
394
+ const idsStr = selectId.value.join(',')
395
+ let newData: any = {
396
+ batchId: batchId.value,
397
+ taskIds: idsStr,
398
+ }
399
+ newData = Object.assign(newData, paramsObj.value)
400
+ var urlencoded = new URLSearchParams()
401
+ for (const key in newData) {
402
+ urlencoded.append(key, newData[key])
403
+ }
404
+ const res: any = await __deleteInvoice(urlencoded, token.value)
405
+ if (res.code === 200) {
406
+ showMessage({
407
+ type: 'success',
408
+ message: '移除成功',
409
+ })
410
+ getList()
411
+ }
369
412
  })
370
- .then(async () => {
371
- const idsStr = selectId.value.join(',')
372
- let newData: any = {
373
- batchId: batchId.value,
374
- taskIds: idsStr,
375
- }
376
- newData = Object.assign(newData, paramsObj.value)
377
- var urlencoded = new URLSearchParams()
378
- for (const key in newData) {
379
- urlencoded.append(key, newData[key])
380
- }
381
- const res: any = await __deleteInvoice(urlencoded, token.value)
382
- if (res.code === 200) {
383
- showToast({
384
- type: 'success',
385
- message: '移除成功',
386
- teleport: Cookies.get('teleport') || null,
387
- zIndex: 9527,
388
- })
389
- getList()
390
- }
391
- })
392
- .catch(() => {
393
- // on cancel
394
- })
395
413
  }
396
414
  const add = () => {
397
415
  showPopup.value = true
398
416
  }
399
417
 
400
- const selectImg = async (type: number) => {
401
- let fd: FormData
402
- if (type === 1) {
403
- fd = await selectPhoto($props.multiple)
418
+ const options = ref([
419
+ {
420
+ name: '从相册中选择',
421
+ icon: 'gg-image',
422
+ },
423
+ {
424
+ name: '拍照上传',
425
+ icon: 'gg-smart-home-wash-machine',
426
+ },
427
+ ])
428
+ const onSelect = async (type: any) => {
429
+ console.log(type)
430
+ let files = []
431
+ if (type.name === '从相册中选择') {
432
+ files = await selectPhoto($props.multiple)
404
433
  } else {
405
- fd = await takePhoto()
434
+ files = await takePhoto()
435
+ }
436
+ let fd = new FormData()
437
+ for (let i = 0; i < files.length; i++) {
438
+ fd.append('invoiceFiles', files[i])
406
439
  }
407
-
408
440
  let newData: any = {
409
441
  businessLicense: $props.businessLicense || '',
410
442
  taxCode: $props.taxCode || '',
@@ -414,16 +446,15 @@ const selectImg = async (type: number) => {
414
446
  for (const key in newData) {
415
447
  fd.append(key, newData[key])
416
448
  }
417
- showLoading.value = true
449
+ const ld = new CreateLoading()
450
+ ld.show()
418
451
  showPopup.value = false
419
452
  try {
420
453
  const res: any = await __uploadInvoice(fd)
421
454
  if (res.code === 200) {
422
- showToast({
455
+ showMessage({
423
456
  type: 'success',
424
457
  message: '上传成功',
425
- teleport: Cookies.get('teleport') || null,
426
- zIndex: 9527,
427
458
  })
428
459
  setTimeGetList()
429
460
  }
@@ -431,7 +462,7 @@ const selectImg = async (type: number) => {
431
462
  console.log(error)
432
463
  setTimeGetList()
433
464
  }
434
- showLoading.value = false
465
+ ld.hide()
435
466
  }
436
467
  const submitBtn = computed(() => {
437
468
  const flag = list.value
@@ -449,24 +480,23 @@ const selectedLengthCount = computed(() => {
449
480
  return list.value.filter((item: any) => selectStatus(item)).length
450
481
  })
451
482
  const openErrImg = (url: any) => {
452
- showImagePreview([url])
483
+ viewerApi({
484
+ images: [url],
485
+ options: {
486
+ zIndex: OCR_getMaxZIndex() + 1,
487
+ },
488
+ })
453
489
  }
454
490
  const submitData = () => {
455
491
  if (selectId.value.length <= 0) {
456
- showToast({
457
- type: 'text',
492
+ showMessage({
458
493
  message: '请先选择发票',
459
- teleport: Cookies.get('teleport') || null,
460
- zIndex: 9527,
461
494
  })
462
495
  return
463
496
  }
464
497
  if (!submitBtn.value) {
465
- showToast({
466
- type: 'text',
498
+ showMessage({
467
499
  message: '发票无效或已被使用,请进行确认',
468
- teleport: Cookies.get('teleport') || null,
469
- zIndex: 9527,
470
500
  })
471
501
  return
472
502
  }
@@ -487,8 +517,8 @@ const submitData = () => {
487
517
  (item) => item.invoiceRootType === '专票' || item.invoiceRootType === '普票'
488
518
  )
489
519
  if (ProhibitSubmissionFlag) {
490
- console.log('专票和普票不允许出现异常抬头或异常税号,请取消勾选后继续提交')
491
520
  showConfirmDialog({
521
+ title: '财务要求',
492
522
  message: () => {
493
523
  return h('div', {
494
524
  style: 'color:#EF1725;',
@@ -496,11 +526,7 @@ const submitData = () => {
496
526
  '专票和普票不允许出现异常抬头或异常税号,请取消勾选后继续提交',
497
527
  })
498
528
  },
499
- teleport: Cookies.get('teleport') || null,
500
- confirmButtonText: '确定',
501
- className: 'OCR-Zindex-OCR',
502
529
  showCancelButton: false,
503
- overlayClass: 'OCR-Zindex-OCR',
504
530
  })
505
531
  return
506
532
  }
@@ -508,11 +534,8 @@ const submitData = () => {
508
534
  showConfirmDialog({
509
535
  title: '提醒',
510
536
  message: '存在异常抬头发票,请确认是否继续提交?',
511
- teleport: Cookies.get('teleport') || null,
512
- cancelButtonText: '返回修改',
513
- confirmButtonText: '继续提交',
514
- className: 'OCR-Zindex-OCR',
515
- overlayClass: 'OCR-Zindex-OCR',
537
+ cancelText: '返回修改',
538
+ confirmText: '继续提交',
516
539
  })
517
540
  .then(() => {
518
541
  emit('ok', selectData, batchId.value)
@@ -553,6 +576,11 @@ onUnmounted(() => {
553
576
  })
554
577
  </script>
555
578
  <style lang="scss" scoped>
579
+ .select-item {
580
+ display: flex;
581
+ align-items: center;
582
+ gap: 12px;
583
+ }
556
584
  .disabledColor {
557
585
  opacity: 0.6; /* 降低不透明度以表示禁用状态 */
558
586
  cursor: not-allowed; /* 鼠标指针样式设置为禁用 */
@@ -561,13 +589,12 @@ onUnmounted(() => {
561
589
  padding-bottom: 100px;
562
590
  position: relative;
563
591
  width: 100%;
564
- min-height: 100vh;
592
+ height: 100%;
565
593
  background-color: #f3f4f6;
594
+ display: flex;
595
+ flex-direction: column;
566
596
  .selectAll {
567
597
  background-color: #f3f4f6;
568
- position: sticky;
569
- top: 0;
570
- z-index: 999;
571
598
  padding: 12px;
572
599
  display: flex;
573
600
  justify-content: space-between;
@@ -579,215 +606,214 @@ onUnmounted(() => {
579
606
  }
580
607
  .card {
581
608
  width: 100%;
582
- ul {
609
+ height: inherit;
610
+ overflow: auto;
611
+ .li {
612
+ width: 100%;
613
+ border-radius: 4px;
614
+ padding: 0 12px;
583
615
  display: flex;
584
- flex-direction: column;
585
- gap: 12px;
586
- .li {
587
- width: 100%;
588
- border-radius: 4px;
589
- padding: 0 12px;
590
- display: flex;
591
- align-items: center;
592
- gap: 12px;
593
- overflow: hidden;
616
+ align-items: center;
617
+ overflow: hidden;
618
+ margin-bottom: 12px;
619
+ .item-card {
620
+ flex: 1;
621
+ position: relative;
594
622
 
595
- .item-card {
596
- flex: 1;
597
- position: relative;
623
+ background-color: #fff;
624
+ padding-bottom: 20px;
625
+ min-width: 100%;
626
+ .details-btn {
627
+ position: absolute;
628
+ top: 0;
629
+ right: 0;
630
+ padding: 0 8px 4px;
631
+ font-size: 14px;
632
+ color: #333;
633
+ border-radius: 2px;
634
+ flex-shrink: 0;
635
+ text-align: right;
636
+ padding: 8px 16px 16px 16px;
637
+ }
638
+ div.company {
639
+ background-color: #ff8b26;
640
+ }
641
+ div.err {
642
+ background-color: #d5001c;
643
+ }
644
+ .title {
645
+ color: #fff;
646
+ display: flex;
647
+ width: max-content;
648
+ text-align: center;
649
+ align-items: center;
650
+ font-size: 12px;
651
+ border-radius: 4px 0px 4px 0px;
652
+ padding: 2px 4px;
653
+ background-color: #266fe8;
654
+ margin-bottom: 5px;
655
+ }
598
656
 
599
- background-color: #fff;
600
- padding-bottom: 20px;
601
- min-width: 100%;
602
- .details-btn {
603
- position: absolute;
604
- bottom: 12px;
605
- right: 9px;
606
- border: 1px solid #dcdee0;
607
- padding: 4px 16px;
608
- font-size: 14px;
609
- color: #333;
610
- border-radius: 2px;
611
- }
612
- div.company {
613
- background-color: #ff8b26;
614
- }
615
- div.err {
616
- background-color: #d5001c;
617
- }
618
- .title {
619
- color: #fff;
657
+ .storeName {
658
+ padding: 0 12px;
659
+ .name {
620
660
  display: flex;
621
- width: max-content;
622
- text-align: center;
661
+ justify-content: space-between;
662
+ width: 100%;
623
663
  align-items: center;
624
- font-size: 12px;
625
- border-radius: 4px 0px 4px 0px;
626
- padding: 2px 4px;
627
- background-color: #266fe8;
628
- margin-bottom: 5px;
664
+ .left {
665
+ font-size: 15px;
666
+ color: #333333;
667
+ font-weight: 700;
668
+ }
669
+ .right {
670
+ font-size: 12px;
671
+ color: #ee0a24;
672
+ }
629
673
  }
630
-
631
- .storeName {
632
- padding: 0 12px;
633
- .name {
634
- display: flex;
635
- justify-content: space-between;
636
- width: 100%;
637
- align-items: center;
638
- .left {
639
- font-size: 15px;
640
- color: #333333;
641
- font-weight: 700;
674
+ .tags {
675
+ display: flex;
676
+ align-items: center;
677
+ gap: 7px;
678
+ margin-top: 8px;
679
+ margin-bottom: 15px;
680
+ .manual {
681
+ background-color: #facd91;
682
+ color: #c77458;
683
+ }
684
+ span {
685
+ padding: 2px 4px;
686
+ font-size: 12px;
687
+ font-weight: 400;
688
+ border-radius: 2px;
689
+ &.ok {
690
+ background-color: rgba(38, 111, 232, 0.1);
691
+ color: #266fe8;
642
692
  }
643
- .right {
644
- font-size: 12px;
645
- color: #ee0a24;
693
+ &.warning {
694
+ background-color: rgba(255, 251, 230, 1);
695
+ color: #ff8f26;
646
696
  }
647
- }
648
- .tags {
649
- display: flex;
650
- align-items: center;
651
- gap: 7px;
652
- margin-top: 8px;
653
- margin-bottom: 15px;
654
- .manual {
655
- background-color: #facd91;
656
- color: #c77458;
697
+ &.error {
698
+ background-color: rgba(255, 242, 240, 1);
699
+ color: #ff4d4f;
657
700
  }
658
- span {
659
- padding: 2px 4px;
660
- font-size: 12px;
661
- font-weight: 400;
662
- border-radius: 2px;
663
- &.ok {
664
- background-color: rgba(38, 111, 232, 0.1);
665
- color: #266fe8;
666
- }
667
- &.warning {
668
- background-color: rgba(255, 251, 230, 1);
669
- color: #ff8f26;
670
- }
671
- &.error {
672
- background-color: rgba(255, 242, 240, 1);
673
- color: #ff4d4f;
674
- }
675
- &.default {
676
- background-color: rgba(153, 153, 153, 0.2);
677
- color: #666666;
678
- }
679
- &.success {
680
- background-color: #e6ffdd;
681
- color: #2ba500;
701
+ &.default {
702
+ background-color: rgba(153, 153, 153, 0.2);
703
+ color: #666666;
704
+ }
705
+ &.success {
706
+ background-color: #e6ffdd;
707
+ color: #2ba500;
682
708
 
683
- opacity: 0.68;
684
- }
709
+ opacity: 0.68;
685
710
  }
686
711
  }
687
- .InvoiceInfo {
688
- display: flex;
689
- justify-content: space-between;
690
- .leftinfo {
691
- .item-info {
692
- display: flex;
693
- align-items: center;
694
- gap: 16px;
695
- margin-bottom: 8px;
696
- &:last-child {
697
- margin-bottom: 0;
712
+ }
713
+ .InvoiceInfo {
714
+ display: flex;
715
+ justify-content: space-between;
716
+ .leftinfo {
717
+ .item-info {
718
+ display: flex;
719
+ align-items: center;
720
+ gap: 16px;
721
+ margin-bottom: 8px;
722
+ &:last-child {
723
+ margin-bottom: 0;
724
+ }
725
+ span {
726
+ font-size: 14px;
727
+ &.label {
728
+ color: #999999;
729
+ }
730
+ &.value {
731
+ color: #333333;
698
732
  }
699
- span {
700
- font-size: 14px;
701
- &.label {
702
- color: #999999;
703
- }
704
- &.value {
705
- color: #333333;
706
- }
707
- &.price {
708
- color: #266fe8;
709
- font-weight: 700;
710
- }
733
+ &.price {
734
+ color: #266fe8;
735
+ font-weight: 700;
711
736
  }
712
737
  }
713
738
  }
714
- .rightCheckbox {
715
- height: max-content;
716
- }
739
+ }
740
+ .rightCheckbox {
741
+ height: max-content;
717
742
  }
718
743
  }
719
744
  }
745
+ }
720
746
 
721
- .err-card {
722
- background-color: #fff;
723
- width: 100%;
724
- display: flex;
725
- gap: 9px;
726
- .left-img {
727
- width: 113px;
728
- height: 79px;
729
- margin: 10px 0;
730
- margin-left: 10px;
731
- flex-shrink: 0;
732
- img {
733
- width: 100%;
734
- height: 100%;
735
- }
747
+ .err-card {
748
+ background-color: #fff;
749
+ width: 100%;
750
+ display: flex;
751
+ gap: 9px;
752
+ .left-img {
753
+ width: 113px;
754
+ height: 79px;
755
+ margin: 10px 0;
756
+ margin-left: 10px;
757
+ flex-shrink: 0;
758
+ img {
759
+ width: 100%;
760
+ height: 100%;
736
761
  }
737
- .right-errText {
738
- .title {
739
- color: #fff;
740
- display: flex;
741
- text-align: right;
742
- align-items: center;
743
- justify-content: flex-end;
744
- margin-bottom: 5px;
745
- span {
746
- background-color: rgba(238, 10, 36, 0.1);
747
- color: #ee0a24;
748
- padding: 2px 4px;
749
- font-size: 12px;
750
- border-radius: 0 4px 0 4px;
751
- }
762
+ }
763
+ .right-errText {
764
+ .title {
765
+ color: #fff;
766
+ display: flex;
767
+ text-align: right;
768
+ align-items: center;
769
+ justify-content: flex-end;
770
+ margin-bottom: 5px;
771
+ span {
772
+ background-color: rgba(238, 10, 36, 0.1);
773
+ color: #ee0a24;
774
+ padding: 2px 4px;
775
+ font-size: 12px;
776
+ border-radius: 0 4px 0 4px;
752
777
  }
753
- .content {
778
+ }
779
+ .content {
780
+ display: flex;
781
+ padding-right: 12px;
782
+ align-items: center;
783
+ font-size: 12px;
784
+ gap: 18px;
785
+ .recognitionResult {
786
+ gap: 5px;
754
787
  display: flex;
755
- padding-right: 12px;
756
- align-items: center;
757
- font-size: 12px;
758
- gap: 18px;
759
- .recognitionResult {
760
- gap: 5px;
761
- display: flex;
762
- flex-direction: column;
763
- justify-content: space-between;
764
- p {
765
- color: #666666;
766
- }
788
+ flex-direction: column;
789
+ justify-content: space-between;
790
+ p {
791
+ color: #666666;
792
+ font-size: 14px;
767
793
  }
768
794
  }
769
795
  }
770
796
  }
771
797
  }
772
- .loading {
773
- position: absolute;
774
- left: 50%;
775
- top: 50%;
776
- transform: translate(-50%, -50%);
777
- z-index: 100;
778
- }
798
+ }
799
+ .loading {
800
+ position: absolute;
801
+ left: 50%;
802
+ top: 50%;
803
+ transform: translate(-50%, -50%);
804
+ z-index: 100;
779
805
  }
780
806
  }
781
807
 
782
808
  .btn-form {
783
- z-index: 999;
809
+ // z-index: 999;
810
+ z-index: 99;
784
811
  position: fixed;
785
812
  bottom: 0;
786
813
  left: 0;
787
814
  background-color: #fff;
788
815
  height: 90px;
789
816
  width: 100%;
790
-
791
817
  .operate {
792
818
  width: 100%;
793
819
  height: 100%;
@@ -857,7 +883,7 @@ onUnmounted(() => {
857
883
  }
858
884
 
859
885
  /* 重置复选框的默认样式 */
860
- .checkbox {
886
+ .inv-checkbox {
861
887
  appearance: none; /* 去除默认外观 */
862
888
  -webkit-appearance: none;
863
889
  -moz-appearance: none;
@@ -868,12 +894,14 @@ onUnmounted(() => {
868
894
  border-radius: 50%; /* 使复选框成为圆形 */
869
895
  outline: none; /* 去除点击时的边框 */
870
896
  cursor: pointer;
897
+ position: relative;
871
898
  }
872
899
 
873
900
  /* 根据复选框的选中状态设置颜色 */
874
- .checkbox:checked {
901
+ .inv-checkbox:checked {
875
902
  width: 22px;
876
903
  height: 22px;
904
+ border-radius: 50%; /* 使复选框成为圆形 */
877
905
  background: url('@/assets/xuanzhong@2x.png') no-repeat center;
878
906
  background-size: 110%;
879
907
  border: none;