ysy пре 1 година
родитељ
комит
b2089662de

+ 161 - 3
src/views/produce/components/jobBooking/components/oneJobQualityBom.vue

@@ -6,9 +6,164 @@
       <div class="rx-bc"> </div>
     </div>
 
-    <div class="material" v-for="(it, idx) in list" :key="idx">
-      <div class="content_table"> </div>
-    </div>
+    <el-table
+      ref="oneJobQualityBom"
+      class="table_content"
+      :max-height="600"
+      :data="list"
+      tooltip-effect="dark"
+      style="width: 100%"
+      stripe
+      border
+    >
+      <el-table-column label="序号" type="index" width="55">
+        <template slot-scope="{ row, $index }">
+          {{ $index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="编码" type="code" minWidth="110">
+        <template slot-scope="{ row, $index }">
+          {{ row.code }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="名称" type="name" minWidth="110">
+        <template slot-scope="{ row, $index }">
+          {{ row.name }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="型号" type="modelType">
+        <template slot-scope="{ row, $index }">
+          {{ row.modelType }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="规格" type="specification">
+        <template slot-scope="{ row, $index }">
+          {{ row.specification }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="牌号" type="brandNum">
+        <template slot-scope="{ row, $index }">
+          {{ row.brandNum }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="包装库存" type="brandNum">
+        <template slot-scope="{ row, $index }">
+          {{ row.packingCountBase }}/ {{ row.minUnit }}
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1"
+        :label="currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'"
+        type="weightUnit"
+      >
+        <template slot-scope="{ row, $index }">
+          <div v-if="currentTaskDiagram.isFirstTask == 1">
+            {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
+          >
+          <div v-if="currentTaskDiagram.isFirstTask == 0">
+            {{ row.extInfo.newWeight || 0 }}
+            {{ row.extInfo.weightUnit }}</div
+          >
+        </template>
+      </el-table-column>
+
+      <el-table-column v-if="singleReport == 1" label="刻码" type="engrave">
+        <template slot-scope="{ row, $index }">
+          {{ row.extInfo.engrave }}
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1"
+        label="物料代号"
+        type="materielCode"
+      >
+        <template slot-scope="{ row, $index }">
+          {{ row.extInfo.materielCode }}
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1 && deviceList.length > 0"
+        width="140"
+        label="设备"
+        type="deviceId"
+      >
+        <template slot-scope="{ row, $index }">
+          <el-select
+            class="content_num"
+            v-model="row.deviceId"
+            placeholder="请选择"
+            @change="(e) => selectVal(e, row, $index)"
+            size="mini"
+          >
+            <el-option
+              v-for="item in deviceList"
+              :label="item.name + '-' + item.codeNumber"
+              :value="item.id"
+              :key="item.id"
+            >
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1 && deviceList.length > 0"
+        label="炉次号"
+        width="90"
+        type="heatNumber"
+      >
+        <template slot-scope="{ row, $index }">
+          <el-input
+            size="mini"
+            class="content_num"
+            v-model="row.extInfo.heatNumber"
+            placeholder="请输入炉次号"
+          />
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1"
+        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"
+        label="位置"
+        width="110"
+        type="feedQuantity"
+      >
+        <template slot-scope="{ row, $index }">
+          {{ row.extInfo.position }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" fixed="right" width="60px">
+        <template slot-scope="{ $index, row }">
+          <el-link type="danger" @click="getDelete($index)">删除</el-link>
+        </template>
+      </el-table-column>
+    </el-table>
   </div>
 </template>
 
@@ -33,6 +188,9 @@
       isDetails: {
         type: Boolean,
         default: false
+      },
+      singleReport: {
+        default: null
       }
     },
 

+ 1 - 10
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -6,16 +6,7 @@
       <div class="rx-bc"> </div>
     </div>
 
-    <div
-      :class="[
-        'material',
-        it.extInfo.reportWeight && it.extInfo.reportWeight && 'materialBor'
-      ]"
-      v-for="(it, idx) in list"
-      :key="idx"
-    >
-      <div class="content_table"> </div>
-    </div>
+
   </div>
 </template>
 

+ 47 - 6
src/views/produce/components/jobBooking/index.vue

@@ -74,7 +74,31 @@
         >
         </revolvingDiskBom>
 
-        <semiProductJobBom></semiProductJobBom>
+        <semiProductJobBom
+          :singleReport="item.singleReport"
+          v-if="
+            item.semiProductList &&
+            item.semiProductList.length != 0 &&
+            taskObj.taskType != 4 &&
+            taskObj.taskType != 6
+          "
+          :item="item"
+          :list="item.semiProductList"
+          :equipmentList="item.equipmentList"
+        ></semiProductJobBom>
+
+        <oneJobQualityBom
+          :singleReport="item.singleReport"
+          v-if="
+            item.semiProductList &&
+            item.semiProductList.length != 0 &&
+            taskObj.taskType == 6 &&
+            item.singleReport == 1
+          "
+          :item="item"
+          :list="item.semiProductList"
+        >
+        </oneJobQualityBom>
 
         <byProductBom
           v-if="item.productRecycleList.length != 0"
@@ -90,9 +114,17 @@
         >
         </turnoverBom>
 
-        <aridRegion  v-if='item.aridRegionList.length != 0' :list='item.aridRegionList' :isType='true'></aridRegion>
-
-        <packingBom :workOrderId='item.id' :objData='item' ref="packRef" 	></packingBom>
+        <aridRegion
+          v-if="item.aridRegionList.length != 0"
+          :list="item.aridRegionList"
+          :isType="true"
+        ></aridRegion>
+
+        <packingBom
+          :workOrderId="item.id"
+          :objData="item"
+          ref="packRef"
+        ></packingBom>
       </div>
     </div>
 
@@ -116,11 +148,12 @@
   import modelBom from '../feeding/components/modelBom.vue';
   import palletBom from './components/palletBom.vue';
   import revolvingDiskBom from '../feeding/components/revolvingDiskBom.vue';
+  import oneJobQualityBom from './components/oneJobQualityBom.vue';
   import semiProductJobBom from './components/semiProductJobBom.vue';
 
   import byProductBom from './components/byProductBom.vue';
   import turnoverBom from './components/turnoverBom.vue';
-  import aridRegion from '../feeding/components/aridRegion.vue'
+  import aridRegion from '../feeding/components/aridRegion.vue';
   import packingBom from './components/packingBom.vue';
   export default {
     components: {
@@ -133,6 +166,7 @@
       modelBom,
       palletBom,
       revolvingDiskBom,
+      oneJobQualityBom,
       semiProductJobBom,
       byProductBom,
       turnoverBom,
@@ -147,6 +181,13 @@
         }
       }
     },
+
+    computed: {
+      taskObj() {
+        return this.$store.state.user.taskObj;
+      }
+    },
+
     data() {
       return {
         List: [],
@@ -276,7 +317,7 @@
           .finally(() => {
             this.isLoad = true;
 
-            if (this.taskObj.id == 1) {
+            if (this.taskObj.type == 1) {
               this.getCacheFn();
             }
           });