瀏覽代碼

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

Min 1 年之前
父節點
當前提交
909df81333

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author Seyason
@@ -388,6 +388,12 @@ public class TimeType extends Model<TimeType> {
     @TableField("max_report_time")
     private Float maxReportTime;
 
+    /**
+     * 填报工作时长下限
+     */
+    @TableField("min_report_time")
+    private Float minReportTime;
+
     /**
      * 是否同步泛微考勤打卡和出差
      */

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ProjectMapper.java

@@ -166,6 +166,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
 
     List<UserCateTimeVo> getMembProjectCateTime(Integer companyId, String startDate, String endDate);
 
-    @Update("update project set incharger_id = null, finish_date = null, plan_start_date = null, plan_end_date=null, level=null,contract_amount=null,man_day=null,where id = #{id} and is_public = 1")
+    @Update("update project set incharger_id = null, finish_date = null, plan_start_date = null, plan_end_date=null, level=null,contract_amount=0.0,man_day=null where id = #{id} and is_public = 1")
     void cleanPublicProjectData(Integer id);
 }

File diff suppressed because it is too large
+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml


+ 16 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -177,6 +177,20 @@ export default {
         }).catch(err => { this.$toast.clear(); });
     },
     onSubmit() {
+      //核验件数
+      if (this.reportForm.finishNum >0 && this.reportForm.finishNum < 1.0) {
+        //完成件数为小数时,如果勾选了钢印号需要二次确认
+        this.$dialog.confirm({
+                    title: '提醒',
+                    message: '检测到件数为小数同时勾选了钢印号,确认该钢印号已完成吗?'
+                }).then(() => {
+                    this.submitData();
+                }).catch(() => {});
+        return
+      }
+      this.submitData();
+    },
+    submitData() {
       let postData = {
         userProcedureTeamId: this.reportForm.id,
         prodProcedureId: this.reportForm.prod_procedure_id,
@@ -217,6 +231,8 @@ export default {
     onCheckChange(names) {
       this.$forceUpdate();
       console.log(this.reportForm.checkedSteelNum);
+      //自动计算件数
+      this.reportForm.finishNum = this.reportForm.checkedSteelNum.length;
     },
     getMyPlanProcedureList() {
       const { id, reportBoolean, date } = this.$route.query;

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/Home.vue

@@ -990,7 +990,7 @@
                 }
             }
             .logo-width {
-                width: 200px;
+                width: 160px;
             }
             .logo-collapse-width {
                 width: 60px;
@@ -1036,8 +1036,8 @@
                 width: 60px;
             }
             .menu-expanded {
-                flex: 0 0 200px;
-                width: 200px;
+                flex: 0 0 160px;
+                width: 160px;
             }
             .content-container {
                 flex: 1;
@@ -1047,7 +1047,7 @@
                 // position: relative;
                 .breadcrumb-container {
                     .title {
-                        width: 200px;
+                        width: 160px;
                         float: left;
                         color: #475669;
                     }

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue

@@ -60,21 +60,21 @@
         </el-table-column>
         <el-table-column prop="projectCode" label="项目代码" width="180">
         </el-table-column>
-        <el-table-column prop="num" label="数量" width="180"> </el-table-column>
+        <el-table-column prop="num" label="数量" width="100"> </el-table-column>
         <el-table-column prop="mainProcess" label="主工序" width="180">
         </el-table-column>
         <el-table-column prop="stationName" label="工位名称" width="180">
         </el-table-column>
-        <el-table-column prop="foremanName" label="工长" width="180">
+        <el-table-column prop="foremanName" label="工长" width="140">
           <template slot-scope="scope">
             <div @click="getFormenDetail(scope.row)" class="colorText">
               {{ scope.row.foremanName }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="startDate" label="开工时间" width="180">
+        <el-table-column prop="startDate" label="开工时间" width="140">
         </el-table-column>
-        <el-table-column prop="endDate" label="完工时间" width="180">
+        <el-table-column prop="endDate" label="完工时间" width="140">
         </el-table-column>
         <el-table-column label="操作" :fixed="'right'">
           <template slot-scope="scope">

+ 29 - 33
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/statistic/index.vue

@@ -1,8 +1,8 @@
 <template>
   <section>
     <div style=" display: flex;">
-    <div ref="sidebars" style="width: 200px;display: block;background: #fff;border-right: 1px solid #E6E6E6;">
-      <div ref="abbisd" style="width: 200px;overflow: hidden;">
+    <div ref="sidebars" style="width: 180px;display: block;background: #fff;border-right: 1px solid #E6E6E6;">
+      <div ref="abbisd" style="width: 180px;overflow: hidden;">
           <el-col :span="12">
             <el-menu
               :default-active="defaultActive"
@@ -11,7 +11,7 @@
               background-color="#ffffff" 
               text-color="#666666"
               active-text-color="#20A0FF"
-              style="width:200px">
+              style="width:180px">
               <el-submenu index="1">
                 <template slot="title">
                   <i class="iconfont firerock-iconbaobiao"></i>
@@ -28,7 +28,7 @@
               </el-menu>
           </el-col>
       </div>
-      <div class="side" @click="side" ref="sid" style="left: 400px">
+      <div class="side" @click="side" ref="sid" style="left: 340px">
         <div class="spans" ref="side" style="left: -19px;"><i  ref="sideI" class="el-icon-arrow-left"></i></div>
       </div>
     </div>
@@ -112,13 +112,13 @@
                 </el-table-column>
                 <el-table-column align="center" prop="procedureName" label="工序" min-width="250"></el-table-column>
                 <!-- <el-table-column align="center" prop="userName" label="人员" min-width="150"></el-table-column> -->
-                <el-table-column align="center" prop="planWorkTime" label="计划工时" min-width="250">
+                <el-table-column align="center" prop="planWorkTime" label="计划工时" width="150">
                   <template slot-scope="scope" v-if="scope.row.planWorkTime">{{scope.row.planWorkTime}}分钟</template>
                 </el-table-column>
-                <el-table-column align="center" prop="nowWorkTime" label="当前工时" min-width="250">
+                <el-table-column align="center" prop="nowWorkTime" label="当前工时" width="150">
                   <template slot-scope="scope" v-if="scope.row.nowWorkTime">{{scope.row.nowWorkTime}}分钟</template>
                 </el-table-column>
-                <el-table-column align="center" prop="progress" label="进度" min-width="250">
+                <el-table-column align="center" prop="progress" label="进度" width="150">
                   <template slot-scope="scope" v-if="scope.row.progress">
                     {{scope.row.progress}}%
                   </template>
@@ -132,45 +132,45 @@
                 </el-table-column>
                 <el-table-column align="center" prop="productName" label="产品名称" min-width="250"></el-table-column>
                 <el-table-column align="center" prop="foremanName" label="工长" min-width="150"></el-table-column>
-                <el-table-column align="center" prop="startDate" label="开工时间" min-width="250"></el-table-column>
-                <el-table-column align="center" prop="endDate" label="完工时间" min-width="250"></el-table-column>
+                <el-table-column align="center" prop="startDate" label="开工时间" width="150"></el-table-column>
+                <el-table-column align="center" prop="endDate" label="完工时间" width="150"></el-table-column>
                 <el-table-column align="center" prop="procedureName" label="工序" min-width="250"></el-table-column>
-                <el-table-column align="center" prop="creatorName" label="组员" min-width="250"></el-table-column>
-                <el-table-column align="center" prop="createDate" label="报工时间" min-width="250"></el-table-column>
-                <el-table-column align="center" prop="checkName" label="质检人" min-width="250">
+                <el-table-column align="center" prop="creatorName" label="组员" width="150"></el-table-column>
+                <el-table-column align="center" prop="createDate" label="报工时间" width="150"></el-table-column>
+                <el-table-column align="center" prop="checkName" label="质检人" width="150">
                   <template slot-scope="scope">{{scope.row.checkName}}</template>
                 </el-table-column>
             </el-table>
 
             <!-- 计划实时进度表 -->
             <el-table v-if="ins == 3"  key="4" border :data="planRealTimeProgressList" highlight-current-row v-loading="listLoading" :height="+tableHeight - 1" style="width: 100%;">
-                <el-table-column align="center" prop="taskName" label="排产工单号" min-width="150">
+                <el-table-column align="center" prop="taskName" label="排产工单号" min-width="250">
                   <template slot-scope="scope">{{scope.row.taskName}}</template>
                 </el-table-column>
-                <el-table-column align="center" prop="userName" label="工长" min-width="250"></el-table-column>
-                <el-table-column align="center" prop="planNum" label="计划件数" min-width="150">
+                <el-table-column align="center" prop="userName" label="工长" width="150"></el-table-column>
+                <el-table-column align="center" prop="planNum" label="计划件数" width="100">
                   <template slot-scope="scope">{{scope.row.planNum}}</template>
                 </el-table-column>
                 <el-table-column align="center" prop="productName" label="产品名称" min-width="150">
                   <template slot-scope="scope">{{scope.row.productName}}</template>
                 </el-table-column>
-                <el-table-column align="center" prop="startDate" label="开始日期" min-width="150">
+                <el-table-column align="center" prop="startDate" label="开始日期" width="150">
                   <template slot-scope="scope">{{scope.row.startDate}}</template>
                 </el-table-column>
-                <el-table-column align="center" prop="endDate" label="完工日期" min-width="150">
+                <el-table-column align="center" prop="endDate" label="完工日期" width="150">
                   <template slot-scope="scope">{{scope.row.endDate}}</template>
                 </el-table-column>
-                <el-table-column align="center" prop="statinoName" label="工位" min-width="250"></el-table-column>
-                <el-table-column align="center"  label="计划工时" min-width="150">
+                <el-table-column align="center" prop="statinoName" label="工位" width="150"></el-table-column>
+                <el-table-column align="center"  label="计划工时" min-width="190">
                   <template slot-scope="scope" v-if="scope.row.planWorkTime">{{scope.row.planWorkTime}}分钟 {{scope.row.planCost}}元</template>
                 </el-table-column>
-                <el-table-column align="center"  label="当前工时" min-width="250">
+                <el-table-column align="center"  label="当前工时" min-width="190">
                   <template slot-scope="scope" v-if="scope.row.nowWorkTime">{{scope.row.nowWorkTime}}分钟 {{scope.row.nowCost}}元</template>
                 </el-table-column>
                 <el-table-column align="center"  label="实际完工日期" min-width="150">
                   <template slot-scope="scope" v-if="scope.row.realEndDate">{{scope.row.realEndDate}}</template>
                 </el-table-column>
-                <el-table-column align="center"  label="进度" min-width="250">
+                <el-table-column align="center"  label="进度" min-width="150">
                   <template slot-scope="scope" v-if="scope.row.progress">{{scope.row.progress}}</template>
                 </el-table-column>
             </el-table>
@@ -1428,24 +1428,20 @@ export default {
     side() {
       if(this.$refs.side.style.left < '1px') {
         this.$refs.sidebars.style.width = '1px'
-        this.$refs.sid.style.left = '201px'
+        this.$refs.sid.style.left = '161px'
         this.$refs.side.style.left = '1px'
         this.$refs.sideI.className = 'el-icon-arrow-right'
-        // this.$refs.staff.style.margin = '5px 0px 0px 5px'
-        // this.$refs.staff.style.width = '100%'
         this.$refs.headHe.style.paddingLeft = '10px'
-        this.$refs.headine.style.width = (this.windowWidth - 200)+'px'
-        this.$refs.tabless.style.width = (this.windowWidth - 200)+'px'
+        this.$refs.headine.style.width = (this.windowWidth - 180)+'px'
+        this.$refs.tabless.style.width = (this.windowWidth - 180)+'px'
       } else {
-        this.$refs.sidebars.style.width = '200px'
-        this.$refs.sid.style.left = '400px'
+        this.$refs.sidebars.style.width = '180px'
+        this.$refs.sid.style.left = '340px'
         this.$refs.side.style.left = '-19px'
         this.$refs.sideI.className = 'el-icon-arrow-left'
-        // this.$refs.staff.style.margin = '5px 0px 0px 10px'
-        // this.$refs.staff.style.width = '98%'
         this.$refs.headHe.style.paddingLeft = '10px'
-        this.$refs.headine.style.width = (this.windowWidth - 400)+'px'
-        this.$refs.tabless.style.width = (this.windowWidth - 400)+'px'
+        this.$refs.headine.style.width = (this.windowWidth - 340)+'px'
+        this.$refs.tabless.style.width = (this.windowWidth - 340)+'px'
       }
     },
     picks() {
@@ -1669,7 +1665,7 @@ export default {
 /* 侧边栏收索 */
 .side {
   position: absolute;
-  z-index: 2;
+  z-index: 5;
   border-right: 2px solid #DDDDDD;
   height: 100%;
   top: 0;

+ 4 - 2
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -908,7 +908,8 @@
   "dailyworkinghours": "Normal working hours per day",
   "workingdayspermonth": "Average working days per month",
   "hoursreporteperday": "Lock the upper limit of daily reporting hours",
-  "imitillingtime": "Fill in the time limit",
+  "imitillingtime": "Max report time",
+  "minReportTime": "Min report time",
   "lockingworkinghours": "Lock working hours",
   "chargedtocost": "Overtime hours charged to cost",
   "hourscanbereported": "Reportable overtime hours",
@@ -1505,5 +1506,6 @@
   "que-ding-yao-shan-chu-ci-tiao-he-tong-lei-xing-ma": "Are you sure you want to delete this contract type ?",
   "que-ding-yao-shan-chu-gai-he-tong-ma": "Are you sure you want to delete this contract ?",
   "que-ding-yao-shan-chu-gai-wen-jian-ma": "Are you sure you want to delete this file ?",
-  "he-tong-guan-li-dao-ru-mo-ban": "Contract Management Template"
+  "he-tong-guan-li-dao-ru-mo-ban": "Contract Management Template",
+  "minMaxCheck": "report time min value should not be greater than the max value"
 }

+ 6 - 4
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -909,11 +909,12 @@
   "employeehourlywage": "员工时薪录入方式设置",
   "methodsa": "方式一: 录入月成本,自动计算时薪",
   "suitableforfulltimeemployees": "(适合企业全职员工)",
-  "workingdayspermonth": "平均每月工作天数",
-  "dailyworkinghours": "每日正常工作时长",
+  "workingdayspermonth": "平均每月工作",
+  "dailyworkinghours": "每日正常工作",
   "lockingworkinghours": "锁定工作时长",
   "hoursreporteperday": "锁定每日填报工时的上限",
-  "imitillingtime": "填报时长上限",
+  "imitillingtime": "工时上限",
+  "minReportTime": "工时下限",
   "workSettings": "加班设置",
   "hourscanbereported": "可填报加班时长",
   "chargedtocost": "加班工时记入成本",
@@ -1509,5 +1510,6 @@
   "que-ding-yao-shan-chu-ci-tiao-he-tong-lei-xing-ma": "确定要删除此条合同类型吗?",
   "que-ding-yao-shan-chu-gai-he-tong-ma": "确定要删除该合同吗?",
   "que-ding-yao-shan-chu-gai-wen-jian-ma": "确定要删除该文件吗?",
-  "he-tong-guan-li-dao-ru-mo-ban": "合同管理导入模板"
+  "he-tong-guan-li-dao-ru-mo-ban": "合同管理导入模板",
+  "minMaxCheck": "工时下限不得大于上限"
 }

+ 17 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -18,7 +18,7 @@
                     <el-radio v-model="timeType.hourCostInputType" :label="0" style="width:100%;margin-left:10px;">{{ $t('methodsa') }}<span class="tip">{{ $t('suitableforfulltimeemployees') }}</span></el-radio>
                 </div>
                 <div style="width:100%;float:left"> 
-                    <el-form ref="form0" :inline="true" :model="timeType" label-width="150px" style="margin-top:10px">
+                    <el-form ref="form0" :inline="true" :model="timeType" label-width="120px" style="margin-top:10px">
                         <el-form-item :label="$t('workingdayspermonth')" prop="monthDays">
                         <el-input v-model="timeType.monthDays"  type="number" style="width:120px;"></el-input>
                         {{ $t('time.day') }} 
@@ -40,7 +40,13 @@
                             <el-select :disabled="timeType.lockWorktime" v-model="timeType.maxReportTime" type="number" style="width:120px;">
                                 <el-option v-for="item in maxReportTimeRange" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
                             </el-select><span style="margin-left:5px;color:#409eff">{{ $t('time.hour') }}</span>
-                        </el-form-item><br>
+                        </el-form-item>
+                        <el-form-item :label="$t('minReportTime')">
+                            <el-select :disabled="timeType.lockWorktime" v-model="timeType.minReportTime" type="number" style="width:120px;">
+                                <el-option v-for="item in minReportTimeRange" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
+                            </el-select><span style="margin-left:5px;color:#409eff">{{ $t('time.hour') }}</span>
+                        </el-form-item>
+                        <br>
                         <el-form-item :label="$t('workSettings')" prop="allday" v-if="!timeType.lockWorktime">
                             <el-checkbox v-model="timeType.fillOvertime" :label="$t('hourscanbereported')" />
                             <el-form-item v-if="timeType.fillOvertime">
@@ -713,7 +719,7 @@
                     label: 'label'
                 },
                 maxReportTimeRange: [],
-
+                minReportTimeRange:[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.5,13.0,13.5,14.0,14.5,15.0],
                 wxFilterText: '', // 企业微信搜索
 
                 searchPersonnelFlg: false,
@@ -1308,6 +1314,14 @@
                                 return
                             }
                         }
+                        //工时上下限的校验
+                        if (param.minReportTime > param.maxReportTime) {
+                            this.$message({
+                                message:this.$t('minMaxCheck'),
+                                type:"error"
+                            })
+                            return
+                        }
                         delete param.userList
                         param.customTextStatus = param.customTextStatus && param.customTextActive ? 1 : 0
                         param.customDegreeStatus = param.customDegreeStatus && param.customDegreeActive ? 1 : 0

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

@@ -2048,7 +2048,7 @@
                 subProjectList:[],
                 canEdit: true,
                 originCanEdit: true,
-                timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0],
+                timeRange:[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0],
                 selectTime:null,
                 reportTimeType:{},
                 curDate:'',
@@ -2311,6 +2311,10 @@
             if(this.user.timeType.lockWorktime){
                 this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
             }
+            //设置了下限
+            if (this.user.timeType.minReportTime) {
+                this.timeRange = this.timeRange.filter(item => {return item >= this.user.timeType.minReportTime})
+            }
 
             const that = this
             if(this.user.userNameNeedTranslate == 1) {

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

@@ -546,7 +546,7 @@ export default {
             endTime: '18:00',
             nowTime: new Date(),
             showPickerHours: false,
-            timeRange: [0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.5, 11.0, 11.5, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0],
+            timeRange: [],
             selectTime: null,
             reportTimeType: {},
             user: JSON.parse(localStorage.userInfo),
@@ -2522,8 +2522,17 @@ export default {
 
         this.today = this.format(new Date(), 'yyyy-MM-dd')
         this.timeRange = []
-        for (let i = 0.5; i <= 20; i += 0.5) {
-            this.timeRange.push(i)
+        let i = 0.0; 
+        while(true) {
+            if (i < 24) {
+                //校验上下限
+                if (i >= this.user.timeType.minReportTime && i <= this.user.timeType.maxReportTime) {
+                    this.timeRange.push(i);
+                }
+                i += 0.5;
+            } else {
+                break;
+            }
         }
         // console.log('user',this.user)
         var ua = navigator.userAgent.toLowerCase();

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

@@ -457,7 +457,7 @@
                 endTime: '18:00',
                 nowTime:new Date(),
                 showPickerHours: false,
-                timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.5,13.0,13.5,14.0,14.5,15.0],
+                timeRange:[],
                 selectTime:null,
                 reportTimeType:{},
                 user: JSON.parse(localStorage.userInfo),
@@ -2587,8 +2587,17 @@
             //     }
             // }
             this.timeRange = []
-            for(let i=0.5; i<=20; i+=0.5){
-                this.timeRange.push(i)
+            let i = 0.0; 
+            while(true) {
+                if (i < 24) {
+                    //校验上下限
+                    if (i >= this.user.timeType.minReportTime && i <= this.user.timeType.maxReportTime) {
+                        this.timeRange.push(i);
+                    }
+                    i += 0.5;
+                } else {
+                    break;
+                }
             }
             this.getDateRange()
             var ua = navigator.userAgent.toLowerCase();