|
|
@@ -2,11 +2,13 @@
|
|
|
<view class="app-content">
|
|
|
<view class="input-wrap" >
|
|
|
<view class="search-bar">
|
|
|
- <app-search-module v-model="searchText" placeholder="这里搜索" @input="searchFn" />
|
|
|
+ <app-search-module v-model="searchText" placeholder="输入名称" @input="searchFn" />
|
|
|
</view>
|
|
|
<view style="padding-left:10upx;">
|
|
|
- <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="selectFlowerNumFn()">支数查询</button>
|
|
|
- <button class="admin-button-com middle blue" style="margin-right:6upx;" @click="addGoods()">新增</button>
|
|
|
+ <button class="admin-button-com middle blue" style="margin-right:8upx;" @click.stop="openPriceOption">{{lookStock==0 ? '价格' : lookStock==1 ? '有价' : '无价' }}</button>
|
|
|
+ <button class="admin-button-com middle blue" style="margin-right:8upx;" @click.stop="openOption">{{lookStock==0 ? '库存' : lookStock==1 ? '有的' : '没有' }}</button>
|
|
|
+ <button class="admin-button-com middle blue" style="margin-right:8upx;" @click="selectFlowerNumFn()">支数</button>
|
|
|
+ <button class="admin-button-com middle blue" @click="addGoods()">新增</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="app-middle">
|
|
|
@@ -22,11 +24,9 @@
|
|
|
<view class="goods-list" v-for="(goodsItem, idx) in list.data" :key="idx">
|
|
|
<view class="goods-list-top" @click="edit(goodsItem.id)">
|
|
|
<view class="img-blo">
|
|
|
-
|
|
|
<view v-if="goodsItem.stock <= 0" class="sold-out">
|
|
|
<view class="sold-out-xj">已下架</view>
|
|
|
</view>
|
|
|
-
|
|
|
<img :src="goodsItem.smallCover" mode="aspectFit" />
|
|
|
</view>
|
|
|
<view class="goods-det">
|
|
|
@@ -34,8 +34,8 @@
|
|
|
<view class="goods-name" style="font-size:29upx;font-weight:bold; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:350upx;">{{ goodsItem.name||'' }}</view>
|
|
|
</view>
|
|
|
<view class="operate-wrap" style="margin-bottom:15upx;">
|
|
|
- <view class="goods-price" style="font-size:23upx;" v-if="goodsItem.priceType == 1">¥{{ goodsItem.price?parseFloat(goodsItem.price):0 }}</view>
|
|
|
- <view class="goods-price" style="font-size:23upx;" v-else>-</view>
|
|
|
+ <view class="goods-price" style="font-size:26upx;" v-if="goodsItem.priceType == 1">¥{{ goodsItem.price?parseFloat(goodsItem.price):0 }}</view>
|
|
|
+ <view class="goods-price" style="font-size:26upx;" v-else>---</view>
|
|
|
</view>
|
|
|
<view class="operate-wrap">
|
|
|
<view style="font-size:23upx;">
|
|
|
@@ -72,6 +72,35 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
+
|
|
|
+ <uni-popup ref="searchPriceOptionRef" 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="changePriceStyle(2)" style="margin-bottom:20upx;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">没价格</view>
|
|
|
+ </view>
|
|
|
+ <view @tap.stop="changePriceStyle(1)" style="margin-bottom:20upx;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">有价格</view>
|
|
|
+ </view>
|
|
|
+ <view @tap.stop="changePriceStyle(0)" style="margin-bottom:20upx;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">重新选</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </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;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">没库存</view>
|
|
|
+ </view>
|
|
|
+ <view @tap.stop="changeHasStock(1)" style="margin-bottom:20upx;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">有库存</view>
|
|
|
+ </view>
|
|
|
+ <view @tap.stop="changeHasStock(0)" style="margin-bottom:20upx;">
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:150upx;text-align:center;font-size:38upx;">重新选</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -105,7 +134,9 @@ export default {
|
|
|
autoLoad:false,
|
|
|
flowerNum:0,
|
|
|
flowerNumList:[{num:6,name:6},{num:9,name:9},{num:11,name:11},{num:19,name:19},{num:33,name:33},{num:52,name:52},{num:66,name:66},{num:99,name:99},{num:0,name:'取消'}],
|
|
|
- searchText:''
|
|
|
+ searchText:'',
|
|
|
+ lookStock:0,
|
|
|
+ lookPrice:0
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -124,7 +155,20 @@ export default {
|
|
|
init(){
|
|
|
this.getCategoryData()
|
|
|
},
|
|
|
-
|
|
|
+ changeHasStock(check){
|
|
|
+ this.lookStock = check
|
|
|
+ this.$refs.searchOptionRef.close()
|
|
|
+ },
|
|
|
+ openOption(){
|
|
|
+ this.$refs.searchOptionRef.open('top')
|
|
|
+ },
|
|
|
+ changePriceStyle(){
|
|
|
+ this.lookPrice = check
|
|
|
+ this.$refs.searchPriceOptionRef.close()
|
|
|
+ },
|
|
|
+ openPriceOption(){
|
|
|
+ this.$refs.searchPriceOptionRef.open('top')
|
|
|
+ },
|
|
|
moreToDo(item){
|
|
|
let that=this;
|
|
|
let doList = ['打1个标签', '打2个标签','打5个标签', '打10个标签', '销售记录', '设置为散花']
|