소스 검색

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

zx 1 년 전
부모
커밋
5647782297

+ 4 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -305,6 +305,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
             List<String> foremanIds = planList.stream().map(Plan::getForemanId).distinct().collect(Collectors.toList());
             List<User> userList = userMapper.selectBatchIds(foremanIds);
             for (Plan plan : planList) {
+                if(plan.getStatus()==1){
+                    continue;
+                }
                 Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(plan.getForemanId())).findFirst();
                 if(first.isPresent()){
                     //todo:推送到企业微信
@@ -316,6 +319,7 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                     plan.setStatus(1);
                 }else msg.setError("验证失败");
             }
+            updateBatchById(planList);
         }
         return msg;
     }

+ 10 - 5
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/router/index.js

@@ -33,7 +33,8 @@ const router = new Router({
         }
     },
     {
-        path: "/todayPlan",
+        // path: "/todayPlan",
+        path: "/plan/today",
         component: () => import("@/views/planView/todayPlan/todayPlan"),
         meta: {
             title: "今日计划",
@@ -50,7 +51,8 @@ const router = new Router({
         }
     },
     {
-        path: "/tomorrowPlan",
+        // path: "/tomorrowPlan",
+        path: "/plan/tomorrow",
         component: () => import("@/views/planView/tomorrowPlan/tomorrowPlan"),
         meta: {
             title: "明日计划",
@@ -58,7 +60,8 @@ const router = new Router({
         }
     },
     {
-        path: "/InsertionPlan",
+        // path: "/InsertionPlan",
+        path: "/plan/orderInsert",
         component: () => import("@/views/planView/InsertionPlan/InsertionPlan"),
         meta: {
             title: "插单计划",
@@ -75,7 +78,8 @@ const router = new Router({
         }
     },
     {
-        path: "/statisticsView",
+        // path: "/statisticsView",
+        path: "/statistic",
         component: () => import("@/views/statisticsView/statisticsView"),
         meta: {
             title: "数据统计",
@@ -99,7 +103,8 @@ const router = new Router({
         }
     },
     {
-        path: "/workView",
+        // path: "/workView",
+        path: "/report",
         component: () => import("@/views/workView/workView"),
         meta: {
             title: "报工",

+ 6 - 4
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/index/index.vue

@@ -184,19 +184,20 @@ export default {
                 {
                     name: '今日计划',
                     moudelName: '今日计划',
-                    url: '/todayPlan',
+                    // url: '/todayPlan',
+                    url: '/plan/today',
                     icon: 'balance-list-o'
                 },
                 {
                     name: '明日计划',
                     moudelName: '明日计划',
-                    url: '/tomorrowPlan',
+                    url: '/plan/tomorrow',
                     icon: 'balance-list-o'
                 },
                 {
                     name: '插单计划',
                     moudelName: '插单计划',
-                    url: '/InsertionPlan',
+                    url: '/plan/orderInsert',
                     icon: 'balance-list-o'
                 },
                 {
@@ -215,7 +216,8 @@ export default {
                 {
                     name: '报工',
                     moudelName: '查看报工',
-                    url: '/workView',
+                    // url: '/workView',
+                    url: '/report',
                     icon: 'balance-list-o'
                 },
             ]

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

@@ -9,8 +9,8 @@
         <div class="OutSide_center">
           <div class="block">
             <span class="demonstration">查询以往{{ titleText }}</span>
-            <el-date-picker v-model="planDate" type="date" value-format="yyyy-MM-dd" @change="getTableData(hasChooseDept)"
-              placeholder="选择日期" size="small">
+            <el-date-picker v-model="planDate" type="date" value-format="yyyy-MM-dd" :clearable="false" @change="getTableData(hasChooseDept)"
+              placeholder="选择日期" size="small" :picker-options="planType == 1 ? toMPickerOptions : todayPickerOptions">
             </el-date-picker>
           </div>
           <div class="OutSide" style="padding-bottom: 0;">
@@ -129,11 +129,11 @@
             </el-cascader>
           </el-form-item>
           <el-form-item label="工长" prop="foremanName">
-            <el-input v-model="todayPlanForm.foremanName" disabled></el-input>
+            <el-input v-model="todayPlanForm.foremanName" readonly></el-input>
           </el-form-item>
           <el-form-item label="开工时间" prop="startDate">
             <el-date-picker class="w100" v-model="todayPlanForm.startDate" type="date" placeholder="选择日期"
-              value-format="yyyy-MM-dd">
+              value-format="yyyy-MM-dd" readonly>
             </el-date-picker>
           </el-form-item>
           <el-form-item label="完工时间" prop="endDate">
@@ -196,6 +196,16 @@ export default {
   },
   data() {
     return {
+      todayPickerOptions: {
+        disabledDate(v) {
+          return v.getTime() > Date.now();
+        }
+      },
+      toMPickerOptions: {
+        disabledDate(v) {
+          return v.getTime() < Date.now();
+        }
+      },
       steelStampNumber: "",
       planDate: this.todayDate,
       deptSetDialog: false,
@@ -218,7 +228,7 @@ export default {
         stationId: "",
         foremanId: "",
         foremanName: "",
-        startDate: "",
+        startDate: this.todayDate,
         endDate: "",
         describtion: "",
         versionNumber: "",
@@ -240,12 +250,12 @@ export default {
         ],
         productId: [{ required: true, message: "产品名称", trigger: "blur" }],
         projectCode: [{ required: true, message: "项目代码", trigger: "blur" }],
-        steelStampNumberStart: [
-          { required: true, message: "钢印号", trigger: "blur" },
-        ],
-        steelStampNumberEnd: [
-          { required: true, message: "钢印号", trigger: "blur" },
-        ],
+        // steelStampNumberStart: [
+        //   { required: true, message: "钢印号", trigger: "blur" },
+        // ],
+        // steelStampNumberEnd: [
+        //   { required: true, message: "钢印号", trigger: "blur" },
+        // ],
         num: [{ required: true, message: "数量", trigger: "blur" }],
         mainProcess: [{ required: true, message: "主工序", trigger: "blur" }],
         stationId: [{ required: true, message: "工位", trigger: "blur" }],
@@ -258,6 +268,7 @@ export default {
   watch: {},
   created() { },
   mounted() {
+    console.log(this.planType, '费雷')
     this.getDepartmentList(),
       this.getPlanDeptSet(),
       this.getHasSetPlanDeptList(),
@@ -316,7 +327,6 @@ export default {
         this.departmentIdArray,
         JSON.stringify(this.departmentIdArray)
       );
-      return
       let arr = [];
       for (var i in this.departmentIdArray) {
         arr.push(
@@ -493,13 +503,60 @@ export default {
     },
     addPlan() {
       this.titleName = `新增${this.titleText}`;
+      this.initTodayPlanForm()
       this.editPlanDiaLog = true;
       this.getDepartmentList();
       this.getProductList();
       // this.todayPlanForm
     },
+    // 初始化 Form
+    initTodayPlanForm() {
+      this.todayPlanForm = {
+        id: null,
+        productSchedulingNum: "",
+        productId: "",
+        projectCode: "",
+        steelStampNumberStart: "",
+        steelStampNumberEnd: "",
+        num: "",
+        mainProcess: "",
+        progress: "",
+        stationId: "",
+        foremanId: "",
+        foremanName: "",
+        startDate: this.todayDate,
+        endDate: "",
+        describtion: "",
+        versionNumber: "",
+      }
+    },
     addPlanData(formName) {
       console.log(this.todayPlanForm);
+      if(!this.todayPlanForm.steelStampNumberStart){
+          if(this.todayPlanForm.steelStampNumberEnd){
+              this.$message({
+                  message:"钢印号区间填写不完整",
+                  type: "error",
+              });
+              return  
+          }
+      }
+      if(!this.todayPlanForm.steelStampNumberEnd){
+          if(this.todayPlanForm.steelStampNumberStart){
+              this.$message({
+                  message:"钢印号区间填写不完整",
+                  type: "error",
+              });
+              return
+          }
+      }
+      if(this.todayPlanForm.endDate<this.todayPlanForm.startDate){
+        this.$message({
+                  message:"完工日期不能小于开工日期",
+                  type: "error",
+              });
+              return
+      }
       this.$refs[formName].validate((valid) => {
         if (valid) {
           console.log(this.todayPlanForm, "传给后端的值");
@@ -524,7 +581,6 @@ export default {
                   type: "success",
                 });
                 this.editPlanDiaLog = false;
-                this.todayPlanForm = [];
                 this.getTableData(this.hasChooseDept);
               } else {
                 this.$message({