guojy 1 yıl önce
ebeveyn
işleme
34f4a97774

+ 4 - 1
config/devtest.env.js

@@ -1,7 +1,7 @@
 'use strict'
  module.exports = {
   NODE_ENV: '"production"',
-  BASE_API: '"https://new.gdy.g107.com"',
+  BASE_API: '"http://test.qywx.g107.net"',
   BASE_API_KQ: '"https://nkaoqin.g107.net"',
   APP_NAME: '"功道云-绩效版"',
   APP_VER: '"7.0"',
@@ -14,4 +14,7 @@
   WEB_LINK: '"https://new.gdy.g107.com/m"',
   IMG_UPLOADER_URL:'"https://intesys.cms.g107.com/integral.php/Api/get_signature"',
   APP_DOWNDOAD_URL: '"https://new.gdy.g107.com/m/#/android/"',
+  
+  APP_ID: '"ww4065f0d4bb232a6a"',
+  REDIRECT_URI: '"http://wechatgdym.vaiwan.com"',
  }

+ 2 - 2
config/prod.env.js

@@ -4,13 +4,13 @@ module.exports = {
 
   // BASE_API: '"http://test.qywx.g107.net"',//开发
   BASE_API: '"https://qywx.g107.net"',//生产
-  
+
   BASE_API_KQ: '"https://ad.g107.com"',
   APP_NAME: '"功道云-绩效版"',
   APP_VER: '"7.0"',
   WEBSOCKET_API: '"https://socket.g107.com"',
   COPYRIGHT_CN: '"功道云 版权所有"',
-  COPYRIGHT_EN: '"Copyright ©2015-2021 Kung Dao Cloud All Rights Reserved."',
+  COPYRIGHT_EN: '"Copyright ©2015-2023 Kung Dao Cloud All Rights Reserved."',
   ALIOSS_URL: '"https://integralsys.oss-cn-shenzhen.aliyuncs.com"',
   ALIOSS_CDN_URL: '"https://integralsys.oss-cn-shenzhen.aliyuncs.com"',
   APPID: '"os_base"',

+ 84 - 84
src/components/common/DateSelectorDropdown.vue

@@ -63,103 +63,103 @@
   </div>
 </template>
 <script>
-  import Vue from 'vue'
-  import moment from 'moment'
-  import {Button, DatetimePicker} from 'vant'
+import Vue from 'vue'
+import moment from 'moment'
+import {Button, DatetimePicker} from 'vant'
 
-  Vue.use(Button).use(DatetimePicker)
+Vue.use(Button).use(DatetimePicker)
 
-  export default {
-    name: 'DateSelectorDropdown',
-    props: {
-      title: {type: String},
-      resetBtnText: {type: String, default: '恢复默认'}
+export default {
+  name: 'DateSelectorDropdown',
+  props: {
+    title: {type: String},
+    resetBtnText: {type: String, default: '恢复默认'}
+  },
+  data () {
+    return {
+      currDatePicker: 1,
+      dateMode: 1,
+      endDate: new Date(),
+      startDate: new Date()
+    }
+  },
+  watch: {
+    startDate (newVal) {
+      this.changeTitle(newVal)
     },
-    data () {
-      return {
-        currDatePicker: 1,
-        dateMode: 1,
-        endDate: new Date(),
-        startDate: new Date(),
-      }
+    dateMode () {
+      this.changeTitle(this.startDate)
+    }
+  },
+  computed: {
+    isMonthMode () {
+      return this.dateMode === 1
     },
-    watch: {
-      startDate (newVal) {
-        this.changeTitle(newVal)
-      },
-      dateMode () {
-        this.changeTitle(this.startDate)
-      }
+    isDayMode () {
+      return this.dateMode !== 1
+    },
+    startDateStr () {
+      return moment(this.startDate).format(
+        this.isMonthMode ? 'YYYY-MM' : 'YYYY-MM-DD'
+      )
     },
-    computed: {
-      isMonthMode () {
-        return this.dateMode === 1
-      },
-      isDayMode () {
-        return this.dateMode !== 1
-      },
-      startDateStr () {
-        return moment(this.startDate).format(
-          this.isMonthMode ? 'YYYY-MM' : 'YYYY-MM-DD'
-        )
-      },
-      endDateStr () {
-        return this.endDate ? moment(this.endDate).format('YYYY-MM-DD') : null
-      },
-      minEndDate () {
-        return this.deepCopyDate(this.startDate)
+    endDateStr () {
+      return this.endDate ? moment(this.endDate).format('YYYY-MM-DD') : null
+    },
+    minEndDate () {
+      return this.deepCopyDate(this.startDate)
+    }
+  },
+  methods: {
+    formatter (type, val) {
+      if (type === 'year') {
+        return `${val}年`
+      } else if (type === 'month') {
+        return `${val}月`
       }
+      return `${val}日`
     },
-    methods: {
-      formatter (type, val) {
-        if (type === 'year') {
-          return `${val}年`
-        } else if (type === 'month') {
-          return `${val}月`
-        }
-        return `日`
-      },
-      deepCopyDate (date) {
-        return new Date(date.getFullYear(), date.getMonth(), date.getDate())
-      },
-      changeTitle (startDate) {
-        if (this.isMonthMode) {
-          const now = new Date()
-          if (startDate.getMonth() === now.getMonth() && startDate.getFullYear() === now.getFullYear()) {
-            this.$emit('update:title', '本月')
-          } else {
-            this.$emit('update:title', startDate.getMonth()+1 +'月')
-          }
+    deepCopyDate (date) {
+      return new Date(date.getFullYear(), date.getMonth(), date.getDate())
+    },
+    changeTitle (startDate) {
+      if (this.isMonthMode) {
+        const now = new Date()
+        if (startDate.getMonth() === now.getMonth() && startDate.getFullYear() === now.getFullYear()) {
+          this.$emit('update:title', '本月')
         } else {
-          this.$emit('update:title','日')
+          this.$emit('update:title', '月')
         }
-      },
-      onResetDate () {
-        this.startDate = new Date()
+      } else {
+        this.$emit('update:title', '日')
+      }
+    },
+    onResetDate () {
+      this.startDate = new Date()
+      this.resetDefaultDateMode()
+    },
+    resetDefaultDateMode () {
+      this.endDate = new Date()
+      this.dateMode = 1
+      this.currDatePicker = 1
+    },
+    onConfirmDate () {
+      if (this.isDayMode && this.startDate.getTime() > this.endDate.getTime()) {
+        this.$notify({type: 'warning', message: '开始日期不能大于结束如期'})
+        return
+      }
+      this.$emit('onConfirm', {dateMode: this.dateMode, startDate: this.startDateStr, endDate: this.endDateStr})
+    },
+    onChangeDateMode (val) {
+      if (this.dateMode === val) return
+      if (this.isMonthMode) {
+        this.dateMode = 2
+      } else {
         this.resetDefaultDateMode()
-      },
-      resetDefaultDateMode () {
-        this.endDate = new Date()
-        this.dateMode = 1
-        this.currDatePicker = 1
-      },
-      onConfirmDate () {
-        if (this.isDayMode && this.startDate.getTime() > this.endDate.getTime()) {
-          this.$notify({type: 'warning', message: '开始日期不能大于结束如期'})
-          return
-        }
-        this.$emit('onConfirm', {dateMode: this.dateMode, startDate: this.startDateStr, endDate: this.endDateStr})
-      },
-      onChangeDateMode (val) {
-        if (this.dateMode === val) return
-        if (this.isMonthMode) {
-          this.dateMode = 2
-        } else {
-          this.resetDefaultDateMode()
-        }
       }
     }
   }
+}
 </script>
 <style lang="less" scoped>
   .date-selector-dropdown_wrap {

+ 2 - 2
src/components/common/EmployeeSelector.vue

@@ -67,7 +67,7 @@
               <Wxopendata type="userName" :openid="item.name"></Wxopendata>
               {{ item.identification ? '(直属上级)' : '' }}
             </template>
-            <template slot="right-icon" v-if="typeof item.status != 'undefined'">
+            <template slot="right-icon" v-if="(typeof item.status) != 'undefined'">
               <van-tag plain v-show="item.status == 0 || item.status == 2">{{ item.status == 0 ? '未加入' : '离职' }}</van-tag>
             </template>
           </van-cell>
@@ -81,7 +81,7 @@
       <div class="selected_box flex-1">
         <div class="flex-box flex-v-ce ul" :style="'width:' + selected_box_width">
           <div v-for="(item, index) in employee_selected_list" :key="index" @click="employee_cancel(item)" class="li">
-            <userImage :img_url="item.img_url" :user_name="item.name" width="0.9rem" height="0.9rem" fontSize="0.2"></userImage>
+            <userImage :img_url="item.img_url" showName :user_name="item.name" width="0.9rem" height="0.9rem" fontSize="0.2"></userImage>
           </div>
           <div v-for="(item, index) in dept_selected_list" :key="index" @click="dept_cancel(item)" class="fb">
             <img src="static/images/e66f.jpg" />

+ 19 - 46
src/components/common/integralApplyItem.vue

@@ -32,11 +32,12 @@
       </div>
 
       <van-cell required>
-        <Mtextarea v-model="item.remark" name="申请事由" v-validate="'required|max:100'" placeholder="请输入申请事由(最多100字)" :text_max="100" :imgs_max="3" images speech :imgs.sync="item.files"></Mtextarea>
+        <Mtextarea v-model="item.remark" name="申请事由" v-validate="'required|max:300'" placeholder="请输入申请事由(最多300字)" :text_max="300" :imgs_max="3" images speech :imgs.sync="item.files"></Mtextarea>
       </van-cell>
       <DateCell required title="选择日期" v-model="item.event_time"></DateCell>
       <div>
         <EmployeeSelectorCell v-show="superior_list.length != 0" required title="审批人" name="审批人" v-validate="'required'" :employee_list="superior_list" use_employee_list v-model="employee_list" :multi="false" ></EmployeeSelectorCell>
+
         <van-cell v-show="superior_list.length == 0" required title="审批人" is-link @click="$toast('您没有审批人,请联系管理员')"></van-cell>
       </div>
     </van-cell-group>
@@ -47,7 +48,7 @@ import Mtextarea from '@/components/common/Mtextarea'
 import EmployeeSelectorCell from '@/components/common/EmployeeSelectorCell'
 import RuleCategorySelectorCell from '@/components/common/RuleCategorySelectorCell1'
 import DateCell from '@/components/common/DateCell'
-
+import request from '@/utils/request';
 import moment from 'moment'
 import Vue from 'vue'
 import { Switch } from 'vant'
@@ -94,8 +95,16 @@ export default {
         this.item.employee_id = ''
       } else {
         this.item.employee_id = val[0].id
-        var obj = this.employee_list_fun(val[0].id)
-        this.employee_list = obj ? [obj] : []
+        this.getUserInfo(val[0].id,(res)=>{
+          this.superior_list=res.employee_detail.superior_list;
+          let superior_id= res.employee_detail.superior_id //选中对象的直属上级id
+          this.employee_list = [];
+          res.employee_detail.superior_list.forEach(e=>{
+            if(e.id==superior_id){
+              this.employee_list=[e];
+            }
+          })
+        })
       }
     },
     employee_list (val) {
@@ -126,7 +135,7 @@ export default {
       this.rule_item = data
       this.item.rule_id = data[0].rule_id
       this.item.item_id = data[0].id
-      this.item.remark = JSON.parse(JSON.stringify(data[0].remark))
+      this.item.remark = data[0].remark
     },
     get_point_name (id) {
       let name = ''
@@ -137,48 +146,12 @@ export default {
       })
       return name
     },
-    // 审批人
-    employee_list_fun (id) { // id: 录入对象ID
-      const employee_list = window.plus ? JSON.parse(plus.storage.getItem('SET_EMPLOYEE_MAP')) : JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP'))
-      for (const i in employee_list) {
-        if (employee_list[i].id == id) { // 拿到选中的录入对象的信息
-          this.superior_list = employee_list[i].superior_list
-          if (employee_list[i].superior_id != 0) { // 判断有无设置直属上级
-            for (let a in employee_list[i].superior_list) { // 遍历上级
-              if (employee_list[i].superior_id == employee_list[i].superior_list[a].id) {
-                employee_list[i].superior_list[a].identification = true
-                return employee_list[i].superior_list[a]
-              }
-            }
-          } else {
-            if (employee_list[i].department !== null && employee_list[i].department.length > 0) {
-              return this.manageDeptEmployee(employee_list[i].superior_list, employee_list[i].department[0].dept_id) || employee_list[i].superior_list[0]
-            } else {
-              return employee_list[i].superior_list[0]
-            }
-          }
-        }
-      }
+    //获取缓存起来的审批人
+    getUserInfo(id,func) {
+    		request('get', '/api/employee/info', {id: id }).then(res =>{
+          func(res.data.data)
+        })
     },
-    // 管理人员是否同部门
-    manageDeptEmployee (arr, id) {
-      const employee_list = window.plus ? JSON.parse(plus.storage.getItem('SET_EMPLOYEE_MAP')) : JSON.parse(localStorage.getItem('SET_EMPLOYEE_MAP'))
-      let obj = null
-      arr.forEach(element => {
-        for (const i in employee_list) {
-          if (employee_list[i].id == element.id) {
-            if (employee_list[i].department.length !== 0) {
-              employee_list[i].department.forEach(item => {
-                if (item.dept_id == id) {
-                  obj = {id: employee_list[i].id, name: employee_list[i].name}
-                }
-              })
-            }
-          }
-        }
-      })
-      return obj
-    }
   },
   // 组件挂载完成
   mounted () {

+ 14 - 6
src/components/common/user_image.vue

@@ -1,10 +1,15 @@
 <template>
   <div>
-    <van-image v-if="info.img_url" :src="info.img_url == defaultImg() ? replaceImg() : info.img_url" :width="width" :height="height" round type="contain" />
-    <span class="img_round" v-else>
-      <div class="user_name_div" :style="{width: width, height: height,lineHeight: height, fontSize: fontSize + 'rem'}"><Wxopendata type="userName" :openid="user_name"></Wxopendata></div>
-      <div class="user_img_bg" :style="{width: width, height: height}" ></div>
-    </span>
+    <template v-if="showName">
+      <van-image v-if="info.img_url" :src="info.img_url ? info.img_url:replaceImg()" :width="width" :height="height" round type="contain" />
+      <span class="img_round" v-else>
+        <div class="user_name_div" :style="{width: width, height: height,lineHeight: height, fontSize: fontSize + 'rem'}">
+          <Wxopendata type="userName" :openid="user_name"></Wxopendata>
+        </div>
+        <div class="user_img_bg" :style="{width: width, height: height}" ></div>
+      </span>
+    </template>
+    <van-image v-else :src="info.img_url ? info.img_url:replaceImg()" :width="width" :height="height" round type="contain" />
   </div>
 </template>
 <script>
@@ -37,6 +42,10 @@
       fontSize:{
         type: String,
         default: '0.32'
+      },
+      showName:{  //在没有图片时显示名称
+        type: Boolean,
+        default: false
       }
     },
     watch:{
@@ -101,7 +110,6 @@
         return "https://rescdn.qqmail.com/node/wwmng/wwmng/style/images/independent/DefaultAvatar$73ba92b5.png"
       },
       replaceImg(){
-        // return 'static/images/gttx'+ Math.round(Math.random()*5) +'.jpg'
         return 'static/images/default5.png'
       },
     },

+ 4 - 11
src/components/integral/approval_list.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="approval_list_box">
     <van-nav-bar :title="title" left-text="返回" @click-left="$route_back" left-arrow right-text="批量审批" @click-right="openBatch()"></van-nav-bar>
-    <van-search v-model="filter.keyword" placeholder="搜索姓名或内容"/>
-
+    <van-search v-model="filter.keyword" maxlength="20" placeholder="搜索内容"/>
     <TabsList
       ref="tabsList"
       :top="2.1"
@@ -44,18 +43,12 @@
             class="task_list"
             :class="{cell_padding_bottom: item.status != 0}">
             <div class="task-item__header">
-              <userImage  :user_name="item.employee_name" v-if="item.source_type == 1 || item.source_type == 4" width="0.72rem" height="0.72rem"/>
-              <userImage  :user_name="item.employee_name" v-if="item.source_type == 2 || item.source_type == 3" width="0.72rem" height="0.72rem"/>
+              <userImage :user_name="item.employee_name" v-if="item.source_type == 1 || item.source_type == 4" width="0.72rem" height="0.72rem"/>
+              <userImage :user_name="item.employee_name" v-if="item.source_type == 2 || item.source_type == 3" width="0.72rem" height="0.72rem"/>
               <div class="task-title__bar">
-                <!-- <span class="title" v-show="item.source_type == 1">{{item.employee_name}}的积分任务</span>
-                <span class="title" v-show="item.source_type == 2">{{item.employee_name}}的积分申请</span>
-                <span class="title" v-show="item.source_type == 3">{{item.employee_name}}的积分奖扣</span>
-                <span class="title" v-show="item.source_type == 4">{{item.employee_name}}的绩效工作</span> -->
                 <span class="title">
-                  <Wxopendata type="userName" :openid="item.employee_name"></Wxopendata>
-                  {{item.source_type == 1?'的积分任务':item.source_type == 2?'的积分申请':item.source_type == 3?'的积分奖扣':item.source_type == 4?'':''}}
+                  <Wxopendata type="userName" :openid="item.employee_name"></Wxopendata>{{item.source_type == 1?'的积分任务':item.source_type == 2?'的积分申请':item.source_type == 3?'的积分奖扣':item.source_type == 4?'':''}}
                 </span>
-                <!-- <span class="title" v-show="item.source_type == 4">{{item.employee_name}}提交的绩效工作包</span> -->
                 <span v-if="filter.type === 'reviewed' && item.status !== 0 &&   item.status !== 2 ">
                   <span class="task-item__point green" v-if="item.review_point >= 0">+{{ item.review_point }} {{$isPt_id(item.pt_id)}}</span>
                   <span class="task-item__point" v-else>{{ item.review_point }} {{$isPt_id(item.pt_id)}}</span>

+ 25 - 17
src/components/integral/batchList.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <van-nav-bar title="批量审批" left-text="返回" @click-left="$route_back" left-arrow :right-text="rightText" @click-right="openBatch()"></van-nav-bar>
-    <van-search v-model="params.keyword" placeholder="搜索姓名或内容" show-action style="border-bottom: 1px solid #ebedf0;">
+    <van-search v-model="params.keyword" placeholder="搜索内容" show-action style="border-bottom: 1px solid #ebedf0;">
       <template #action>
         <van-dropdown-menu style="height: 0.8rem;" class="menu">
           <van-dropdown-item title="筛选" ref="item">
@@ -10,30 +10,26 @@
                 <div class="flex-1">可直接打分审批(默认)</div>
                 <div v-if="activeIndex == 1"><i class="van-icon van-icon-success"></i></div>
               </div>
-              <!-- <div style="font-size: 0.28rem;" class="color_ccc">绩效工作不参与批量审批</div> -->
             </div>
             <div class="sx-item" @click="activeItem(2)">
               <div class="flex-box">
                 <div class="flex-1">全部</div>
                 <div v-if="activeIndex == 2"><i class="van-icon van-icon-success"></i></div>
               </div>
-              <!-- <div style="font-size: 0.28rem;" class="color_ccc">绩效工作不参与批量审批</div> -->
             </div>
           </van-dropdown-item>
         </van-dropdown-menu>
       </template>
     </van-search>
+    <div style="padding: 0.2rem 0.24rem;background-color: #fff;color:#303133">
+      <van-checkbox v-model="allChecked">全选<span style="color: #666;font-size: 0.24rem;">(默认选中前10条)</span> </van-checkbox>
+    </div>
     <div class="body_com">
       <!-- 先隐藏掉下来刷新功能 -->
-      <!-- <scroller ref="scroller" :on-refresh="onRefresh" :on-infinite="onInfinite"> -->
        <scroller ref="scroller" :on-infinite="onInfinite">
         <div class="flex-box list-item" v-for="(item,index) in data" :key="index">
           <div><van-checkbox v-model="item.activeChecked" @change="activeChange(index)"></van-checkbox></div>
           <div class="flex-1" style="overflow: hidden;">
-            <!-- <span class="title" v-show="item.source_type == 1">{{item.employee_name}}的积分任务</span>
-            <span class="title" v-show="item.source_type == 2">{{item.employee_name}}的积分申请</span>
-            <span class="title" v-show="item.source_type == 3">{{item.employee_name}}的积分奖扣</span>
-            <span class="title" v-show="item.source_type == 4">{{item.employee_name}}的绩效工作</span> -->
             <span class="title">
               <Wxopendata type="userName" :openid="item.employee_name"></Wxopendata>
               {{item.source_type == 1?'的积分任务':item.source_type == 2?'的积分申请':item.source_type == 3?'的积分奖扣':item.source_type == 4?'的绩效工作':''}}
@@ -61,7 +57,7 @@
               </van-cell>
               <div v-if="item.error.rule" style="height: 0.8rem;padding-left: 1.6rem;line-height: 0.8rem;font-size: 0.32rem;" class="color_red">{{item.error.rule}}</div>
               <div v-if="item.error.item" style="height: 0.8rem;padding-left: 1.6rem;line-height: 0.8rem;font-size: 0.32rem;" class="color_red">{{item.error.item}}</div>
-              <div  style="border-bottom: 0.02rem solid #ebedf0;">
+              <div style="border-bottom: 0.02rem solid #ebedf0;">
                 <NumberInput
                  v-model="item.point"
                  :min="item.item_min_point"
@@ -220,8 +216,7 @@
                    </template>
                  </van-cell>
               </template>
-
-                <EmployeeSelectorCell
+              <EmployeeSelectorCell
                    bar_title="选择递交审批人"
                    title="递交审批"
                    name="递交审批"
@@ -230,14 +225,13 @@
                    :max="1"
                    :use_employee_list="true"
                    :employee_list="superior_list">
-                 </EmployeeSelectorCell>
-                 <div v-if="item.error.reviewer&&item.reviewer_list.length==0" style="height: 0.8rem;padding-left: 1.6rem;line-height: 0.8rem;font-size: 0.32rem;" class="color_red">权限分不足,请选择审批人</div>
+              </EmployeeSelectorCell>
+              <div v-if="item.error.reviewer&&item.reviewer_list.length==0" style="height: 0.8rem;padding-left: 1.6rem;line-height: 0.8rem;font-size: 0.32rem;" class="color_red">权限分不足,请选择审批人</div>
             </template>
-
           </div>
         </div>
         <noData :list="data" />
-        <div style="height: 2rem;"></div>
+        <div style="height: 3rem;"></div>
       </scroller>
       <div class="flex-box btns" v-show="rightText" :class="{ isIos: isIos }" >
         <van-button plain type="danger" class="flex-1" style="margin-right: 0.24rem" @click="reject()">驳回</van-button>
@@ -292,7 +286,8 @@ export default {
       },
       isIos: false,
       showReject: false, // 驳回弹窗
-      reject_text: ''// 驳回意见
+      reject_text: '',// 驳回意见
+      allChecked:false,
     }
   },
   created () {
@@ -306,7 +301,20 @@ export default {
     'params.keyword': _debounce(function () {
       this.params.page = 1
       this.get_list()
-    })
+    }),
+    allChecked(val){
+      this.data.forEach(item=>{
+        item.activeChecked=false;
+      })
+      if(val){
+        this.data.forEach((item,index)=>{
+          if(index<20){
+            item.activeChecked=true;
+          }
+        })
+      }
+    }
+
   },
   methods: {
     // 当选择规则设置积分初始值

+ 6 - 6
src/components/integral/event_list.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="event-list__container">
     <van-nav-bar title="积分事件" left-text="返回" @click-left="$route_back" left-arrow></van-nav-bar>
-    <van-search placeholder="请输入姓名或事件内容搜索" v-model="searchParams.keyword" @input="keyVal()"/>
+    <van-search placeholder="请输入事件内容搜索" maxlength="20"  v-model="searchParams.keyword" @input="keyVal()"/>
     <van-dropdown-menu>
       <van-dropdown-item :title="dateItemTitle" ref="dateDropdownItem">
         <DateSelectorDropdown :title.sync="dateItemTitle" @onConfirm="onConfirmDate"/>
@@ -28,9 +28,8 @@
                 <userImage class="about-me__avatar" :img_url="item.employee_img_url" :user_name="item.employee_name" fontSize="0.24rem" width="0.72rem" height="0.72rem"></userImage>
               </span>
               <span class="event-item__name"><Wxopendata type="userName" :openid="item.employee_name"></Wxopendata></span>
-              <span class="event-item__value green" v-if="item.point >= 0">+{{ item.point }}{{ types_list[item.pt_id]}}</span>
-              <span class="event-item__value" v-else>{{ item.point }}{{ types_list[item.pt_id] }}</span>
-
+              <span class="event-item__value green" v-if="item.point >= 0">+{{ item.point }} {{ types_list[item.pt_id]}}</span>
+              <span class="event-item__value" v-else>{{ item.point }} {{ types_list[item.pt_id] }}</span>
             </div>
             <div class="event-content__text">
               <span>{{ item.remark }}</span>
@@ -161,6 +160,7 @@ export default {
       this.getEventData(done)
     },
     onConfirmDate (item) {
+      
       this.searchParams.page = 1
       if (item.dateMode === 1) {
         this.searchParams.month = item.startDate
@@ -168,8 +168,8 @@ export default {
         this.searchParams.start_day = null
       } else {
         this.searchParams.month = null
-        this.searchParams.end_day = item.startDate
-        this.searchParams.start_day = item.endDate
+        this.searchParams.end_day = item.endDate
+        this.searchParams.start_day = item.startDate   
       }
       this.$refs.dateDropdownItem.toggle()
       this.$refs.scroller.triggerPullToRefresh()

+ 6 - 3
src/components/integral/integralDetail.vue

@@ -13,7 +13,7 @@
     </div>
     <div class="text" v-if="userData_tow.site_config.base_point">基础分:{{userData_tow.site_config.base_point}}   工龄分:{{userData_tow.point_config.service_point}}</div>
     <div v-else class="text">该明细不包含基础分与工龄分</div>
-    <van-dropdown-menu active-color="#26a2ff"><van-dropdown-item :options="sxArr" v-model="pointType" @change="onChangePointType" /></van-dropdown-menu>
+    <!-- <van-dropdown-menu active-color="#26a2ff"><van-dropdown-item :options="sxArr" v-model="pointType" @change="onChangePointType" /></van-dropdown-menu> -->
     <div class="event-list__content">
       <scroller ref="scroller" :on-refresh="refresh" :on-infinite="infinite" noDataText="我也是有底线的" :list="eventData">
         <van-cell-group>
@@ -25,7 +25,7 @@
                 <span class="color_green" v-else>{{ item.point }}{{ types_list[item.pt_id] }}</span>
               </div>
             </div>
-            <div class="event-time__text">{{ item.event_time }}</div>
+            <div class="event-time__text"> {{$moment(item.event_time).format('YYYY-MM-DD')}}</div>
           </div>
         </van-cell-group>
 
@@ -88,6 +88,9 @@ export default {
       this.searchParams.year = item.year
       this.searchParams.month = item.month
       this.searchParams.quarter = item.quarter
+      if(item.pt_id){
+         this.searchParams.pt_id = item.pt_id
+      }
       if (item.employee_id && this.$route.query.isLj) {
         this.getUserPoint()
       }
@@ -199,7 +202,7 @@ export default {
 
   & .event-list__content {
     position: relative;
-    height: calc(100% - 3.9rem);
+    height: calc(100% - 2.9rem);
     & .van-hairline--top-bottom:after,
     .body_com .van-hairline-unset--top-bottom:after {
       border: none;

+ 1 - 1
src/components/integral/integral_entry_list.vue

@@ -2,7 +2,7 @@
   <div class="teampk_box">
     <van-nav-bar :title="title" left-text="返回" @click-left="$route_back" left-arrow style="font-size:0.32rem;"></van-nav-bar>
 
-    <van-search placeholder="请输入姓名或事件内容搜索" v-model="filter.keyword"/>
+    <van-search placeholder="请输入事件内容搜索" v-model="filter.keyword"/>
 
     <van-tabs v-model="type">
       <van-tab v-for="(item,index) in tabs_arr" :key="index" :title="item.title" :name="item.code"></van-tab>

+ 1 - 1
src/components/integral/integral_entry_n.vue

@@ -88,7 +88,7 @@
               ></EmployeeSelectorCell>
             </div>
             <van-cell required>
-              <Mtextarea v-model="item.remark"  placeholder="请输入事件内容" name="申请事由"  v-validate="'required|max:100'" :text_max="100" :imgs_max="3" images speech :imgs.sync="item.files"></Mtextarea>
+              <Mtextarea v-model="item.remark"  placeholder="请输入事件内容" name="申请事由"  v-validate="'required|max:300'" :text_max="300" :imgs_max="3" images speech :imgs.sync="item.files"></Mtextarea>
             </van-cell>
           </van-cell-group>
         </div>

+ 2 - 0
src/components/integral/integral_rank.vue

@@ -137,11 +137,13 @@ export default {
   methods: {
     // 打开明细列表
     openDetail (item) {
+      console.log(item);
       var params = this.getParams()
       item.year = params.year// 年
       item.rule_id = params.rule// 分类
       item.quarter = params.quarter// 季度
       item.month = params.month
+      item.pt_id=params.pt_id
       this.$router.push({ name: 'integralDetail', query: {item: JSON.stringify(item)}})
     },
     onConfirmRule (ruleIds) {

+ 1 - 1
src/components/integral/rule_item_add.vue

@@ -6,7 +6,7 @@
 
         <van-cell-group>
           <van-cell required>
-            <Mtextarea required v-model="item.remark" placeholder="输入规则内容" :text_max="100" :imgs_max="3"></Mtextarea>
+            <Mtextarea required v-model="item.remark" placeholder="输入规则内容" :text_max="300" :imgs_max="3"></Mtextarea>
           </van-cell>
         </van-cell-group>
         <van-cell-group>

+ 1 - 1
src/components/integral/rule_item_edit.vue

@@ -6,7 +6,7 @@
 
         <van-cell-group>
           <van-cell>
-            <Mtextarea v-model="item.remark" placeholder="输入规则内容" :text_max="100" :imgs_max="3"></Mtextarea>
+            <Mtextarea v-model="item.remark" placeholder="输入规则内容" :text_max="300" :imgs_max="3"></Mtextarea>
           </van-cell>
         </van-cell-group>
         <van-cell-group>

+ 4 - 4
src/components/task/temp_task.vue

@@ -20,7 +20,7 @@
           <van-cell title="任务类型" required>
             <template slot="right-icon">
               <van-radio-group v-model="data.pt_id" direction="horizontal" class="radio_button">
-                <van-radio class="list"   :class="{changeRadio: item.id === data.pt_id}" v-if="item.code != 'JX'" :name="item.id" v-for="(item, index) in $store.getters.point_types" :key="index">{{item.name}}</van-radio>
+                <van-radio class="list"  :class="{changeRadio: item.id === data.pt_id}" v-if="item.code != 'JX'" :name="item.id" v-for="(item, index) in $store.getters.point_types" :key="index">{{item.name}}</van-radio>
               </van-radio-group>
               <smallTip icon="question-o" position="30%">
                 <p style="margin: 0; line-height: 0.6rem">A分:物质分,与钱直接挂钩</p>
@@ -160,7 +160,7 @@
       <van-nav-bar title="任务描述" left-text="返回" @click-left="show_task_remark_popup = false" left-arrow right-arrow @click-right="save_remark" right-text="保存"></van-nav-bar>
       <van-cell-group v-if="show_task_remark_popup">
         <van-cell>
-          <Mtextarea v-model="data.task_remark" placeholder="请输入关于任务的描述" :text_max="100"></Mtextarea>
+          <Mtextarea v-model="data.task_remark" placeholder="请输入关于任务的描述" :text_max="300"></Mtextarea>
         </van-cell>
       </van-cell-group></van-popup>
 
@@ -199,7 +199,7 @@ export default {
       reviewer: reviewer,
       data: {
         task_type: 1,
-        pt_id: 0,
+        pt_id: 3,
         task_name: '',
         task_remark: '',
         base_point: 0,
@@ -344,7 +344,7 @@ export default {
           self.$toast.clear()
           self.data = {
             task_type: 1,
-            pt_id: 0,
+            pt_id: 3,
             task_name: '',
             task_remark: '',
             base_point: 0,

+ 1 - 1
src/components/task/temp_task_edit.vue

@@ -151,7 +151,7 @@
       <van-nav-bar title="任务描述" left-text="返回" @click-left="show_task_remark_popup = false" left-arrow right-arrow @click-right="save_remark" right-text="保存"></van-nav-bar>
       <van-cell-group v-if="show_task_remark_popup">
         <van-cell>
-          <Mtextarea v-model="data.task_remark" placeholder="请输入关于任务的描述" :text_max="100"></Mtextarea>
+          <Mtextarea v-model="data.task_remark" placeholder="请输入关于任务的描述" :text_max="300"></Mtextarea>
         </van-cell>
       </van-cell-group></van-popup>
 

+ 2 - 0
src/main.js

@@ -7,6 +7,7 @@ import './permission'
 import './utils/validator'
 import '../css/reset.css'
 import echarts from 'echarts'
+import moment from 'moment'
 
 // wx通讯录
 import wwOpenDAtas from '@/view/wxOpendata'
@@ -33,6 +34,7 @@ Vue.prototype.$getCache = getCache
 Vue.prototype.$setCache = setCache
 Vue.prototype.$isPt_id = isPt_id
 Vue.prototype.$echarts = echarts
+Vue.prototype.$moment = moment
 Vue.prototype.$wx = (window).wx; // 全局使用