shish 5 сар өмнө
parent
commit
f7f4d7d712

+ 5 - 1
ghsApp/src/admin/item/list2.vue

@@ -31,7 +31,7 @@
 					<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添花材</button>
 				</view>
 			</view>
-
+			<button class="admin-button-com middle" @click="changeOnStock()" :class="[globalOnStock == 1 ? 'blue' : '']" v-if="globalLookStock==2" style="position: absolute;top:245upx;right:150upx;z-index:99;">在路上花材</button>
 			<button class="admin-button-com middle blue" @click="refreshItem()" style="position: absolute;top:245upx;right:24upx;z-index:99;">刷 新</button>
 
 			<view class="scroll-middle_bx">
@@ -374,6 +374,10 @@ export default {
 			this.globalLookStock = check
 			this.reGetGlobalProductList()
 		},
+		changeOnStock(){
+			this.globalOnStock = this.globalOnStock == 0 ? 1 : 0
+			this.reGetGlobalProductList()
+		},
 		openOption(){
 			this.$refs.searchOptionRef.open('top')
 		},

+ 3 - 2
ghsApp/src/mixins/product2.js

@@ -41,7 +41,8 @@ export default {
 			globalIsRequesting:false,
 			globalCgMyCharge:0,
 			globalLookStock:0,
-			globalDefaultClassId:0
+			globalDefaultClassId:0,
+			globalOnStock:0
 		};
 	},
 	onLoad(options) {
@@ -172,7 +173,7 @@ export default {
             }
             let that = this
 			getItemList({classId:this.globalClassId,requestType:this.globalRequestType,page:this.globalPage,
-				search:this.globalPy,customId:this.globalCustomId,globalCgMyCharge:this.globalCgMyCharge,lookStock:this.globalLookStock}).then(res=>{
+				search:this.globalPy,customId:this.globalCustomId,globalCgMyCharge:this.globalCgMyCharge,lookStock:this.globalLookStock,onStock:this.globalOnStock}).then(res=>{
 				if(res.code == 1){
 					that.globalItemData = that.globalPage == 1 ? res.data.list : that.globalItemData.concat(res.data.list)
                     if(res.data.moreData == 1){