瀏覽代碼

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

cs 2 年之前
父節點
當前提交
518acc4d4c

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

@@ -134,7 +134,7 @@
       </div>
       <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" >
         <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
-        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9">按季度导出</el-button>
+        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9 && user.companyId == 876">按季度导出</el-button>
       </p>
       
     </div>

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -931,7 +931,9 @@ export default {
         leaveCode: this.leaveTypeItem,
         companyId: this.user.companyId,
         departmentId: this.departmentSel ? this.departmentSel[this.departmentSel.length - 1] : '',
-        userId: this.userSelId,
+      }
+      if(this.userSelId != '') {
+        param.userId = this.userSelId
       }
       this.http.post('/user-yearleave-setting/exportDingDingLeaveQt',param,
       res => {

+ 24 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -276,14 +276,24 @@
                             <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
                                 <template slot-scope="scope">
                                     <span v-if="user.userNameNeedTranslate != '1'">
-                                        {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}}
+                                        <!-- {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}} -->
+                                        <span v-if="scope.row.executorName == null">{{$t('dai-fen-pei')}}</span>
+                                        <span v-else>
+                                            <span v-for="(item, index) in scope.row.executorName" :key="index">
+                                                {{item}}
+                                                <span v-if="index < scope.row.executorName.length - 1">,</span>
+                                            </span>
+                                        </span>
                                     </span>
                                     <span v-if="user.userNameNeedTranslate == '1'">
                                         <span v-if="scope.row.executorName == null">
                                             {{$t('dai-fen-pei')}}
                                         </span>
                                         <span v-else>
-                                            <ww-open-data type='userName' :openid='scope.row.executorName'></ww-open-data>
+                                            <span v-for="(item, index) in scope.row.executorName" :key="index">
+                                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                <span v-if="index < scope.row.executorName.length - 1">,</span>
+                                            </span>
                                         </span>
                                     </span>
                                 </template>
@@ -919,7 +929,10 @@
             <el-form ref="formIncharger" :model="groupForm" :rules="rules" style="margin-top:10px;">
                     <el-form-item prop="taskGpIncharge">
                         <el-select v-if="user.userNameNeedTranslate != 1" v-model="groupForm.inchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" clearable filterable>
-                            <el-option v-for="item in joinMembList" :key="item.id" :value="item.id" :label="item.name"></el-option>
+                            <el-option v-for="item in joinMembList" :key="item.id" :value="item.id" :label="item.name">
+                                <span style="float: left">{{ item.name }}</span>
+                                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
+                            </el-option>
                         </el-select>
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" @selectCal="selectCal" :subject="joinMembList" :subjectId="groupForm.inchargerId" :clearable="true" :distinction="'2'"></selectCat>
                     </el-form-item>
