Selaa lähdekoodia

考勤排名详情修改

347617796@qq.com 4 vuotta sitten
vanhempi
commit
58fcb199d7

+ 4 - 3
Component/selectSectionStaff/selectSectionStaff.axml

@@ -29,8 +29,7 @@
         </view>
         <view class="flex-box flex-v-ce userItem" a:for="{{userList}}">
           <label class="flex-box flex-v-ce flex-1">
-            <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;" src="{{item.img_url}}"/>
-            <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+            <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box>
             <text style="margin-left:20rpx;" class="flex-1">{{item.name}}</text>
             <checkbox onChange="radioChange" data-index="{{index}}" data-item="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
           </label>
@@ -48,8 +47,10 @@
   <view class="StaffFooter flex-box flex-v-ce">
     <view class="flex-1 f-left flex-box flex-v-ce">
       <view a:for="{{selectUserId}}" style="margin-right:10rpx;">
+
         <image a:if="{{item.img_url}}" class="img-url" style="width:70rpx;height:70rpx;display: inline-block;  position: relative;top: 6rpx;" src="{{item.img_url}}"/>
-        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 64rpx;font-size: 24rpx;">{{item.name}}</view>
+        <view a:else style="width: 70rpx;height: 70rpx;border-radius: 100%;background: #26A2FF;color: #fff;text-align: center;line-height: 70rpx;font-size: 24rpx;">{{item.name.substr(item.name.length-2)}}</view>
+      
       </view>
     </view>
     <view class="staffBtn" onTap="onConfirm">确定</view>

+ 2 - 2
Component/selectSectionStaff_tow/selectSectionStaff_tow.acss

@@ -189,6 +189,6 @@
     height: 70rpx;
     border-radius: 50rpx;
     display: block;
-      position: relative;
-  top: 4rpx;
+    position: relative;
+    top: 4rpx;
 }

+ 1 - 1
Component/selectSectionStaff_tow/selectSectionStaff_tow.axml

@@ -41,7 +41,7 @@
     <view class="flex-1 f-left flex-box flex-v-ce">
       <view a:for="{{selectUserId}}" style="margin-right:10rpx;" a:key="{{index}}">
         <image mode="scaleToFill" class="img_box" src="{{item.img_url}}" a:if="{{item.img_url}}"/>
-        <view a:else class="img_name_box">{{item.name.substring(item.name.length-2)}}</view>
+        <view a:else class="img_name_box">{{item.name.substr(item.name.length-2)}}</view>
         <!-- <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="70rpx" width="70rpx"></img-box> -->
       </view>
     </view>

+ 2 - 2
app.js

