From b07889e22f823fac80a66b503671e170668f4ee6 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期二, 10 十二月 2024 10:10:25 +0800
Subject: [PATCH] 1.供应商子账号

---
 pages/user/supplier-user.vue |  112 +++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 95 insertions(+), 17 deletions(-)

diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue
index 2c552bf..2b441c1 100644
--- a/pages/user/supplier-user.vue
+++ b/pages/user/supplier-user.vue
@@ -36,9 +36,25 @@
 
 				<view class="name" v-if="currentInfo.id">
 					<view class="t1">
-						{{
+						<!-- {{
               (!!currentInfo.partnerDTO ? (currentInfo.partnerDTO.name) : "") ||  (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-'
-            }}
+            }} -->
+						<span v-if="currentInfo.partnerDTO && currentInfo.partnerDTO.name">
+							{{ currentInfo.partnerDTO.name }}
+						</span>
+						<span v-else-if="currentInfo.supplierDTO && currentInfo.supplierDTO.name">
+							{{ currentInfo.supplierDTO.name }}
+						</span>
+						<span v-else-if="currentInfo.customerDTO && currentInfo.customerDTO.name">
+							{{ currentInfo.customerDTO.name }}
+						</span>
+						<span v-else-if="currentInfo.nickName">
+							{{ currentInfo.nickName }}
+						</span>
+						<span v-else-if="currentInfo.loginName">
+							{{ currentInfo.loginName }}
+						</span>
+						<span v-else>-</span>
 						<span v-if="currentInfo.supplierDTO&&currentInfo.supplierDTO.status!=='P'">
 							({{ currentInfo.supplierDTO ? currentInfo.supplierDTO.statusStr : '' }})</span>
 						<span v-if="currentInfo.partnerDTO&&currentInfo.partnerDTO.status!=='P'">
@@ -87,7 +103,13 @@
 					<!-- getUserProfile -->
 					{{ '点击登陆/注册' }}
 				</view>
-				<image class="icon-setting" @click="toInfo" src="../../static/common/icon-setting.png" mode="aspectFit">
+				<image class="icon-setting" 
+					v-if="
+						(selftype==='supplier' && $hasPermission('supplier:mine:setting'))
+						|| (selftype==='partner' && $hasPermission('partner:mine:setting') ) 
+						|| (selftype==='customer')
+					"
+					@click="toInfo" src="../../static/common/icon-setting.png" mode="aspectFit">
 				</image>
 			</view>
 			<!-- #ifdef PUB_CUSTOMER -->
@@ -187,6 +209,34 @@
 				</view>
 			</view>
 		</view>
+		
+		<view class="user-utils kf-container  m-20 flex" v-if="selftype==='customer'||!selftype" 
+		@click="goto('/sub_pages/supplier/customer_service/customer_service',false)">
+			<view class="">
+				<image src="/static/common/icon-kf.png" class="icon-kf m-r-15 img100 icon"></image>
+			</view>
+			<view class="flex1" >
+				<view class="icon-view" style="font-weight: 600;">				
+					我的客服
+				</view>
+				<view class="flex m-t-12">
+					<view class="flex1 w-fit m-auto icon-view" @click.stop="callTel">
+						<image src="/static/common/icon-call.png" class="icon icon-call m-r-10  img100"></image>
+						{{tel}}
+					</view>
+					<view class="flex1 w-fit m-auto icon-view flex flex-wrap-normal" open-type="contact">
+						<image src="/static/common/icon-wx.png" class="icon icon-call m-t-2  m-r-10 img100"></image>
+						
+						<button open-type="contact" class="component-button-contact" @handleContact="handleContact">
+							在线客服
+						</button>
+					</view>
+						
+						
+				</view>
+			</view>
+		</view>
+		
 		<view class="user-utils m-20" v-if="selftype==='customer'||!selftype">
 			<view class="user-util m-t-12 user-customer-service-infos">
 				<view class="title flex">
@@ -272,21 +322,23 @@
 		</view>
 		<!-- #endif -->
 		<view class="user-utils m-20">
-			<view class="user-util m-t-12 flex" v-if="selftype==='customer'||!selftype"
+			<!-- <view class="user-util m-t-12 flex" v-if="selftype==='customer'||!selftype"
 				@click="goto('/sub_pages/customer/customer-info/customer-info',true)">
 				<view class="title">个人信息</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
-			</view>
-			<view class="user-util m-t-12 flex" v-if="selftype==='partner'||!selftype"
+			</view> -->
+			<view class="user-util m-t-12 flex" 
+				v-if="(selftype==='partner' && $hasPermission('partner:mine:personal:info') )||!selftype"
 				@click="goto('/sub_pages/partner/partner-info/partner-info-personal',true)">
 				<view class="title">个人资料</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
 			</view>
-			<view class="user-util m-t-12 flex" v-if="selftype==='partner'"
+			<view class="user-util m-t-12 flex" 
+				v-if="selftype==='partner' &&  $hasPermission('partner:mine:partner:info') "
 				@click="goto('/sub_pages/partner/partner-info/partner-info',true)">
 				<view class="title">合伙人信息</view>
 				<view class="right-icon">
@@ -295,7 +347,9 @@
 			</view>
 			<!-- #ifdef PUB_PARTNER -->
 			<view class="user-util m-t-12 flex"
-				v-if="selftype==='partner'&&currentInfo.partnerDTO&&currentInfo.partnerDTO.id&&currentInfo.partnerDTO.status=='P'"
+				v-if="
+					selftype==='partner'&& $hasPermission('partner:mine:reg:qrcode')
+					&&currentInfo.partnerDTO&&currentInfo.partnerDTO.id&&currentInfo.partnerDTO.status=='P'"
 				@click="goto('/sub_pages/partner/partner-info/partner-code',true)">
 				<view class="title">推广的注册二维码</view>
 				<view class="right-icon">
@@ -321,22 +375,39 @@
 			</view>
 			<!-- #endif -->
 			<view class="user-util m-t-12 flex"
-				v-if="selftype==='supplier'&&currentInfo&&currentInfo.id&&currentInfo.supplierDTO&&currentInfo.supplierDTO.status==='P'"
+				v-if="
+				(selftype==='supplier'&&currentInfo&&currentInfo.id&&currentInfo.supplierDTO&&currentInfo.supplierDTO.status==='P'
+					&& $hasPermission('supplier:mine:edit:info')
+				)
+				"
 				@click="goto('/sub_pages/supplier/supplier-info/supplier-info-update',true)">
 				<view class="title">信息维护</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
 			</view>
-			<view class="user-util m-t-12 flex" v-if="selftype==='supplier'"
+			<view class="user-util m-t-12 flex" 
+				v-if=" (selftype==='supplier' && $hasPermission('supplier:mine:shop:info') )"
 				@click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)">
 				<view class="title">店铺信息</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
 			</view>
