|
|
@@ -6,7 +6,7 @@
|
|
|
<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
|
|
|
</view>
|
|
|
<view class="search-bar">
|
|
|
- <app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="goSearchFn"/>
|
|
|
+ <app-search-module v-model="globalPy" placeholder="这里搜索" @input="globalSearch"/>
|
|
|
</view>
|
|
|
<view style="padding:0 0upx 0 15upx;" >
|
|
|
<button class="admin-button-com middle blue" @click="refreshItem()">刷新</button>
|
|
|
@@ -17,20 +17,19 @@
|
|
|
</view>
|
|
|
<view class="scroll-middle_bx">
|
|
|
<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
|
|
|
- <div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
|
|
|
- <text style="text-align: center;">{{ item.className || "" }}</text>
|
|
|
+ <div v-for="(item, index) in globalClassData" :key="index" class="tab-bar-item" :class="[globalClassIndex == index ? 'active' : '']" :data-current="index" @tap.stop="globalSwitchClass(index,item)">
|
|
|
+ <text style="text-align: center;">{{ item.name || "" }}</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">
|
|
|
-
|
|
|
- <block v-if="!$util.isEmpty(globalClassItemList)">
|
|
|
- <view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
|
|
|
- <view class="item_list_title"> {{ classItem.className }}</view>
|
|
|
- <view v-if="classItem.child && !$util.isEmpty(classItem.child)">
|
|
|
- <template v-for="(productItem, productIndex) in classItem.child">
|
|
|
- <view style="height:255upx" :id="`class_${classIndex}`" :key="productIndex">
|
|
|
- <ItemStock v-if="classItem.isActive" :info="productItem" @moreAction="moreAction"
|
|
|
+ <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">
|
|
|
+ <block v-if="!$util.isEmpty(globalItemData)">
|
|
|
+ <view class="item_list_bx selectAll">
|
|
|
+ <view class="item_list_title"></view>
|
|
|
+ <view v-if="!$util.isEmpty(globalItemData)">
|
|
|
+ <template v-for="(productItem, productIndex) in globalItemData">
|
|
|
+ <view style="height:255upx" :key="productIndex">
|
|
|
+ <ItemStock :info="productItem" @moreAction="moreAction"
|
|
|
@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
|
|
|
:ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn"
|
|
|
@cancelPreSellFn="cancelPreSellFn" @breakSingleItem="breakSingleItem">
|
|
|
@@ -179,13 +178,14 @@ export default {
|
|
|
this.searchFn()
|
|
|
},
|
|
|
initItem(){
|
|
|
- this.initData({requestType:'itemList'}).then(res=>{
|
|
|
+ this.globalRequestType = 'itemList'
|
|
|
+ this.initData().then(res=>{
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
refreshItem(){
|
|
|
uni.showLoading({mask:true})
|
|
|
- this.py = ''
|
|
|
+ this.globalPy = ''
|
|
|
this.initItem()
|
|
|
},
|
|
|
hideChangeFn(item,status){
|
|
|
@@ -324,7 +324,7 @@ export default {
|
|
|
},
|
|
|
changeClass(index){
|
|
|
this.$refs.selectFlowerNumRef.close()
|
|
|
- this.swichClass(index)
|
|
|
+ this.globalSwitchClass(index)
|
|
|
},
|
|
|
selectFlowerNumFn(){
|
|
|
this.$refs.selectFlowerNumRef.open('top')
|
|
|
@@ -497,11 +497,8 @@ export default {
|
|
|
} else {
|
|
|
}
|
|
|
},
|
|
|
- scrollTop() {},
|
|
|
- initProductInfo() {
|
|
|
- this.globalClassItemListContrapose = [];
|
|
|
- this.page = 1;
|
|
|
- this.isMore = true;
|
|
|
+ scrollTop() {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
};
|