|
|
@@ -200,8 +200,22 @@
|
|
|
<view class="tabs-wrap">
|
|
|
<view class="tabs-list" v-for="(item, index) in tabsData" :key="index">
|
|
|
<view @click="goPage(item)">
|
|
|
- <view class="tabs-img">
|
|
|
- <image :src="`${constant.hostUrl}/image/${item.img}`" alt mode="widthFix" ></image>
|
|
|
+ <view
|
|
|
+ v-if="item.icon"
|
|
|
+ class="tabs-img tabs-icon-box"
|
|
|
+ :style="{ background: iconBg(item.icon) }"
|
|
|
+ >
|
|
|
+ <image
|
|
|
+ class="tabs-icon-img"
|
|
|
+ :src="iconSrc(item.icon)"
|
|
|
+ mode="aspectFit"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+ <view v-else class="tabs-img">
|
|
|
+ <image
|
|
|
+ :src="tabImgSrc(item)"
|
|
|
+ mode="widthFix"
|
|
|
+ ></image>
|
|
|
</view>
|
|
|
<view class="tabs-name">{{ item.name }}</view>
|
|
|
</view>
|
|
|
@@ -289,6 +303,7 @@ import { renewShop,noRemind,needRemind } from "@/api/renew"
|
|
|
import { getListB,orderFh} from "@/api/order";
|
|
|
import wexinPay from "@/utils/pay/wxPay";
|
|
|
import keyboardModule from '@/components/keyboard'
|
|
|
+import { iconSrc, iconBg } from "@/utils/iconSrc";
|
|
|
export default {
|
|
|
name: "workbench",
|
|
|
components: {
|
|
|
@@ -306,18 +321,14 @@ export default {
|
|
|
todayData: { income:0.00, order:0, custom:0, expend:0.00 }
|
|
|
},
|
|
|
tabsData: [
|
|
|
- { name: "商城", img: 'ghs/home/shop.png', url: "/admin/home/mall" },
|
|
|
- { name: "改价", img: 'ghs/home/gj.png', url: "/admin/changePrice/list" },
|
|
|
- { name: "花材", img: 'ghs/home/hcgl.png', url: "/admin/item/list" },
|
|
|
- { name: "采购", img: 'ghs/home/icon_caigou.png', url: "/pagesPurchase/order" },
|
|
|
- { name: "供货商", img: 'ghs/home/icon_ghs.png', url: "/pagesPurchase/supplier" },
|
|
|
- { name: "损耗", img: 'ghs/home/kcyjs.png', url: "/admin/breakage/list" },
|
|
|
- { name: "调拨入库", img: 'ghs/home/dbrk.png', url: "/pagesStorehouse/allot/allotPut" },
|
|
|
- { name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
|
|
|
- {name : "结账记录", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
|
|
|
- {name : "支出", img : "ghs/home/kcyjs.png", url : "/admin/expend/list"},
|
|
|
- {name : "盘点", img : "/ghs/home/pandian.png", url : "/pagesStorehouse/inventory/list"},
|
|
|
- {name : "库存预警", img : "/ghs/home/kcyjs.png", url : "/admin/item/list?warning=1"},
|
|
|
+ { name: "商城码", img: "ghs/home/shop3.png", url: "/admin/home/mall" },
|
|
|
+ { name: "改价", img: "ghs/home/gj.png", url: "/admin/changePrice/list2" },
|
|
|
+ { name: "花材", img: "ghs/home/hcgl.png", url: "/admin/item/list2" },
|
|
|
+ { name: "采购", img: "ghs/home/icon_caigou.png", url: "/pagesPurchase/order" },
|
|
|
+ { name: "供货商", img: "ghs/home/icon_ghs.png", url: "/pagesPurchase/supplier" },
|
|
|
+ { name: "报损", img: "ghs/home/kcyjs.png", url: "/admin/breakage/list" },
|
|
|
+ { name: "调拨入库", img: "ghs/home/dbrk.png", url: "/pagesStorehouse/allot/allotPut" },
|
|
|
+ { name: "调拨出库", img: "ghs/home/dbck.png", url: "/pagesStorehouse/allot/allotEx" },
|
|
|
],
|
|
|
skSrc: `${this.$constant.hostUrl}/image/ghs/home/kj2.png`,
|
|
|
pfSrc: `${this.$constant.hostUrl}/image/ghs/home/pf.jpg`,
|
|
|
@@ -409,6 +420,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
+ iconSrc,
|
|
|
+ iconBg,
|
|
|
+ tabImgSrc (item) {
|
|
|
+ const img = item && item.img ? String(item.img).replace(/^\//, '') : '';
|
|
|
+ return img ? `${this.constant.hostUrl}/image/${img}` : '';
|
|
|
+ },
|
|
|
directFh(info){
|
|
|
orderFh({id:info.id,fhType:0}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
@@ -702,7 +719,7 @@ export default {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
this.isMini = 1
|
|
|
// #endif
|
|
|
- consoleIndex({isMini:this.isMini,version:2}).then(res => {
|
|
|
+ consoleIndex({isMini:this.isMini,version:3}).then(res => {
|
|
|
this.data = res.data;
|
|
|
const { menu } = res.data;
|
|
|
this.tabsData = menu
|
|
|
@@ -1033,10 +1050,23 @@ export default {
|
|
|
width: 100upx;
|
|
|
height: 100upx;
|
|
|
margin: 0 auto;
|
|
|
- img {
|
|
|
+ image {
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
+ .tabs-icon-box {
|
|
|
+ border-radius: 18upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ line-height: 0;
|
|
|
+ }
|
|
|
+ .tabs-icon-img {
|
|
|
+ display: block;
|
|
|
+ width: 56upx;
|
|
|
+ height: 56upx;
|
|
|
+ }
|
|
|
.tabs-name {
|
|
|
color: #444444;
|
|
|
margin-top: 10upx;
|