Browse Source

解决版本合并代码丢失的问题

seyason 3 năm trước cách đây
mục cha
commit
57068bd6ff

+ 3 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1365,7 +1365,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             if (project.getContractAmount() != null && project.getContractAmount() > 0) {
                 double profitAmt = project.getContractAmount() - totalFee;
                 data.add(profitAmt+"");
-                data.add(new java.text.DecimalFormat("#.0").format((100*profitAmt/project.getContractAmount()))+"%");
+                data.add(new java.text.DecimalFormat("#0.0").format((100*profitAmt/project.getContractAmount()))+"%");
             } else {
                 double profitAmt = -totalFee;
                 data.add(profitAmt+"");
@@ -1405,7 +1405,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             if (project.getContractAmount() != null && project.getContractAmount() > 0) {
                 double profitAmt = project.getContractAmount() - totalFee;
                 data.add(profitAmt+"");
-                data.add(new java.text.DecimalFormat("#.0").format((100*profitAmt/project.getContractAmount()))+"%");
+                data.add(new java.text.DecimalFormat("#0.0").format((100*profitAmt/project.getContractAmount()))+"%");
             } else {
                 double profitAmt = -totalFee;
                 data.add(profitAmt+"");
@@ -1430,7 +1430,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if (child.getContractAmount() != null && child.getContractAmount() > 0) {
                     double profitAmt = child.getContractAmount() - totalFeeChild;
                     dataChild.add(profitAmt+"");
-                    dataChild.add(new java.text.DecimalFormat("#.0").format((100*profitAmt/project.getContractAmount()))+"%");
+                    dataChild.add(new java.text.DecimalFormat("#0.0").format((100*profitAmt/project.getContractAmount()))+"%");
                 } else {
                     double profitAmt = -totalFeeChild;
                     dataChild.add(profitAmt+"");

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SimpleReportServiceImpl.java

@@ -383,7 +383,7 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
         //数据
         double time = 0;
         BigDecimal cost = new BigDecimal(0);
-        DecimalFormat df = new DecimalFormat("#.0");
+        DecimalFormat df = new DecimalFormat("#0.0");
 
         for (HashMap item : costList) {
             List<String> data = new ArrayList<>();

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

@@ -90,17 +90,13 @@
             } 
             if (localStorage.userInfo != null) {
                 var user = JSON.parse(localStorage.userInfo);
-                // if (user.role == 3) {
-                //     //公司高层
-                //     this.$router.push({ path: '/cost' });
-                // } else if (user.role == 4) {
-                //     //财务管理员
-                //     this.$router.push({ path: '/team' });
-                // } else {
-                //     this.$router.push({ path: '/daily' });
-                // }
-                if(user.moduleList.length > 0) {
-                    this.$router.push({ path: user.moduleList[0].path })
+                if (user.company.packageSimple == 1) {
+                    //简易模式,直接进入工时统计表
+                    this.$router.push({ path: '/simple' });
+                } else {
+                    if(user.moduleList.length > 0) {
+                        this.$router.push({ path: user.moduleList[0].path })
+                    }
                 }
             } else {
                 if (this.isCorpWX) {
@@ -282,20 +278,13 @@
                                 var user = res.data;
                                 sessionStorage.setItem('user', JSON.stringify(res.data));
                                 this.permissionsList(res.data)
-                                // if (user.company.packageSimple == 1) {
-                                //     //简易模式,直接进入工时统计表
-                                //     this.$router.push({ path: '/simple' });
-                                // } else if (user.role == 3) {
-                                //     //公司高层
-                                //     this.$router.push({ path: '/cost' });
-                                // } else if (user.role == 4) {
-                                //     //财务管理员
-                                //     this.$router.push({ path: '/team' });
-                                // } else {
-                                //     this.$router.push({ path: '/daily' });
-                                // }
-                                if(user.moduleList.length > 0) {
-                                    this.$router.push({ path: user.moduleList[0].path })
+                                if (user.company.packageSimple == 1) {
+                                    //简易模式,直接进入工时统计表
+                                    this.$router.push({ path: '/simple' });
+                                } else {
+                                    if(user.moduleList.length > 0) {
+                                        this.$router.push({ path: user.moduleList[0].path })
+                                    }
                                 }
                             } else {
                                 this.$message({

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

@@ -473,11 +473,11 @@
         <el-dialog title="加班详情" :visible.sync="dialogVisibleDetails" width="800px" v-loading="listLoading" :before-close="handleClose">
           <div>
              <el-table :data="detailsList" style="width: 100%" height="400px">
+                <el-table-column prop="username" label="姓名" width="120"></el-table-column>
                 <el-table-column prop="projectName" label="项目名称" width="200"></el-table-column>
                 <el-table-column prop="projectCode" label="项目编号" width="200"></el-table-column>
                 <el-table-column prop="createDate" label="加班日期" width="120"></el-table-column>
                 <el-table-column prop="workingTime" label="当天工作时长(h)" width="160"></el-table-column>
-                <el-table-column prop="username" label="姓名" width="120"></el-table-column>
                 <el-table-column prop="overtimeHours" label="加班时长(h)" width="130"></el-table-column>
                 <el-table-column prop="cost" label="加班成本" width="120" v-if="permissions.reportCost"></el-table-column>
              </el-table>

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

@@ -137,7 +137,7 @@
             <!-- 客户管理 -->
             <el-table-column prop="customerName" label="客户" width="190"   v-if="user.company.packageCustomer == 1">
             <template slot-scope="scope">
-                <el-popover placement="top" width="250" trigger="hover" v-if="scope.row.projectName.length > 12">
+                <el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
                     <div slot="reference" class="kans">
                         <span >{{scope.row.customerName.substring(0,12)}}...</span>
                     </div>

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

@@ -273,7 +273,7 @@
                         <el-select v-model="domain.workingTime" style="width:200px;"
                         v-if="reportTimeType.type == 1"
                         :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
-                        placeholder="请选择工作时长"
+                        :placeholder="'请选择工作时长' + domain.workingTime"
                         @change="seleChn(0,domain)">
                         <el-option v-for="item in timeRange" :key="item" :value="item.toFixed(1)">{{item.toFixed(1)}}</el-option>
                         </el-select>
@@ -321,8 +321,8 @@
                         :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                             <!-- <el-option v-for="item in projectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName" :value="item.id"></el-option> -->
                             <el-option v-for="item in projectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
-                                <span style="float: left">{{ item.projectName }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px">{{ item.projectCode }}</span>
+                                <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
+                                <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
                             </el-option>
                         </el-select>
                         <span v-if="domain.subProjectList != null && domain.subProjectList.length> 0 && domain.projectId != ''"
@@ -427,8 +427,8 @@
                             @change="selectProject(domain, index)"
                             :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                                 <el-option v-for="item in projectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
-                                    <span style="float: left">{{ item.projectName }}</span>
-                                    <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px">{{ item.projectCode }}</span>
+                                    <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
+                                    <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
                                 </el-option>
                             </el-select>
                             <span  v-if="domain.subProjectList != null && domain.subProjectList.length> 0 && domain.projectId != ''"
@@ -1248,6 +1248,7 @@
     export default {
         data() {
             return {
+                alalal: '8.0',
                 timeBasecostList:null,
                 tbload: false,
                 exportTimeDialog: false,
@@ -3422,8 +3423,13 @@
                 res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
+                        for(var i in res.data) {
+                            if(res.data[i].projectCode == null || res.data[i].projectCode == 'null') {
+                                res.data[i].projectCode = ''
+                            }
+                        }
                         this.projectList = res.data;
-                        // console.log("项目列表",this.projectList);
+                        console.log("项目列表",this.projectList);
                     } else {
                         this.$message({
                             message: res.msg,
@@ -3541,6 +3547,9 @@
                                 userNames:null,
                                 time: this.report.time
                             }
+                            if(this.user.timeType.type == 1) {
+                                    this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                }
                             if (this.timeBasecostList && this.timeBasecostList.length > 0) {
                                 //默认给第一个,必填字段
                                 this.workForm.domains[0].basecostId = this.timeBasecostList[0].id;
@@ -3585,6 +3594,7 @@
 
             // 打开日报填写
             fillInReport(i, isBatch) {
+                console.log(this.user.timeType.type, '选择时长')
                 if(i != 1) {
                     this.falsss = false 
                 } else {
@@ -3604,6 +3614,7 @@
                     this.workForm.createDate = this.date + day; // 获取个人某天的日报
                     this.getReport(i);
                 } else {
+                    console.log('执行到了这里')
                     this.jsTime = 0
                     this.jsDay = 0
                     this.workForm = {
@@ -3620,6 +3631,10 @@
                                     worktimeList:[{}],
                                 }],
                             }
+                            if(this.user.timeType.type == 1) {
+                                this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                            }
+                            console.log(this.workForm)
                     if (this.timeBasecostList&&this.timeBasecostList.length>0) {
                         this.workForm.domains[0].basecostId = this.timeBasecostList[0].id;
                     }        

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

@@ -150,9 +150,8 @@
             </el-table-column>
             <el-table-column label="操作" width="220">
                 <template slot-scope="scope">
-                    <el-button v-if="scope.row.state == 0" type="primary" :loading="logining" size="small" @click="approve(scope.row.id,scope.row.date, scope.row)">通过</el-button>
-                    <el-button v-if="scope.row.state == 0" type="danger" :loading="logining" size="small" @click="showDenyDialog(scope.row.id,0,scope.row.dateStr, scope.row)">驳回</el-button>
-                    <el-button v-if="scope.row.state == 1" type="danger" :loading="logining" size="small" @click="showDenyDialog(scope.row.id,1,scope.row.dateStr, scope.row)">撤销</el-button>
+                    <el-button type="primary" :loading="logining" size="small" @click="approve(scope.row.id,scope.row.date, scope.row)">通过</el-button>
+                    <el-button type="danger" :loading="logining" size="small" @click="showDenyDialog(scope.row.id,0,scope.row.dateStr, scope.row)">驳回</el-button>
                 </template>
             </el-table-column>
         </el-table>

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

@@ -426,6 +426,11 @@
                 this.$axios.post("/project/getProjectList", {})
                 .then(res => {
                     if(res.code == "ok") {
+                        for(var i in res.data) {
+                            if(res.data[i].projectCode == 'null' || res.data[i].projectCode == null) {
+                                res.data[i].projectCode = ' '
+                            }
+                        }
                         this.projectss = res.data;
                         this.projectss = this.projectss.filter(p=>p.status == 1);
                         this.proads = res.data
@@ -437,14 +442,18 @@
             sea() {
                 console.log(this.userName.length)
                 if(this.userName.length > 0) {
-                    console.log(123)
-                    let text = this.userName
-                    let reg = new RegExp(text)
-                    let data = this.proads.filter(item => reg.test(item.projectName)) //返回
-                    let datas = this.proads.filter(item => reg.test(item.projectCode))
-                    let dataTree = data.concat(datas)
+                    // let text = this.userName
+                    // let reg = new RegExp(text)
+                    // let data = this.proads.filter(item => reg.test(item.projectName)) //返回
+                    // let datas = this.proads.filter(item => reg.test(item.projectCode))
+                    // let dataTree = data.concat(datas)
+                    // let arrList = Array.from(new Set(dataTree))
+                    // this.projectss = arrList
+                    // console.log(this.userName.toUpperCase())
+                    let data = this.proads.filter(item => {return  item.projectName.indexOf(this.userName.toUpperCase()) != '-1'});
+                    let dataList = this.proads.filter(item => {return  item.projectCode.indexOf(this.userName.toUpperCase()) != '-1'});
+                    let dataTree = data.concat(dataList)
                     let arrList = Array.from(new Set(dataTree))
-                    // this.projectss = data
                     this.projectss = arrList
                 } else {
                     console.log(456)

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

@@ -512,6 +512,11 @@
                 this.$axios.post("/project/getProjectList", {})
                 .then(res => {
                     if(res.code == "ok") {
+                        for(var i in res.data) {
+                            if(res.data[i].projectCode == 'null' || res.data[i].projectCode == null) {
+                                res.data[i].projectCode = ' '
+                            }
+                        }
                         this.projectss = res.data;
                         this.projectss = this.projectss.filter(p=>p.status == 1);
                         this.proads = res.data
@@ -523,15 +528,20 @@
             sea() {
                 console.log(this.userName.length)
                 if(this.userName.length > 0) {
-                    console.log(123)
-                    let text = this.userName
-                    let reg = new RegExp(text)
+                    // console.log(123)
+                    // let text = this.userName
+                    // let reg = new RegExp(text)
+                    // // let data = this.proads.filter(item => reg.test(item.projectName)) //返回
                     // let data = this.proads.filter(item => reg.test(item.projectName)) //返回
-                    let data = this.proads.filter(item => reg.test(item.projectName)) //返回
-                    let datas = this.proads.filter(item => reg.test(item.projectCode))
-                    let dataTree = data.concat(datas)
+                    // let datas = this.proads.filter(item => reg.test(item.projectCode))
+                    // let dataTree = data.concat(datas)
+                    // let arrList = Array.from(new Set(dataTree))
+                    // // this.projectss = data
+                    // this.projectss = arrList
+                    let data = this.proads.filter(item => {return  item.projectName.indexOf(this.userName.toUpperCase()) != '-1'});
+                    let dataList = this.proads.filter(item => {return  item.projectCode.indexOf(this.userName.toUpperCase()) != '-1'});
+                    let dataTree = data.concat(dataList)
                     let arrList = Array.from(new Set(dataTree))
-                    // this.projectss = data
                     this.projectss = arrList
                 } else {
                     console.log(456)

+ 2 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -79,9 +79,8 @@
                         </div>
                     </div>
                     <div class="form_btn" slot="footer">
-                        <van-button v-if="(flg || user.id == item.data[0].projectAuditorId)&&item.state == 0" size="small" type="info" @click="approve(item.id, item)">通过</van-button>
-                        <van-button v-if="(flg || user.id == item.data[0].projectAuditorId)&&item.state == 0" size="small" type="danger" @click="showDenyDialog(item.id,0,item.dateStr, item)">驳回</van-button>
-                        <van-button v-if="(flg || user.id == item.data[0].inchargerId) && item.state == 1" size="small" type="danger" @click="showDenyDialog(item.id,1,item.dateStr, item)">撤销</van-button>
+                        <van-button size="small" type="info" @click="approve(item.id, item)">通过</van-button>
+                        <van-button size="small" type="danger" @click="showDenyDialog(item.id,0,item.dateStr, item)">驳回</van-button>
                     </div>
                     <van-popup v-model="imgShow" position="bottom" closeable >
                         <van-swipe class="my-swipe"  indicator-color="white">