Prechádzať zdrojové kódy

2022.10.13 移动端新建任务调整,自选审核人校验调整

ggooalice 2 rokov pred
rodič
commit
d6506cdb07

+ 20 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -230,6 +230,7 @@
             </el-form-item>
 
             <el-form-item style="float:right;margin-right:20px;" v-if="permissions.financialShare">
+                <el-link type="primary" :underline="false" @click="uploadTest()" v-if="user.companyId == 936" style="margin-right:10px">上传</el-link>
                 <el-link type="primary" :underline="false" @click="exportFinanceDialog=true">{{ $t('ExportingtheAllocationData') }}</el-link>
             </el-form-item>
             
@@ -646,6 +647,25 @@ import { error } from 'dingtalk-jsapi';
             };
         },
         methods: {
+            uploadTest(){
+                this.http.post('/report/uploadThirdReportData',{
+                    yearMonth: this.date
+                },res => {
+                    if(res.code == 'ok'){
+
+                    }else{
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: er,
+                        type: 'error'
+                    })
+                })
+            },
             chosenProjectsCheckedClick() {
                 console.log(this.chosenProjects, '数据')
                 if(this.chosenProjectsChecked) {

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

@@ -3172,7 +3172,7 @@
                         });
                     });
                 //检查当前的项目是否需要获取分组的负责人
