|
|
@@ -6,22 +6,20 @@
|
|
|
@change="change"
|
|
|
itemWidth="50%"
|
|
|
/>
|
|
|
- <view
|
|
|
- class="input-wrap">
|
|
|
+ <view class="input-wrap">
|
|
|
<!-- <view
|
|
|
v-if=" == 1"
|
|
|
class="city-select text-line">
|
|
|
瑞经典<text class="iconfont iconsanjiao_xia"></text>
|
|
|
</view> -->
|
|
|
- <view
|
|
|
- v-if="loginInfo.super"
|
|
|
- class="city-select text-line">
|
|
|
- <DorpdownSelect
|
|
|
+ <view v-if="loginInfo.super" class="city-select text-line">
|
|
|
+ <DorpdownSelect
|
|
|
:menuObj.sync="menuObj"
|
|
|
:selectItemId.sync="shopId"
|
|
|
- top="40px"
|
|
|
- @selectSussess="selectSussess">
|
|
|
- </DorpdownSelect>
|
|
|
+ top="40px"
|
|
|
+ @selectSussess="selectSussess"
|
|
|
+ >
|
|
|
+ </DorpdownSelect>
|
|
|
</view>
|
|
|
<view class="search-bar">
|
|
|
<app-search-module
|
|
|
@@ -69,7 +67,7 @@
|
|
|
</view>
|
|
|
<template v-for="(productItem, productIndex) in classItem.child">
|
|
|
<CommodityStock
|
|
|
- :type="pageType"
|
|
|
+ :type="tabs[tabIndex].key"
|
|
|
:key="productIndex"
|
|
|
:info="productItem"
|
|
|
></CommodityStock>
|
|
|
@@ -93,11 +91,11 @@
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import AppTabs from "@/components/plugin/tabs";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import CommodityStock from "../components/CommodityStock";
|
|
|
+import CommodityStock from "../components/Commodity";
|
|
|
import { STOCK_TYPE } from "@/utils/declare";
|
|
|
import productMins from "@/mixins/product";
|
|
|
-import { selectShop } from '@/mixins'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
+import { selectShop } from "@/mixins";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
export default {
|
|
|
name: "stock_manage", // 开单
|
|
|
@@ -108,7 +106,7 @@ export default {
|
|
|
CommodityStock,
|
|
|
DorpdownSelect
|
|
|
},
|
|
|
- mixins: [productMins,selectShop],
|
|
|
+ mixins: [productMins, selectShop],
|
|
|
data() {
|
|
|
return {
|
|
|
STOCK_TYPE,
|
|
|
@@ -124,16 +122,16 @@ export default {
|
|
|
name: "库存管理",
|
|
|
key: STOCK_TYPE.MANAGE
|
|
|
}
|
|
|
- ],
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
let type = this.tabs[this.tabIndex].key == STOCK_TYPE.WARN ? "waring" : "";
|
|
|
// 当前门店
|
|
|
- this.shopId = this.userInfo.id
|
|
|
- this.initData({ type,shopId:this.shopId });
|
|
|
+ this.shopId = this.userInfo.id;
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
affirm(val) {
|
|
|
if (val.index === 0) {
|
|
|
@@ -142,35 +140,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
change(e) {
|
|
|
-
|
|
|
if (this.tabIndex == e.index) {
|
|
|
return false;
|
|
|
} else {
|
|
|
uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
+ title: "加载中"
|
|
|
});
|
|
|
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 });
|
|
|
+ this.initData({ type, shopId: this.shopId });
|
|
|
}
|
|
|
},
|
|
|
searchFn() {
|
|
|
uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
- });
|
|
|
- this.initData({ shopId:this.shopId });
|
|
|
+ title: "加载中"
|
|
|
+ });
|
|
|
+ this.initData({ shopId: this.shopId });
|
|
|
},
|
|
|
scrollTop() {},
|
|
|
- selectSussess(val){
|
|
|
+ selectSussess(val) {
|
|
|
uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
+ title: "加载中"
|
|
|
});
|
|
|
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 });
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|