@@ -2272,7 +2285,15 @@
                 this.http.post('/task/list',{projectId: this.curProjectId, viewId: this.selectedGroup.id, order: this.order, isDesc: this.isDesc},
                 res => {
                     if (res.code == "ok") {
+                        // this.taskDataList = res.data;
+                        // console.log(this.taskDataList, '任务视图的列表')
+                        for(var i in res.data) {
+                            if(res.data[i].executorName != null) {
+                                res.data[i].executorName = res.data[i].executorName.split(',')
+                            }
+                        }
                         this.taskDataList = res.data;
+                        console.log(this.taskDataList, '任务视图的列表')
                         this.taskDataList.forEach(t=>{
                             t.isFinish = t.taskStatus==1?true:false;
                         });

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

@@ -269,7 +269,7 @@
                     <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                 </el-form-item>
             </el-form>
-            <div slot="footer" class="dialog-footer">
+            <div slot="footer" class="dialog-footer"> 
                 <el-button @click="handleSelectionZzjgshow = false">{{ $t('btn.cancel') }}</el-button>
                 <el-button type="primary" @click="handleSelectionZzjgbtn2">{{ $t('btn.determine') }}</el-button>
             </div>
@@ -300,14 +300,20 @@
                 <!-- 主要负责人 -->
                 <el-form-item :label="$t('Principalpersoninharge')" prop="managerId">
                     <el-select v-model="depForm.managerId" filterable  clearable  :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%">
-                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
+                          <span style="float: left">{{ item.name }}</span>
+                          <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
 
                 <!-- 其他负责人 -->
                 <el-form-item :label="$t('responsiblepersons')" prop="managerId">
                     <el-select v-model="depForm.otherManagerIds" filterable  clearable multiple style="width: 100%" :placeholder="$t('defaultText.pleaseChoose')" >
-                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
+                          <span style="float: left">{{ item.name }}</span>
+                          <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
                 <!-- 直属领导 -->

+ 37 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -6,11 +6,23 @@
             <div>
             <van-field readonly clickable name="datetimePicker" :value="form.createDate" label="时间选择" placeholder="点击选择时间" 
             @click="showPicker = true" :rules="rules.createDate" />
-                <div v-if="report.time" class="attendanceRecord">
+            <van-cell v-if="user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1">
+                <template #default>
+                    <div class="attendanceRecord">
+                    <span>考勤打卡:</span>
+                    <span v-if="!report.time">暂无考勤记录</span>
+                    <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}小时</span>
+                    </div>
+                </template>
+                <template #right-icon>
+                    <van-button icon="replay" type="default" size="mini" style="height:0.6rem;padding:0 0.16667rem;" :loading="cardRefLoading" loading-size="0.26667rem" @click="cardtimeRefresh(form.createDate)" v-if="user.timeType.syncCorpwxTime==1 && (form.createDate == today || !report.time || report.time.workHours == 0)"></van-button>
+                </template>
+            </van-cell>
+                <!-- <div v-if="report.time" class="attendanceRecord">
                     <i class="iconfont firerock-icondakajilu" style="font-size:0.35rem;margin-right:0.12rem"></i>
                     <span v-if="user.timeType.syncDingding==1&&!report.time">暂无考勤记录</span>
                     <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}小时</span>
-                </div>
+                </div> -->
             </div>
             <van-popup v-model="showPicker" position="bottom">
                 <van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="changeTime" @cancel="showPicker = false"/>
@@ -382,6 +394,8 @@ import timetoolVue from '../timetool/timetool.vue';
     export default {
         data() {
             return {
+                cardRefLoading: false,
+                today: '',
 
                 showPickerStage: false,
                 showPickerTaskGroup: false,
@@ -475,6 +489,22 @@ import timetoolVue from '../timetool/timetool.vue';
         },
 
         methods: {
+            cardtimeRefresh(workdate){  // 考勤记录刷新
+            if (!workdate) return;
+            this.cardRefLoading = true;
+                this.$axios.post('/user-corpwx-time/getPunchRecordBySelf',{
+                    date: workdate
+                })
+                .then(res => {
+                    if(res.code == 'ok'){
+                        this.cardRefLoading = false;
+                        this.report.time = res.data.time;
+                    }else{
+                        this.cardRefLoading = false;
+                        this.$toast.fail('获取失败:'+res.msg);
+                    }
+                }).catch(err => {this.$toast.clear();this.cardRefLoading = false;})
+            },
             auditorClick(domainIndex,auditorIndex){
                 this.auditor.index = domainIndex
                 this.auditor.auditorIndex = auditorIndex
@@ -1825,6 +1855,7 @@ import timetoolVue from '../timetool/timetool.vue';
         },
         
         mounted() {
+            this.today = this.format(new Date(), 'yyyy-MM-dd')
             this.timeRange = []
             for(let i=0.5; i<=20; i+=0.5){
                 this.timeRange.push(i)
@@ -1888,10 +1919,11 @@ import timetoolVue from '../timetool/timetool.vue';
         position: relative;
     }
     .attendanceRecord{
-        position: absolute;
-        top: 0.26667rem;
-        right: 0.42667rem;
+        // position: absolute;
+        // top: 0.26667rem;
+        // right: 0.42667rem;
         color: #969799;
+        text-align: center;
         font-size: 0.35rem;
         line-height: 0.64rem;
     }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/details.vue

@@ -82,7 +82,7 @@
             <!-- 发票 -->
             <van-field label="发票" readonly>
                 <template #input
-                    >总费用:{{ totalCost | numtosum }}</template
+                    >总费用:{{ totalCost | numtosum }}</template
                 >
             </van-field>
             <div class="invoice" v-if="invoiceList.length != 0">

+ 33 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue

@@ -62,7 +62,7 @@
                 <van-field v-model="editForm.remark" label="备注" type="textarea"></van-field>
                 <!-- 发票 -->
                 <van-field label="发票" readonly>
-                    <template #input>总费用:{{totalCost | numtosum}}</template>
+                    <template #input>总费用:{{totalCost | numtosum}}</template>
                 </van-field>
                 <div class="invoice" v-if="invoiceList.length != 0">
                     <div v-for="item,index in invoiceList" :key="item.id" style="position:relative" :class="index == 0 ? '' : 'invoice_item'">
@@ -142,6 +142,9 @@
         <!-- #endregion -->
         <!-- 单据列表 -->
         <div class="list" v-if="active == 1">
+            <!-- <van-pull-refresh v-model="downLoading" @refresh="onDownRefresh">
+                <van-list v-model="uploading" :finished="upFinished" :immediate-check="false" :offset="100" finished-text="没有更多了" @load="onLoadList"></van-list>
+            </van-pull-refresh> -->
             <van-collapse v-model="activeName" accordion class="list_collapse">
                 <van-collapse-item v-for="item in billList" :key="item.id" title="标题1" :name="item.id">
                     <template #title>
@@ -188,8 +191,8 @@
                         <div class="collapse_label_l">金额: ¥{{item.totalAmount | numtosum}}</div>
                         <div class="collapse_label_r">状态:<span :class="statusClass[item.status]">{{statusList[item.status]}}</span></div>
                         <div class="operation">
-                            <van-button size="small" type="info" @click="approve(item.id)">通过</van-button>
-                            <van-button style="margin-left:15px" size="small" type="danger" @click="deny(item.id)">驳回</van-button>
+                            <van-button size="small" type="info" @click.stop="approve(item.id)">通过</van-button>
+                            <van-button style="margin-left:15px" size="small" type="danger" @click.stop="denyToReason(item.id)">驳回</van-button>
                         </div>
                     </template>
                     <div class="wrapper">
@@ -211,6 +214,13 @@
                     </div>
                 </van-collapse-item>
             </van-collapse>
+            <van-popup v-model="denyReasonDialog" position="bottom" closeable >
+                <van-cell>请输入原因</van-cell>
+                <van-field class="form_input"
+                    v-model="denyParm.denyReason" name="reason" type="textarea" placeholder="请输入您决定驳回的原因"
+                    rows="3" autosize  />
+                <van-button style="width:100%;" type="info" @click="deny()">提交</van-button>
+            </van-popup>
         </div>
     </div>
 </div>
@@ -279,9 +289,16 @@ export default {
             statusList: ['审核通过','待审核','已驳回','已撤销'],
             statusClass: ['','waiting','rejected',''],
 
+            uploading: false,
+
             // 单据审核
             auditName: '',
-            examineList: []
+            examineList: [],
+            denyReasonDialog: false,
+            denyParm: {
+                id: '',
+                denyReason: ''
+            }
 
         }
     },
@@ -320,6 +337,7 @@ export default {
         back(){
             sessionStorage.removeItem("page");
             history.back();
+            
         },
         formatDate(date) {
             let mon = date.getMonth() + 1
@@ -461,6 +479,11 @@ export default {
                                 type: 0,
                                 remark: ''
                             }
+                            this.formshowText = {
+                                name: '',
+                                inProjectName: []
+                            }
+                            this.totalCost = 0
                             this.invoiceList = []
                             this.uploader = []
                         } else {
@@ -511,8 +534,12 @@ export default {
                 }
             }).catch(err=> {this.$toast.clear();console.log(err)});
         },
-        deny(pid){
-            this.$axios.post("/expense-sheet/deny", {id: pid,denyReason:''})
+        denyToReason(pid){
+            this.denyParm.id = pid
+            this.denyReasonDialog = true
+        },
+        deny(){
+            this.$axios.post("/expense-sheet/deny", this.denyParm)
             .then(res => {
                 if(res.code == "ok") {
                     this.$toast.success('已驳回')

+ 20 - 18
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -41,22 +41,28 @@
         created() {
         },
         mounted() {
+            // 手机上看控制台
             // if(this.user.companyName == '比基尼小镇'){
-            //     let consoleScript = document.createElement("script");
-            //     consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
-            //     consoleScript.onload = function () {
-            //         new VConsole()
-            //     }
-            //     document.head.appendChild(consoleScript);
+                // let consoleScript = document.createElement("script");
+                // consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
+                // consoleScript.onload = function () {
+                //     new VConsole()
+                // }
+                // document.head.appendChild(consoleScript);
             // }
-            // console.log('userNameNeedTranslate',window.location.href);
+            var ua = navigator.userAgent.toLowerCase();
+            if (ua.indexOf("wxwork") > 0) {
+                this.isCorpWX = true;
+            } else if (ua.indexOf("micromessenger") > 0) {
+                this.isWX = true;
+            }
             let that = this
             if (localStorage.userInfo != null) {
                 that.getAccountInfo();
+            } else {
+                this.$router.push("/login");
             }
-            that.getModule()
-            that.getMessage();
-            that.bindIfNessary();
+           
         },
         components: {
             Footer
@@ -67,12 +73,6 @@
                 if(this.user.userNameNeedTranslate == '1'){
                     this.agentConfig()
                 }
-                var ua = navigator.userAgent.toLowerCase();
-                if (ua.indexOf("wxwork") > 0) {
-                    this.isCorpWX = true;
-                } else if (ua.indexOf("micromessenger") > 0) {
-                    this.isWX = true;
-                }
 
                 if (this.user.company.packageEngineering == 1) {
                     this.routers.push(
@@ -204,7 +204,7 @@
                 if(window.location.href.indexOf('errorMsg') != '-1') {
                     let err = window.location.href.split('errorMsg=')[1]
                     let str = err.split('#/')[0]
-                    this.$router.push("/error");
+                    this.$router.push("/login");
                 }
                 this.$axios.get('/user/loginByUserId', {params:{userId: userId}})
                 .then(res => {
@@ -214,9 +214,11 @@
                         //账号信息有问题,不能使用。
                         this.$router.push("/error");
                     } else {
-                        
                         localStorage.userInfo = JSON.stringify(res.data);
                         this.user = res.data;
+                        this.getModule()
+                        this.getMessage();
+                        this.bindIfNessary();
                     } 
                 }).catch(err=> {
                     alert('err=' + err);