Bläddra i källkod

fix(warehouse): 修复入库单用户ID和重量计算问题

liujt 5 månader sedan
förälder
incheckning
4023dd6fcb
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      pages/warehouse/enterHouse/addStock.vue

+ 5 - 5
pages/warehouse/enterHouse/addStock.vue

@@ -480,9 +480,9 @@
 			// this.getDept()
 			// this.getSupplier()
 			const userInfo = uni.getStorageSync('userInfo')
-			console.log()
+			console.log('userInfo~~~', userInfo)
 			this.formData.extInfo.createUserName = userInfo.name
-			this.formData.createUserId = userInfo.name
+			this.formData.createUserId = userInfo.userId
 			this.storageTime = Number(new Date())
 			this.formData.storageTime = this.formatter(this.storageTime)
 			// this.formData.registerId = userInfo.id
@@ -1086,7 +1086,7 @@
 					console.log('!!this.getDict(item.measureUnit).dictValue--------', this.getDict(item.measureUnit))
 					if (outBoolen) {
 						// 计量单位为KG类,直接替换
-						item.weight = item.measureQuantity
+						item.weight = item.measureQuantity || 0
 					} else {
 						// 计量单位为不为KG类,重新统计计算
 						let inBoolen = !!this.getDict(item.packingSpecificationOption[0].packageUnit).dictValue
@@ -1104,11 +1104,11 @@
 						}
 						if (inBoolen) {
 							// 第二层为KG类
-							item.weight = total
+							item.weight = total || 0
 						} else {
 							// 第二层不为KG类
 							// item.weight = this.$math.format(total * item.netWeight, 14)
-							item.weight = total * item.netWeight
+							item.weight = total * item.netWeight  || 0
 						}
 					}
 					row.outInDetailRecordRequestList.push(item)