Lijy 2 vuotta sitten
vanhempi
commit
15b1d5f3cf

+ 16 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1402,5 +1402,20 @@
   "biao-zhun-gong-shi": "Standard working hours",
   "qing-jia-gong-shi": "Off hours",
   "shi-fou-man-zu-gong-shi": "Whether the working hours are met",
-  "fu-wu-xiang-mu": "service project"
+  "fu-wu-xiang-mu": "service project",
+  "zhang-hao-shou-ji-hao": "Account number/mobile number",
+  "mi-ma": "password",
+  "login": "login",
+  "lian-xi-ke-fu": "Contact customer service",
+  "qi-ye-zhu-ce": "Enterprise registration",
+  "sao-ma-jia-ke-fu-wei-xin": "Scan the code to add customer service wechat",
+  "shi-yong-shuo-ming": "instructions",
+  "qing-lian-xi-guan-li-yuan-wei": "Contact the administrator for",
+  "di-yi-shen-he-ren": "Adjudicator of first instance",
+  "di-er-shen-he-ren": "The second auditor",
+  "di-san-shen-he-ren": "Third Auditor",
+  "chao-song-ren": "carbon copy",
+  "wu-kao-qin-ji-lu-bu-ke-tian-bao": "No attendance record is allowed",
+  "di-yi": "The first",
+  "qing-zhi-ding": "Please specify"
 }

+ 16 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1402,5 +1402,20 @@
   "biao-zhun-gong-shi": "标准工时",
   "qing-jia-gong-shi": "请假工时",
   "shi-fou-man-zu-gong-shi": "是否满足工时",
-  "fu-wu-xiang-mu": "服务项目"
+  "fu-wu-xiang-mu": "服务项目",
+  "zhang-hao-shou-ji-hao": "账号/手机号",
+  "mi-ma": "密码",
+  "login": "登录",
+  "lian-xi-ke-fu": "联系客服",
+  "sao-ma-jia-ke-fu-wei-xin": "扫码加客服微信",
+  "shi-yong-shuo-ming": "使用说明",
+  "qi-ye-zhu-ce": "企业注册",
+  "qing-lian-xi-guan-li-yuan-wei": "请联系管理员为",
+  "di-yi-shen-he-ren": "第一审核人",
+  "di-er-shen-he-ren": "第二审核人",
+  "di-san-shen-he-ren": "第三审核人",
+  "chao-song-ren": "抄送人",
+  "wu-kao-qin-ji-lu-bu-ke-tian-bao": "无考勤记录不可填报",
+  "di-yi": "第一、",
+  "qing-zhi-ding": "请指定"
 }

+ 13 - 14
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -5,32 +5,31 @@
                 <div class="login-logo">
                     <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
                 </div>
-                <h3 class="title">工时管家</h3>
+                <h3 class="title">{{ $t('workingHoursHousekeeper') }}</h3>
                 <el-form-item class="login-input" prop="username">
-                    <el-input type="text" v-model="ruleForm.username" autocomplete="off" placeholder="账号/手机号" clearable prefix-icon="el-icon-user-solid"></el-input>
+                    <el-input type="text" v-model="ruleForm.username" autocomplete="off" :placeholder="$t('zhang-hao-shou-ji-hao')" clearable prefix-icon="el-icon-user-solid"></el-input>
                 </el-form-item>
                 <el-form-item class="login-input" prop="password">
-                    <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" placeholder="密码" show-password prefix-icon="el-icon-lock"></el-input>
+                    <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" :placeholder="$t('mi-ma')" show-password prefix-icon="el-icon-lock"></el-input>
                 </el-form-item>
                 <el-form-item class="login-button" style="width:100%;">
-                    <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">登录</el-button>
+                    <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
                 </el-form-item>
                 <div class="toRegister">
-                    <el-link type="primary" class="btn" style="float:left;" :underline="false">联系客服
+                    <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
                         <div class="service">
-                            <p style="color: #333">扫码加客服微信</p>
+                            <p style="color: #333">{{ $t('sao-ma-jia-ke-fu-wei-xin') }}</p>
                             <img src="../assets/image/code.jpg">
                             <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
                         </div>
                     </el-link>
                     <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
-                        使用说明
-                    </el-link>
-                    <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">企业注册</el-link>
+                        {{ $t('shi-yong-shuo-ming') }} </el-link>
+                    <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">{{ $t('qi-ye-zhu-ce') }}</el-link>
                 </div>
             </el-form>
         </div>
