lilei 2 anni fa
parent
commit
ab81f8cb16

+ 1 - 1
App.vue

@@ -5,7 +5,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'pro', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 8 - 4
pages.json

@@ -609,19 +609,23 @@
 		"list": [
 			{
 				"pagePath": "pages/sales/index",
-				"text": "销售"
+				"text": "销售",
+				"visible": true
 			},
 			{
 				"pagePath": "pages/stock/index",
-				"text": "库存"
+				"text": "库存",
+				"visible": true
 			},
 			{
 				"pagePath": "pages/index/index",
-				"text": "货架"
+				"text": "货架",
+				"visible": true
 			},
 			{
 				"pagePath": "pages/userCenter/index",
-				"text": "我的"
+				"text": "我的",
+				"visible": true
 			}
 		]
 	}

+ 14 - 7
pages/index/index.vue

@@ -1,44 +1,51 @@
 <template>
 	<view class="homePage-container">
 		 <!-- 数字货架 -->
-		 <div class="panel-box">
+		 <div class="panel-box" v-if="$hasPermissions('M_ERManage_mobile')">
 		 	<div class="panel-title"><div class="texts">补货管理</div></div>
 		 	<div class="panel-body"><iconItemsList :list="storageRacksNavList"></iconItemsList></div>
 		 </div>
 		 <!-- 调回管理 -->
 		 <div class="graid-box">
-			 <div class="graid-box-1" @click="toPage('/pages/shuntBackManage/shuntBackList')">
+			 <div class="graid-box-1" @click="toPage('/pages/shuntBackManage/shuntBackList')" v-if="$hasPermissions('M_BackToManage_mobile')">
 				 <div class="icon">
 					 <u-icon name="huowu-tuihui" custom-prefix="iscm-icon" size="70"></u-icon>
 				 </div>
 				 <div class="title">调回管理</div>
 			 </div>
-			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
+			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')" v-if="$hasPermissions('M_printLabel_mobile')">
 				 <div class="icon">
-				 	<u-icon name="icon_remark" custom-prefix="iscm-icon" size="65"></u-icon>
+				 	<u-icon name="dayin" custom-prefix="iscm-icon" size="65"></u-icon>
 				 </div>
 				 <div class="title">补打贴签</div>
 			 </div>
-			 <div class="graid-box-1" @click="toPage('/pages/shelfSetting/shelfList')">
+			 <div class="graid-box-1" @click="toPage('/pages/shelfSetting/shelfList')" v-if="$hasPermissions('M_shelfSetting_mobile')">
 				 <div class="icon">
 					<u-icon name="ison_shelf" custom-prefix="iscm-icon" size="65"></u-icon>
 				 </div>
 				 <div class="title">货架设置</div>
 			 </div>
-			 <div class="graid-box-1" @click="toPage('/pages/approveStore/list')">
+			 <div class="graid-box-1" @click="toPage('/pages/approveStore/list')" v-if="$hasPermissions('M_auditStore_mobile')">
 				 <div class="icon">
 				 	<u-icon name="mendianzhuanxiangshenhe" custom-prefix="iscm-icon" size="70"></u-icon>
 					<u-badge type="error" size="mini" :offset="[-5,20]" :count="storeAuthNums"></u-badge>
 				 </div>
 				 <div class="title">门店审核</div>
 			 </div>
-			 <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')">
+			 <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')" v-if="$hasPermissions('M_stockCheck_mobile')">
 				 <div class="icon">
 					<u-icon name="icon_warehousing" custom-prefix="iscm-icon" size="65"></u-icon>
 					<u-badge type="error" size="mini" :offset="[-5,20]" :count="stockCheckNums"></u-badge>
 				 </div>
 				 <div class="title">库存盘点</div>
 			 </div>
+			 <div class="graid-box-1" @click="toPage('/pages/stockCheck/shelfList')" v-if="$hasPermissions('M_shelfOrder_mobile')">
+				 <div class="icon">
+					<u-icon name="icon_order" custom-prefix="iscm-icon" size="65"></u-icon>
+					<u-badge type="error" size="mini" :offset="[-5,20]" :count="stockCheckNums"></u-badge>
+				 </div>
+				 <div class="title">货架订单</div>
+			 </div>
 			 <!-- <div class="graid-box-1" @click="toPage('/pages/index/printAbc')">
 				 <div class="title">打印ABC</div>
 			 </div> -->

+ 1 - 1
pages/sales/chooseProduct.vue

@@ -23,7 +23,7 @@
 						</view>
 					</view>
 					<view class="list-item-footer flex align_center justify_between">
-						<view class="footer-item" v-if="searchParams && searchParams.cost">
+						<view class="footer-item" v-if="searchParams && searchParams.cost &&$hasPermissions('M_showCostPrice_mobile')">
 							<view>{{toThousands(item.putCost||0, 2)}}</view>
 							<view class="color_6">成本价</view>
 						</view>

