diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue index 69a6afe..b38d7ec 100644 --- a/pages/billing/changeGoods1.vue +++ b/pages/billing/changeGoods1.vue @@ -89,7 +89,10 @@ - + + + + {{item.name}} 库存:{{item.productNum}} @@ -307,7 +310,7 @@ temporaryChange(val) { this.zNum = 0 for (var i = 0; i < this.temporaryList.length; i++) { - this.zNum += this.temporaryList[i].productCount + this.zNum += this.temporaryList[i].productCount || 0 } this.zPrice = this.zNum * this.purchasePrice }, @@ -514,6 +517,29 @@ that.$forceUpdate() } }) + }, + //选商品的时候能删除规格 + delCarData(index) { + this.temporaryList.splice(index, 1); + this.temporaryChange() + // uni.showModal({ + // title: "提示", + // content: "确定删除此条商品吗?", + // success: function(res) { + // if(res.confirm){ + // that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name); + // that.carList.get(id).stockLogList.delete(name) + // that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice + // if(that.carList.get(id).stockLogList.size == 0){ + // that.carList.delete(id) + // } + + // that.getAllPrice() + // } + // that.$forceUpdate() + // } + // }) + }, //删除商品下的某一个规格 delShopSpec(index, index1) { diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue index c161468..e7e9aa6 100644 --- a/pages/index/addHangOrder.vue +++ b/pages/index/addHangOrder.vue @@ -118,6 +118,9 @@ + + + {{item.name}} 库存:{{item.productNum}} @@ -656,6 +659,29 @@ } } }) + }, + //选商品的时候能删除规格 + delCarData(index) { + this.temporaryList.splice(index, 1); + this.temporaryChange() + // uni.showModal({ + // title: "提示", + // content: "确定删除此条商品吗?", + // success: function(res) { + // if(res.confirm){ + // that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name); + // that.carList.get(id).stockLogList.delete(name) + // that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice + // if(that.carList.get(id).stockLogList.size == 0){ + // that.carList.delete(id) + // } + + // that.getAllPrice() + // } + // that.$forceUpdate() + // } + // }) + }, //删除商品下的单条规格 delGoodsPrecs(item, index, index1) { diff --git a/pages/index/customAndSupplierProductDetail.vue b/pages/index/customAndSupplierProductDetail.vue index 6f670f7..6982567 100644 --- a/pages/index/customAndSupplierProductDetail.vue +++ b/pages/index/customAndSupplierProductDetail.vue @@ -1,22 +1,48 @@