|
|
@@ -13,30 +13,35 @@
|
|
|
/>
|
|
|
</view>
|
|
|
</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 filterProductInfo"
|
|
|
- :key="index"
|
|
|
- class="tab-bar-item"
|
|
|
- :class="[classIndex == index ? 'active' : '']"
|
|
|
- :data-current="index"
|
|
|
- @tap.stop="swichClass"
|
|
|
- >
|
|
|
+ <view v-if="tabs[tabIndex].name=='库存预警'" class="scroll-middle_bx">
|
|
|
+ <!--内容部分 start -->
|
|
|
+ <!--内容部分 start -->
|
|
|
+ <block v-if="!$util.isEmpty(filterProductInfoContrapose)">
|
|
|
+<!-- <view class="item_list_bx" v-for="(classItem, classIndex) in filterProductInfoContrapose" :key="classIndex" :id="`class_${classItem.classId}`">-->
|
|
|
+<!-- </view>-->
|
|
|
+ <!-- <text v-else>当前库存充足</text>-->
|
|
|
+ <view class="item_list_bx">
|
|
|
+ <template v-for="(productItem, productIndex) in filterProductInfoContrapose">
|
|
|
+ <CommodityStock
|
|
|
+ :isPrice="false"
|
|
|
+ :type="tabs[tabIndex].key"
|
|
|
+ :key="productIndex"
|
|
|
+ :info="productItem"
|
|
|
+ ></CommodityStock>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfoContrapose)"/>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ <view v-else class="scroll-middle_bx">
|
|
|
+ <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
|
|
|
+ <div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass">
|
|
|
<text>{{ item.className || "" }}</text>
|
|
|
</div>
|
|
|
</scroll-view>
|
|
|
- <scroll-view
|
|
|
- scroll-y
|
|
|
- class="right-box"
|
|
|
- v-if="currentTab == index"
|
|
|
- :scroll-into-view="scrollClassId"
|
|
|
- >
|
|
|
+ <scroll-view scroll-y class="right-box" v-if="currentTab == index" :scroll-into-view="scrollClassId">
|
|
|
<!--内容部分 start -->
|
|
|
<!--内容部分 start -->
|
|
|
<block v-if="!$util.isEmpty(filterProductInfo)">
|
|
|
@@ -73,6 +78,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import CommodityStock from "../components/CommodityStock";
|
|
|
import { STOCK_TYPE } from "@/utils/declare";
|
|
|
import productMins from "@/mixins/product";
|
|
|
+import productContraposeMins from "@/mixins/productContrapose";
|
|
|
import { selectShop } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
@@ -85,7 +91,7 @@ export default {
|
|
|
CommodityStock,
|
|
|
DorpdownSelect
|
|
|
},
|
|
|
- mixins: [productMins, selectShop],
|
|
|
+ mixins: [productMins, selectShop,productContraposeMins],
|
|
|
data() {
|
|
|
return {
|
|
|
STOCK_TYPE,
|
|
|
@@ -108,7 +114,12 @@ export default {
|
|
|
let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
|
|
|
// 当前门店
|
|
|
this.shopId = this.userInfo.id;
|
|
|
- this.initData({ type, shopId: this.shopId });
|
|
|
+ if(type=="waring"){
|
|
|
+ this.initDataContrapose({ type, shopId: this.shopId });
|
|
|
+ }else{
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -128,14 +139,23 @@ export default {
|
|
|
this.tabIndex = e.index;
|
|
|
this.tabs[this.tabIndex].key;
|
|
|
let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
|
|
|
- this.initData({ type, shopId: this.shopId });
|
|
|
+ if(type=="waring"){
|
|
|
+ this.initDataContrapose({ type, shopId: this.shopId });
|
|
|
+ }else{
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
searchFn() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中"
|
|
|
});
|
|
|
- this.initData({ shopId: this.shopId });
|
|
|
+ if(type=="waring"){
|
|
|
+ this.initDataContrapose({ type, shopId: this.shopId });
|
|
|
+ }else{
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
+ }
|
|
|
+ // this.initData({ shopId: this.shopId });
|
|
|
},
|
|
|
scrollTop() {},
|
|
|
selectSussess(val) {
|
|
|
@@ -144,7 +164,12 @@ export default {
|
|
|
});
|
|
|
let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
|
|
|
this.shopId = val.selectItem.id;
|
|
|
- this.initData({ type, shopId: this.shopId });
|
|
|
+ // this.initData({ type, shopId: this.shopId });
|
|
|
+ if(type=="waring"){
|
|
|
+ this.initDataContrapose({ type, shopId: this.shopId });
|
|
|
+ }else{
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|