+ 1 - 1
pages/sales/edit.vue

@@ -41,7 +41,7 @@
 					<view>
 						急件总款数:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.oosCategory || detailData.oosCategory==0) ? toThousands(detailData.oosCategory) : '--'}}</text>;急件总数量:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.oosQty || detailData.oosQty==0) ? toThousands(detailData.oosQty) : '--'}}</text>;赠品总数量:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.giftQty || detailData.giftQty==0) ? toThousands(detailData.giftQty) : '--'}}</text>;
 					</view>
-					<view>
+					<view v-if="$hasPermissions('M_showCostPrice_mobile')">
 						总成本:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost, 2) : '--'}}</text>;总毛利:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit, 2) : '--'}}</text>;
 					</view>
 				</view>

+ 5 - 3
pages/sales/index.vue

@@ -2,7 +2,7 @@
 	<view class="sales-warp">
 		<view id="tjCons">
 			<!--销售数据统计 -->
-			<view class="content-data">
+			<view class="content-data" v-if="$hasPermissions('M_salesTj_mobile')">
 				<view class="date-type">
 					<text v-for="(item, index) in tabNav" :key="index" :class="[index == navInd ? 'active_day' : '']" @click="seleteTime(index)">{{item.name}}</text>
 				</view>
@@ -23,7 +23,7 @@
 			</view>
 			<!-- 产品报价及新增销售单 -->
 			<view class="nav-cont flex align_center justify_between">
-				<view class="nav-item" @click="toPage('/pages/sales/productPricing')">
+				<view class="nav-item" @click="toPage('/pages/sales/productPricing')" v-if="$hasPermissions('M_productPrice_mobile')">
 					<u-image class="nav-pic" style="margin-top: 5upx;" :src="`../../static/${theme}/navIcon/price_icon.png`" width="60" height="60"></u-image>
 					<text class="nav-txt" style="margin-top: 5upx;">产品报价</text>
 				</view>
@@ -31,7 +31,7 @@
 					<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/sale_icon.png`" width="70" height="70"></u-image>
 					<text class="nav-txt">新增销售单</text>
 				</view> -->
-				<view class="nav-item" @click="toPage('/pages/webviews/openview?title=产品查询&url=https://jgqp.51cjml.com/h5/#!/')">
+				<view class="nav-item" @click="toPage('/pages/webviews/openview?title=产品查询&url=https://jgqp.51cjml.com/h5/#!/')" v-if="$hasPermissions('M_queryProduct_mobile')">
 					<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/pfind.png`" width="64" height="64"></u-image>
 					<text class="nav-txt">产品查询</text>
 				</view>
@@ -98,11 +98,13 @@
 			  "index": 1,
 			  "iconPath": "static/"+theme+"/tabbar/stock.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/stock-active.png",
