Jelajahi Sumber

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

2213980799@qq.com 1 tahun lalu
induk
melakukan
8f4e8d1585

TEMPAT SAMPAH
dist.zip


+ 55 - 21
src/views/produce/components/feeding/components/instanceBom.vue

@@ -1,7 +1,9 @@
 <template>
   <div>
     <div class="title_box rx-bc mt6">
-      <div class="name">物料清单({{ list.length || 0 }})个 </div>
+      <div class="name"
+        >物料清单   ({{ list.length || 0 }})个
+      </div>
 
       <div class="rx-bc"> </div>
     </div>
@@ -59,7 +61,7 @@
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport != 0"
         :label="currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'"
         type="weightUnit"
       >
@@ -74,14 +76,18 @@
         </template>
       </el-table-column>
 
-      <el-table-column v-if="singleReport == 1" label="刻码" type="engrave">
+      <el-table-column
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport != 0"
+        label="刻码"
+        type="engrave"
+      >
         <template slot-scope="{ row, $index }">
           {{ row.extInfo.engrave }}
         </template>
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport != 0"
         label="物料代号"
         type="materielCode"
       >
@@ -91,15 +97,15 @@
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1 && deviceList.length > 0"
+        v-if="deviceList.length > 0"
         width="140"
         label="设备"
         type="deviceId"
       >
         <template slot-scope="{ row, $index }">
           <el-select
-           class="content_num"
-           filterable
+            class="content_num"
+            filterable
             v-model="row.deviceId"
             placeholder="请选择"
             @change="(e) => selectVal(e, row, $index)"
@@ -117,7 +123,7 @@
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1 && deviceList.length > 0"
+        v-if="deviceList.length > 0"
         label="炉次号"
         width="90"
         type="heatNumber"
@@ -133,18 +139,30 @@
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1"
-        label="数量"
-        width="90"
-        type="feedQuantity"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport == 0"
+        label="投料类型"
+        type="materielCode"
       >
         <template slot-scope="{ row, $index }">
-          <el-input size="mini" class="content_num" v-model="row.feedQuantity" placeholder="数量" />
+          <span style="color: #157a2c">
+            {{ workInfo.singleReport == 0 ? '批量投料' : '' }}</span
+          >
+        </template>
+      </el-table-column>
+
+      <el-table-column label="数量" width="90" type="feedQuantity">
+        <template slot-scope="{ row, $index }">
+          <el-input
+            size="mini"
+            class="content_num"
+            v-model="row.feedQuantity"
+            placeholder="数量"
+          />
         </template>
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport != 0"
         label="位置"
         width="110"
         type="feedQuantity"
@@ -154,7 +172,12 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="操作" fixed="right" width="60px" v-if="!isDetails">
+      <el-table-column
+        label="操作"
+        fixed="right"
+        width="60px"
+        v-if="!isDetails"
+      >
         <template slot-scope="{ $index, row }">
           <el-link type="danger" @click="getDelete($index)">删除</el-link>
         </template>
@@ -182,8 +205,15 @@
         type: Boolean,
         default: false
       },
-      singleReport: {
-        default: null
+      workInfo: {
+        type: Object,
+        default: () => {}
+      }
+    },
+
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
 
@@ -226,10 +256,11 @@
       },
 
       changeHeatNumber() {
-        console.log(this.deviceList);
+ 
 
         this.deviceList.forEach((f) => {
           this.list.forEach((o) => {
+
             if (
               o.deviceId &&
               f.id == o.deviceId &&
@@ -241,11 +272,14 @@
               o['deviceName'] = this.deviceList[0].name;
               o['deviceId'] = this.deviceList[0].id;
               o['workstationName'] = this.deviceList[0].workstationName;
-              o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
+              this.$set(o.extInfo, 'heatNumber', this.deviceList[0].extInfo.heatNumber);
 
-              this.$forceUpdate();
+              
+             this.$forceUpdate();
+           
             }
           });
+
         });
       }
     }
@@ -257,7 +291,7 @@
     margin-bottom: 4px;
   }
 
-  .content_num{
+  .content_num {
     --input-background-color: #f0f8f2;
   }
 </style>

+ 6 - 2
src/views/produce/components/feeding/components/semiProductBom.vue

@@ -141,13 +141,13 @@
       </el-table-column>
 
       <el-table-column
-        v-if="singleReport == 1"
+      
         label="数量"
         width="90"
         type="feedQuantity"
       >
         <template slot-scope="{ row, $index }">
-          <el-input size="mini" v-model="row.feedQuantity" placeholder="数量" />
+          <el-input size="mini"  class="content_num" v-model="row.feedQuantity" placeholder="数量" />
         </template>
       </el-table-column>
 
@@ -269,4 +269,8 @@
   .mb4 {
     margin-bottom: 4px;
   }
+
+  .content_num{
+    --input-background-color: #f0f8f2;
+  }
 </style>

+ 6 - 3
src/views/produce/components/feeding/index.vue

@@ -33,11 +33,11 @@
         </modelBom>
 
         <instanceBom v-if="item.instanceList.length != 0" :list="item.instanceList" :equipmentList="item.equipmentList"
-          :currentTaskDiagram="item.currentTaskDiagram" :singleReport="item.singleReport"></instanceBom>
+          :currentTaskDiagram="item.currentTaskDiagram" :workInfo="item" ></instanceBom>
 
         <semiProductBom v-if="item.semiProductList.length != 0" :list="item.semiProductList"
           :equipmentList="item.equipmentList" :currentTaskDiagram="item.currentTaskDiagram"
-          :singleReport="item.singleReport"></semiProductBom>
+          :workInfo="item" ></semiProductBom>
 
         <turnoverBom v-if="item.turnover.length != 0" :wordItem="item" :list="item.turnover" pattern="feed">
         </turnoverBom>
@@ -106,7 +106,10 @@ export default {
   computed: {
     taskObj() {
       return this.$store.state.user.taskObj;
-    }
+    },
+    clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
   },
 
   watch: {

+ 1 - 1
src/views/produce/components/routings.vue

@@ -44,7 +44,7 @@
 <script>
   import { getTaskInstanceList } from '@/api/produce/job';
   import feedDetails from '../components/feeding/details.vue';
-  import jobDetails from '../components//jobBooking/details.vue';
+  import jobDetails from '../components/jobBooking/details.vue';
   export default {
     components: {
       feedDetails,