Sfoglia il codice sorgente

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

cs 2 anni fa
parent
commit
3dd3a57b5d

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

@@ -1449,5 +1449,12 @@
   "dao-chu-jia-qi": "Export holidays",
   "an-ji-du-dao-chu": "export by quarter",
   "han-qing-jia": "(including leave)",
-  "ke-fu-wei-xin": "Customer service wechat"
+  "ke-fu-wei-xin": "Customer service wechat",
+  "bian-ji-mo-ban": "Edit a Template",
+  "mo-ban-ming-cheng": "Template Name",
+  "mo-ban-ming-cheng-bu-neng-wei-kong": "template name cannot be empty",
+  "ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian": "The task expiration time cannot be later than the start time",
+  "ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong": "The task list name cannot be empty",
+  "xin-zeng-ren-wu-lie-biao": "Adding a Task List",
+  "zan-wu-ren-wu": "No job at the moment"
 }

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

@@ -1449,5 +1449,12 @@
   "dao-chu-jia-qi": "导出假期",
   "an-ji-du-dao-chu": "按季度导出",
   "han-qing-jia": "(含请假)",
-  "ke-fu-wei-xin": "客服微信"
+  "ke-fu-wei-xin": "客服微信",
+  "zan-wu-ren-wu": "暂无任务",
+  "bian-ji-mo-ban": "编辑模板",
+  "mo-ban-ming-cheng": "模板名称",
+  "xin-zeng-ren-wu-lie-biao": "新增任务列表",
+  "mo-ban-ming-cheng-bu-neng-wei-kong": "模板名称不能为空",
+  "ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong": "任务列表名称不能为空",
+  "ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian": "任务截止时间不能小于开始时间"
 }

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -166,7 +166,7 @@
                             :value="item.id">
                             </el-option>
                         </el-select>
-                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIds" :clearable="true" :filterable="true" :distinction="'1'" :other="'1'" @selectCal="selectCal"></selectCat>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIds" :clearable="true" :filterable="false" :distinction="'1'" :other="'1'" @selectCal="selectCal"></selectCat>
                     </div>
                     <div><span style="color: #606266">{{ $t('traffictools') }}</span>
                         <el-select v-model="type" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="billss(1)" style="width: 140px;" size="small" filterable="true">
@@ -642,7 +642,7 @@
                     <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
                     </el-option>
                 </el-select>
-                <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIdsId" :distinction="'2'" :filterable="true" @selectCal="selectCal"></selectCat>
+                <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIdsId" :distinction="'2'" :filterable="false" @selectCal="selectCal"></selectCat>
             </div>
             <div class="dingdingtongbu" style="margin-top: 20px">
                 <span>{{ $t('message.period') }}</span>

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

@@ -629,7 +629,7 @@
                 <el-option :label="item.name" :value="item.id"></el-option>
                 </span>
             </el-select> -->
-            <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="addForm.ownerId" :disabled="true" :distinction="'4'" :filterable="true" @selectCal="selectCal"></selectCat>
+            <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="addForm.ownerId" :disabled="true" :distinction="'4'" :filterable="false" @selectCal="selectCal"></selectCat>
         </el-form-item>
         <!-- 电话 -->
         <el-form-item :label="$t('phone')" prop="tel" style="width: 300px;display: inline-block;">

+ 19 - 10
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -231,7 +231,7 @@
                                                     </div>
                                                 </draggable>
                                                 <el-button v-if="canAddTask" slot="footer" role="people" @click="addTask(stage)" style="width:300px;" size="small" icon="el-icon-plus"></el-button>
-                                                <el-label v-if="!canAddTask && (stage.taskList.length == 0)" style="width:300px;color:#666;">暂无任务</el-label>
+                                                <el-label v-if="!canAddTask && (stage.taskList.length == 0)" style="width:300px;color:#666;">{{ $t('zan-wu-ren-wu') }}</el-label>
                                             </div>
                                         </v-flex>
                                     <!-- </transition-group > -->
@@ -930,20 +930,20 @@
                 </el-tab-pane>
                 </el-tabs>
             </div>
-            <el-dialog title="编辑模板" append-to-body v-if="setTemplateDialog" :visible.sync="setTemplateDialog" width="500px">
+            <el-dialog :title="$t('bian-ji-mo-ban')" append-to-body v-if="setTemplateDialog" :visible.sync="setTemplateDialog" width="500px">
                 <el-form label-width="20%">
