347617796@qq.com 2 years ago
parent
commit
1c8be934da

+ 1 - 1
Component/selectRule/selectRule.axml

@@ -46,7 +46,7 @@
             <image mode="scaleToFill" src="../../../image/noData.png" style="width: 340rpx;height: 340rpx;margin-bottom:20rpx;"/>
           </view>
           <text a:if="{{isCreator}}">暂无积分规则,请前往钉钉电脑端添加【积分规则】</text>
-          <text a:else>暂无积分规则,请联系管理员“{{creatorName}}”或积分管理员前往钉钉电脑添加【积分规则】</text>
+          <text a:else>暂无积分规则,请联系系统管理员“{{creatorName}}”或积分管理员前往钉钉电脑添加【积分规则】</text>
         </view>
       </view>
     </scroll-view>

+ 1 - 1
Component/selectSectionStaff/selectSectionStaff.js

@@ -26,7 +26,7 @@ Component({
     selectUser: [],
     isAllSelect: true,//是否多选
     isLeadership: false,//数据源是否是自己的管理范围
-    isBoss: false,//是否去除创始人
+    isBoss: false,//是否去除系统管理员
     isUser: false,//是否去除自己
   },
   didMount() {

+ 5 - 5
app.js

@@ -2,8 +2,8 @@ import { showToast } from './utils/feedback'
 import { formatTime, arrRemoveObj, getTypeItem } from './utils/util'
 import * as socketApi from './utils/websocket'
 
-// const baseUrl = "https://test-ding.g107.com/";//测试
-const baseUrl = "https://app55493.eapps.dingtalkcloud.com/";//正式
+const baseUrl = "https://test-ding.g107.com/";//测试
+// const baseUrl = "https://app55493.eapps.dingtalkcloud.com/";//正式
 var that;
 var yearArr = [];
 var year = formatTime(new Date()).year;
@@ -14,8 +14,8 @@ App({
   //自定义全局变量
   globalData: {
     baseUrl:baseUrl,
-    // webScoketUrl: "test-ding.g107.com",//webScoket测试
-    webScoketUrl: "app55493.eapps.dingtalkcloud.com",//webScoket正式
+    webScoketUrl: "test-ding.g107.com",//webScoket测试
+    // webScoketUrl: "app55493.eapps.dingtalkcloud.com",//webScoket正式
     showToast: showToast,//提示框
     arrRemoveObj: arrRemoveObj,//删除数组的某一项
     year: formatTime(new Date()).year,//当前年
@@ -31,7 +31,7 @@ App({
     corpId: '',
     yearArr: yearArr,
     isAdministrator: false,//是否管理员
-    isCreator: false,//是否是创始人
+    isCreator: false,//是否是系统管理员
     corpMessage: '',//企业套餐信息
     usersList: [],//缓存的人员列表
     socketApi:socketApi,//长连接

+ 2 - 1
app.json

@@ -79,7 +79,8 @@
     "pages/statistics/jfDetail/jfDetail",
     "pages/deploy/serveMore/serveMore",
     "pages/deploy/yuY/yuY",
-    "pages/deploy/webView/webView"
+    "pages/deploy/webView/webView",
+    "pages/statistics/reviewsList/reviewsList"
   ],
   "window": {
     "defaultTitle": "功道云",

+ 1 - 1
pages/begin/begin.js

@@ -21,7 +21,7 @@ Page({
           })
         }
       },function(data){
-        if(data.code==3000){
+        if(data.code==3000||data.code==2001){
           if(that.data.num==3){ return false}
           setTimeout(function(){ 
             let num=that.data.num;

+ 1 - 1
pages/start/start.axml

@@ -4,7 +4,7 @@
     <view class="content fontColorA">
       <view class="c_top">
         你是开通应用的
-        <text class="orange">创始人</text>
+        <text class="orange">系统管理员</text>
         ,可在
         <text class="orange">“设置-组织架构”</text>
         授权员工【开启积分管理】

+ 2 - 2
pages/statistics/allTask/allTask.axml

@@ -40,8 +40,8 @@
             <view class="flex-box li-bottom">
               <text class="flex-1 fontColorC">{{item.expire_time}} 截止</text>
               <button type="primary" class="defBtn" catchTap="openDetail" data-item="{{item}}">查看任务</button>
-              <button a:if="{{minuteIndex==1||minuteIndex==2}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" 
-                style="margin-left:20rpx;">查看审批</button>
+              <!-- <button a:if="{{minuteIndex==1||minuteIndex==2}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" 
+                style="margin-left:20rpx;">查看审批</button> -->
             </view>
           </view>
         </view>

+ 1 - 1
pages/statistics/index/index.js

@@ -34,7 +34,7 @@ Page({
           { name: '考勤分', imgUrl: '../../../image/att_sign.png', url: '../check_top/check_top', code: 'creator admin employee' },
           { name: '日志分', imgUrl: '../../../image/log1.png', url: '../log_rank/log_rank', code: 'creator admin employee' },
           { name: '任务分', imgUrl: '../../../image/log2.png', url: '../task_rank/task_rank', code: 'creator admin employee' },
-          { name: '任务统计', imgUrl: '../../../image/att_statistics.png', url: '../taskStatistical/taskStatistical', code: 'creator admin employee',new:true },
+          { name: '任务统计', imgUrl: '../../../image/att_statistics.png', url: '../taskStatistical/taskStatistical', code: 'creator admin employee',new:false },
           { name: '积分事件', imgUrl: '../../../image/event_list_a.png', url: '../integralEvent/integralEvent', code: 'creator admin employee' },
           { name: '积分周报', imgUrl: '../../../image/length_point.png', url: '../../reportBox/report/report', code: 'admin' },
         ]

+ 3 - 0
pages/statistics/my_issue/my_issue.axml

@@ -78,6 +78,9 @@
           <text a:if="{{item.task_cycle == 1}}">每天0点自动发布,{{item.task_cycle_value > 9 ? item.task_cycle_value + ': 00' : '0' + item.task_cycle_value + ': 00'}}截止</text>
           <text a:if="{{item.task_cycle == 2}}">每周一自动发布,周{{weekList[item.task_cycle_value - 1]}}截止</text>
           <text a:if="{{item.task_cycle == 3}}">每月1号自动发布,{{item.task_cycle_value }}号截止</text>
+          <text class="flex-1"></text>
+          <text class="blue" a:if="{{item.enable}}">已启用</text>
+          <text class="red" a:else>已暂停</text>
         </view>
       </view>
       <view class="noDatas" a:if="{{isData}}">没有更多咯</view>

+ 2 - 2
pages/statistics/my_sp/my_sp.axml

@@ -59,8 +59,8 @@
             <view class="flex-box li-bottom">
               <text class="flex-1 fontColorC">{{item.expire_time}} 截止</text>
               <button type="primary" class="defBtn" catchTap="openDetail" data-item="{{item}}">查看任务</button>
-              <button a:if="{{minuteIndex==1}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" style="margin-left:20rpx;">去审批</button>
-              <button a:if="{{minuteIndex==2}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" style="margin-left:20rpx;">查看审批</button>
+              <!-- <button a:if="{{minuteIndex==1}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" style="margin-left:20rpx;">去审批</button> -->
+              <!-- <button a:if="{{minuteIndex==2}}" type="primary" class="defBtn" catchTap="openDetail2" data-item="{{item}}" style="margin-left:20rpx;">查看审批</button> -->
             </view>
           </view>
         </view>

+ 12 - 10
pages/statistics/my_task/my_task.axml

@@ -28,12 +28,13 @@
           <text class="red" a:if="{{item.point_config.base_point>0}}">+{{item.point_config.base_point}}  {{item.pt_name}}</text>
           <text a:else>{{item.point_config.base_point}}  {{item.pt_name}}</text>
         </view>
-        <view class="flex-box li-bottom">
+        <view class="flex-box-ce li-bottom">
           <text class="flex-1 fontColorC" catchTap="openDetail" data-item="{{item}}">{{item.expire_time}} 截止</text>
-          <button type="primary" class="defBtn" a:if="{{item.status == 1}}" data-is="{{true}}" data-item="{{item}}" onTap="openPerform">完成任务</button>
-          <text class="yellowBox" a:if="{{item.status == 2}}">待审批</text>
-          <text class="redBox" a:if="{{item.review_status == 2}}">审批驳回</text>
-          <text class="greenBox" a:if="{{item.review_status == 1}}">审批通过</text>
+          <text class="redBox" a:if="{{item.review_status == 3}}" style="margin-right:10rpx">审批驳回</text>
+          <button type="primary" style="position:relative;top:0.1rem" class="defBtn" a:if="{{item.status == 1}}" data-is="{{true}}" data-item="{{item}}" onTap="openPerform">完成任务</button>
+          <!-- <text class="yellowBox" a:if="{{item.status == 2}}">待审批</text>
+          <text class="redBox"  a:if="{{item.review_status == 3}}">审批驳回</text>
+          <text class="greenBox" a:if="{{item.review_status == 1}}">审批通过</text> -->
         </view>
       </view>
       <view class="task">待完成任务</view>
@@ -43,12 +44,13 @@
           <text class="red" a:if="{{item.point_config.base_point>0}}">+{{item.point_config.base_point}}  {{item.pt_name}}</text>
           <text a:else>{{item.point_config.base_point}}  {{item.pt_name}}</text>
         </view>
-        <view class="flex-box li-bottom">
+        <view class="flex-box-ce li-bottom">
           <text class="flex-1 fontColorC {{item.isCs? 'red':''}}" catchTap="openDetail" data-item="{{item}}">{{item.expire_time}} 截止</text>
-          <button type="primary" class="defBtn" a:if="{{item.status == 1}}" data-item="{{item}}" onTap="openPerform">完成任务</button>
-          <text class="yellowBox" a:if="{{item.status == 2}}">待审批</text>
-          <text class="redBox" a:if="{{item.status == 3}}">审批驳回</text>
-          <text class="greenBox" a:if="{{item.status == 4}}">审批通过</text>
+          <text class="redBox" a:if="{{item.review_status == 3}}" style="margin-right:10rpx">审批驳回</text>
+          <button type="primary" style="position:relative;top:0.1rem" class="defBtn" a:if="{{item.status == 1}}" data-item="{{item}}" onTap="openPerform">完成任务</button>
+          <!-- <text class="yellowBox" a:if="{{item.status == 2}}">待审批</text>
+          <text class="redBox" style="padding-left:10rpx" a:if="{{item.status == 3}}">审批驳回</text>
+          <text class="greenBox" a:if="{{item.status == 4}}">审批通过</text> -->
         </view>
       </view>
       <view class="noDatas" a:if="{{isData}}">没有更多咯</view>

+ 5 - 0
pages/statistics/repetitive_tasks_detail/repetitive_tasks_detail.axml

@@ -1,5 +1,10 @@
 <view>
   <view class="header margin-bottom">
+    <view class="main margin-bottom flex-box-ce" style="padding: 0.16rem 0.32rem;background-color:#fff"> 
+      <text class="blue flex-1" a:if="{{dataDetail.enable}}" style="font-size:36rpx">已启用</text>
+      <text class="red flex-1" a:else style="font-size:36rpx">已暂停</text>
+      <button type="primary" size="mini" catchTap="enable">{{dataDetail.enable==1? '暂停任务':'启用任务'}}</button>
+    </view>
     <view class="header-main">
       <view class="flex-box ">
         <view class="laber">任务内容</view>

+ 6 - 0
pages/statistics/repetitive_tasks_detail/repetitive_tasks_detail.js

@@ -18,6 +18,12 @@ Page({
       })
     }
   },
+  enable(){
+    app.$post('api/integral/schedule/enable', { schedule_id: this.data.id }).then(res => {
+      app.globalData.showToast(this.data.dataDetail.enable==1? '已暂停':'已启用');
+      this.getDetail(this.data.id);
+    })
+  },
   formSubmit() {
     dd.confirm({
       title: '删除任务',

+ 21 - 0
pages/statistics/reviewsList/reviewsList.acss

@@ -0,0 +1,21 @@
+
+.li{
+ padding: 24rpx 32rpx; 
+ background-color: #fff;
+}
+.name{
+  padding-right: 12rpx;
+}
+.context{
+  overflow : hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  border-radius: 3px;
+  margin-top: 10rpx;
+}
+.scroll {
+ height: 100vh;
+}
+

+ 16 - 0
pages/statistics/reviewsList/reviewsList.axml

@@ -0,0 +1,16 @@
+<view>
+  <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}">
+    <view class="li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+      <view class="flex-box-ce">
+        <view class="name">{{item.reviewer_name}}</view>
+        <view class="da" a:if="{{item.review_status==0}}">待审批</view>
+        <view class="green da" a:elif="{{item.review_status==1}}">已审批</view>
+        <view class="red da" a:else>已驳回</view>
+        <view class="flex-1"></view>
+        <view class="fontColorC">{{item.review_time}}</view>
+      </view>
+        
+      <view class="context fontColorB">{{item.remark||'无备注'}}</view>
+    </view>
+  </scroll-view>
+</view>

+ 22 - 0
pages/statistics/reviewsList/reviewsList.js

@@ -0,0 +1,22 @@
+var app = getApp()
+var that;
+Page({
+  data: {
+    list:[],
+  },
+  onLoad(e) {
+    that = this;
+    dd.setNavigationBar({ title: "审批记录" });
+    if (e.list) {
+      this.setData({
+        list: JSON.parse(e.list)
+      })
+    }
+  },
+  openDetail(e) {
+    var id = e.target.dataset.item.id;
+    dd.navigateTo({
+      url: '../../workbench/approveDetail/approveDetail?id=' + id
+    })
+  },
+});

+ 5 - 0
pages/statistics/reviewsList/reviewsList.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "img-box": "/Component/img-box/index"
+  }
+}

+ 1 - 1
pages/statistics/taskStatistical/taskStatistical.axml

@@ -113,7 +113,7 @@
           <view class="chu">总任务数</view>
           <view>只要任务从开始到截止与选择时间段有交叉,或者在选择时间段内完成的,都会加入统计</view>
           <view class="chu">完成任务数</view>
-          <view>已经完成的任务,包含待审批和已审批通过的,不计算审批驳回的</view>
+          <view>已经完成的任务,包含待审批和已审批的</view>
           <view class="chu">百分比计算方式</view>
           <view>完成百分比=完成任务数/总任务数</view>
       </view>

+ 9 - 3
pages/statistics/workDetail/workDetail.axml

@@ -19,7 +19,11 @@
         <view>最终分</view>
       </view>
     </view>
-    <view class="header-main" a:if="{{dataDetail.review_status==2}}">
+    
+    <view class="header-main blue" style="text-align:right;padding-top:30rpx" a:if="{{dataDetail.reviews.length>0}}" catchTap="openReview">查看审批记录</view>
+
+
+    <!-- <view class="header-main" a:if="{{dataDetail.review_status==2}}">
       <view class="flex-box flex-v-ce">
         <view class="laber">审批状态</view>
         <view class="flex-1 red">已驳回</view>
@@ -31,6 +35,7 @@
       </view>
       <view style="height:20rpx;background: rgba(245, 247, 250, 1);"></view>
     </view>
+
     <view class="header-main" a:if="{{dataDetail.review_status==1}}">
       <view class="flex-box flex-v-ce">
         <view class="laber">审批状态</view>
@@ -42,9 +47,10 @@
         </view>
       </view>
       <view style="height:20rpx;background: rgba(245, 247, 250, 1);"></view>
-    </view>
+    </view> -->
+
     <view class="header-main">
-      <view class="flex-box flex-v-ce">
+      <view class="flex-box">
         <view class="laber">任务内容</view>
         <view class="flex-1">{{dataDetail.task_name}}</view>
       </view>

+ 6 - 1
pages/statistics/workDetail/workDetail.js

@@ -121,6 +121,11 @@ Page({
     var index = e.target.dataset.index;
     this.setData({ activeIndex: index })
   },
+  openReview(){
+    dd.navigateTo({
+      url: '../reviewsList/reviewsList?list=' + JSON.stringify(this.data.dataDetail.reviews)
+    })
+  },
   openJyt() {
     dd.navigateTo({
       url: '../workpoints/workpoints?item=' + JSON.stringify(this.data.process) + '&id=' + this.data.dataDetail.id + '&isJf=' + false
@@ -186,7 +191,7 @@ Page({
       total: 0,
       process: []//清空数据,避免头像组件未刷新造成的视图问题
     })
-    app.$get("api/integral/work", { work_id: id }).then((res) => {
+    app.$get("api/integral/work", { work_id: id },'application/vnd.test.v2+json').then((res) => {
       fun();
       this.current_none(res.data.data)
       var process = res.data.data.process.list || [];

+ 1 - 1
pages/workbench/apply/apply.axml

@@ -7,7 +7,7 @@
       </view>
       <view class="inputs">
         <view class="flex-box flex-v-ce li" data-index="{{index}}" data-num="3" data-item="{{{id:item.employee_id,name:item.employeeName}}}" catchTap="openSelect">
-          <view class="label isBt">录入对象</view>
+          <view class="label isBt">奖扣对象</view>
           <view class="flex-1">{{item.employeeName}}</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
         </view>

+ 5 - 5
pages/workbench/apply/apply.js

@@ -23,7 +23,7 @@ Page({
     activeIndex: '',
     isArr: ['奖', '扣'],
     reviewerObj: [],//选中的审批人
-    employeeObj: [],//选中的录入对象
+    employeeObj: [],//选中的奖扣对象
     disabled: false,
     superior_list: [],//录入人的上级
     getReviewerObj: {},//默认当前的缓存对象
@@ -150,7 +150,7 @@ Page({
   showQrcode() {
     if (this.data.qrcodeId) {
       if (app.globalData.isCreator) {
-        app.globalData.showToast("你当前身份为创始人,不需要申请记分功能");
+        app.globalData.showToast("你当前身份为系统管理员,不需要申请记分功能");
         setTimeout(() => {
           dd.switchTab({
             url: '../index/index'
@@ -209,10 +209,10 @@ Page({
     that.setData({ activeIndex: '', isShowType: '0' });
     if (num == 2) {
       if (!item.employee_id) {
-        this.showToast('请先选择录入对象')
+        this.showToast('请先选择奖扣对象')
         return;
       }
-      // 获取录入对象的上级
+      // 获取奖扣对象的上级
       this.getEmployeeList([item.employee_id], function (res) {//获取共同上级
         var reviewer_id = `items[${index}].reviewer_id`
         var revieweName = `items[${index}].revieweName`
@@ -552,7 +552,7 @@ Page({
       items: list
     })
   },
-  //选择录入对象
+  //选择奖扣对象
   onSelectUserEmployee(item) {
     var elm = item.length > 0 ? item[0] : { id: '', name: '' };
     var index = this.data.activeIndex;

+ 5 - 16
pages/workbench/approve/approve.js

@@ -80,7 +80,7 @@ Page({
     var item = that.data.item;
     var data, point;
     var num = item.checked ? item.point : item.point2
-    console.log(item)
+    // console.log(item)
     if (item.checked) {
       if (!item.rule_id) {
         this.showToast("请选择所属规则")
@@ -95,20 +95,6 @@ Page({
         this.showToast("积分不能为0或空")
         return;
       }
-      // if (item.selectRule.range_type == 1 && item.selectRule.min_point == item.selectRule.max_point) {
-      //   if (point < item.selectRule.min_point || point > item.selectRule.max_point) {
-      //     this.showToast(`系统发现此条积分规则制度有变动,请驳回后让员工按最新的规则重新申请`);
-      //     return;
-      //   }
-      // } 
-      // else {
-      //   if (point < item.selectRule.min_point || point > item.selectRule.max_point) {
-      //     this.showToast(`积分超出可输入范围`);
-      //     return;
-      //   }
-      // }
-
-
     } else {
       if (!item.rule_id2) {
         this.showToast("请选择所属分类")
@@ -135,6 +121,8 @@ Page({
       remark: item.remark,
       ticket_count: item.ticket_count ? 1 : 0,
     }
+    // console.log(data)
+    // return false
     this.setData({ disabled: true });
     app.$post("api/integral/review", data).then((res) => {
       if (res.data.code == 1) {
@@ -246,7 +234,7 @@ Page({
           getPoint = data.point;
         }
       }
-
+      console.log(getPoint);
       var isData, selectRule;
       var checked = false;
       if (data.rule_id && data.item_id) {
@@ -287,6 +275,7 @@ Page({
         ['item.point']: getPoint == 0 ? '' : getPoint,
         ['item.point2']: getPoint == 0 ? '' : getPoint,
         ['item.isArrindex']: data.point >= 0 ? true : false,
+        ['item.isArrindex2']: data.point >= 0 ? true : false,
       })
     })
   },

+ 1 - 1
pages/workbench/index/index.js

@@ -17,7 +17,7 @@ Page({
     isAdministrator: app.globalData.isAdministrator,//是否管理员角色
     rankingTotal: 0,
     rankingList: [],
-    getRole_four: app.globalData.isCreator,//是否创始人
+    getRole_four: app.globalData.isCreator,//是否系统管理员
     setECharts: [],//柱形图数据
     pieTotal: 1,
     total: '',

+ 1 - 1
pages/workbench/jk_A/jk_A.axml

@@ -1,7 +1,7 @@
 <view>
   <form>
     <view class="flex-box flex-v-ce form-top" catchTap="openSelect"  data-num="3">
-      <view class="label isBt">录入对象</view>
+      <view class="label isBt">奖扣对象</view>
       <view class="flex-1 font-flex-word">
           <block a:for="{{users}}">
               <text style="font-size:32rpx">{{item.name}},</text>

+ 1 - 1
pages/workbench/jk_A/jk_A.js

@@ -279,7 +279,7 @@ Page({
     var isTg = true;
     var pt_id = app.getTypesItem("AF").id;
     if(userData.length==0){
-      this.showToast('请输入录入对象')
+      this.showToast('请输入奖扣对象')
       return;
     }
     for (var i = 0; i < items.length; i++) {

+ 1 - 1
pages/workbench/jk_B/jk_B.js

@@ -17,7 +17,7 @@ Page({
     type: 'B',
     isGzType: 'BF',
     defaultRuleId: '',
-    isCreator: false,//是否创始人
+    isCreator: false,//是否系统管理员
     popupCx: '',
     boxTop: 0,
     ruleOnoff: false,