Sfoglia il codice sorgente

供货商-库存为负数的花材,数量输入框输入大于0的数值,点击【确定】按钮,会提示库存不足,输入框自动填入负库存数,点击确定按钮后,负库存数添加成功,金额变成负的

jf 5 anni fa
parent
commit
c07a9379fd

+ 2 - 1
ghsApp/src/components/module/allSelectInput.vue

@@ -26,7 +26,7 @@
 	}
 	}
 </style>
 </style>
 <template>
 <template>
-	<view class="change-input" :style="'width:'+width+'rpx !important;height:'+height+'rpx !important;'" >
+	<view class="change-input" :style="'width:'+width+'rpx !important;height:'+height+'rpx !important;font-size:'+fontSize+'rpx !important'" >
 			<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'"  :type="inputType?inputType:'number'" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" :placeholder="value==''&&inputVal==''?placeholder:''">
 			<input :focus="isFocus" :style="isActive?'caret-color:rgba(0,0,0,0)':'caret-color:rgba(0,0,0,1)'"  :type="inputType?inputType:'number'" @focus="initAllInput" @blur="moveAllInput" v-model="inputVal" @input="changeAllInput" :placeholder="value==''&&inputVal==''?placeholder:''">
 			<text :class="isActive?'active':''">{{value?value:''}}</text>
 			<text :class="isActive?'active':''">{{value?value:''}}</text>
 	</view>
 	</view>
@@ -37,6 +37,7 @@ export default {
 	props: {
 	props: {
 		width: '',
 		width: '',
 		height: '',
 		height: '',
+		fontSize: '',
 		isActive: '',
 		isActive: '',
 		isFocus: '',
 		isFocus: '',
 		value: '',
 		value: '',

+ 2 - 0
ghsApp/src/mixins/product.js

@@ -315,6 +315,7 @@ export default {
 		 * 添加商品
 		 * 添加商品
 		 */
 		 */
 		addEvent(item) {
 		addEvent(item) {
+			console.log('****')
 			const list = this.selectList;
 			const list = this.selectList;
 			let has = false;
 			let has = false;
 			for (let index = 0; index < list.length; index++) {
 			for (let index = 0; index < list.length; index++) {
@@ -396,6 +397,7 @@ export default {
 						list.push(params);
 						list.push(params);
 					}else{
 					}else{
 						this.$msg("库存不足");
 						this.$msg("库存不足");
+						return;
 					}
 					}
 				}
 				}
 			}
 			}

+ 1 - 1
ghsApp/src/pagesPurchase/add.vue

@@ -77,7 +77,7 @@
 <!--								placeholder="请填写采购总价"-->
 <!--								placeholder="请填写采购总价"-->
 <!--							/>元-->
 <!--							/>元-->
 							<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'请填写采购总价'"
 							<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'请填写采购总价'"
-																							:width="400" :height="80"
+																							:width="400" :height="80" :fontSize="40"
 																							@deleteInputVal="deleteAloneInputVal" @initAllInput="initAloneAllInput" @moveAllInput="moveAloneAllInput">
 																							@deleteInputVal="deleteAloneInputVal" @initAllInput="initAloneAllInput" @moveAllInput="moveAloneAllInput">
 							</allSelectInput> <text style="margin-left: 20rpx">元</text>
 							</allSelectInput> <text style="margin-left: 20rpx">元</text>
 						</view>
 						</view>

+ 3 - 2
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -219,8 +219,9 @@ export default {
 							title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
 							title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
 							icon: "none"
 							icon: "none"
 						});
 						});
-						this.customData.bigCount = bigNum;
-						this.customData.smallCount = smallNum;
+						this.customData.bigCount = 0;
+						this.customData.smallCount = 0;
+						this.delAllEvent(this.customData)
 					} else {
 					} else {
 						this.updateItemEvent(this.customData);
 						this.updateItemEvent(this.customData);
 						this.modalCancel();
 						this.modalCancel();