+			  "visible": this.$hasPermissions('M_stockManage_mobile')
 			})
 			uni.setTabBarItem({
 			  "index": 2,
 			  "iconPath": "static/"+theme+"/tabbar/shelf.png",
 			  "selectedIconPath": "static/"+theme+"/tabbar/shelf-active.png",
+			  "visible": this.$hasPermissions('M_shelfManage_mobile')
 			})
 			uni.setTabBarItem({
 			  "index": 3,

+ 7 - 1
pages/sales/productPricing.vue

@@ -2,7 +2,7 @@
 	<view class="productPricing-content">
 		<view class="checkbox-price">
 			<u-checkbox-group  placement="row">
-				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in priceList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
+				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in tabList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
 			</u-checkbox-group>
 		</view>
 		<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
@@ -100,6 +100,12 @@
 			selPriceShow() {
 				const a = this.priceList.filter(item => item.checked)
 				return a.length > 0
+			},
+			tabList(){
+				if(!this.$hasPermissions('M_showCostPrice_mobile')){
+					return this.priceList.slice(1,4)
+				}
+				return this.priceList
 			}
 		},
 		onLoad(option) {

+ 2 - 2
pages/stock/detaiList.vue

@@ -20,7 +20,7 @@
 							<view class="font_13">
 								可用总数量:{{toThousands(stockInfo&&stockInfo.currentStockQty||0)}}{{stockInfo&&stockInfo.productUnit||''}}
 							</view>
-							<view class="font_13">
+							<view class="font_13" v-if="$hasPermissions('M_showCostPrice_mobile')">
 								可用总成本:
 								¥{{toThousands(stockInfo&&stockInfo.currentStockCost||0, 2)}}
 							</view>
@@ -29,7 +29,7 @@
 							<view class="font_13">
 								冻结总数量:{{toThousands(stockInfo&&stockInfo.freezeQty||0)}}{{stockInfo&&stockInfo.productUnit||''}}
 							</view>
-							<view class="font_13">
+							<view class="font_13" v-if="$hasPermissions('M_showCostPrice_mobile')">
 								冻结总成本:
 								¥{{toThousands(stockInfo&&stockInfo.freezeCost||0, 2)}}
 							</view>

+ 8 - 12
pages/stock/index.vue

@@ -1,18 +1,18 @@
 <template>
 	<view class="stock-wrap">
 		<!-- 统计 -->
-		<view class="panel-box" v-if="totalData">
+		<view class="panel-box" v-if="totalData&&$hasPermissions('M_stockTj_mobile')">
 			<view class="item-box">
-				<u-count-to :end-val="totalData&&totalData.totalCurrentStockQty ? totalData.totalCurrentStockQty : 0" separator=","></u-count-to>
 				<view>库存总数量(个)</view>
+				<u-count-to :end-val="totalData&&totalData.totalCurrentStockQty ? totalData.totalCurrentStockQty : 0" separator=","></u-count-to>
 			</view>
-			<view class="item-box">
-				<u-count-to :end-val="totalData&&totalData.totalCurrentStockCost ? totalData.totalCurrentStockCost : 0" separator="," :decimals="2"></u-count-to>
+			<view class="item-box" v-if="$hasPermissions('M_showCostPrice_mobile')">
 				<view>库存总成本(¥)</view>
+				<u-count-to :end-val="totalData&&totalData.totalCurrentStockCost ? totalData.totalCurrentStockCost : 0" separator="," :decimals="2"></u-count-to>
 			</view>
 		</view>
 		<!-- 库存查询 -->
-		<view class="stock-con">
+		<view class="stock-con" v-if="$hasPermissions('M_stockQuery_mobile')">
 			<view class="stock-tit flex align_center">
 				<view class="u-line" :style="{background: $config('primaryColor')}"></view>
 				库存查询
@@ -215,15 +215,11 @@
 			border-radius: 20upx;
 			box-shadow: 3upx 2upx 6upx #eee;
 			margin-bottom: 30upx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
 			.item-box{
 				text-align: center;
-				width: 50%;
-			}
-			.item-box:first-child{
-				border-right: 1px solid #e4e7ed;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
 			}
 		}
 		.stock-con{

+ 1 - 1
pages/stock/stockDetail.vue

@@ -34,7 +34,7 @@
 				<view class="info-name">冻结库存数量</view>
 				<view>{{toThousands(paramsData && paramsData.freezeQty || 0)}}</view>
 			</view>
-			<view class="info-item flex align_center justify_between">
+			<view class="info-item flex align_center justify_between" v-if="$hasPermissions('M_showCostPrice_mobile')">
 				<view class="info-name">成本单价</view>
 				<view>¥{{toThousands(paramsData && paramsData.putCost || 0, 2)}}</view>
 			</view>

+ 3 - 4
pages/stock/stockSearch.vue

@@ -10,7 +10,7 @@
 				<view>可用库存数量</view>
 				<view>{{toThousands(totalData&&totalData.totalCurrentStockQty||0)}}个</view>
 			</view>
-			<view class="item-box">
+			<view class="item-box" v-if="$hasPermissions('M_showCostPrice_mobile')">
 				<view>可用库存成本</view>
 				<view>¥{{toThousands(totalData&&totalData.totalCurrentStockCost||0, 2)}}</view>
 			</view>
@@ -37,12 +37,12 @@
 							<view class="padding_3">原厂编码:{{item.productOrigCode && item.productOrigCode !== ' '? item.productOrigCode : '--'}}</view>
 						</view>
 					</view>
-					<view class="stockSearch-item-footer flex align_center justify_between">
+					<view class="stockSearch-item-footer flex align_center">
 						<view class="font_13">
 							可用库存数量
 							<view>{{toThousands(item.currentStockQty||0)}}{{item.productUnit}}</view>
 						</view>
-						<view class="font_13">
+						<view class="font_13" v-if="$hasPermissions('M_showCostPrice_mobile')">
 							可用库存成本
 							<view>¥{{toThousands(item.currentStockCost||0, 2)}}</view>
 						</view>
@@ -189,7 +189,6 @@
 			box-shadow: 3upx 2upx 6upx #eee;
 			margin-bottom: 20upx;
 			display: flex;
-			justify-content: space-between;
 			align-items: center;
 			.item-box{
 				text-align: center;

+ 1 - 1
pages/stock/warehouseDetail.vue

@@ -58,7 +58,7 @@
 				<view class="info-name">仓位</view>
 				<view>{{paramsData && paramsData.warehouseLocationName || '--'}}</view>
 			</view>
-			<view class="info-item flex align_center justify_between">
+			<view class="info-item flex align_center justify_between" v-if="$hasPermissions('M_showCostPrice_mobile')">
 				<view class="info-name">总成本</view>
 				<view>¥{{toThousands(paramsData && paramsData.totalCost || 0, 2)}}</view>
 			</view>