Forráskód Böngészése

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

seyason 2 éve
szülő
commit
e343dc83f4

+ 15 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -2700,7 +2700,7 @@ public class WeiXinCorpController {
     }
 
     private boolean saveOrderAndUpCompany(org.json.JSONObject jsonObject) throws Exception {
-        System.err.println("+++++++++++++++++++"+"订单回调时间"+"++++++++++++++++++++++");
+        System.err.println("+++++++++++++++++++"+"订单回调开始"+"++++++++++++++++++++++");
         String infoType = jsonObject.getString("InfoType");
         String suiteAccessToken = getSuiteAccessToken();
         HttpHeaders headers = new HttpHeaders();
@@ -2712,18 +2712,19 @@ public class WeiXinCorpController {
         if ("change_editon".equals(infoType)){
             String url = "https://qyapi.weixin.qq.com/cgi-bin/service/get_auth_info?suite_access_token="+suiteAccessToken;
             String paidCorpId = jsonObject.getString("PaidCorpId");
-            WxCorpInfo corpid = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("corpid", paidCorpId));
-            Company company = companyMapper.selectById(corpid.getCompanyId());
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("corpid", paidCorpId));
+            Company company = companyMapper.selectById(wxCorpInfo.getCompanyId());
             JSONObject map = new JSONObject();
             map.put("auth_corpid",corpId);
-            map.put("permanent_code",corpid.getPermanentCode());
+            map.put("permanent_code",wxCorpInfo.getPermanentCode());
             HttpEntity<JSONObject> detailEntity = new HttpEntity<>(map, headers);
             ResponseEntity<String> detailResponseEntity = restTemplate.postForEntity(url, detailEntity, String.class);
             JSONObject json = JSONObject.parseObject(detailResponseEntity.getBody());
-            if (json.getInteger("errcode")==0){
-                String editionName = json.getString("edition_name");
+            if (json.containsKey("auth_corp_info")){
+                String editionName = json.getString("edition_id");
                 switch (editionName){
-                    case "工时基础版":
+                    //基础版
+                    case "sp17da4a6e6f2a91f8":
                         company.setPackageProject(0);
                         company.setPackageOa(0);
                         company.setPackageExpense(0);
@@ -2731,7 +2732,8 @@ public class WeiXinCorpController {
                         company.setPackageEngineering(0);
                         company.setPackageProvider(0);
                         break;
-                    case "项目管理专业版":
+                        //专业版
+                    case "sp4a30d92ede178afd":
                         company.setPackageProject(1);//项目协作平台
                         company.setPackageOa(0);//OA平台;请假,出差等
                         company.setPackageExpense(1);//费用报销
@@ -2739,7 +2741,8 @@ public class WeiXinCorpController {
                         company.setPackageEngineering(0);//工程专业
                         company.setPackageProvider(0);//供应商模块
                         break;
-                    case "建筑工程管理专业版":
+                        //建筑版
+                    case "spd04f1b0582a0fe19":
                         company.setPackageProject(1);//项目协作平台
                         company.setPackageOa(0);//OA平台;请假,出差等
                         company.setPackageExpense(1);//费用报销
@@ -2747,7 +2750,8 @@ public class WeiXinCorpController {
                         company.setPackageEngineering(1);//工程专业
                         company.setPackageProvider(0);//供应商模块
                         break;
-                    case "企业办公旗舰版":
+                        //旗舰版
+                    case "sp69f71e42798c7f55":
                         company.setPackageProject(1);//项目协作平台
                         company.setPackageOa(1);//OA平台;请假,出差等
                         company.setPackageExpense(1);//费用报销
@@ -2769,7 +2773,7 @@ public class WeiXinCorpController {
                 orderId = jsonObject.getString("NewOrderId");
             }
             WxOrder wxOrder = new WxOrder();
-            String detailUrl = " https://qyapi.weixin.qq.com/cgi-bin/service/get_order?suite_access_token=" + suiteAccessToken;
+            String detailUrl = "https://qyapi.weixin.qq.com/cgi-bin/service/get_order?suite_access_token=" + suiteAccessToken;
             JSONObject detailMap = new JSONObject();
             detailMap.put("orderid",orderId);
             HttpEntity<JSONObject> detailEntity = new HttpEntity<>(detailMap, headers);

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

@@ -175,8 +175,8 @@
                                         <el-timeline>
                                             <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
                                                 <el-card shadow="never">
-                                                    <p><!-- 项目 -->{{$t('other.project')}}:<b v-if="item2.projectCode">{{item2.projectCode + '/'}}</b><b>{{item2.project}}</b><span v-if="item2.subProjectName != null"> / {{item2.subProjectName}}</span>
-                                                    
+                                                    <p><!-- 项目 -->{{$t('other.project')}}:<b v-if="item2.projectCode">{{item2.projectCode + '/'}}</b><b>{{item2.project}}</b>
+                                                    <!-- <span v-if="item2.subProjectName != null"> / {{item2.subProjectName}}</span> -->
                                                     <span v-if="user.company.packageEngineering == 0">
                                                     <span style="margin-left:15px;color:#DAA520;"  v-if="item2.state == 0">[ 
                                                         <span v-if="item2.isDeptAudit==0">

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

@@ -6,16 +6,20 @@
             <div>
             <van-field readonly clickable name="datetimePicker" :value="form.createDate" label="时间选择" placeholder="点击选择时间" 
             @click="showPicker = true" :rules="rules.createDate" />
-            <van-cell v-if="user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1">
+            <van-cell >
                 <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>
+                        <template v-if="user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1">
+                            <span>考勤打卡:</span>
+                            <span v-if="!report.time">暂无考勤记录</span>
+                            <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}h</span>
+                        </template>
+                        <span style="margin-left:20px">总填报时长:</span>
+                        <span>{{totalReportHours}}h</span>
                     </div>
                 </template>
                 <template #right-icon>
-                    <van-button icon="replay" native-type="button" type="default" size="mini" style="height:0.6rem;padding:0 0.16667rem;" :loading="cardRefLoading" loading-size="0.26667rem" @click.stop.native="cardtimeRefresh(form.createDate)" v-if="user.timeType.syncCorpwxTime==1 && (form.createDate == today || !report.time || report.time.workHours == 0)"></van-button>
+                    <van-button icon="replay" native-type="button" type="default" size="mini" style="height:0.6rem;padding:0 0.16667rem;" :loading="cardRefLoading" loading-size="0.26667rem" @click.stop.native="cardtimeRefresh(form.createDate)" v-if="user.timeType.syncCorpwxTime==1 && (form.createDate == today || !report.time || report.time.workHours == 0) && (user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1)"></van-button>
                 </template>
             </van-cell>
                 <!-- <div v-if="report.time" class="attendanceRecord">
@@ -311,7 +315,7 @@
                         <div class="overTimeClas" v-if="user.timeType.fillOvertime || (isWeekend && user.timeType.lockWorktime != 1)">
                             <van-checkbox :disabled="!item.canEdit" v-model="item.isOvertime" style="width: 4.3rem;">含加班</van-checkbox>
                             <van-field v-model="item.overtimeHours" type="number" :disabled="!item.canEdit || item.isOvertime==null||item.isOvertime==0 || !item.isOvertime"
-                            placeholder="请输入加班时长" style="width: 5rem"></van-field>
+                            placeholder="请输入加班时长" style="width: 5.2rem"></van-field>
                             <span :class="item.canEdit ? 'overListTime' : 'overListTime hoveOver'">小时</span>    
                         </div>
                         <van-tag style="position:absolute;right:10px;" v-if="isCorpWX&&item.canEdit" type="primary" size="large" @click="takePhoto(index)">拍照上传</van-tag>
@@ -487,8 +491,21 @@ import timetoolVue from '../timetool/timetool.vue';
         created() {
 
         },
+        computed: {
+            totalReportHours(){
+                let domains = this.form.domains
+                let hours = 0
+                for(let i in domains){
+                    if(domains[i].projectId){
+                        hours += parseFloat(domains[i].workingTime)
+                    }
+                }
+                return hours.toFixed(1)
+            },
+        },
 
         methods: {
+            
             cardtimeRefresh(workdate){  // 考勤记录刷新
             if (!workdate) return;
             this.cardRefLoading = true;
@@ -876,6 +893,9 @@ import timetoolVue from '../timetool/timetool.vue';
                 return options;
             },
             choseTimePick(value, index) {
+                if(!value){
+                    return
+                }
                 //选中时间
                 if (this.reportTimeType.type == 0) {
                     this.form.domains[this.clickTimeIndex].timeType = value.value;
@@ -1088,7 +1108,7 @@ import timetoolVue from '../timetool/timetool.vue';
                                     isOvertime: flg,
                                     progress: list[i].progress,
                                     taskList: list[i].taskList,
-                                    taskId: list[i].taskId,
+                                    taskId: list[i].taskId ? list[i].taskId : null,
                                     taskName:tname,
                                     professionProgress:list[i].professionProgressList,
                                     pics: list[i].pics,
@@ -1201,8 +1221,10 @@ import timetoolVue from '../timetool/timetool.vue';
             },
 
             choseAuditor(value, index) {
-                this.form.domains[this.clickIndex].projectAuditorId = value.auditorId;
-                this.form.domains[this.clickIndex].projectAuditorName = value.auditorName;
+                if(value){
+                    this.form.domains[this.clickIndex].projectAuditorId = value.auditorId;
+                    this.form.domains[this.clickIndex].projectAuditorName = value.auditorName;
+                }
                 this.form.domains[this.clickIndex].showPickerAuditor = false;
                 this.$forceUpdate();
             },
@@ -1273,8 +1295,10 @@ import timetoolVue from '../timetool/timetool.vue';
                 this.$forceUpdate();
             },
             choseTask(value, index) {
-                this.form.domains[this.clickIndex].taskId = value.taskId;
-                this.form.domains[this.clickIndex].taskName = value.taskName;
+                if(value){
+                    this.form.domains[this.clickIndex].taskId = value.taskId;
+                    this.form.domains[this.clickIndex].taskName = value.taskName;
+                }
                 this.form.domains[this.clickIndex].showPickerTask = false;
                 this.$forceUpdate();
             },
@@ -1290,13 +1314,18 @@ import timetoolVue from '../timetool/timetool.vue';
             },
 
             choseSubProject(value, index) {
-                this.form.domains[this.clickIndex].subProjectId = value.id;
-                this.form.domains[this.clickIndex].subProjectName = value.name;
+                if(value){
+                    this.form.domains[this.clickIndex].subProjectId = value.id;
+                    this.form.domains[this.clickIndex].subProjectName = value.name;
+                }
                 this.form.domains[this.clickIndex].showPickerSubProject = false;
                 this.$forceUpdate();
             },
 
             choseTaskGroup(value, index) {
+                if(!value){
+                    return
+                }
                 this.form.domains[this.clickIndex].groupId = value.id;
                 this.form.domains[this.clickIndex].groupName = value.name;
                 this.form.domains[this.clickIndex].showPickerTaskGroup = false;
@@ -1323,14 +1352,19 @@ import timetoolVue from '../timetool/timetool.vue';
                 }
             },
             choseStage(value, index) {
-                this.form.domains[this.clickIndex].stage = value.stagesName;
+                if (value) {
+                    this.form.domains[this.clickIndex].stage = value.stagesName;
+                }
+                
                 this.form.domains[this.clickIndex].showPickerStage = false;
                 this.$forceUpdate();
 
             },
             choseCostId(value,index){
-                this.form.domains[this.clickIndex].basecostId = value.id;
-                this.form.domains[this.clickIndex].basecostName = value.name;
+                if(value){
+                    this.form.domains[this.clickIndex].basecostId = value.id;
+                    this.form.domains[this.clickIndex].basecostName = value.name;
+                }
                 this.form.domains[this.clickIndex].showPickerCostId = false;
                 this.$forceUpdate();
             },

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

@@ -465,7 +465,6 @@
                 
             },
             onSearch(val){
-                console.log(val);
                 this.auditor.searchList = [];
                 this.auditor.list.forEach(u=>{if (u.name.startsWith(val)) {
                     this.auditor.searchList.push(u);
@@ -496,8 +495,10 @@
                 this.$forceUpdate();
             },
             choseCostId(value,index){
-                this.currentForm.domains[this.clickIndex].basecostId = value.id;
-                this.currentForm.domains[this.clickIndex].basecostName = value.name;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].basecostId = value.id;
+                    this.currentForm.domains[this.clickIndex].basecostName = value.name;
+                }
                 this.currentForm.domains[this.clickIndex].showPickerCostId = false;
                 this.$forceUpdate();
             },
@@ -1007,6 +1008,9 @@
                 return options;
             },
             choseTimePick(value, index) {
+                if(!value){
+                    return
+                }
                 //选中时间
                 if (this.reportTimeType.type == 0) {
                     this.currentForm.domains[this.clickTimeIndex].timeType = value.value;
@@ -1193,7 +1197,7 @@
                                     isOvertime: flg,
                                     progress: list[i].progress,
                                     taskList: list[i].taskList,
-                                    taskId: list[i].taskId,
+                                    taskId: list[i].taskId ? list[i].taskId : null,
                                     taskName:tname,
                                     professionProgress:list[i].professionProgressList,
                                     pics: list[i].pics,
@@ -1276,8 +1280,10 @@
             },
 
             choseAuditor(value, index) {
-                this.currentForm.domains[this.clickIndex].projectAuditorId = value.auditorId;
-                this.currentForm.domains[this.clickIndex].projectAuditorName = value.auditorName;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].projectAuditorId = value.auditorId;
+                    this.currentForm.domains[this.clickIndex].projectAuditorName = value.auditorName;
+                }
                 this.currentForm.domains[this.clickIndex].showPickerAuditor = false;
                 this.$forceUpdate();
             },
@@ -1337,28 +1343,37 @@
                 this.$forceUpdate();
             },
             choseTask(value, index) {
-                this.currentForm.domains[this.clickIndex].taskId = value.taskId;
-                this.currentForm.domains[this.clickIndex].taskName = value.taskName;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].taskId = value.taskId;
+                    this.currentForm.domains[this.clickIndex].taskName = value.taskName;
+                }
                 this.currentForm.domains[this.clickIndex].showPickerTask = false;
                 this.$forceUpdate();
             },
 
             choseProjects(value, index) {
                 // console.log(value)
-                this.currentForm.domains[this.clickIndex].weiduName = value.name;
-                this.currentForm.domains[this.clickIndex].degreeId = value.id;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].weiduName = value.name;
+                    this.currentForm.domains[this.clickIndex].degreeId = value.id;
+                }
                 this.currentForm.domains[this.clickIndex].showPickDegree = false;
                 this.$forceUpdate();
             },
 
             choseSubProject(value, index) {
-                this.currentForm.domains[this.clickIndex].subProjectId = value.id;
-                this.currentForm.domains[this.clickIndex].subProjectName = value.name;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].subProjectId = value.id;
+                    this.currentForm.domains[this.clickIndex].subProjectName = value.name;
+                }
                 this.currentForm.domains[this.clickIndex].showPickerSubProject = false;
                 this.$forceUpdate();
             },
 
             choseTaskGroup(value, index) {
+                if(!value){
+                    return
+                }
                 this.currentForm.domains[this.clickIndex].groupId = value.id;
                 this.currentForm.domains[this.clickIndex].groupName = value.name;
                 this.currentForm.domains[this.clickIndex].showPickerTaskGroup = false;
@@ -1385,7 +1400,9 @@
                 }
             },
             choseStage(value, index) {
-                this.currentForm.domains[this.clickIndex].stage = value.stagesName;
+                if(value){
+                    this.currentForm.domains[this.clickIndex].stage = value.stagesName;
+                }
                 this.currentForm.domains[this.clickIndex].showPickerStage = false;
                 this.$forceUpdate();
 

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/edit.vue

@@ -315,7 +315,7 @@ export default {
                         if(res.code == "ok") {
                             this.$toast.clear();
                             this.$toast.success('删除成功');
-                            this.back();
+                            this.$router.push('/project');
                         } else if(res.code == 'reconfirm'){
                             this.$toast.clear();
                             this.forceDelete(res.msg)

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/test/list.vue

@@ -836,7 +836,7 @@
                                     isOvertime: flg,
                                     progress: list[i].progress,
                                     taskList: list[i].taskList,
-                                    taskId: list[i].taskId,
+                                    taskId: list[i].taskId ? list[i].taskId : null,
                                     taskName:tname,
                                     professionProgress:list[i].professionProgressList,
                                     pics: list[i].pics,