-                    <el-form-item label="模板名称"><el-input v-model="setTemplateData.name" style="width:80%" clearable></el-input></el-form-item>
-                    <el-form-item label=""><el-checkbox v-model="setTemplateData.creWithPro">随项目自动创建</el-checkbox></el-form-item>
+                    <el-form-item :label="$t('mo-ban-ming-cheng')"><el-input v-model="setTemplateData.name" style="width:80%" clearable></el-input></el-form-item>
+                    <el-form-item label=""><el-checkbox v-model="setTemplateData.creWithPro">{{ $t('suixiangmuzidongchuangjian') }}</el-checkbox></el-form-item>
                     <el-form-item v-for="item,index in setTemplateData.stagesList" :key="item.id" :label="index == 0 ? '任务列表' : ''">
                         <el-input v-model="item.stagesName"  style="width:70%" clearable></el-input>
                         <el-link :underline="false" type="primary" style="color:#aaa;" @click="deleteStages(item,index)"  v-if="index != 0">
                             <i class="el-icon-delete"></i>
                         </el-link>
                     </el-form-item>
-                    <el-link style="margin-left:20%" :underline="false" type="primary" @click="addStages()">新增任务列表</el-link>
+                    <el-link style="margin-left:20%" :underline="false" type="primary" @click="addStages()">{{ $t('xin-zeng-ren-wu-lie-biao') }}</el-link>
                 </el-form>
                 <div slot="footer" class="dialog-footer">
-                    <el-button type="primary" @click="setTemplateDialog = false">取消</el-button>
+                    <el-button type="primary" @click="setTemplateDialog = false">{{ $t('btn.cancel') }}</el-button>
                     <el-button type="primary" @click="setTemplateSave()">{{ $t('save') }}</el-button>
                 </div>
             </el-dialog>
