shish пре 5 година
родитељ
комит
16cb16edc6
3 измењених фајлова са 66 додато и 92 уклоњено
  1. 5 29
      ghsApp/src/admin/billing/index.vue
  2. 13 8
      ghsApp/src/admin/home/workbench.vue
  3. 48 55
      hdApp/src/admin/home/workbench.vue

+ 5 - 29
ghsApp/src/admin/billing/index.vue

@@ -1,11 +1,10 @@
 <template>
 <template>
 	<view class="billing_box_bg">
 	<view class="billing_box_bg">
-		<app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%" />
-		<view class="input-wrap" v-if="tabIndex == 0">
+		<view class="input-wrap" >
 			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @search="searchFn" />
 			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @search="searchFn" />
 		</view>
 		</view>
 		<view class="scroll-middle_bx">
 		<view class="scroll-middle_bx">
-			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" v-if="tabIndex == 0">
+			<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">
 				<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>
 					<text>{{ item.className || "" }}</text>
 					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
 					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
@@ -18,7 +17,7 @@
 				</div>
 				</div>
 			</scroll-view>
 			</scroll-view>
 
 
-			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scrollClassId">
+			<scroll-view scroll-y class="right-box" :scroll-into-view="scrollClassId">
 				<!--内容部分 start -->
 				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 					<view
 					<view
@@ -64,11 +63,7 @@
 				</block>
 				</block>
 				<!--内容部分 end -->
 				<!--内容部分 end -->
 			</scroll-view>
 			</scroll-view>
-			<block v-else>
-				<view style="width:100%">
-					<AppWrapperEmpty :type="'billing'" :is-empty="true" />
-				</view>
-			</block>
+
 		</view>
 		</view>
 		<!-- :maskClosable="false" -->
 		<!-- :maskClosable="false" -->
 		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
 		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
@@ -101,7 +96,7 @@
 			padding="30rpx 30rpx"
 			padding="30rpx 30rpx"
 		>
 		>
 		</modal-module>
 		</modal-module>
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" v-if="tabIndex == 0"></FooterCart>
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -132,18 +127,6 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			COMMODITY_TYPE,
 			COMMODITY_TYPE,
-			tabIndex: 0,
-			tabs: [
-				{
-					name: "批发"
-				},
-				{
-					name: "零售"
-				}
-				// {
-				//     name: '课程'
-				// },
-			],
 			isModel: false,
 			isModel: false,
 			customData: {
 			customData: {
 				bigCount: 0,
 				bigCount: 0,
@@ -237,13 +220,6 @@ export default {
 				this.$msg("请选择花材");
 				this.$msg("请选择花材");
 			}
 			}
 		},
 		},
-		change(e) {
-			if (this.tabIndex == e.index) {
-				return false;
-			} else {
-				this.tabIndex = e.index;
-			}
-		},
 		scrollTop() {}
 		scrollTop() {}
 	}
 	}
 };
 };

+ 13 - 8
ghsApp/src/admin/home/workbench.vue

