Просмотр исходного кода

Merge branch 'master' of http://s.dev01.dkiboss.com:9001/iBOSS-2.0-Mini/iboss_wx_app

liuyao 1 год назад
Родитель
Сommit
3e17425270

+ 172 - 5
package-basic-data/pages/activity/activity.js

@@ -9,6 +9,7 @@
 const Constants = require('@/utils/Constants.js');
 const util = require('@/utils/util.js')
 const mixins = require('@/mixins/index.js');
+const config = require('@/config/config.js');
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -16,6 +17,7 @@ Page({
      * 页面的初始数据
      */
     data: {
+        imageUrl: config.image_url + '/static/img/',
         // 是否加载完毕
         loadFlag: false,
         // 是否显示vip
@@ -51,7 +53,42 @@ Page({
         buttonSaveList: [
             { code: 'save', title: mixins.$t('save'), width: '120rpx' }
         ],
-        noticeInfo: Constants.noticeInfo
+        noticeInfo: Constants.noticeInfo,
+        funcMenu: [
+            {
+                title: '订单开单',
+                icon: 'btn-account-receivable.png',
+            },
+            {
+                title: '销售出库',
+                icon: 'btn-shipped.png',
+            },
+            {
+                title: '销售退货',
+                icon: 'btn-stored.png',
+            },
+            {
+                title: '销售跟踪',
+                icon: 'btn-shipped-out.png',
+            },
+            {
+                title: '采购订单',
+                icon: 'btn-account-receivable.png',
+            },
+            {
+                title: '采购入库',
+                icon: 'btn-shipped.png',
+            },
+            {
+                title: '采购退货',
+                icon: 'btn-stored.png',
+            },
+            {
+                title: '以销定采',
+                icon: 'btn-shipped-out.png',
+            },
+        ],
+        funcMenuFlg: false,
     },
     /**
      * @desc : 选择活动明细
@@ -327,10 +364,10 @@ Page({
     validData() {
         // 专业版校验
         if (this.data.gradeCode == Constants.gradeCode.PRO) {
-            if (!this.data.readFlag) {
-                util.showToast('请勾选阅读须知');
-                return false;
-            }
+            // if (!this.data.readFlag) {
+            //     util.showToast('请勾选阅读须知');
+            //     return false;
+            // }
             let curentAdItem = this.data.curentAdItem;
             if (!curentAdItem) {
                 util.showToast('请选择活动');
@@ -570,4 +607,134 @@ Page({
         // 获取当前用户授权数
         this.getStaffCount();
     },
+    /**
+     * 六大功能的切换
+     */
+    funcClick(e) {
+        let funcMenuFlg = !this.data.funcMenuFlg
+        if (funcMenuFlg) {
+            this.setData({
+                funcMenu: [
+                    {
+                        title: '订单开单',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '销售出库',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '销售退货',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '销售跟踪',
+                        icon: 'btn-shipped-out.png',
+                    },
+                    {
+                        title: '采购订单',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '采购入库',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '采购退货',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '以销定采',
+                        icon: 'btn-shipped-out.png',
+                    },
+                    {
+                        title: '库存查询',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '入库办理',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '出库办理',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '库存盘点',
+                        icon: 'btn-shipped-out.png',
+                    },
+                    {
+                        title: '资金账户',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '资金转账',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '收款单',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '付款单',
+                        icon: 'btn-shipped-out.png',
+                    },
+                    {
+                        title: '日结对账',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '资金日记账',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '供应商往来',
+                        icon: 'btn-stored.png',
+                    },
+                     
+                ],
+            })
+        } else {
+            this.setData({
+                funcMenu: [
+                    {
+                        title: '订单开单',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '销售出库',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '销售退货',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '销售跟踪',
+                        icon: 'btn-shipped-out.png',
+                    },
+                    {
+                        title: '采购订单',
+                        icon: 'btn-account-receivable.png',
+                    },
+                    {
+                        title: '采购入库',
+                        icon: 'btn-shipped.png',
+                    },
+                    {
+                        title: '采购退货',
+                        icon: 'btn-stored.png',
+                    },
+                    {
+                        title: '以销定采',
+                        icon: 'btn-shipped-out.png',
+                    },
+                ],
+            })
+        }
+
+        this.setData({
+            funcMenuFlg
+        })
+    },
 })

+ 20 - 6
package-basic-data/pages/activity/activity.wxml

@@ -9,7 +9,8 @@
 			<!-- 头像 -->
 			<open-data type="userAvatarUrl" class='wx-avatar'></open-data>
 			<view style="margin-left: 30rpx;">
-				<view class="cp-class">{{companyName}} <dk-tag style="margin-left: 20rpx;" type="primary" padding="0 10rpx" height="30rpx" color="linear-gradient(77.62deg, #CAA977 12.58%, #FFDA7A 85.49%),conic-gradient(from 154.5deg at 29.17% -8.33%, #FFE8BA -0.56deg, rgba(255, 230, 165, 0) 0.26deg, rgba(227, 184, 73, 0.34) 17.37deg, rgba(240, 187, 253, 0.23) 347.83deg, rgba(186, 234, 255, 0.38) 353.78deg, #FFE8BA 359.44deg, rgba(255, 230, 165, 0) 360.26deg);" textColor="#1B365D" radius="10rpx" fontSize="9px" value="{{gradeCode == 'STD'?$t['std']:$t['pro']}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+				<view class="cp-class">{{companyName}}
+					<dk-tag style="margin-left: 20rpx;" type="primary" padding="0 10rpx" height="30rpx" color="linear-gradient(77.62deg, #CAA977 12.58%, #FFDA7A 85.49%),conic-gradient(from 154.5deg at 29.17% -8.33%, #FFE8BA -0.56deg, rgba(255, 230, 165, 0) 0.26deg, rgba(227, 184, 73, 0.34) 17.37deg, rgba(240, 187, 253, 0.23) 347.83deg, rgba(186, 234, 255, 0.38) 353.78deg, #FFE8BA 359.44deg, rgba(255, 230, 165, 0) 360.26deg);" textColor="#1B365D" radius="10rpx" fontSize="9px" value="{{gradeCode == 'STD'?$t['std']:$t['pro']}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
 				</view>
 				<view class="staff-class">{{cpManager + (cpPhone?(' | ' + cpPhone):'')}}</view>
 				<view class="end-date-class" wx:if="{{gradeCode != 'STD' && !upgradeFlag}}">{{$t['cpEndDate'] + ':' + cpEndDate}}</view>
@@ -20,7 +21,7 @@
 	</view>
 
 	<!--活动(专业版)-->
-	<view class="func" wx:if="{{gradeCode != 'STD'}}">
+	<view class="func" wx:if="{{gradeCode != 'STD' && !funcMenuFlg}}">
 		<view style="display:flex;flex-wrap: wrap;">
 			<view class="{{(curentAdItem && curentAdItem.itemId == item.itemId)?'func-card-selected':'func-card'}}" wx:for="{{activityTable}}" wx:for-item="item" wx:key="index" data-item="{{item}}" catchtap="chooseAdItem">
 				<!-- 标题 -->
@@ -66,7 +67,7 @@
 	</view>
 
 	<!--用户数-->
-	<view class="card-class" wx:if="{{gradeCode != 'STD'}}">
+	<view class="card-class" wx:if="{{gradeCode != 'STD' && !funcMenuFlg}}">
 		<!--用户数量-->
 		<van-cell border="{{ false }}" title-class="cell_title">
 			<view slot="title" style="display: flex;">
@@ -100,7 +101,7 @@
 	</view>
 
 	<!--合计(专业版)-->
-	<view class="summary-class" wx:if="{{gradeCode != 'STD'}}">
+	<view class="summary-class" wx:if="{{gradeCode != 'STD' && curentAdItem!=null && !funcMenuFlg}}">
 		<view class="summary-item-class">订单详情:</view>
 		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
 		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
@@ -119,8 +120,8 @@
 			折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
 	</view>
 
-	<!--注册须知-->
-	<view class="notice-class" wx:if="{{gradeCode != 'STD'}}">
+	<!--注册须知 240704 去除 用功能模块代替-->
+	<!-- <view class="notice-class" wx:if="{{gradeCode != 'STD'}}">
 		<view class="notice-item-class" style="font-size: 16px;font-weight: bold;">{{noticeInfo.title}}</view>
 		<view class="notice-item-class">{{noticeInfo.cpName}}</view>
 		<view class="notice-item-class">{{noticeInfo.contact}}</view>
@@ -130,8 +131,21 @@
 			<view style="color: #CE9965;">《注册须知》</view>
 			<view style="color: #CE9965;">《免责条款》</view>
 		</view>
+	</view> -->
+
+	<!--   功能模块 -->
+	<view class="notice-class" wx:if="{{upgradeFlag}}" catch:tap="funcClick">
+		<view class="notice-item-class" style="color: #FF7B1ACC; font-size: 16px;font-weight: bold;text-align: center;">{{noticeInfo.proTitle}}</view>
+		<view style="display: flex;flex-wrap: wrap;padding: 10rpx 0 20rpx 0;">
+			<view class="app-item" style="width:25%;text-align: center;margin-top: 15rpx;margin-bottom: 15rpx;" wx:for="{{funcMenu}}" wx:for-item="item"  wx:key="i">				 
+				<image src="{{imageUrl + item.icon }}" style="height: 85rpx;width:85rpx;"></image>
+				<view class="index-grid-item-text-class" style="font-size: 12px;">{{item.title}}</view>
+			</view>
+		</view>
 	</view>
 
+
+
 	<view style="height: 200rpx;"></view>
 </view>
 

+ 73 - 19
package-basic-data/pages/activity/activity.wxss

@@ -106,7 +106,7 @@ page {
 	border-radius: 19rpx;
 }
 
-.func-card-selected{
+.func-card-selected {
 	margin: 15rpx 1.15%;
 	width: 30.5%;
 	height: 215rpx;
@@ -115,7 +115,7 @@ page {
 	border: 3rpx solid #CE9965;
 }
 
-.func-card-std{
+.func-card-std {
 	margin: 15rpx 30rpx;
 	width: 50%;
 	height: 215rpx;
@@ -124,7 +124,7 @@ page {
 	border: 3rpx solid #CE9965;
 }
 
-.func-card-vip-std-selected{
+.func-card-vip-std-selected {
 	margin: 15rpx 10rpx 15rpx 0;
 	width: 38%;
 	height: 215rpx;
@@ -133,7 +133,7 @@ page {
 	border: 3rpx solid #CE9965;
 }
 
-.func-card-vip-std{
+.func-card-vip-std {
 	margin: 15rpx 10rpx 15rpx 0;
 	width: 38%;
 	height: 215rpx;
@@ -162,9 +162,9 @@ page {
 	font-weight: 600;
 }
 
-.card-title-std{
+.card-title-std {
 	margin-top: 10rpx;
-	margin-left:20rpx;
+	margin-left: 20rpx;
 	display: flex;
 	height: 54rpx;
 	align-items: center;
@@ -174,7 +174,7 @@ page {
 	font-weight: 600;
 }
 
-.card-desc{
+.card-desc {
 	margin-top: 10rpx;
 	display: flex;
 	height: 54rpx;
@@ -185,7 +185,7 @@ page {
 	font-size: 11px;
 }
 
-.card-desc-std{
+.card-desc-std {
 	margin: 10rpx 20rpx;
 	display: flex;
 	height: 54rpx;
@@ -196,50 +196,51 @@ page {
 	font-size: 14px;
 }
 
-.card-class{
+.card-class {
 	margin: 0 30rpx;
 	border-radius: 16rpx;
 	background: #ffffff;
 }
 
-.cell_title{
+.cell_title {
 	color: #e00808;
 }
 
-.summary-class{
+.summary-class {
 	margin: 0 30rpx;
 	margin-top: 30rpx;
 	padding: 10rpx 20rpx;
 	border-radius: 16rpx;
 	background: #ffffff;
-	color:#CE9965;
+	color: #CE9965;
 	font-size: 14px;
 }
 
-.notice-class{
+.notice-class {
 	margin: 0 30rpx;
 	margin-top: 30rpx;
 	padding: 10rpx 20rpx;
 	border-radius: 16rpx;
 	background: #ffffff;
-	color:#1B365D;
+	color: #1B365D;
 }
 
-.checkbox-class{
-	color:#1B365D !important;
+.checkbox-class {
+	color: #1B365D !important;
 }
 
-.van-checkbox__icon--square{
+.van-checkbox__icon--square {
 	border-radius: 10rpx;
 }
 
-.notice-item-class{
+.notice-item-class {
 	margin: 20rpx 0;
 	font-size: 14px;
 	font-weight: 400;
 }
+ 
 
-.summary-item-class{
+.summary-item-class {
 	margin: 8rpx 0;
 }
 
@@ -274,4 +275,57 @@ page {
 	align-items: center;
 	padding: 20rpx;
 	box-shadow: 0px 17px 22px 0px #1B365D33;
+}
+
+
+
+.todo-view-app {
+	padding-top: 24rpx;
+	display: -webkit-box;
+	overflow: auto;
+	width: 100%;
+}
+
+.todo-view-app-item {
+	width: 25%;
+	display: grid;
+	justify-items: center;
+}
+
+.todo-view-app-item-icon {
+	width: 85rpx;
+	height: 85rpx;
+	/* background-color: #B280E4; */
+	display: flex;
+	align-items: center;
+	justify-content: center; 
+	position: relative;
+}
+
+.todo-view-app-item-icon-tip {
+	position: absolute;
+	width: 85rpx;
+	height: 85rpx;
+	top: -6rpx;
+	right: -6rpx;
+	font-size: 9px;
+	font-family: 'PingFang SC';
+	background: #FF594E;
+	border: 1px solid #FFFFFF;
+	border-radius: 50%;
+	color: #fff;
+	text-align: center;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.todo-view-app-item-name {
+	font-style: normal;
+	font-weight: 400;
+	font-size: 14px;
+	font-family: 'PingFang SC';
+	/* font-family: 'SimSun'; */
+	color: #1B365D;
+	margin-top: 10rpx;
 }

+ 12 - 3
package-basic-data/pages/activity/detail/detail.js

@@ -46,7 +46,7 @@ Page({
 		params.flgValid = true;
 		params.currentPage = 1;
 		params.pageSize = Constants.MAX_PAGE_SIZE;
-		if(this.data.gradeCode == Constants.gradeCode.STD){
+		if (this.data.gradeCode == Constants.gradeCode.STD) {
 			// 标准版需要排除掉 企业授权的那个用户
 			params.flgInit = false;
 		}
@@ -72,7 +72,11 @@ Page({
 		// 过滤出手机授权(默认展示)
 		tableData = tableData.filter(it => it.loginType == Constants.loginType.loginTypeWx
 			|| it.loginType == Constants.loginType.loginTypeWxPc);
-
+		tableData.forEach(it => {
+			if (it.flgInit) {
+				it.staffName = staffName + '(负责人)'
+			}
+		})
 		this.setData({
 			tableData: tableData
 		})
@@ -125,7 +129,12 @@ Page({
 	* @author : 周兴
 	*/
 	handleStaff(e) {
-		let staffId = e.detail.item.staffId
+		let item = e.detail.item
+		if (item.flgInit) {
+			util.showToast('责任人不能取消授权')
+			return
+		}
+		let staffId = item.staffId
 		return this.excute(this.data.staffService, this.data.staffService.disable, staffId).then(res => {
 			if (res.data.code == Constants.SUCESS_CODE) {
 				wx.showToast({

+ 3 - 1
package-basic-data/pages/activity/detail/detail.json

@@ -1,3 +1,5 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "授权"
+
 }

+ 1 - 1
package-basic-data/pages/activity/detail/detail.wxml

@@ -29,7 +29,7 @@
 <dk-tabs wx:if="{{gradeCode != 'STD'}}" active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"></dk-tabs>
 
 <!-- 列表区 -->
-<dk-list list="{{tableData}}" title="staffName" content="{{contentList}}" routeObjName="{{routeObjName}}" flgPoint="{{false}}" titleBtnText="不再续费" bind:clickTitleBtn="handleStaff"></dk-list>
+<dk-list list="{{tableData}}" title="staffName" content="{{contentList}}" routeObjName="{{routeObjName}}" flgPoint="{{false}}" titleBtnText="取消授权" bind:clickTitleBtn="handleStaff"></dk-list>
 
 <view style="height: 200rpx;"></view>
 

+ 1 - 0
utils/Constants.js

@@ -160,6 +160,7 @@ module.exports = {
   },
 
   noticeInfo: {
+    proTitle:'六大模块功能',
     title: '注册须知:',
     cpName: '用于登录系统时显示公司信息。',
     contact: '负责人和联系电话:用于开通系统电话确认核实信息。',