Sfoglia il codice sorgente

零售 采购 库在不足时 点添加 按钮不收缩 供货商开单计算运费是新增客户id,花材id

jf 5 anni fa
parent
commit
02d4b10a4b

+ 6 - 0
ghsApp/src/admin/billing/affirm.vue

@@ -185,7 +185,13 @@ export default {
 		},
 
 		changeCustomerFn(info) {
+			console.log(info,'this.form')
+			const product = this.selectList.map(ele => {
+				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
+			});
 			let params = {
+				customId:info.id,
+				product:JSON.stringify(product),
 				province: info.province,
 				city:info.city,
 				address:info.address,

+ 12 - 0
hdApp/src/components/module/app-commodity.vue

@@ -88,6 +88,10 @@ export default {
 			type: Boolean,
 			default: false
 		},
+		offVerifyRepertory: {
+			type: Boolean,
+			default: false
+		},
 	},
 	data() {
 		return {
@@ -143,6 +147,14 @@ export default {
 			}
 		},
 		addEvents() {
+			const ratio = Number(this.info.ratio);
+			if(this.offVerifyRepertory){
+				if (Number(this.bigCount) * ratio + Number(this.smallCount) >Number(this.info.bigNum) * ratio + Number(this.info.smallNum)) {
+					this.$msg("库存不足");
+					return
+				}
+			}
+
 			this.animationFun('add');
 			// let params = {
 			// 	...this.info,

+ 1 - 0
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -48,6 +48,7 @@
 							>
 								<Commondity
 									:info="productItem"
+									:offVerifyRepertory="true"
 									:bigCount="
 										getSelectItemById(productItem.id, classItem.classId).bigCount
 									"