@@ -186,16 +186,21 @@ export default {
 			],
 			],
 			// tab按钮
 			// tab按钮
 			tabsData: [
 			tabsData: [
-				{
-					name: "库存预警",
-					img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,
-					url: "/pagesStorehouse/stockWarn/manage"
-				},
 				{
 				{
 					name: "改价",
 					name: "改价",
 					img: `${this.$constant.imgUrl}/ghs/home/gj.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/gj.png`,
 					url: "/admin/billing/priceChange"
 					url: "/admin/billing/priceChange"
 				},
 				},
+				{
+					name: "采购",
+					img: `${this.$constant.imgUrl}/ghs/home/qball.png`,
+					url: "/pagesPurchase/order"
+				},
+				{
+					name: "库存",
+					img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,
+					url: "/pagesStorehouse/stockWarn/manage"
+				},
 				{
 				{
 					name: "调拨出库",
 					name: "调拨出库",
 					img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,
@@ -207,7 +212,7 @@ export default {
 					url: "/pagesStorehouse/allot/allotPut"
 					url: "/pagesStorehouse/allot/allotPut"
 				},
 				},
 				{
 				{
-					name: "花材管理",
+					name: "花材",
 					img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,
 					url: "/pagesStorehouse/flower/manage"
 					url: "/pagesStorehouse/flower/manage"
 				},
 				},
@@ -217,12 +222,12 @@ export default {
 					url: "/pagesArrears/list"
 					url: "/pagesArrears/list"
 				},
 				},
 				{
 				{
-					name: "员工管理",
+					name: "员工",
 					img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,
 					url: "/admin/staff/list"
 					url: "/admin/staff/list"
 				},
 				},
 				{
 				{
-					name: "门店管理",
+					name: "门店",
 					img: `${this.$constant.imgUrl}/ghs/home/shop.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/shop.png`,
 					url: "/admin/shop/list"
 					url: "/admin/shop/list"
 				},
 				},

+ 48 - 55
hdApp/src/admin/home/workbench.vue

@@ -56,7 +56,7 @@
 				class="news-list"
 				class="news-list"
 				v-for="(item, index) in data.notice"
 				v-for="(item, index) in data.notice"
 				:key="index"
 				:key="index"
-				@click="pageToFn(item.page)"
+				@click="pageTo(item.page)"
 			>
 			>
 				<div class="news-left">
 				<div class="news-left">
 					<i class="iconfont iconxiaoxi2 ling"></i>
 					<i class="iconfont iconxiaoxi2 ling"></i>
@@ -85,7 +85,7 @@
 			</view>
 			</view>
 			<div class="tabs-wrap">
 			<div class="tabs-wrap">
 				<div class="tabs-list" v-for="(item, index) in tabsData" :key="index">
 				<div class="tabs-list" v-for="(item, index) in tabsData" :key="index">
-					<div @click="pageTo(item)">
+					<div @click="pageToFn(item)">
 						<div class="tabs-img">
 						<div class="tabs-img">
 							<img :src="item.img" alt mode="widthFix" />
 							<img :src="item.img" alt mode="widthFix" />
 						</div>
 						</div>
@@ -106,22 +106,6 @@
 			</div>
 			</div>
 		</div>
 		</div>
 		<!-- <fab-module /> -->
 		<!-- <fab-module /> -->
-		<!-- 续费遮罩层 -->
-		<modal-module
-			:show="renewMask"
-			:custom="true"
-			:maskClosable="true"
-			padding="30rpx 30rpx"
-		>
-			<template>
-				<div class="renew-wrap">
-					<div class="renew-wrap-text">你的账号已到期</div>
-					<button class="admin-button-com middle" @click="renewFn()">
-						立即续费
-					</button>
-				</div>
-			</template>
-		</modal-module>
 	</div>
 	</div>
 </template>
 </template>
 
 
@@ -187,45 +171,52 @@ export default {
 			// tab按钮
 			// tab按钮
 			tabsData: [
 			tabsData: [
 				{
 				{
-					name: "库存预警",
-					img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,
-					url: "/pagesStorehouse/stockWarn/manage"
+					name: "采购",
+					img: `${this.$constant.imgUrl}/ghs/home/qball.png`,
+					url: "/pagesPurchase/order",
+					type:'common',
 				},
 				},
 				{
 				{
-					name: "改价",
+					name: "收款",
 					img: `${this.$constant.imgUrl}/ghs/home/gj.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/gj.png`,
-					url: "/admin/billing/priceChange"
+					url: "/admin/billing/priceChange",
+					type:'gathering',
 				},
 				},
 				{
 				{
-					name: "商品管理",
+					name: "商品",
 					img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,
-					url: "/admin/goodsManage/list"
+					url: "/admin/goodsManage/list",
+					type:'common',
 				},
 				},
 				{
 				{
-					name: "员工管理",
+					name: "员工",
 					img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,
-					url: "/admin/staff/list"
+					url: "/admin/staff/list",
+					type:'common',
 				},
 				},
 				{
 				{
-					name: "门店管理",
+					name: "门店",
 					img: `${this.$constant.imgUrl}/ghs/home/shop.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/shop.png`,
-					url: "/admin/shop/list"
+					url: "/admin/shop/list",
+					type:'common',
 				},
 				},
 				{
 				{
 					name: "邀请开店",
 					name: "邀请开店",
 					img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,
-					url: "/pagesInvite/list"
+					url: "/pagesInvite/list",
+					type:'common',
 				},
 				},
 				{
 				{
 					name: "经营概况",
 					name: "经营概况",
 					img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,
 					img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,
-					url: "/pagesStatistics/business"
+					url: "/pagesStatistics/business",
+					type:'common',
 				},
 				},
 				{
 				{
-					name: "全部",
-					img: `${this.$constant.imgUrl}/ghs/home/qball.png`,
-					url: "/admin/home/apply",
-					type:4
+					name: "库存",
+					img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,
+					url: "/pagesStorehouse/stockWarn/manage",
+					type:'common',
 				}
 				}
 			],
 			],
 			// 总览
 			// 总览
@@ -289,12 +280,31 @@ export default {
 		this.init();
 		this.init();
 	},
 	},
 	methods: {
 	methods: {
+		pageToFn(item){
+			if(item.type == 'gathering'){
+				getWeixinId().then(res => {
+					uni.navigateToMiniProgram({
+						appId: res.data.mall.miniAppId,
+						path: 'pages/pay/index?account='+this.loginInfo.shopId,
+						//develop 开发板 trial 体验版 release 正式版
+						envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+						extraData: {
+							'shopAdminId': this.loginInfo.shopAdminId
+						},
+						success(res) {
+							// 打开成功
+						}
+					})
+				})
+			}else{
+				this.$util.pageTo(item.url);
+			}
+		},
 		init() {
 		init() {
 			getUser().then(res => {
 			getUser().then(res => {
 				uni.setNavigationBarTitle({
 				uni.setNavigationBarTitle({
 					title: res.name
 					title: res.name
 				});
 				});
-
 				let nowTime = getDataTimestamp(new Date(), true);
 				let nowTime = getDataTimestamp(new Date(), true);
 				if (nowTime > res.setDeadline) {
 				if (nowTime > res.setDeadline) {
 					this.renewMask = true;
 					this.renewMask = true;
@@ -318,29 +328,13 @@ export default {
 				}
 				}
 			});
 			});
 		},
 		},
-		// 跳转
-		pageToFn(page) {
-			this.$util.pageTo({
-				url: page
-			});
-		},
-		// 续费
-		renewFn() {
-			this.$util.pageTo({
-				url: "/pagesClient/official/index",
-				query: {
-					pay: 1
-				},
-				type: 2
-			});
-		},
 		getMyMall(){
 		getMyMall(){
 			getWeixinId().then(res => {
 			getWeixinId().then(res => {
 				uni.navigateToMiniProgram({
 				uni.navigateToMiniProgram({
 					appId: res.data.mall.miniAppId,
 					appId: res.data.mall.miniAppId,
 					path: 'pages/home/index?account='+this.loginInfo.shopId,
 					path: 'pages/home/index?account='+this.loginInfo.shopId,
 					//develop 开发板 trial 体验版 release 正式版
 					//develop 开发板 trial 体验版 release 正式版
-					envVersion: 'develop',
+					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
 					extraData: {
 					extraData: {
 						'shopAdminId': this.loginInfo.shopAdminId
 						'shopAdminId': this.loginInfo.shopAdminId
 					},
 					},
@@ -348,8 +342,7 @@ export default {
 						// 打开成功
 						// 打开成功
 					}
 					}
 				})
 				})
-			});
-
+			})
 		},
 		},
 	}
 	}
 };
 };