@@ -19,8 +19,8 @@ App({
     day: formatTime(new Date()).day,//当前日
     types:[],
     userData: '',
-    // token:'',
-    token:' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZGluZy5pbnN5cy5nMTA3LmNvbVwvYXBpXC9kaW5nXC9sb2dpbiIsImlhdCI6MTYwMDMxNDM0NywiZXhwIjoxNjAwOTE0MzQ3LCJuYmYiOjE2MDAzMTQzNDcsImp0aSI6IjgwMFJUS0J4RllIbnU5M3EiLCJzdWIiOjIsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.E1RiQ6uMRICoL-2qDTeh5j5y-QLaUsGGs6PYLm-_1m8',
+    token:'',
+    // token:' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZGluZy5pbnN5cy5nMTA3LmNvbVwvYXBpXC9kaW5nXC9sb2dpbiIsImlhdCI6MTYwMDMxNDM0NywiZXhwIjoxNjAwOTE0MzQ3LCJuYmYiOjE2MDAzMTQzNDcsImp0aSI6IjgwMFJUS0J4RllIbnU5M3EiLCJzdWIiOjIsInBydiI6ImNhNjQ4OWQ1MGYyNDA3YTY3ODMwZTgwOTBkMDE0ODgzNTY4NTk2MmIiLCJyb2xlIjoiZW1wbG95ZWUifQ.E1RiQ6uMRICoL-2qDTeh5j5y-QLaUsGGs6PYLm-_1m8',
     ALIOSS_URL: 'https://integralsys.oss-cn-shenzhen.aliyuncs.com',
     imgHttpUrl:'https://intesys.cms.g107.com/integral.php/Api/get_signature',
     corpId:'',

+ 25 - 15
pages/deploy/organization/organization.js

@@ -19,13 +19,23 @@ Page({
     this.getBmData();
     this.getUserData(0);
   },
-  tbDd(){
-    var http1= app.$post("api/ding/employee_sync",{});
-    var http2= app.$post("api/ding/department_sync",{});
-    Promise.all([http1,http2]).then((item)=>{
-      app.globalData.showToast(item[1].data.msg);
-      console.log(item);
-    })
+  tbDd() {
+    dd.confirm({
+      title: '温馨提示',
+      content: '下次同步时间需在两小时之后,是否同步',
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      success: (result) => {
+        if (result.confirm) {
+          var http1 = app.$post("api/ding/employee_sync", {});
+          var http2 = app.$post("api/ding/department_sync", {});
+          Promise.all([http1, http2]).then((item) => {
+            app.globalData.showToast("已同步");
+            console.log(item);
+          })
+        }
+      },
+    });
   },
   bindKeyInput(e) {
     app.$get("api/employee/list", { dept_id: 0 }).then((res) => {
@@ -73,15 +83,15 @@ Page({
     });
     this.getUserData(item.id);
   },
-      //获取部门列表
+  //获取部门列表
   getBmData() {
-      app.$get("api/department/tree", {}).then((res) => {
-        var list = res.data.data.list;
-        this.setData({
-          rule_tree: list,
-          all_rule_list: list
-        })
+    app.$get("api/department/tree", {}).then((res) => {
+      var list = res.data.data.list;
+      this.setData({
+        rule_tree: list,
+        all_rule_list: list
       })
+    })
   },
   //获取员工信息
   getUserData(dept_id) {
@@ -92,7 +102,7 @@ Page({
       })
     })
   },
-  getMessage(){
+  getMessage() {
     app.$get("api/site/info").then((res) => {
       this.setData({
         gsData: res.data.data

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

@@ -29,7 +29,7 @@ Page({
       sort: that.data.isPx ? 'DESC' : 'ASC',
       type: 'all',
       group_id: that.data.id,
-      rule_id: that.data.rule_id
+      item_id: that.data.rule_id
     }
     app.$get('api/integral/statistics/ranking', data, 'application/vnd.test.v2+json').then((res) => {
       var data = res.data.data.list;

+ 4 - 0
pages/statistics/checkDetail/checkDetail.acss

@@ -18,4 +18,8 @@
 .date{
   font-size: 22rpx;
   margin-top: 20rpx;
+}
+.scroll{
+  height: calc(100vh - 157rpx);
+  /* background-color: #E6A23C */
 }

+ 12 - 9
pages/statistics/checkDetail/checkDetail.axml

@@ -11,16 +11,19 @@
     </view>
   </view>
   <view class="main">
-    <view class="flex-box li margin-top" a:if="{{list.length>0}}" a:for="{{list}}" a:for-item="val">
-      <view class="flex-1">
-        <view>{{val.event_date}} {{val.remark}}</view>
-        <view class="date fontColorF">时间:{{val.event_date}}</view>
+    <scroll-view scroll-y="{{true}}" class="scroll margin-top" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
+      <view class="flex-box li" a:if="{{list.length>0}}" a:for="{{list}}" a:for-item="val">
+        <view class="flex-1">
+          <view>{{val.event_date}} {{val.remark}}</view>
+          <view class="date fontColorF">时间:{{val.event_date}}</view>
+        </view>
+        <view class="text-right">
+          <view class="red">{{val.point}}</view>
+          <view class="date fontColorF">{{val.event_name}}</view>
+        </view>
       </view>
-      <view class="text-right">
-        <view class="red">{{val.point}}</view>
-        <view class="date fontColorF">{{val.event_name}}</view>
-      </view>
-    </view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
+    </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
 </view>

+ 30 - 5
pages/statistics/checkDetail/checkDetail.js

@@ -21,14 +21,39 @@ Page({
       this.getData();
     }
   },
-  getData() {
+    //上啦加载
+  onScrollToLower() {
+    if (!that.data.isData) {
+      this.setData({ page: ++that.data.page })
+      this.getData(true);
+    } else {
+      app.globalData.showToast("已无更多咯");
+    }
+  },
+  getData(is) {
     var item=this.data.item;
-    console.log(item);
+    item.page=this.data.page;
+    item.page_size="10";
     app.$post('api/ad/event',item).then((res) => {
       var data = res.data.data.list;
-      this.setData({
-        list: data
-      })
+      if (is) {
+        if (data.length == 0) {
+          this.setData({
+            isData: true
+          })
+          return;
+        }
+        var list = that.data.list;
+        this.setData({
+          list: list.concat(data)
+        })
+      } else {
+        this.setData({ list: [] });
+        this.setData({
+          list: data,
+          isData: false
+        })
+      }
     })
   },
     //显示规则组件

+ 4 - 4
pages/statistics/check_top/check_top.js

@@ -32,7 +32,7 @@ Page({
     var item = e.target.dataset.item;
     var type = that.data.minuteArray[that.data.minuteIndex].id
     var obj={
-      id:item.id,
+      employee_id:item.employee_id,
       type:type,
       date_type:that.data.date_type,
       item:item,
@@ -139,12 +139,12 @@ Page({
   getTisrr() {
     app.$get('api/ad/groups', {}).then((res) => {
       var arr = [];
-      var data = res.data.data.list;
-      if(data.length>0){
+      var data = res.data.data.list||{};
+      // if(data.length>0){
         for (let k in data) {
           arr.push({ id: k, name: data[k] })
         }
-      }
+      // }
       this.setData({
         tisrrArr: arr
       })