mg-ocr-invoice 0.4.7 → 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 +10589 -11511
  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 +433 -404
  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="ok"
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
- const ok = () => {
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
  }
@@ -484,22 +514,19 @@ const ok = () => {
484
514
  item.invoiceCompanyType === '异常税号'
485
515
  )
486
516
  const ProhibitSubmissionFlag = filterTitleErr.some(
487
- (item) => item.invoiceRootType === '专票'
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;',
495
- innerHTML: '专票不允许出现异常抬头或异常税号,请取消勾选后继续提交',
525
+ innerHTML:
526
+ '专票和普票不允许出现异常抬头或异常税号,请取消勾选后继续提交',
496
527
  })
497
528
  },
498
- teleport: Cookies.get('teleport') || null,
499
- confirmButtonText: '确定',
500
- className: 'OCR-Zindex-OCR',
501
529
  showCancelButton: false,
502
- overlayClass: 'OCR-Zindex-OCR',
503
530
  })
504
531
  return
505
532
  }
@@ -507,11 +534,8 @@ const ok = () => {
507
534
  showConfirmDialog({
508
535
  title: '提醒',
509
536
  message: '存在异常抬头发票,请确认是否继续提交?',
510
- teleport: Cookies.get('teleport') || null,
511
- cancelButtonText: '返回修改',
512
- confirmButtonText: '继续提交',
513
- className: 'OCR-Zindex-OCR',
514
- overlayClass: 'OCR-Zindex-OCR',
537
+ cancelText: '返回修改',
538
+ confirmText: '继续提交',
515
539
  })
516
540
  .then(() => {
517
541
  emit('ok', selectData, batchId.value)
@@ -552,6 +576,11 @@ onUnmounted(() => {
552
576
  })
553
577
  </script>
554
578
  <style lang="scss" scoped>
579
+ .select-item {
580
+ display: flex;
581
+ align-items: center;
582
+ gap: 12px;
583
+ }
555
584
  .disabledColor {
556
585
  opacity: 0.6; /* 降低不透明度以表示禁用状态 */
557
586
  cursor: not-allowed; /* 鼠标指针样式设置为禁用 */
@@ -560,13 +589,12 @@ onUnmounted(() => {
560
589
  padding-bottom: 100px;
561
590
  position: relative;
562
591
  width: 100%;
563
- min-height: 100vh;
592
+ height: 100%;
564
593
  background-color: #f3f4f6;
594
+ display: flex;
595
+ flex-direction: column;
565
596
  .selectAll {
566
597
  background-color: #f3f4f6;
567
- position: sticky;
568
- top: 0;
569
- z-index: 999;
570
598
  padding: 12px;
571
599
  display: flex;
572
600
  justify-content: space-between;
@@ -578,215 +606,214 @@ onUnmounted(() => {
578
606
  }
579
607
  .card {
580
608
  width: 100%;
581
- ul {
609
+ height: inherit;
610
+ overflow: auto;
611
+ .li {
612
+ width: 100%;
613
+ border-radius: 4px;
614
+ padding: 0 12px;
582
615
  display: flex;
583
- flex-direction: column;
584
- gap: 12px;
585
- .li {
586
- width: 100%;
587
- border-radius: 4px;
588
- padding: 0 12px;
589
- display: flex;
590
- align-items: center;
591
- gap: 12px;
592
- overflow: hidden;
616
+ align-items: center;
617
+ overflow: hidden;
618
+ margin-bottom: 12px;
619
+ .item-card {
620
+ flex: 1;
621
+ position: relative;
593
622
 
594
- .item-card {
595
- flex: 1;
596
- 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
+ }
597
656
 
598
- background-color: #fff;
599
- padding-bottom: 20px;
600
- min-width: 100%;
601
- .details-btn {
602
- position: absolute;
603
- bottom: 12px;
604
- right: 9px;
605
- border: 1px solid #dcdee0;
606
- padding: 4px 16px;
607
- font-size: 14px;
608
- color: #333;
609
- border-radius: 2px;
610
- }
611
- div.company {
612
- background-color: #ff8b26;
613
- }
614
- div.err {
615
- background-color: #d5001c;
616
- }
617
- .title {
618
- color: #fff;
657
+ .storeName {
658
+ padding: 0 12px;
659
+ .name {
619
660
  display: flex;
620
- width: max-content;
621
- text-align: center;
661
+ justify-content: space-between;
662
+ width: 100%;
622
663
  align-items: center;
623
- font-size: 12px;
624
- border-radius: 4px 0px 4px 0px;
625
- padding: 2px 4px;
626
- background-color: #266fe8;
627
- 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
+ }
628
673
  }
629
-
630
- .storeName {
631
- padding: 0 12px;
632
- .name {
633
- display: flex;
634
- justify-content: space-between;
635
- width: 100%;
636
- align-items: center;
637
- .left {
638
- font-size: 15px;
639
- color: #333333;
640
- 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;
641
692
  }
642
- .right {
643
- font-size: 12px;
644
- color: #ee0a24;
693
+ &.warning {
694
+ background-color: rgba(255, 251, 230, 1);
695
+ color: #ff8f26;
645
696
  }
646
- }
647
- .tags {
648
- display: flex;
649
- align-items: center;
650
- gap: 7px;
651
- margin-top: 8px;
652
- margin-bottom: 15px;
653
- .manual {
654
- background-color: #facd91;
655
- color: #c77458;
697
+ &.error {
698
+ background-color: rgba(255, 242, 240, 1);
699
+ color: #ff4d4f;
656
700
  }
657
- span {
658
- padding: 2px 4px;
659
- font-size: 12px;
660
- font-weight: 400;
661
- border-radius: 2px;
662
- &.ok {
663
- background-color: rgba(38, 111, 232, 0.1);
664
- color: #266fe8;
665
- }
666
- &.warning {
667
- background-color: rgba(255, 251, 230, 1);
668
- color: #ff8f26;
669
- }
670
- &.error {
671
- background-color: rgba(255, 242, 240, 1);
672
- color: #ff4d4f;
673
- }
674
- &.default {
675
- background-color: rgba(153, 153, 153, 0.2);
676
- color: #666666;
677
- }
678
- &.success {
679
- background-color: #e6ffdd;
680
- 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;
681
708
 
682
- opacity: 0.68;
683
- }
709
+ opacity: 0.68;
684
710
  }
685
711
  }
686
- .InvoiceInfo {
687
- display: flex;
688
- justify-content: space-between;
689
- .leftinfo {
690
- .item-info {
691
- display: flex;
692
- align-items: center;
693
- gap: 16px;
694
- margin-bottom: 8px;
695
- &:last-child {
696
- 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;
697
732
  }
698
- span {
699
- font-size: 14px;
700
- &.label {
701
- color: #999999;
702
- }
703
- &.value {
704
- color: #333333;
705
- }
706
- &.price {
707
- color: #266fe8;
708
- font-weight: 700;
709
- }
733
+ &.price {
734
+ color: #266fe8;
735
+ font-weight: 700;
710
736
  }
711
737
  }
712
738
  }
713
- .rightCheckbox {
714
- height: max-content;
715
- }
739
+ }
740
+ .rightCheckbox {
741
+ height: max-content;
716
742
  }
717
743
  }
718
744
  }
745
+ }
719
746
 
720
- .err-card {
721
- background-color: #fff;
722
- width: 100%;
723
- display: flex;
724
- gap: 9px;
725
- .left-img {
726
- width: 113px;
727
- height: 79px;
728
- margin: 10px 0;
729
- margin-left: 10px;
730
- flex-shrink: 0;
731
- img {
732
- width: 100%;
733
- height: 100%;
734
- }
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%;
735
761
  }
736
- .right-errText {
737
- .title {
738
- color: #fff;
739
- display: flex;
740
- text-align: right;
741
- align-items: center;
742
- justify-content: flex-end;
743
- margin-bottom: 5px;
744
- span {
745
- background-color: rgba(238, 10, 36, 0.1);
746
- color: #ee0a24;
747
- padding: 2px 4px;
748
- font-size: 12px;
749
- border-radius: 0 4px 0 4px;
750
- }
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;
751
777
  }
752
- .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;
753
787
  display: flex;
754
- padding-right: 12px;
755
- align-items: center;
756
- font-size: 12px;
757
- gap: 18px;
758
- .recognitionResult {
759
- gap: 5px;
760
- display: flex;
761
- flex-direction: column;
762
- justify-content: space-between;
763
- p {
764
- color: #666666;
765
- }
788
+ flex-direction: column;
789
+ justify-content: space-between;
790
+ p {
791
+ color: #666666;
792
+ font-size: 14px;
766
793
  }
767
794
  }
768
795
  }
769
796
  }
770
797
  }
771
- .loading {
772
- position: absolute;
773
- left: 50%;
774
- top: 50%;
775
- transform: translate(-50%, -50%);
776
- z-index: 100;
777
- }
798
+ }
799
+ .loading {
800
+ position: absolute;
801
+ left: 50%;
802
+ top: 50%;
803
+ transform: translate(-50%, -50%);
804
+ z-index: 100;
778
805
  }
779
806
  }
780
807
 
781
808
  .btn-form {
782
- z-index: 999;
809
+ // z-index: 999;
810
+ z-index: 99;
783
811
  position: fixed;
784
812
  bottom: 0;
785
813
  left: 0;
786
814
  background-color: #fff;
787
815
  height: 90px;
788
816
  width: 100%;
789
-
790
817
  .operate {
791
818
  width: 100%;
792
819
  height: 100%;
@@ -856,7 +883,7 @@ onUnmounted(() => {
856
883
  }
857
884
 
858
885
  /* 重置复选框的默认样式 */
859
- .checkbox {
886
+ .inv-checkbox {
860
887
  appearance: none; /* 去除默认外观 */
861
888
  -webkit-appearance: none;
862
889
  -moz-appearance: none;
@@ -867,12 +894,14 @@ onUnmounted(() => {
867
894
  border-radius: 50%; /* 使复选框成为圆形 */
868
895
  outline: none; /* 去除点击时的边框 */
869
896
  cursor: pointer;
897
+ position: relative;
870
898
  }
871
899
 
872
900
  /* 根据复选框的选中状态设置颜色 */
873
- .checkbox:checked {
901
+ .inv-checkbox:checked {
874
902
  width: 22px;
875
903
  height: 22px;
904
+ border-radius: 50%; /* 使复选框成为圆形 */
876
905
  background: url('@/assets/xuanzhong@2x.png') no-repeat center;
877
906
  background-size: 110%;
878
907
  border: none;