ci-plus 1.6.7 → 1.6.8

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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  ## 历史更新
2
2
 
3
3
  ```js
4
+ 1.6.8
5
+ 1、微调标识卡模板到 1.5.9 版本:优化单重和净重字段判空逻辑
4
6
  1.6.7
5
7
  1、微调标识卡模板到 1.5.8 版本:删除产品标识卡和返工标识卡中的'采购单号'字段
6
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ci-plus",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "description": "ci组件库",
5
5
  "main": "./index.ts",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  * @module cardPrint
3
3
  * @author : 卖女孩的小火柴
4
4
  * ?description : 11月22日开会重新更新成品工厂标识卡
5
- * !@version : 1.5.8
5
+ * !@version : 1.5.9
6
6
  * TODO:@since : 创建时间 2024-11-23 09:40:30
7
7
  * !update : 2024-11.23 更新标识卡
8
8
  */
@@ -55,6 +55,12 @@ export const cardPrint = (
55
55
  let dataInfo: any[] = []
56
56
  data.forEach((item: any) => {
57
57
  let obj = {}
58
+ let weight1 = item.net_weight ?item.net_weight : ''
59
+ let weight_unit1 = item.net_weight_unit ? item.net_weight_unit : ''
60
+ let net_weight = weight1 ? weight1 + weight_unit1:'' // 净重+净重单位
61
+ let weight2 = item.piece_weight ? item.piece_weight : ''
62
+ let weight_unit2 = item.piece_weight_unit ? item.piece_weight_unit : ''
63
+ let piece_weight = weight2 ? weight2 + weight_unit2:'' // 单重+单重单位
58
64
  // 成品工厂-产品标识卡
59
65
  if (item.card_state == 'CHANPIN' && item.is_finished_goods == 2) {
60
66
  obj = {
@@ -150,9 +156,9 @@ export const cardPrint = (
150
156
  r9c3: '收货人员',
151
157
  r9c4: item.center_data[0]?.consignee,
152
158
  r10c1: '净重',
153
- r10c2: item.net_weight + item.net_weight_unit,
159
+ r10c2: net_weight,
154
160
  r10c3: '单重',
155
- r10c4: item.piece_weight + item.piece_weight_unit,
161
+ r10c4: piece_weight,
156
162
  r11c1: '产线',
157
163
  r11c2: item.line_name,
158
164
  r11c3: '工单号',
@@ -351,7 +357,6 @@ export const cardPrint = (
351
357
  return l + ':' + v
352
358
  })
353
359
  .join(',')
354
-
355
360
  obj = {
356
361
  card_state: item.card_state,
357
362
  // 工厂类型:1:为尚工厂 | 2:成品工厂
@@ -388,7 +393,7 @@ export const cardPrint = (
388
393
  r10c1: '责废总数', // 建
389
394
  r10c2: item.storage_scrap_count,
390
395
  r10c3: '单重',
391
- r10c4: item.piece_weight + item.piece_weight_unit,
396
+ r10c4: piece_weight ,
392
397
  r11c1: '工序',
393
398
  r11c2: item.process_name,
394
399
  r11c3: '本批数量',
@@ -792,7 +797,6 @@ export const cardPrint = (
792
797
  return l + ':' + v
793
798
  })
794
799
  .join(',')
795
-
796
800
  obj = {
797
801
  card_state: item.card_state,
798
802
  // 工厂类型:1:为尚工厂 | 2:成品工厂
@@ -830,7 +834,7 @@ export const cardPrint = (
830
834
  r10c1: '料废总数',
831
835
  r10c2: item.storage_scrap_count,
832
836
  r10c3: '单重',
833
- r10c4: item.piece_weight + item.piece_weight_unit,
837
+ r10c4: piece_weight ,
834
838
  r11c1: '工序',
835
839
  r11c2: item.process_name,
836
840
  r11c3: '本批数量',
@@ -929,9 +933,9 @@ export const cardPrint = (
929
933
  r9c3: '收货人员',
930
934
  r9c4: item.center_data[0]?.consignee,
931
935
  r10c1: '净重',
932
- r10c2: item.net_weight + item.net_weight_unit,
936
+ r10c2: net_weight,
933
937
  r10c3: '单重',
934
- r10c4: item.piece_weight + item.piece_weight_unit,
938
+ r10c4: piece_weight,
935
939
  r11c1: '产线',
936
940
  r11c2: item.line_name,
937
941
  r11c3: '工单号',
@@ -998,11 +1002,11 @@ export const cardPrint = (
998
1002
  r10c1: '本箱数量',
999
1003
  r10c2: item.current_inventory,
1000
1004
  r10c3: '单重',
1001
- r10c4: item.piece_weight + item.piece_weight_unit,
1005
+ r10c4: piece_weight,
1002
1006
  r11c1: '总箱数',
1003
1007
  r11c2: item.total_row,
1004
1008
  r11c3: '净重',
1005
- r11c4: item.net_weight + item.net_weight_unit,
1009
+ r11c4: net_weight ,
1006
1010
  r12c1: '包装方式',
1007
1011
  r12c2: item.packaging_specifications_name,
1008
1012
  r12c3: '生产日期',