+			<!-- <view class="user-util m-t-12 flex" v-if="selftype==='supplier'||selftype==='partner'"
+				@click="goto('/sub_pages/customer/setup/account-self',true)">
+				<view class="title">账户安全</view>
+				<view class="right-icon">
+					<uni-icons type="right"></uni-icons>
+				</view>
+			</view> -->
 
-			<view class="user-util m-t-12 flex" @click="goto('/pages/user/user-pwd/user-pwd',true)">
+			<view class="user-util m-t-12 flex"
+			 v-if="
+				(selftype==='supplier' && $hasPermission('supplier:mine:edit:password') )
+				|| (selftype==='partner' && $hasPermission('partner:mine:edit:password'))
+			 "
+			 @click="goto('/pages/user/user-pwd/user-pwd',true)">
 				<view class="title">修改密码</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
@@ -349,7 +420,10 @@
 					<uni-icons type="right"></uni-icons>
 				</view>
 			</view> -->
-			<view class="user-util m-t-12 flex" v-if="currentInfo&&currentInfo.id"
+			<view class="user-util m-t-12 flex" v-if="
+				currentInfo&&currentInfo.id &&
+				((selftype==='supplier' &&  $hasPermission('supplier:mine:bind:wechat') )
+				||(selftype==='partner') &&  $hasPermission('partner:mine:bind:wechat') ) "
 				@click="goto('/pages/user/user-bind-wx/user-bind-wx',true)">
 				<view class="title">绑定当前微信</view>
 				<view class="right-icon">
@@ -364,21 +438,25 @@
 			</view> -->
 
 			<!-- v-if="selftype==='customer'" -->
-			<view class="user-util m-t-12 flex" @click="clearlogout">
+			<view class="user-util m-t-12 flex"
+			  v-if="
+			  	(selftype==='supplier' && $hasPermission('supplier:mine:logout')) || 
+				(selftype==='partner' &&  $hasPermission('partner:mine:logout')) "
+			 @click="clearlogout">
 				<view class="title">退出登录</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
 			</view>
 
-			<view class="user-util m-t-12 flex"
+			<!-- <view class="user-util m-t-12 flex"
 			v-if="selftype==='supplier'||selftype==='customer' || !selftype"
-			 @click="goto('/pages/customer_service/customer_service',false)">
+			 @click="goto('/sub_pages/supplier/customer_service/customer_service',false)">
 				<view class="title">我的客服</view>
 				<view class="right-icon">
 					<uni-icons type="right"></uni-icons>
 				</view>
-			</view>
+			</view> -->
 
 
 
@@ -493,7 +571,7 @@
 				tcode: '',
 				inviterName: '',
 				// StatusBar:0,
-				tel: '15974805814',
+				tel: '19288780072',
 				tj: {},
 				tj_order: {},
 				cacheUserId: '',

--
Gitblit v1.9.3