Browse Source

调整查看报工

Lijy 1 year ago
parent
commit
c20dbd66a1

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -133,6 +133,10 @@ export default {
         finishNum: this.reportForm.finishNum,
         isFinish: this.reportForm.isFinish
       };
+      const { id, reportBoolean } = this.$route.query;
+      if(reportBoolean == 'true') {
+        postData.id = id;
+      }
       if (this.reportForm.isFinish) {
         if (this.reportForm.check_type != 0) {
           if (this.reportForm.checker_id == null) {
@@ -159,7 +163,11 @@ export default {
       console.log(this.reportForm.checkedSteelNum);
     },
     getMyPlanProcedureList() {
-      this.$axios.post("/plan-procedure-total/getFillProcedureDetail", { id: this.$route.query.id,inputSteelNum:this.inputSteelNum})
+      const { id, reportBoolean } = this.$route.query;
+      this.$axios.post("/plan-procedure-total/getFillProcedureDetail", { 
+        id: id,
+        inputSteelNum:this.inputSteelNum
+      })
         .then(res => {
           if (res.code == "ok") {
             this.reportForm = res.data;

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

@@ -31,7 +31,7 @@
           <div v-if="prod.vehicle_num_start && prod.vehicle_num_end">{{ prod.vehicle_num_start }}-{{ prod.vehicle_num_end
           }}</div>
         </div>
-        <div class="distribution_box" v-for="item, index in prod.procedureList" :key="index" @click="reportItem(item)">
+        <div class="distribution_box" v-for="item, index in prod.procedureList" :key="index" @click="reportItem(item, prod)">
           <div>
             <van-row>
               <van-col span="19">{{ prod.plan_type == 0 ? item.procedure_name : prod.task_change_notice_num }}</van-col>
@@ -243,7 +243,8 @@ export default {
             progress: item.progress,
             work_time: item.workTime,
             finishNum: item.finishNum,
-            id: item.id
+            id: item.id,
+            userProcedureTeamId: item.userProcedureTeamId,
           })
         }
         obj.procedureList = arr
@@ -254,11 +255,12 @@ export default {
     },
 
     //打开报工页面
-    reportItem(item) {
+    reportItem(item, prod) {
       this.$router.push({
         path: '/fillReport',
         query: {
-          id: item.id
+          id: this.reportBoolean ? item.id : item.userProcedureTeamId,
+          reportBoolean: this.reportBoolean
         }
       })
     },