ci-plus 1.7.1 → 1.7.3
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.
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module identificationCard
|
|
3
3
|
* @author : 卖女孩的小火柴
|
|
4
4
|
* ?description : 11月22日开会重新更新成品工厂标识卡
|
|
5
|
-
* !@version : 1.6.
|
|
5
|
+
* !@version : 1.6.2
|
|
6
6
|
* TODO:@since : 创建时间 2024-11-23 09:40:30
|
|
7
|
-
* !update : 2025-01-
|
|
7
|
+
* !update : 2025-01-14 调整装配标识卡模板
|
|
8
8
|
*/ -->
|
|
9
9
|
<template>
|
|
10
10
|
<div style="display: flex; flex-direction: column; height: 100%">
|
|
@@ -1147,15 +1147,15 @@
|
|
|
1147
1147
|
{{ item.r5c4 }}
|
|
1148
1148
|
</td>
|
|
1149
1149
|
</tr>
|
|
1150
|
-
<tr>
|
|
1151
|
-
<!-- 外圈编码
|
|
1150
|
+
<tr v-if="item.r6c2">
|
|
1151
|
+
<!-- 外圈编码 外圈批号 -->
|
|
1152
1152
|
<td>{{ item.r6c1 }}</td>
|
|
1153
1153
|
<td>{{ item.r6c2 }}</td>
|
|
1154
1154
|
<td>{{ item.r6c3 }}</td>
|
|
1155
1155
|
<td>{{ item.r6c4 }}</td>
|
|
1156
1156
|
</tr>
|
|
1157
|
-
<tr>
|
|
1158
|
-
<!--
|
|
1157
|
+
<tr v-if="item.r7c2">
|
|
1158
|
+
<!-- 内圈编码 内圈批号 -->
|
|
1159
1159
|
<td>{{ item.r7c1 }}</td>
|
|
1160
1160
|
<td>{{ item.r7c2 }}</td>
|
|
1161
1161
|
<td>{{ item.r7c3 }}</td>
|
package/src/utils/cardPrint.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module cardPrint
|
|
3
3
|
* @author : 卖女孩的小火柴
|
|
4
4
|
* ?description : 11月22日开会重新更新成品工厂标识卡
|
|
5
|
-
* !@version : 1.6.
|
|
5
|
+
* !@version : 1.6.1
|
|
6
6
|
* TODO:@since : 创建时间 2024-11-23 09:40:30
|
|
7
|
-
* !update :
|
|
7
|
+
* !update : 2025-01-14 调整装配标识卡模板
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { ElMessage, MessageParamsWithType } from 'element-plus'
|
|
@@ -606,10 +606,20 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
606
606
|
label: string
|
|
607
607
|
value: string
|
|
608
608
|
}[] = []
|
|
609
|
+
// 套圈的编码和批号数组
|
|
610
|
+
let tqList: {
|
|
611
|
+
id: number | string
|
|
612
|
+
label: string
|
|
613
|
+
value: string
|
|
614
|
+
}[] = []
|
|
615
|
+
|
|
609
616
|
let nqbm = '' // 内圈编码
|
|
610
617
|
let nqph = '' // 内圈批号
|
|
611
618
|
let wqbm = '' // 内圈编码
|
|
612
619
|
let wqph = '' // 内圈批号
|
|
620
|
+
|
|
621
|
+
let tqbm = '' // 内圈编码
|
|
622
|
+
let tqph = '' // 内圈批号
|
|
613
623
|
if (item.children && badNum > 0) {
|
|
614
624
|
item.children?.forEach((badItem: any) => {
|
|
615
625
|
let objbad = { id: '', label: '', value: '' }
|
|
@@ -619,6 +629,23 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
619
629
|
} else if (badItem.category == '外圈') {
|
|
620
630
|
wqbm = badItem.material_code || ''
|
|
621
631
|
wqph = badItem.b2b_batch_number || ''
|
|
632
|
+
} else if (badItem.category == '套圈') {
|
|
633
|
+
tqbm = badItem.material_code || ''
|
|
634
|
+
tqph = badItem.b2b_batch_number || ''
|
|
635
|
+
let tqbmobj = {
|
|
636
|
+
id: badItem.card_code + 'bm',
|
|
637
|
+
label: badItem.category + '编码',
|
|
638
|
+
value: tqbm
|
|
639
|
+
}
|
|
640
|
+
let tqphobj = {
|
|
641
|
+
id: badItem.card_code + 'ph',
|
|
642
|
+
label: badItem.category + '批号',
|
|
643
|
+
value: tqph
|
|
644
|
+
}
|
|
645
|
+
if (badItem.category) {
|
|
646
|
+
tqList.push(tqbmobj)
|
|
647
|
+
tqList.push(tqphobj)
|
|
648
|
+
}
|
|
622
649
|
} else {
|
|
623
650
|
objbad = {
|
|
624
651
|
id: badItem.card_code,
|
|
@@ -631,7 +658,6 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
631
658
|
}
|
|
632
659
|
})
|
|
633
660
|
}
|
|
634
|
-
|
|
635
661
|
let obj1 = {
|
|
636
662
|
card_state: item.card_state,
|
|
637
663
|
// 工厂类型:1:为尚工厂 | 2:成品工厂
|
|
@@ -651,31 +677,60 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
651
677
|
r5c4: item.card_code, // 标识卡号
|
|
652
678
|
r6c1: '外圈编码',
|
|
653
679
|
r6c2: wqbm,
|
|
654
|
-
r6c3: '
|
|
655
|
-
r6c4:
|
|
656
|
-
r7c1: '
|
|
657
|
-
r7c2:
|
|
680
|
+
r6c3: '外圈批号',
|
|
681
|
+
r6c4: wqph,
|
|
682
|
+
r7c1: '内圈编码',
|
|
683
|
+
r7c2: nqbm,
|
|
658
684
|
r7c3: '内圈批号',
|
|
659
685
|
r7c4: nqph
|
|
660
686
|
}
|
|
687
|
+
|
|
661
688
|
// 获取obj1最后一条属性的行号列号
|
|
662
689
|
// 获取obj1最后一条属性
|
|
663
690
|
let lastKey = Object.keys(obj1)[Object.keys(obj1).length - 1]
|
|
691
|
+
console.log('%c Line:691 🎂 lastKey', 'color:#ffdd4d', lastKey)
|
|
664
692
|
// 获取行号
|
|
665
693
|
let row = Number(parseInt(lastKey.split('r')[1].split('c')[0]))
|
|
666
694
|
// 获取列号
|
|
667
695
|
let column = Number(lastKey.split('c')[1])
|
|
668
696
|
|
|
669
|
-
|
|
670
|
-
|
|
697
|
+
//-------
|
|
698
|
+
// 通过循环 tqList 数组,将数组中的每一项合并到obj中
|
|
699
|
+
console.log('%c Line:699 🍰 套圈数组', 'color:#ed9ec7', tqList)
|
|
700
|
+
let obj4: any = {}
|
|
701
|
+
if (tqList.length > 0) {
|
|
702
|
+
for (let i = 0; i < tqList.length; i++) {
|
|
703
|
+
const item = tqList[i]
|
|
704
|
+
console.log('%c Line:703 🌰 item', 'color:#ffdd4d', item)
|
|
705
|
+
const rowIndex = Math.floor(i / 2) + (row + 1) // 从r8c1开始这里就是8
|
|
706
|
+
const columnIndex = (i % 2) * 2 + 1
|
|
707
|
+
obj4[`r${rowIndex}c${columnIndex}`] = item.label
|
|
708
|
+
obj4[`r${rowIndex}c${columnIndex + 1}`] = item.value
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
console.log('%c Line:709 🌭 obj4', 'color:#42b983', obj4)
|
|
712
|
+
//-------
|
|
713
|
+
|
|
714
|
+
// 获取obj4最后一条属性
|
|
715
|
+
let lastKey4 = lastKey
|
|
716
|
+
if (Object.keys(obj4).length > 0) {
|
|
717
|
+
lastKey4 = Object.keys(obj4)[Object.keys(obj4).length - 1]
|
|
718
|
+
}
|
|
719
|
+
console.log('%c Line:714 🍻 lastKey4', 'color:#6ec1c2', lastKey4)
|
|
720
|
+
// 获取行号
|
|
721
|
+
let row4 = Number(parseInt(lastKey4.split('r')[1].split('c')[0]))
|
|
722
|
+
|
|
723
|
+
// 通过循环 badList 数组,将数组中的每一项合并到obj中
|
|
724
|
+
let obj2: any = {}
|
|
671
725
|
for (let i = 0; i < badList.length; i++) {
|
|
672
726
|
const item = badList[i]
|
|
673
|
-
const rowIndex = Math.floor(i / 2) + (
|
|
727
|
+
const rowIndex = Math.floor(i / 2) + (row4 + 1) // 从r8c1开始这里就是8
|
|
674
728
|
const columnIndex = (i % 2) * 2 + 1
|
|
675
729
|
obj2[`r${rowIndex}c${columnIndex}`] = item.label
|
|
676
730
|
obj2[`r${rowIndex}c${columnIndex + 1}`] = item.value
|
|
677
731
|
// 页面中只渲染到了 r20c4
|
|
678
732
|
}
|
|
733
|
+
console.log('%c Line:728 🥓 obj2', 'color:#465975', obj2)
|
|
679
734
|
let obj3 = {
|
|
680
735
|
r50c1: '本箱数量',
|
|
681
736
|
r50c2: item.current_inventory,
|
|
@@ -701,7 +756,7 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
701
756
|
r55c2: item.remark
|
|
702
757
|
}
|
|
703
758
|
// 将 obj1, obj2, obj3 合并到obj的后面
|
|
704
|
-
Object.assign(obj, obj1, obj2, obj3)
|
|
759
|
+
Object.assign(obj, obj1, obj4, obj2, obj3)
|
|
705
760
|
}
|
|
706
761
|
// 为尚工厂-装配标识卡(为尚工厂无装配标识卡)
|
|
707
762
|
else if (item.card_state == 'ZHUANGPEI' && item.is_finished_goods == 1) {
|