shish 4 лет назад
Родитель
Сommit
e749d071d3

+ 2 - 1
ghsApp/src/admin/changePrice/components/Item.vue

@@ -12,7 +12,8 @@
 					<view class="open-bx" >
 						还剩 <text style="margin-left:8upx;color:#333333;">{{ parseFloat(info.stock) }}</text>
 						<text style="margin-left:30upx;color:#999999" v-if="info.status ==2">已下架</text>
-						<input class="change-input" @click.stop @blur="savePrice" @focus="modifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="填写价格" />
+						<input class="change-input" @click.stop @blur="savePrice"
+						@focus="modifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="填写价格" />
 					</view>
 				</view>
 			</view>

+ 8 - 6
ghsApp/src/admin/changePrice/list.vue

@@ -16,10 +16,12 @@
 					<text>{{ item.className || "" }}</text>
 				</div>
 			</scroll-view>
-				<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
-																	@scroll="scroll_detail"
-																	lower-threshold="100"
-																	@scrolltolower="scroll_bottom">
+				<scroll-view scroll-y class="right-box" 
+					:scroll-into-view="scroll_into_view" 
+					scroll-with-animation="true"
+					@scroll="scroll_detail"
+					lower-threshold="100"
+					@scrolltolower="scroll_bottom">
 				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(globalClassItemList)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
@@ -221,7 +223,7 @@ export default {
 		overflow: hidden;
 	}
 	.tab-view {
-		height: 100%;
+		height: calc(100vh - 140upx);
 		width: 170upx;
 		flex-shrink: 0;
 		background-color: #f0f2f6;
@@ -270,7 +272,7 @@ export default {
 		}
 	}
 	.right-box {
-		height: 100%;
+		height: calc(100vh - 170upx);
 		flex: 1;
 		box-sizing: border-box;
 	}

+ 9 - 5
ghsApp/src/mixins/product.js

@@ -388,13 +388,15 @@ export default {
 			if(this.checkStock){
 				if ((Number(item.bigCount) * item.ratio + Number(item.smallCount)) > (Number(item.bigNum) * item.ratio + Number(item.smallNum))) {
 					this.$util.noStockRemind()
-					this.$msg("库存不足")
+					this.$msg("库存不足")
 					return
 				}
 			}
 			let index = list.findIndex(element => element.id == item.id)
 			if(index == -1){
-				item.userPrice = item.bigPrice
+				if(this.$util.isEmpty(item.userPrice) || Number(item.userPrice) == 0){
+					item.userPrice = item.bigPrice
+				}
 				list.push(item)			
 			}else{
 				if(item.bigCount <= 0 && item.smallCount <= 0){
@@ -421,9 +423,11 @@ export default {
 		//显示可以修改花材的弹框
 		showAddModelFn(info) {
 			if(info.bigNum <= 0 && info.smallNum <= 0){
-				this.$util.noStockRemind()
-				this.$msg('没有库存')
-				return false
+				if(this.checkStock){
+					this.$util.noStockRemind()
+					this.$msg('库存不足哦..')
+					return false
+				}
 			}
 			this.isAddModel = true;
 			this.customData = copyObject(info)