ggooalice 2 anni fa
parent
commit
7f3e58f9c8

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/http.js

@@ -87,7 +87,7 @@ export default {
                                 flgs = 0
                             }, 12000)
                         }
-                        exception(false)
+                        // exception(false)
                     } else {
                         exception(error)
                     }

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -855,6 +855,14 @@ export default {
       this.customerId = ''
       this.cusProJuctId = ''
       this.$forceUpdate()
+      this.list0 = []
+      this.list1 = []
+      this.list2 = []
+      this.list3 = []
+      this.list4 = []
+      this.list5 = []
+      this.overTimeList = []
+      this.baseCostList = []
       this.getList();
     },
     getCustomerProjectInAndOut() {

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -1129,7 +1129,8 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                         type: 'error'
                     })
                 })
-            },haveUsersList(list){
+            },
+            haveUsersList(list){
                 for (var i in list) {
                     if (list[i].children != null) {
                         this.haveUsersList(list[i].children);

+ 199 - 27
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -161,31 +161,45 @@
         </el-col>
         </el-row>
         <!--设置时长样式内容-->
-        <p style="margin-left:10px;color:#666;">填报提醒时间设置</p>
+        <p style="margin-left:10px;color:#666;">填报提醒设置</p>
         <el-row :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
-        <el-col :span="24" >
-            <div class="panel" style="height:60px;">
-                <el-form :inline="true" :model="timeType"  style="margin-top:10px;">
-                 
-                <el-form-item label="未填报提醒时间 " prop="alertTime">
-                    <el-time-picker 
-                            v-model="timeType.alertTime"
-                            placeholder="提醒时间"
-                            style="width:120px;"
-                            format="HH:mm"
-                            value-format="HH:mm"
-                            :picker-options="{
-                            start: '08:00',
-                            end: '23:30'
-                            }">
-                        </el-time-picker>
-                </el-form-item>
-                <el-form-item label="提醒文本" prop="alertMsg" style="width: 50%;margin-left:10px;">
-                        <el-input placeholder="请输入提醒文本" v-model="timeType.alertMsg" clearable class="apu" maxlength="20"></el-input>
-                </el-form-item>
-                </el-form>
-            </div>
-        </el-col>
+            <el-col :span="24" >
+                <div class="panel" style="height:200px;">
+                    <el-form :inline="true" :model="timeType"  style="margin-top:10px;">
+                    <el-form-item label="提醒时间 " prop="alertTime">
+                        <el-time-picker 
+                                v-model="timeType.alertTime"
+                                placeholder="提醒时间"
+                                style="width:120px;"
+                                format="HH:mm"
+                                value-format="HH:mm"
+                                :picker-options="{
+                                start: '08:00',
+                                end: '23:30'
+                                }">
+                            </el-time-picker>
+                    </el-form-item>
+                    <el-form-item prop="alertType" style="margin-left:10px">
+                        <el-select v-model="timeType.alertType" placeholder="请选择提醒方式">
+                            <el-option label="每日提醒当天漏填" :value="0"></el-option>
+                            <el-option label="每日提醒昨天漏填" :value="1"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="提醒文本" prop="alertMsg" style="width: 50%;margin-left:10px;">
+                            <el-input placeholder="请输入提醒文本" v-model="timeType.alertMsg" clearable class="apu" maxlength="20"></el-input>
+                    </el-form-item>
+                    </el-form>
+                    <div class="underpanel">
+                        <div class="whiteList_head">
+                            <span style="float:left;">不提醒人员设置</span>
+                            <el-link type="primary" style="float:left;margin-left:15px" :underline="false" @click="addWhite">添加</el-link>
+                        </div>
+                        <div class="whiteList_content">
+                            <el-tag style="margin:10px 0 0 10px" v-for="item in whiteList" :key="item.id" closable @close="whiteDelete(item)">{{item.label}}</el-tag>
+                        </div>
+                    </div>
+                </div>
+            </el-col>
         </el-row>
 <!-- 设置员工可补填的时间 -->
         <p style="margin-left:10px;color:#666;">普通员工补填日报时间限制</p>
@@ -346,6 +360,26 @@
                 </div>
             </el-dialog>
         </el-dialog>
+
+        <!-- 日报提醒白名单 -->
+        <el-dialog title="选择人员"  v-if="whiteListDialog" :visible.sync="whiteListDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <div class="tree" style="height:400px">
+                <el-scrollbar style="height:100%">
+                    <el-input
+                    placeholder="输入关键字进行过滤"
+                    v-model="filterText">
+                    </el-input>
+                <el-tree :data="whiteListAll" show-checkbox :props="defaultProps" node-key="id"
+                    ref="whiteListTree"
+                    highlight-current  :filter-node-method="filterNode"></el-tree>
+                </el-scrollbar>
+            </div>
+            <!-- <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>         :default-checked-keys="alreadyPartArray"  @check-change="onTreeItemChange" -->
+            <div slot="footer" class="dialog-footer">
+                <el-button  @click="whiteListDialog = false">取消</el-button>
+                <el-button type="primary" @click="setWhiteList()">确定</el-button>
+            </div>
+        </el-dialog>
     </section>
 </template>
 <script>
@@ -371,7 +405,8 @@
                     monthDays: 21.75,
                     pm: 4,
                     type: 0,
-                    lockWorktime: true
+                    lockWorktime: true,
+                    ids: ''
                 },
                 customDegreeActive: false,
                 needDeptAudit: false,
