shish 3 лет назад
Родитель
Сommit
6a01cfa2f9

+ 16 - 3
ghsApp/src/pagesStorehouse/allot/exDetails.vue

@@ -103,11 +103,24 @@ export default {
 			let small = 0;
 			if (this.outData.itemInfo) {
 				for (const item of this.outData.itemInfo) {
-					big += item.bigNum;
-					small += item.smallNum;
+					if(item.bigNum && Number(item.bigNum)>0){
+						big += Number(item.bigNum)
+					}
+					if(item.smallNum && Number(item.smallNum)>0){
+						small += Number(item.smallNum)
+					}
 				}
 			}
-			return `${big}/${small}`;
+			big = parseFloat(big.toFixed(2))
+			small = parseFloat(small.toFixed(2))
+			let text = ''
+			if(Number(big)>0){
+				text += big+'扎'
+			}
+			if(Number(small)>0){
+				text += small+'支'
+			}
+			return text
 		}
 	},
 	methods: {

+ 4 - 8
ghsApp/src/pagesStorehouse/allot/putDetails.vue

@@ -48,16 +48,12 @@
 									</view>
 								</view>
 								<view v-else-if="column.custom == 'stock'">
-									<text > {{ item.bigNumStock }}/ </text>
-									<text>
-										{{ item.smallNumStock }}
-									</text>
+									<text v-if="Number(item.bigNumStock)>0">{{ item.bigNumStock }}扎</text>
+									<text v-if="Number(item.smallNumStock)>0">{{ item.smallNumStock }}支</text>
 								</view>
 								<view v-else-if="column.custom == 'put'">
-									<text > {{ item.bigNum }}/ </text>
-									<text>
-										{{ item.smallNum }}
-									</text>
+									<text v-if="Number(item.bigNum)>0"> {{ item.bigNum }}扎</text>
+									<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
 								</view>
 								<view v-else>
 									{{ item[column.dataIndex] || "" }}