@@ -1769,7 +1769,7 @@
             setTemplateSave(){
                 if(this.setTemplateData.name == '' || this.setTemplateData.name == null){
                     this.$message({
-                        message: '模板名称不能为空',
+                        message: this.$t('mo-ban-ming-cheng-bu-neng-wei-kong'),
                         type: 'error'
                     })
                     return
@@ -1777,7 +1777,7 @@
                 for(let i in this.setTemplateData.stagesList){
                     if(this.setTemplateData.stagesList[i].stagesName == '' || this.setTemplateData.stagesList[i].stagesName == null){
                         this.$message({
-                            message: '任务列表名称不能为空',
+                            message: this.$t('ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong'),
                             type: 'error'
                         })
                         return
@@ -1787,7 +1787,7 @@
                 res => {
                     if(res.code == 'ok'){
                         this.$message({
-                            message: '修改成功',
+                            message: this.$t('message.modifyTheSuccess'),
                             type: 'success'
                         })
                         this.getGroupTemplate()
@@ -3193,7 +3193,16 @@
                         });
                     }
                 }
-
+                if(this.addForm.startDate && this.addForm.endDate) {
+                    if(this.addForm.endDate < this.addForm.startDate) {
+                        return this.$message({
+                            showClose: true,
+                            message: this.$t('ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian'),
+                            type: 'error'
+                        });
+                    }
+                }
+                
                 this.$refs.form1.validate(valid => {
                     if (valid) {
                         delete this.addForm.subTaskList;

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

@@ -485,7 +485,7 @@
                                 </el-option>
                             </el-select>
 
-                            <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="domain.projectAuditorId ? true : false" :flgs="true" @selectCatCli="selectCatCli"></selectCat>
+                            <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="domain.projectAuditorId ? true : false" :flgs="true" @selectCatCli="selectCatCli" :disabled="!domain.canEdit"></selectCat>
 
                         </el-form-item>
                         <!-- 111111 -->
@@ -848,7 +848,7 @@
         </el-dialog>
 
         <!-- 按周填报弹窗 -->
-        <el-dialog :title="$t('defaultText.pleaseFillOut')" :visible.sync="tianxieDialogVisible" width="30%" :before-close="handleClose">
+        <el-dialog :title="$t('defaultText.pleaseFillOut')" :visible.sync="tianxieDialogVisible" width="500px" :before-close="handleClose">
             <div>
                 <div class="zhoFel" v-if="zhoBao.subProjectList != null && zhoBao.subProjectList.length > 0 && user.timeType.mainProjectState != 1">
                     <p>{{$t('lable.subproject')}}</p>
@@ -879,36 +879,42 @@
                 </div>
                 <div class="zhoFel" v-if="user.timeType.reportAuditType != 3">
                     <p>{{$t('other.reviewer')}}</p>
-                    <el-select v-model="zhoBao.projectAuditorId" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
+                    <el-select v-model="zhoBao.projectAuditorId" v-if="user.userNameNeedTranslate != 1" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
                         <el-option v-for="item in zhoBao.auditUserList" :key="item.id" :label="item.auditorName" :value="item.auditorId"></el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'355'" :subject="zhoBao.auditUserList" :subjectId="zhoBao.projectAuditorId" :distinction="'1'" @selectCal="selectCal"></selectCat>
                 </div>
 
                 <template v-if="user.timeType.reportAuditType == 3">
                     <div class="zhoFel">
                         <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-select v-model="zhoBao.auditorFirst" v-if="user.userNameNeedTranslate != 1" :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>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'355'" :subject="allUsersList" :subjectId="zhoBao.auditorFirst" :distinction="'2'" @selectCal="selectCal"></selectCat>
                     </div>
                     <div class="zhoFel">
                         <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-select v-model="zhoBao.auditorSec" v-if="user.userNameNeedTranslate != 1" :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>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'355'" :subject="allUsersList" :subjectId="zhoBao.auditorSec" :distinction="'3'" @selectCal="selectCal"></selectCat>
                     </div>
                     <div class="zhoFel">
                         <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-select v-model="zhoBao.auditorThird" v-if="user.userNameNeedTranslate != 1" :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>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'355'" :subject="allUsersList" :subjectId="zhoBao.auditorThird" :distinction="'4'" @selectCal="selectCal"></selectCat>
                     </div>
 
                     <div class="zhoFel">
                         <p>{{ $t('chao-song-ren') }}</p>
-                        <el-select v-model="zhoBao.ccUserid" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
+                        <el-select v-model="zhoBao.ccUserid" v-if="user.userNameNeedTranslate != 1" :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>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :widthStr="'355'" :subject="allUsersList" :subjectId="zhoBao.ccUserid" :distinction="'5'" @selectCal="selectCal"></selectCat>
                     </div>
                 </template>
 
@@ -6296,6 +6302,20 @@
             },
             ]);
         },
+        // 自定义事件
+        selectCal(obj) {
+            if(obj.distinction == '1') {
+                this.zhoBao.projectAuditorId = obj.id
+            } else if(obj.distinction == '2') {
+                this.zhoBao.auditorFirst = obj.id
+            } else if(obj.distinction == '3') {
+                this.zhoBao.auditorSec = obj.id
+            } else if(obj.distinction == '4') {
+                this.zhoBao.auditorThird = obj.id
+            } else if(obj.distinction == '5') {
+                this.zhoBao.ccUserid = obj.id
+            }
+        }
     };
 </script>
 

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -13,7 +13,7 @@
         <!-- 主体 -->
         <main class="mt-10">
             <div class="bg-fff">
-                <van-cell title="账号" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
+                <van-cell title="账号" v-if="userInfo.userNameNeedTranslate != '1'" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
                 <van-cell title="工号" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
                 <van-cell title="公司" :title-style="'flex: 0.5;'" :value="userInfo.companyName"></van-cell>
                 <!-- <van-cell title="修改密码" isLink to="/my/set"></van-cell> -->

+ 11 - 10
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -349,7 +349,7 @@
                 });
             },
             onDownRefresh() {
-                console.log(123)
+                // console.log(123)
                 this.dpp = true
                 this.pageIndex = 1
                 this.upFinished = false // 不写这句会导致你上拉到底过后在下拉刷新将不能触发下拉加载事件
@@ -366,12 +366,12 @@
                 this.getProject()
             },
 
-            onRefresh() {
-                this.finished = false;
-                this.loading = true;
-                this.page = 1;
-                this.getProject();
-            },
+            // onRefresh() {
+            //     this.finished = false;
+            //     this.loading = true;
+            //     this.page = 1;
+            //     this.getProject();
+            // },
 
             // 新增、编辑项目
             openDialog(i) {
@@ -459,9 +459,10 @@
                         if(res.code == "ok") {    
                             this.$toast.clear();
                             this.$toast.success(this.form.id==null?'新增成功':'修改成功');
-                            this.list = [];
-                            this.page = 1;
-                            this.getProject();
+                            // this.list = [];
+                            // this.page = 1;
+                            this.onDownRefresh();
+                            // this.getProject();
                             this.yanjiuzx()
                         } else {
                             this.$toast.clear();