فهرست منبع

Merge branch 'develop_szhj07' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj07

chenrui 2 سال پیش
والد
کامیت
a53453ab60
2فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 7 1
      pages/shelfSetting/addShelfHw.vue
  2. 6 0
      pages/shelfSetting/editShelfHw.vue

+ 7 - 1
pages/shelfSetting/addShelfHw.vue

@@ -98,6 +98,9 @@
 				_this.form.cost = Number(data.cost)
 				_this.form.productCode = data.code
 				_this.form.productSn = data.productSn
+				_this.form.oldPrice = Number(data.price)
+				_this.form.oldCost = Number(data.cost)
+				_this.form.oldMaxQty = ''
 			})
 			
 			if(this.type == 'edit'){
@@ -154,7 +157,10 @@
 						     productCode: form.productCode,
 						     price: form.price,
 						     cost: form.cost,
-						     maxQty: form.maxQty
+						     maxQty: form.maxQty,
+							 oldPrice: form.oldPrice,
+							 oldCost: form.oldCost,
+							 oldMaxQty: form.oldMaxQty
 						   }
 						 }
 						 // 开始提交数据

+ 6 - 0
pages/shelfSetting/editShelfHw.vue

@@ -103,6 +103,8 @@
 				_this.productEntity = data
 				_this.form.price = Number(data.price)
 				_this.form.cost = Number(data.cost)
+				_this.form.oldPrice = Number(data.price)
+				_this.form.oldCost = Number(data.cost)
 				_this.form.productCode = data.code
 				_this.form.productSn = data.productSn
 				// 更换产品
@@ -180,6 +182,9 @@
 			      this.form.price = res.data.price
 			      this.form.cost = res.data.cost
 			      this.form.maxQty = res.data.maxQty
+				  this.form.oldPrice = res.data.price
+				  this.form.oldCost = res.data.cost
+				  this.form.oldMaxQty = res.data.maxQty
 			    } else {
 			      this.productEntity = null
 			    }
@@ -221,6 +226,7 @@
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
 						 const form = JSON.parse(JSON.stringify(_this.form))
+						 form.shelfSn = _this.nowData && _this.nowData.shelfSn
 						 form.shelfPlaceSn = _this.nowData && _this.nowData.shelfPlaceSn
 						 if(this.type != 'bind'){ // 不是绑定产品
 						 	form.shelfProductSn = _this.nowData && _this.nowData.shelfProductApiEntity && _this.nowData.shelfProductApiEntity.shelfProductSn || _this.nowData.shelfProductSn