shish пре 1 година
родитељ
комит
fa2e03b029
3 измењених фајлова са 31 додато и 4 уклоњено
  1. 1 0
      ghsApp/src/admin/item/detail.vue
  2. 27 2
      ghsApp/src/admin/item/list2.vue
  3. 3 2
      ghsApp/src/mixins/product2.js

+ 1 - 0
ghsApp/src/admin/item/detail.vue

@@ -825,6 +825,7 @@ export default {
         this.form.smallRatio = 1
         this.form.smallRatio = 1
         this.form.frontHide = 0
         this.form.frontHide = 0
         this.form.virtualStock = 0
         this.form.virtualStock = 0
+        this.form.limitBuy = 0
         this.cost = res.data && res.data.cost ? parseFloat(res.data.cost) : 0
         this.cost = res.data && res.data.cost ? parseFloat(res.data.cost) : 0
       })
       })
     },
     },

+ 27 - 2
ghsApp/src/admin/item/list2.vue

@@ -2,13 +2,16 @@
   <view class="app-content" style="background:white;">
   <view class="app-content" style="background:white;">
 		<view class="billing_box_bg">
 		<view class="billing_box_bg">
 			<view class="input-wrap">
 			<view class="input-wrap">
-				<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
+				<view style="padding:0upx 0upx 0upx 0upx;margin-right:8upx;" >
 					<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
 					<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
 				</view>
 				</view>
 				<view class="search-bar">
 				<view class="search-bar">
 					<app-search-module v-model="globalPy" ref="globalSearchRef" placeholder="这里搜索" @input="globalSearch"/>
 					<app-search-module v-model="globalPy" ref="globalSearchRef" placeholder="这里搜索" @input="globalSearch"/>
 				</view>
 				</view>
-				<view style="padding:0 0upx 0 15upx;" >
+				<view style="padding:0 0upx 0 8upx;" >
+					<button class="admin-button-com middle blue" @click.stop="openOption">{{globalLookStock==0 ? '选条件' : globalLookStock==1 ? '有库存' : '没库存' }}</button>
+				</view>
+				<view style="padding:0 0upx 0 8upx;" >
 					<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添花材</button>
 					<button class="admin-button-com middle blue" @click="pageTo({ url: '/admin/ptItem/itemList' })">添花材</button>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -83,6 +86,20 @@
 			</view>
 			</view>
 		</uni-popup>
 		</uni-popup>
 
 
+		<uni-popup ref="searchOptionRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="display:flex;padding:80upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+				<view @tap.stop="changeHasStock(2)" style="margin-bottom:20upx;margin-left:3upx;">
+					<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:100upx;text-align:center;font-size:35upx;">没库存</view>
+				</view>
+				<view @tap.stop="changeHasStock(1)" style="margin-bottom:20upx;margin-left:3upx;">
+					<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:100upx;text-align:center;font-size:35upx;">有库存</view>
+				</view>
+				<view @tap.stop="changeHasStock(0)" style="margin-bottom:20upx;margin-left:3upx;">
+					<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:140upx;text-align:center;font-size:35upx;">重新选</view>
+				</view>
+			</view>
+		</uni-popup>
+
 		<uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
 		<uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
 			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view style="width:100vw;"><button @click="costChange()">成本变动记录</button></view>
 				<view style="width:100vw;"><button @click="costChange()">成本变动记录</button></view>
@@ -173,6 +190,14 @@ export default {
 		goSearchFn(){
 		goSearchFn(){
 			this.searchFn()			
 			this.searchFn()			
 		},
 		},
+		changeHasStock(check){
+			this.globalLookStock = check
+			this.$refs.searchOptionRef.close()
+			this.reGetGlobalProductList()
+		},
+		openOption(){
+			this.$refs.searchOptionRef.open('top')
+		},
 		initItem(){
 		initItem(){
 			this.globalRequestType = 'itemList'
 			this.globalRequestType = 'itemList'
 			this.initData()
 			this.initData()

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

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