-                if (this.user.timeType.reportAuditType >= 1) {
+                if (this.user.timeType.reportAuditType >= 1 && this.user.timeType.reportAuditType != 3) {
                     this.http.post("/task-group/getGroupIncharger", {groupId: domain.groupId},
                         res => {
                             if (res.code == "ok") {
@@ -4384,12 +4384,12 @@
                 if(this.user.timeType.reportAuditType == 3){
                     let auditTips = ''
                     if(!this.zhoBao.auditorFirst){ auditTips += '第一、' }
-                    if(!this.zhoBao.auditorSec && this.user.timeType.auditLevel > 1){ auditTips += '第二、' }
-                    if(!this.zhoBao.auditorThird && this.user.timeType.auditLevel > 2){ auditTips += '第三、' }
+                    // 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: '请选择' + auditTips + '审核人',
                             type: 'warning'
                         })
                         return
@@ -5531,11 +5531,11 @@
                                     audItem.auditorFirst = this.workForm.domains[i].auditorFirst
                                 }
                                 if(this.user.timeType.auditLevel > 1){
-                                    if(!this.workForm.domains[i].auditorSec){ auditRule += '第二、' }
+                                    // if(!this.workForm.domains[i].auditorSec){ auditRule += '第二、' }
                                     audItem.auditorSec = this.workForm.domains[i].auditorSec
                                 }
                                 if(this.user.timeType.auditLevel > 2){
-                                    if(!this.workForm.domains[i].auditorThird){ auditRule += '第三、' }
+                                    // if(!this.workForm.domains[i].auditorThird){ auditRule += '第三、' }
                                     audItem.auditorThird = this.workForm.domains[i].auditorThird
                                 }
                                 if(this.workForm.domains[i].ccUserid){
@@ -5544,7 +5544,7 @@
                                 if(auditRule){
                                     auditRule = auditRule.substring(0,auditRule.length - 1)
                                     this.$message({
-                                        message: '请指定[' + auditRule + ']审核人',
+                                        message: '请指定' + auditRule + '审核人',
                                         type: 'error'
                                     })
                                     return
@@ -5714,7 +5714,7 @@
                                         type: "error"
                                     });
                                     return;
-                                } else if(this.user.timeType.reportAuditType != 3){
+                                } else if(this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2){
                                     //分组负责人先审核, 确定是选择了任务分组
                                     if (this.workForm.domains[i].taskGroups.length == 0) {
                                         this.$message({

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

@@ -1542,11 +1542,11 @@ import timetoolVue from '../timetool/timetool.vue';
                                 audItem.auditorFirst = this.form.domains[i].auditorFirst.id
                             }
                             if(this.user.timeType.auditLevel > 1){
-                                if(!this.form.domains[i].auditorSec.id){ auditRule += '第二、' }
+                                // if(!this.form.domains[i].auditorSec.id){ auditRule += '第二、' }
                                 audItem.auditorSec = this.form.domains[i].auditorSec.id
                             }
                             if(this.user.timeType.auditLevel > 2){
-                                if(!this.form.domains[i].auditorThird.id){ auditRule += '第三、' }
+                                // if(!this.form.domains[i].auditorThird.id){ auditRule += '第三、' }
                                 audItem.auditorThird = this.form.domains[i].auditorThird.id
                             }
                             if(this.form.domains[i].ccUserid.id){
@@ -1554,7 +1554,7 @@ import timetoolVue from '../timetool/timetool.vue';
                             }
                             if(auditRule){
                                 auditRule = auditRule.substring(0,auditRule.length - 1)
-                                this.$toast.fail('请指定[' + auditRule + ']审核人')
+                                this.$toast.fail('请指定' + auditRule + '审核人')
                                 return
                             }
                             formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
@@ -1709,7 +1709,7 @@ import timetoolVue from '../timetool/timetool.vue';
                         } else {
                             if (this.user.timeType.reportAuditType == 0) {
                                 this.$toast.fail("请指定["+this.form.domains[i].projectName+']项目的审核人');
-                            } else {
+                            } else if(this.user.timeType.reportAuditType == 1 || this.user.timeType.reportAuditType == 2){
                                 if (this.form.domains[i].taskGroups.length == 0) {
                                     this.$toast.fail("您在["+this.form.domains[i].projectName+"]项目上尚无参与的任务分组");
                                 } else if (!this.form.domains[i].groupId) {

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -1624,11 +1624,11 @@
                                 audItem.auditorFirst = this.form[formIndex].domains[i].auditorFirst.id
                             }
                             if(this.user.timeType.auditLevel > 1){
-                                if(!this.form[formIndex].domains[i].auditorSec.id){ auditRule += '第二、' }
+                                // if(!this.form[formIndex].domains[i].auditorSec.id){ auditRule += '第二、' }
                                 audItem.auditorSec = this.form[formIndex].domains[i].auditorSec.id
                             }
                             if(this.user.timeType.auditLevel > 2){
-                                if(!this.form[formIndex].domains[i].auditorThird.id){ auditRule += '第三、' }
+                                // if(!this.form[formIndex].domains[i].auditorThird.id){ auditRule += '第三、' }
                                 audItem.auditorThird = this.form[formIndex].domains[i].auditorThird.id
                             }
                             if(this.form[formIndex].domains[i].ccUserid.id){
@@ -1636,7 +1636,7 @@
                             }
                             if(auditRule){
                                 auditRule = auditRule.substring(0,auditRule.length - 1)
-                                this.$toast.fail('请指定' + this.weekArr[formIndex] + '的[' + auditRule + ']审核人')
+                                this.$toast.fail('请指定' + this.weekArr[formIndex] + '的' + auditRule + '审核人')
                                 return
                             }
                             formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
@@ -1783,7 +1783,7 @@
                         //审核人
                         if (this.form[formIndex].domains[i].projectAuditorId) {
                             formData.append("projectAuditorId", this.form[formIndex].domains[i].projectAuditorId);
-                        } else {
+                        } else if(this.user.timeType.reportAuditType == 0){
                             this.$toast.fail('请选择'+this.weekArr[formIndex]+'投入项目的审核人');
                             return;
                         }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -81,7 +81,7 @@
                     this.routers.push({
                         name: '待办任务',
                         url: '/task',
-                        icon: 'todo-list-o'
+                        icon: 'coupon-o'
                     });
                 }
                 if(list[i].name == '项目报告审核') {

+ 28 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue

@@ -30,9 +30,10 @@
                             </template>
                         </van-picker>
                     </van-popup>
-                    <van-cell value-class="addtaskvalue">
+                    <!-- <van-cell value-class="addtaskvalue">
                         <van-button plain type="info" class="addtaskbutton" @click="toEditask(null)">新建任务</van-button>
-                    </van-cell>
+                    </van-cell> -->
+                    <van-icon name="add-o" class="addtaskicon" @click="toEditask(null)" />
                     <div class="taskList">
                         <van-cell v-for="item in inside.taskList" :key="item.id">
                             <div style="line-height:0.8rem">任务名称:{{item.name}}</div>
@@ -42,6 +43,8 @@
                             </div>
                             <div class="task_button">
                                 <van-button size="small" type="info" @click="toEditask(item.id)">编辑</van-button>
+                                <van-button size="small" type="primary" @click="taskStatus(item.id,0,item)" v-if="item.taskStatus == 0">完成</van-button>
+                                <van-button size="small" color="#e6a23c" @click="taskStatus(item.id,1,item)" v-if="item.taskStatus == 1">重启</van-button>
                             </div>
                         </van-cell>
                     </div>
@@ -302,6 +305,19 @@ export default {
             sessionStorage.setItem('taskId',JSON.stringify(item))
             this.$router.push("/editask");
         },
+        taskStatus(taskid,status,taskitem){          // 改变任务状态
+            this.$axios.post("/task/finish", {
+                id: taskid,
+                taskStatus: status
+            }).then(res => {
+                if(res.code == "ok") {
+                    this.$toast.success('操作成功');
+                    taskitem.taskStatus = status ? 0 : 1
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
         
         
 
@@ -383,6 +399,16 @@ export default {
             height: 30px;
         }
     }
+    .addtaskicon{
+        position: fixed;
+        z-index: 1000;
+        font-size: 50px;
+        color: #1989fa;
+        background-color: #fff;
+        border-radius: 50%;
+        bottom: 33px;
+        right: 33px;
+    }
     .task_button{
         padding-top: .09rem;
         text-align: right;