@@ -398,9 +433,24 @@
                     endTime: null
                 },
                 restList: [],
-                setupItemId: null
+                setupItemId: null,
+
+
+                whiteListDialog: false,
+                whiteListAll: [],
+                whiteList: [],
+                filterText: '',
+                defaultProps: {
+                    children: 'children',
+                    label: 'label'
+                },
             };
         },
+        watch: {
+            filterText(val) {
+                this.$refs.whiteListTree.filter(val);
+            }
+        },
         methods: {
             setupRest(){
                 // this.getRestList()
@@ -661,6 +711,104 @@
                    }
                 }
             },
+            getWhiteListAll(){
+                this.http.post('/department/listAllMemb',{
+                },res => {
+                    if(res.code == 'ok'){
+                        let list = res.data
+                        this.haveUsersList(list)
+                        this.whiteListAll = JSON.parse(JSON.stringify(list))
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },error => {
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    })
+                })
+            },
+            haveUsersList(list){
+                for (var i in list) {
+                    if (list[i].children != null) {
+                        this.haveUsersList(list[i].children);
+                    }
+                    if (list[i].userList != null) {
+                        if (list[i].children == null) {
+                            list[i].children = [];
+                        }
+                        list[i].userList.forEach(element => {
+                            var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
+                            list[i].children.push(obj);
+                        });
+                    }
+                }
+            },
+            filterNode(value, data) {
+                if (!value) return true;
+                return data.label.indexOf(value) !== -1;
+            },
+            // onTreeItemChange() {
+            //     var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
+            //     var list = chosenList.filter(item=>item.isUser == 1);
+            //     // this.chosenMembCount = list.length;
+            // },
+            addWhite(){
+                this.whiteListDialog = true
+                this.filterText = ''
+                this.getWhiteListAll()
+            },
+            whiteDelete(item){
+                
+                this.whiteList.splice(this.whiteList.indexOf(item),1)
+                console.log(this.whiteList);
+                this.http.post('/time-type/changeUserReportType',{
+                    id: item.id
+                },res => {
+                    if(res.code == 'ok'){
+                        this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            setWhiteList(){
+                let chosenList = this.$refs.whiteListTree.getCheckedNodes();
+                let chose2 = chosenList.filter(item=>item.isUser == 1)
+                let chose3 = ''
+                for(let i=0;i<chose2.length;i++){chose3 += chose2[i].id + ','}
+                chose3 = chose3.substring(0,chose3.length - 1)
+
+                for(let i in chose2){
+                    let isrepeat = false
+                    for(let n in this.whiteList){
+                        if(chose2[i].id == this.whiteList[n].id){
+                            isrepeat = true
+                        }
+                    }
+                    if(!isrepeat){
+                        this.whiteList.push(chose2[i])
+                    }
+                }
+
+                this.timeType.ids = chose3
+                this.whiteListDialog = false
+                console.log('chose',chose2,chose3);
+            },
             submitInsert() {
                 this.$refs.form1.validate(valid => {
                     if (valid) {
@@ -765,10 +913,18 @@
                     res => {
                         this.listLoading = false;
                         if (res.code == "ok") {
-                            this.timeType = res.data;
+                            this.timeType = res.data.result;
                             this.timeType.fillOvertime = this.timeType.fillOvertime ? true : false
                             this.timeType.lockWorktime = this.timeType.lockWorktime ? true : false
                             this.timeChange();
+                            let userlist = res.data.userList
+                            this.whiteList = []
+                            for(let i in userlist){
+                                this.whiteList[i] = {
+                                    id: userlist[i].id,
+                                    label: userlist[i].name
+                                }
+                            }
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -837,6 +993,22 @@
 .panel {
     padding:15px;height:300px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
 }
+.underpanel{
+    width: 900px;
+    height: 140px;
+    border-top: 1px solid #eee;
+    position: relative;
+    top: -12px;
+}
+.underpanel .whiteList_head{
+    padding: 5px 0 0 5px;
+    height: 24px;
+}
+.underpanel .whiteList_content{
+    margin: 10px 10px 0 10px;
+    border: 1px solid #eee;
+    height: 90px;
+}
 .sample {
     margin-top:22px;
     color: #999;

+ 3 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -54,7 +54,7 @@
                     <el-form-item style="float:right;" v-if="permissions.structureExport">
                         <el-link type="primary" :underline="false" @click="showExportDialog">导出人员</el-link>
                     </el-form-item>
-                    <el-form-item style="float:right;" v-if="!isDingShow && permissions.structureAdd">
+                    <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureAdd">
                         <el-link type="primary" :underline="false" @click="openInsertDialog(null)">添加人员</el-link>
                     </el-form-item>
                     <!-- 原来的 -->
@@ -63,13 +63,13 @@
                             <el-link type="primary" :underline="false">批量导入</el-link>
                         </el-upload>
                     </el-form-item> -->
-                    <el-form-item style="float:right;" v-if="!isDingShow && permissions.structureImport">
+                    <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
                         <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
                             <el-link type="primary" :underline="false">批量导入</el-link>
                         </el-upload>
                     </el-form-item>
 
-                    <el-form-item style="float:right;" v-if="!isDingShow && permissions.structureImport">
+                    <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
                         <el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
                     </el-form-item>
                     <!-- <el-form-item  v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
@@ -453,7 +453,6 @@
         data() {
             return {
                 permissions: JSON.parse(sessionStorage.getItem("permissions")),
-                isDingShow : false,
                 handleSelectionZzjgshow: false,
                 handljues: false,
                 submitLoading:false,
@@ -1937,7 +1936,6 @@
             this.getCompanyTimeSetting();
             this.getUsers();
             this.acquireRole();
-            this.isDingShow = this.$store.state.isDing;
             this.getProfessional()
         }
     };

+ 12 - 9
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -808,12 +808,8 @@
         </el-dialog>
         <!--人员列表 -->
         <el-dialog  :title="(isFill?'已填':'未填')+'人员列表'" v-if="membListVisible" :visible.sync="membListVisible"  width="500px">
-            <el-table :show-header="false" :data="fillMembList" highlight-current-row :height="400" style="width: 100%;">
-            <el-table-column type="index" width="60">
-                <template slot-scope="scope" >
-                        {{scope.$index+1}}
-                    </template>
-            </el-table-column>
+            <el-table :show-header="true" :data="fillMembList" highlight-current-row :height="400" style="width: 100%;" @selection-change="notifySel">
+            <el-table-column type="selection"></el-table-column>
             <el-table-column prop="label" label="姓名" ></el-table-column>
             <el-table-column prop="deptName" label="部门" >
             </el-table-column>
@@ -1459,7 +1455,9 @@
                 isMore: false,
 
                 stateKey: '0',
-                expandDate: []
+                expandDate: [],
+
+                notifySelList:[]
             };
         },
         watch: {
@@ -2406,11 +2404,16 @@
                 
             },
 
+            notifySel(sel){
+                console.log(sel);
+                this.notifySelList = sel
+            },
+
             //微信通知人员填写
             Notify(code) {
-                if (this.fillMembList.length == 0) return;
+                if (this.notifySelList.length == 0) return;
                 var ids = '';
-                this.fillMembList.forEach(f=>{
+                this.notifySelList.forEach(f=>{
                     ids += f.id+',';
                 })
                 this.http.post('/user/pushFillReport',{