mg-ocr-invoice 0.4.8 → 0.4.10

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