-        <el-dialog title="使用说明" :visible.sync="dialogVisible" width="500px">
+        <el-dialog :title="$t('shi-yong-shuo-ming')" :visible.sync="dialogVisible" width="500px">
             <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_基础版.docx" download="工时管家使用说明_基础版.docx" 
                         target="_blank">工时管家使用说明_基础版.docx</a></p>
             <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目管理专业版.docx" download="工时管家使用说明_项目管理专业版.docx" 
@@ -61,8 +60,8 @@
                     password: ''
                 },
                 rules: {
-                    username: [{ required: true, message: '请输入账号/手机号', trigger: 'blur' },],
-                    password: [{ required: true, message: '请输入密码', trigger: 'blur' },]
+                    username: [{ required: true, message: this.$t('peaseenterthe'), trigger: 'blur' },],
+                    password: [{ required: true, message: this.$t('peaseenterthe'), trigger: 'blur' },]
                 }
             };
         },
@@ -273,7 +272,7 @@
                                 console.log('执行')
                                 if(res.data.moduleList.length == 0){
                                     this.$message({
-                                        message: '请联系管理员为\u3000' + res.data.roleName + '\u3000分配权限',
+                                        message: this.$t('qing-lian-xi-guan-li-yuan-wei')+'\u3000' + res.data.roleName + '\u3000'+this.$t('assignpermissions'),
                                         type: 'error'
                                     })
                                     return
@@ -318,7 +317,7 @@
                     if (res.code == "ok") {
                         if(res.data.moduleList.length == 0){
                             this.$message({
-                                message: '请联系管理员为\u3000' + res.data.roleName + '\u3000分配权限',
+                                message: this.$t('qing-lian-xi-guan-li-yuan-wei')+'\u3000' + res.data.roleName + '\u3000'+this.$t('assignpermissions'),
                                 type: 'error'
                             })
                             return

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

@@ -86,7 +86,7 @@
           </el-option>
         </el-select>
         <!-- 月份选择 -->
-        <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" placeholder="选择月份" @change="selcts()" size="small"></el-date-picker>
+        <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" :placeholder="$t('Selectmonth')" @change="selcts()" size="small"></el-date-picker>
           
           <!-- 部门筛选 -->
           <el-cascader v-if="((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
@@ -103,6 +103,12 @@
             </el-option>
           </el-select>
 
+          <!-- 是否满足工时 -->
+          <el-select v-if="ins == 14" v-model="whether" :placeholder="$t('shi-fou-man-zu-gong-shi')" @change="selcts()" clearable filterable size="small" style="margin-left:10px;width:150px">
+            <el-option :label="$t('state.no')" value="0"></el-option>
+            <el-option :label="$t('state.yes')" value="1"></el-option>
+          </el-select>
+
           <!-- 人员筛选 -->
           <el-select v-if="(ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 14)  && user.userNameNeedTranslate != '1'" v-model="userId" :placeholder="$t('pleaseselectpersonnel')" @change="selcts()" clearable filterable size="small" style="margin-left:10px;width:150px">
             <el-option v-for="(item, index) in selUserList" :key="index" :label="item.name" :value="item.id"></el-option>
@@ -1058,7 +1064,7 @@ export default {
             rs = s.length;  
             s += '.';  
         }  
-        while (s.length <= rs + 2) {  
+        while (s.length <= rs + 1) {  
             s += '0';  
         }  
         return s;  
@@ -1399,7 +1405,8 @@ export default {
           url += "/exportEmpMonthHours"
           sl.userId= this.userId,
           sl.departmentId = this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
-          sl.month = this.monthPersonnel + '-01'
+          sl.month = this.monthPersonnel + '-01',
+          sl.whether = this.whether
         }
           this.http.post(url, sl,
             res => {
@@ -1578,7 +1585,8 @@ export default {
         userId: this.userId,
         departmentId: this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
         // departmentId: '',
-        month: this.monthPersonnel + '-01'
+        month: this.monthPersonnel + '-01',
+        whether: this.whether
       }
       this.listLoading = true
       this.http.post('/project/getEmpMonthHours',parameter,
@@ -2149,6 +2157,7 @@ export default {
         return  _this.gettime
     },
     selcts(e) {
+      this.page = 1
       if(this.ins == 12){
         this.groupWorktimeList.right = []
         this.getGroupWorktimeList()

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

@@ -7,7 +7,7 @@
                     <div class="jjk" style="display:inline-block;position:absolute;top:15px;background:#fff;left:0px;z-index: 10;margin-top: -10px;padding-top: 10px;height: 42px;">
                             <el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
                             style="width:190px;"
-                            @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份" :picker-options="getPickerOptions"></el-date-picker>
+                            @change="changeMonthOut" :clearable="false" type="month" :placeholder="$t('Selectmonth')" :picker-options="getPickerOptions"></el-date-picker>
                             <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini"  @click="showWorkTime"></el-button>
                         </div>
                     <div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
@@ -31,7 +31,7 @@
                             
                             </div> -->
                             <div style="width: 100%;box-sizing: border-box;padding-right: 10px;">
-                                <el-input placeholder="请输入姓名" v-if="user.userNameNeedTranslate != 1" size="small" v-model="seluserText" style="width:100%;margin-bottom:10px" clearable>
+                                <el-input :placeholder="$t('defaultText.PleaseEnterYourName')" v-if="user.userNameNeedTranslate != 1" size="small" v-model="seluserText" style="width:100%;margin-bottom:10px" clearable>
                                     <el-button slot="append" icon="el-icon-search" @click="seluserforText()"></el-button>
                                 </el-input>
                                 <el-select v-model="selectState" size="small" @change="stateChange" style="width:100%">
@@ -287,7 +287,7 @@
                                                     <p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
                                                     </div>
                                                     <div v-if="item2.multiWorktime==1" >
-                                                        <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h  <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">加班<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
+                                                        <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h  <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{ $t('other.WorkOvertime') }}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
                                                         <div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
                                                             style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
                                                             <p style="display: inline-block;">{{$t('time.duration')}}:
@@ -486,25 +486,25 @@
                     </el-form-item>
                     <!-- 111111 -->
                     <el-form-item :label="$t('other.reviewer')" v-if="user.timeType.reportAuditType == 3">
-                        <el-select v-model="domain.auditorFirst" placeholder="第一审核人" :disabled="!domain.canEdit" style="width:200px;">
+                        <el-select v-model="domain.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
 
                         <template v-if="user.timeType.auditLevel > 1">
                             <i class="el-icon-right"></i>
-                            <el-select v-model="domain.auditorSec" placeholder="第二审核人" :disabled="!domain.canEdit" style="width:200px;">
+                            <el-select v-model="domain.auditorSec" :placeholder="$t('di-er-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                                 <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                             </el-select>
                         </template>
 
                         <template v-if="user.timeType.auditLevel > 2">
                             <i class="el-icon-right"></i>
-                            <el-select v-model="domain.auditorThird" placeholder="第三审核人" :disabled="!domain.canEdit" style="width:200px;">
+                            <el-select v-model="domain.auditorThird" :placeholder="$t('di-san-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
                                 <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                             </el-select>
                         </template>
                     </el-form-item>
-                    <el-form-item label="抄送人" v-if="user.timeType.reportAuditType == 3">
+                    <el-form-item :label="$t('chao-song-ren')" v-if="user.timeType.reportAuditType == 3">
                         <el-select v-model="domain.ccUserid" clearable :disabled="!domain.canEdit" style="width:200px;">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
@@ -880,26 +880,26 @@
 
                 <template v-if="user.timeType.reportAuditType == 3">
                     <div class="zhoFel">
-                        <p>第一审核人</p>
-                        <el-select v-model="zhoBao.auditorFirst" placeholder="第一审核人" style="width: 355px">
+                        <p>{{ $t('di-yi-shen-he-ren') }}</p>
+                        <el-select v-model="zhoBao.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" style="width: 355px">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
                     </div>
                     <div class="zhoFel">
-                        <p>第二审核人</p>
-                        <el-select v-model="zhoBao.auditorSec" placeholder="第二审核人" style="width: 355px">
+                        <p>{{ $t('di-er-shen-he-ren') }}</p>
+                        <el-select v-model="zhoBao.auditorSec" :placeholder="$t('di-er-shen-he-ren')" style="width: 355px">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
                     </div>
                     <div class="zhoFel">
-                        <p>第三审核人</p>
-                        <el-select v-model="zhoBao.auditorThird" placeholder="第三审核人" style="width: 355px">
+                        <p>{{ $t('di-san-shen-he-ren') }}</p>
+                        <el-select v-model="zhoBao.auditorThird" :placeholder="$t('di-san-shen-he-ren')" style="width: 355px">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
                     </div>
 
                     <div class="zhoFel">
-                        <p>抄送人</p>
+                        <p>{{ $t('chao-song-ren') }}</p>
                         <el-select v-model="zhoBao.ccUserid" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
                             <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                         </el-select>
@@ -1921,6 +1921,29 @@
             },
             
         },
+        mounted() {
+            var now = new Date();
+            var t = util.formatDate.format(now, 'yyyy-MM-dd');
+            var startStr = util.formatDate.format(new Date(), 'yyyy-MM') + "-01";
+            this.exportParam.dateRange = [startStr,t];
+            this.getAllDate(1);
+            this.getReportList();
+            this.getProjectList();
+            this.getFillProjectList();
+            this.getTimeType();
+            this.getDepartment();
+            this.scrollFunction()
+            this.userssHu();
+            if(this.user.timeType.reportAuditType == 3){
+                this.getAllUsersList()
+            }
+            if (this.user.company.packageProject == 1) {
+                this.getBasecostItemList();
+            }
+            if(this.user.timeType.lockWorktime){
+                this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
+            }
+        },
         methods: {
             test(){
                 // console.log('test',this.depData,this.data[0].membCount,this.reportList.length);
@@ -4444,14 +4467,14 @@
                     if(this.zhoData[i].corpTime){
                         if(this.zhoData[i].corpTime.workHours == 0){
                             this.$message({
-                                message: '无考勤记录不可填报',
+                                message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
                                 type: 'error'
                             })
                             return
                         }
                     }else{
                         this.$message({
-                            message: '无考勤记录不可填报',
+                            message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
                             type: 'error'
                         })
                         return
@@ -4532,13 +4555,13 @@
                 }
                 if(this.user.timeType.reportAuditType == 3){
                     let auditTips = ''
-                    if(!this.zhoBao.auditorFirst){ auditTips += '第一、' }
+                    if(!this.zhoBao.auditorFirst){ auditTips += this.$t('di-yi') }
                     // if(!this.zhoBao.auditorSec && this.user.timeType.auditLevel > 1){ auditTips += '第二、' }
                     // if(!this.zhoBao.auditorThird && this.user.timeType.auditLevel > 2){ auditTips += '第三、' }
                     if(auditTips){
                         auditTips = auditTips.substring(0,auditTips.length - 1)
                         this.$message({
-                            message: '请选择' + auditTips + '审核人',
+                            message: this.$t('defaultText.pleaseChoose') + auditTips + this.$t('other.reviewer'),
                             type: 'warning'
                         })
                         return
@@ -5664,14 +5687,14 @@
                             if (this.workForm.time){
                                 if (this.workForm.time.workHours == 0){
                                     this.$message({
-                                        message: '无考勤记录不可填报',
+                                        message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
                                         type: 'error'
                                     })
                                     return
                                 }
                             }else{
                                 this.$message({
-                                    message: '无考勤记录不可填报',
+                                    message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
                                     type: 'error'
                                 })
                                 return
@@ -5695,7 +5718,7 @@
                                     audItem.reportId = this.workForm.domains[i].id
                                 }
                                 if(this.user.timeType.auditLevel > 0){
-                                    if(!this.workForm.domains[i].auditorFirst){ auditRule += '第一、' }
+                                    if(!this.workForm.domains[i].auditorFirst){ auditRule += this.$t('di-yi') }
                                     audItem.auditorFirst = this.workForm.domains[i].auditorFirst
                                 }
                                 if(this.user.timeType.auditLevel > 1){
@@ -5712,7 +5735,7 @@
                                 if(auditRule){
                                     auditRule = auditRule.substring(0,auditRule.length - 1)
                                     this.$message({
-                                        message: '请指定' + auditRule + '审核人',
+                                        message: this.$t('qing-zhi-ding') + auditRule + this.$t('other.reviewer'),
                                         type: 'error'
                                     })
                                     return
@@ -6058,7 +6081,7 @@
                     this.logining = false;
                     if (res.code == "ok") {
                         this.$message({
-                            message: this.denyForm.i==0?"驳回成功":"撤销成功",
+                            message: this.denyForm.i==0?this.$t('message.rejectedsuccessfully'):this.$t('Revocationofsuccess'),
                             type: "success"
                         });
                         this.getReportList();
@@ -6191,29 +6214,6 @@
             },
             ]);
         },
-        mounted() {
-            var now = new Date();
-            var t = util.formatDate.format(now, 'yyyy-MM-dd');
-            var startStr = util.formatDate.format(new Date(), 'yyyy-MM') + "-01";
-            this.exportParam.dateRange = [startStr,t];
-            this.getAllDate(1);
-            this.getReportList();
-            this.getProjectList();
-            this.getFillProjectList();
-            this.getTimeType();
-            this.getDepartment();
-            this.scrollFunction()
-            this.userssHu();
-            if(this.user.timeType.reportAuditType == 3){
-                this.getAllUsersList()
-            }
-            if (this.user.company.packageProject == 1) {
-                this.getBasecostItemList();
-            }
-            if(this.user.timeType.lockWorktime){
-                this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
-            }
-        }
     };
 </script>