FANGLH 6 years ago
parent
commit
679e0f3074

+ 1 - 1
app.json

@@ -1,11 +1,11 @@
 {
   "pages": [
+    "pages/point/point",
     "pages/home/home",
     "pages/pointapply/pointapply",
     "pages/approval/approval",
     "pages/mine/mine",
     "pages/perinfo/perinfo",
-    "pages/point/point",
     "pages/register/register",
     "pages/applyjoinapprovel/applyjoinapprovel",
     "pages/corporateInfo/corporateInfo",

+ 3 - 3
app.wxss

@@ -12,7 +12,7 @@
   display: flex;flex-direction: column;
 }
 .commonHview{
-  display: flex;flex-direction: row;
+  display: flex;flex-direction: row;background-color: #FFFFFF;
 }
 .commonhline{
   background-color: #F2F2F2;height: 10rpx;width: 100%;
@@ -41,10 +41,10 @@
   text-align:center;
 }
 .nodata_view{
-  display: flex;
+  position: fixed;
   flex-direction: column;
   text-align:center;
-  margin-top:200rpx;
+  top:40%;left: 37%;
 }
 /* edn 无数据时 样式  */
 .commonclick-btn{

+ 3 - 3
pages/applyjoinapprovel/applyjoinapprovel.wxml

@@ -84,7 +84,7 @@
       <view class='left_sty'>积分数量</view>
       <view class='right_sty'>{{applyPoint}}</view>
     </view>
-    <view class='commonhline' style='height:3rpx;'></view>
+    <view class='commonhline' style='height:20rpx;'></view>
 </view>
 
 
@@ -147,12 +147,12 @@
       <view class='left_sty'>积分数量</view>
       <view class='right_sty'>{{applyPoint}}</view>
     </view>
-    <view class='commonhline' style='height:3rpx;'></view>
+    <view class='commonhline' style='height:20rpx;'></view>
 </view>
 
 
 
-    <view wx:if='{{approvelStatus == 1 && fromType == 1}}' class='commonHview' style='margin-top:50rpx;'>
+    <view wx:if='{{approvelStatus == 1 && fromType == 1}}' class='commonHview' style='margin-top:20rpx;'>
       <button  class='comBtn' style='background-color: #3C85EC;color:#FFF;' formType="submit" hover-class="commonclick-btn" bindtap='agreeBtnClick'>同意</button>
       <button  class='comBtn' formType="submit" hover-class="commonclick-btn" bindtap='disagreeBtnClick'>不同意</button>
     </view>

+ 2 - 1
pages/approval/approval.wxml

@@ -52,7 +52,8 @@
         <view><image src='../../img/common_header_boy.png' class='img1'></image></view>
         <view class='commonVview itemMsg'>
           <view style='font-size:30rpx;margin-top:10rpx;'>{{fillName}}的积分申报</view>
-          <view style='color:#999999;font-size:24rpx;margin-top:20rpx;'>已审批</view>
+          <view style='color:#999999;font-size:24rpx;margin-top:20rpx;' wx:if='{{invoicesStatus == 2}}'>已审批</view>
+          <view style='color:#FF0000;font-size:24rpx;margin-top:20rpx;' wx:if='{{invoicesStatus == 3}}'>未通过</view>
         </view>
         <view class='itemStatue_finish'>{{approvalDate}}</view>
   </view>

+ 1 - 1
pages/approval/approval.wxss

@@ -12,7 +12,7 @@
     color: #929292 ;  
     background-color: #FFFFFF;
     font-size: 30rpx;
-    padding: 20rpx 0 20rpx 0;
+    padding: 20rpx 0 20rpx 0;z-index: 99;
 } 
 .on{ color: #3C85EC;  border-bottom: 5rpx solid #3C85EC ;}  
 .swiper-box{ display: block; height: 100%; width: 100%; overflow: hidden; } 

+ 1 - 0
pages/home/home.js

@@ -36,6 +36,7 @@ Page({
    */
   onLoad: function (options) {
     baseutils.getComOpenid() //获取openid
+    // BASEURL.comLog('home','hme')
   },
 
   getAddata:function(){

+ 6 - 6
pages/mine/mine.js

@@ -21,10 +21,10 @@ Page({
     idWxlogin:'idWxlogin',
     pointdata:{},//本月、上月积分及排名
 
-    "curmonth_points": 520, //本月当前积分
-    "curmonth_rank": 1,//本月当前排名
-    "lastmonth_points": 520,//上月积分
-    "lastmonth_rank": 1 //上月排名
+    "curmonth_points": 0, //本月当前积分
+    "curmonth_rank": '-',//本月当前排名
+    "lastmonth_points": 0,//上月积分
+    "lastmonth_rank": '-' //上月排名
   },
 
   /**
@@ -121,8 +121,8 @@ Page({
           that.setData({
             isregistered: res.data.data.isregistered,
             pointdata: pointdata,
-            "curmonth_points": pointdata.curmonth_points, //本月当前积分
-            "curmonth_rank": pointdata.curmonth_rank,//本月当前排名
+            "curmonth_points": pointdata.curmonth_points == null ? '0' : pointdata.curmonth_points, //本月当前积分
+            "curmonth_rank": pointdata.curmonth_rank == null ? '0' : pointdata.curmonth_rank,//本月当前排名
             "lastmonth_points": pointdata.lastmonth_points == null ? '0' : pointdata.lastmonth_points,//上月积分
             "lastmonth_rank": pointdata.lastmonth_rank == null ? '-' : pointdata.lastmonth_rank //上月排名
           })

+ 1 - 0
pages/mine/mine.wxml

@@ -19,6 +19,7 @@
     <view class='commonHview' style='margin-left:30rpx;'>
         <view style='width:50%;'>
             <view class='h_data_left'>本月当前积分: <text class='h_data_right'>{{curmonth_points}}</text></view>
+              <view class='h_data_left'>本月当前积分: <text class='h_data_right1'>{{curmonth_points}}</text></view>
             <view class='h_data_left'>本月当前排名: <text class='h_data_right'>{{curmonth_rank}}</text></view>
         </view>
         <view style='width:50%;'>

+ 2 - 1
pages/minusapply/minusapply.js

@@ -164,6 +164,7 @@ Page({
           minusNorm: res.data.data.normName,
           minusPoints: res.data.data.score,
           minusReason: res.data.data.reasons,
+          minusPerson: res.data.data.fillName
           // applyJob: res.data.data.fillStation
         })
       }
@@ -181,7 +182,7 @@ Page({
     var title
     if (isDetails) {
       title = '减分详情'
-      title = '分申请详情'
+      title = '分申请详情'
       if (itemdata && itemdata.invoicesId) {
         // var invoicesStatus = itemdata.invoicesStatus
         // var applyStatus

+ 2 - 1
pages/perinfo/perinfo.wxml

@@ -54,7 +54,8 @@
      <view class='commonHview'>
         <view class='add_item_left_sty'>
           <view style='color:#333333;font-size:30rpx;'>个人邮箱</view>
-          <view style='color:#666666;font-size:30rpx;margin-top:20rpx;'>{{InfoData.empEmail}}</view>
+          <view style='color:#666666;font-size:30rpx;margin-top:20rpx;' wx:if='{{InfoData.empEmail == null}}'>未填写</view>
+          <view style='color:#666666;font-size:30rpx;margin-top:20rpx;' wx:else>{{InfoData.empEmail}}</view>
         </view>
         <view class='add_item_right_sty'>
           <!-- <view class='deit_sty'>编辑</view> -->

+ 22 - 21
pages/point/point.wxml

@@ -1,28 +1,29 @@
-   <view class='commonHview'   >
-      <view class='header_left_view'  bindtap='btnClick' id='{{idAddPoint}}'>
-        <image src='../../img/add_point.png' class='im_sty1'></image>
-        <text class='add_text_sty'>加分单</text>
-      </view>
-      <view style='width:6rpx;height:50rpx;background-color:#F2F2F2;margin-top:10rpx;'></view>
-      <view class='header_left_view'  bindtap='btnClick' id='{{idMinusPoint}}' >
-        <image src='../../img/minus_point.png' class='im_sty1'></image>
-        <text class='minus_text_sty'>减分单</text>
-      </view>
+   <view class=' toppoint_view'  >
+    <view class='commonHview'>
+        <view class='header_left_view'  bindtap='btnClick' id='{{idAddPoint}}'>
+          <image src='../../img/add_point.png' class='im_sty1'></image>
+          <text class='add_text_sty'>加分单</text>
+        </view>
+        <view style='width:6rpx;height:50rpx;background-color:#F2F2F2;margin-top:10rpx;'></view>
+        <view class='header_left_view'  bindtap='btnClick' id='{{idMinusPoint}}' >
+          <image src='../../img/minus_point.png' class='im_sty1'></image>
+          <text class='minus_text_sty'>减分单</text>
+        </view>
+    </view>
+      <view class='commonhline' style='height:20rpx;'></view>
+          <view class="swiper-tab" >  
+          <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">加分记录</view>  
+          <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">扣分记录</view>  
+          <view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">积分排名</view>  
+  </view>  
     </view> 
-<view class='commonhline' style='height:20rpx;'></view>
-
-
-<view class="swiper-tab" style='margin-top:100rpx;'>  
-    <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">加分记录</view>  
-    <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">扣分记录</view>  
-    <view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" bindtap="swichNav">积分排名</view>  
-</view>  
 
  <view wx:if='{{(currentTab == 0 && addList.length == 0) || (currentTab == 1 && minusList.length == 0) || (currentTab == 2 && points_rank.all_points.length == 0)}}' class='nodata_view'>
      <view><image class='nodata_style' src='../../img/common_nodata.png'></image></view> 
 </view> 
 
-<swiper current="{{currentTab}}" class="swiper-box" duWration="300" style="height:{{winHeight-31}}px;margin:85rpx 0 0 0;" bindchange="bindChange">
+<swiper current="{{currentTab}}" class="swiper-box" duWration="300"  bindchange="bindChange" 
+style="height:{{winHeight-31}}px;margin:185rpx 0 0 0;">
       <swiper-item>  
       <scroll-view  scroll-y="true" style="height:100%;">
       <view wx:for='{{addList}}' bindtap='addListClick' data-item='{{item}}' >
@@ -64,7 +65,7 @@
 <template name='addPointTem'> 
     <view class='commonHview'  >
         <view class='add_item_left_sty'>
-          <view style='color:#333333;font-size:30rpx;'>加分标准</view>
+          <view style='color:#333333;font-size:30rpx;overflow:hidden; text-overflow:ellipsis;white-space:nowrap;'>{{categoryName}}</view>
           <view style='color:#20AB41;font-size:30rpx;margin-top:20rpx;'>{{score}}</view>
         </view>
         <view class='add_item_right_sty'>
@@ -80,7 +81,7 @@
 <template name='minusPointTem'> 
     <view class='commonHview'  >
         <view class='add_item_left_sty'>
-          <view style='color:#333333;font-size:30rpx;'>扣分标准</view>
+          <view style='color:#333333;font-size:30rpx;overflow:hidden; text-overflow:ellipsis;white-space:nowrap;'>{{categoryName}}</view>
           <view style='color:#CB0404;font-size:30rpx;margin-top:20rpx;'>{{score}}</view>
         </view>
         <view class='add_item_right_sty'>

+ 4 - 3
pages/point/point.wxss

@@ -1,4 +1,7 @@
 /* pages/point/point.wxss */
+.toppoint_view{
+   position: fixed;top: 0;width: 100%;z-index: 99;background-color: #FFF;
+}
 .header_left_view{
   width: 50%;text-align: center;height: 80rpx;line-height: 80rpx;
 }
@@ -14,9 +17,7 @@
     width: 100%;  
     border-bottom: 1rpx solid #F0F0F0;  
     text-align: center;  
-    position: fixed;
-    top: 0;
-    background-color: #FFFFFF;
+    background-color: #FFFFFF;z-index: 99;
     } 
 .swiper-tab-list{  
     display: inline-block;  

+ 1 - 1
pages/selectStaff/selectStaff.wxml

@@ -1,4 +1,4 @@
 
  <block wx:for='{{staffData}}'>
-       <button class='nav_right_items' bindtap="itemClick" data-item='{{item}}'>{{item.empName}}({{item.remarks}})</button>
+       <button class='nav_right_items' bindtap="itemClick" data-item='{{item}}'>{{item.empName}}({{item.station}})</button>
 </block>

+ 5 - 1
utils/network.js

@@ -2,6 +2,8 @@
  * 网络请求公用方式,以后都这样用 
  * 2018-5-10 16:57
  */
+var isTest = require('../utils/wxconstant.js').isTest()
+
 function request(url, params, success, fail) {
   this.requestLoading(url, params, "", success, fail)
 }
@@ -21,7 +23,9 @@ function requestLoading(url, params, message, method,success, fail) {
     },
     method: method,
     success: function (res) {
-      console.log(url + JSON.stringify(params), res)
+      if (isTest){
+        console.log(url + JSON.stringify(params), res)
+      }
       wx.hideNavigationBarLoading()
       if (message != "") {
         wx.hideLoading()

+ 7 - 0
utils/wxconstant.js

@@ -9,6 +9,12 @@ function isTest(){
   var isTest = true  //判断是否是测试版本,是则打印日志
   return isTest
 }
+
+function comLog(key,value){
+  if (isTest()){
+    console.log(key, value)
+  }
+}
 const getUrl = {
   getOpenid:'/integral/inte/employee/getOpenid/', //获取Openid
   Binding: '/integral/inte/employee/binding/', //关联用户
@@ -38,5 +44,6 @@ module.exports = {
   BaseUrl: BaseUrl,
   getTXMapApiKay: getTXMapApiKay,
   getUrl: getUrl,
+  comLog: comLog,
   isTest: isTest
 }