浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
aaf4b3b058
共有 2 个文件被更改,包括 13 次插入12 次删除
  1. 4 3
      pages/digitalShelf/choosePart.vue
  2. 9 9
      pages/digitalShelf/orderList.vue

+ 4 - 3
pages/digitalShelf/choosePart.vue

@@ -265,9 +265,10 @@
 			},
 			totalAmount(){
 				let ret = 0
-				this.partListData.map(item => {
-					ret = ret + item.price||0
-				})
+				for(let i=0;i<this.partListData.length;i++){
+					const item = this.partListData[i]
+					ret = ret + ((item.price||0) * item.qty)
+				}
 				return ret.toFixed(2)
 			},
 			dealerPhone(){

+ 9 - 9
pages/digitalShelf/orderList.vue

@@ -199,9 +199,9 @@
 					  _this.list = res.data.list || []
 				  }
 				  _this.total = res.data.count || 0
-				  if(this.current == 0){
-					  _this.tabList[0].count = _this.total
-				  }
+				  // if(this.current == 0){
+					 //  _this.tabList[0].count = _this.total
+				  // }
 				} else {
 				  _this.list = []
 				  _this.total = 0
@@ -224,9 +224,9 @@
 					console.log(res)
 					if(res.status == 200){
 						this.list.splice(index,1)
-						if(this.current == 0){
-							this.tabList[0].count = this.tabList[0].count - 1
-						}
+						// if(this.current == 0){
+						// 	this.tabList[0].count = this.tabList[0].count - 1
+						// }
 					}else{
 						uni.showModal({
 							title: '提示',
@@ -269,9 +269,9 @@
 						  takeGoods({sn:item.shelfOrderSn}).then(res => {
 							 if(res.status == 200){
 								 _this.list.splice(index,1)
-								 if(_this.current == 0){
-									_this.tabList[0].count = _this.tabList[0].count - 1
-								 }
+								 // if(_this.current == 0){
+									// _this.tabList[0].count = _this.tabList[0].count - 1
+								 // }
 							 }
 							 uni.showToast({
 								title: res.message,