ysy hai 1 ano
pai
achega
8c86ba36b4

BIN=BIN
dist.zip


+ 19 - 19
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -22,7 +22,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="次数" type="index" width="80">
+      <el-table-column label="次数" prop="index" width="80">
         <template slot-scope="{ row, $index }">
           <div
             class="tag_box"
@@ -45,13 +45,13 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="编码" type="code" minWidth="110">
+      <el-table-column label="编码" prop="code" minWidth="110">
         <template slot-scope="{ row, $index }">
           {{ row.code }}
         </template>
       </el-table-column>
 
-      <el-table-column label="名称" type="name" minWidth="140">
+      <el-table-column label="名称" prop="name" minWidth="140">
         <template slot-scope="{ row, $index }">
           {{ row.name }}
 
@@ -69,25 +69,25 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="型号" type="modelType">
+      <el-table-column label="型号" prop="modelType">
         <template slot-scope="{ row, $index }">
           {{ row.modelType }}
         </template>
       </el-table-column>
 
-      <el-table-column label="规格" type="specification">
+      <el-table-column label="规格" prop="specification">
         <template slot-scope="{ row, $index }">
           {{ row.specification }}
         </template>
       </el-table-column>
 
-      <el-table-column label="牌号" type="brandNum">
+      <el-table-column label="牌号" prop="brandNum">
         <template slot-scope="{ row, $index }">
           {{ row.brandNum }}
         </template>
       </el-table-column>
 
-      <el-table-column label="包装库存" type="brandNum">
+      <el-table-column label="包装库存" prop="brandNum">
         <template slot-scope="{ row, $index }">
           {{ row.packingCountBase }}/ {{ row.minUnit }}
         </template>
@@ -98,7 +98,7 @@
         :label="
           item.currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'
         "
-        type="weightUnit"
+        prop="weightUnit"
       >
         <template slot-scope="{ row, $index }">
           <div v-if="item.currentTaskDiagram.isFirstTask == 1">
@@ -111,7 +111,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column v-if="singleReport == 1" label="刻码" type="engrave">
+      <el-table-column v-if="singleReport == 1" label="刻码" prop="engrave">
         <template slot-scope="{ row, $index }">
           <span v-if="isDetails">{{ row.extInfo.engrave }}</span>
           <el-input
@@ -127,7 +127,7 @@
       <el-table-column
         v-if="singleReport == 1"
         label="物料代号"
-        type="materielCode"
+        prop="materielCode"
       >
         <template slot-scope="{ row, $index }">
           <span v-if="isDetails">{{ row.extInfo.materielCode }}</span>
@@ -145,7 +145,7 @@
         v-if="singleReport == 1 && deviceList.length > 0"
         width="140"
         label="设备"
-        type="deviceId"
+        prop="deviceId"
       >
         <template slot-scope="{ row, $index }">
           <el-select
@@ -171,7 +171,7 @@
         v-if="singleReport == 1 && deviceList.length > 0"
         label="炉次号"
         width="90"
-        type="heatNumber"
+        prop="heatNumber"
       >
         <template slot-scope="{ row, $index }">
           <el-input
@@ -187,7 +187,7 @@
         v-if="singleReport == 1"
         label="数量"
         width="90"
-        type="feedQuantity"
+        prop="feedQuantity"
       >
         <template slot-scope="{ row, $index }">
           <el-input
@@ -203,7 +203,7 @@
         v-if="singleReport == 1"
         label="位置"
         width="110"
-        type="position"
+        prop="position"
       >
         <template slot-scope="{ row, $index }">
           <span v-if="isDetails">{{ row.extInfo.position }}</span>
@@ -221,7 +221,7 @@
         v-if="singleReport == 1"
         label="物料重量"
         width="110"
-        type="weight"
+        prop="weight"
       >
         <template slot-scope="{ row, $index }">
           <div class="tag_box">{{ row.extInfo.newWeight ? '上' : '原' }}</div>
@@ -235,7 +235,7 @@
         v-if="singleReport == 1"
         label="报工重量"
         width="110"
-        type="feedQuantity"
+        prop="feedQuantity"
       >
         <template slot-scope="{ row, $index }">
           <span v-if="isDetails">{{ row.extInfo.reportWeight }}</span>
@@ -245,7 +245,7 @@
             class="content_num"
             v-model="row.extInfo.reportWeight"
             placeholder="报工重量"
-            type="digit"
+            prop="digit"
           />
         </template>
       </el-table-column>
@@ -253,7 +253,7 @@
       <el-table-column
         label="质检结果"
         width="80"
-        type=""
+        prop=""
         v-if="item.currentTaskDiagram.isFirstTask == 1"
       >
         <template slot-scope="{ row, $index }">
@@ -263,7 +263,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="处置" width="130" type="taskName">
+      <el-table-column label="处置" width="130" prop="taskName">
         <template slot-scope="{ row, $index }">
           <span v-if="isDetails">{{ row.extInfo.taskName }}</span>
           <el-select

+ 500 - 0
src/views/produce/components/jobBooking/components/semiProductJobBomPL.vue

@@ -0,0 +1,500 @@
+<template>
+  <div>
+    <div class="title_box rx-bc mt6">
+      <div class="name">报工信息({{ list.length || 0 }})个 </div>
+
+      <div class="rx-bc"> </div>
+    </div>
+
+    <el-table
+      ref="oneJobQualityBom"
+      class="table_content"
+      :max-height="600"
+      :data="list"
+      tooltip-effect="dark"
+      style="width: 100%"
+      stripe
+      border
+      :default-expand-all="true"
+    >
+      <el-table-column type="expand">
+        <template slot-scope="{ row, $index }">
+          <div class="material" :key="$index">
+            <div class="btn_end">
+              <el-button
+                type="primary"
+                size="mini"
+                @click="handAddListPL($index)"
+                style="margin-bottom: 4px"
+                >添加</el-button
+              >
+
+              <div class="content_table2">
+                <div class="head row rx-sc">
+                  <div class="item ww30">合格品数量</div>
+                  <div class="item ww30">报工总重量</div>
+                  <div class="item ww30">处置</div>
+                  <div class="item ww10">操作</div>
+                </div>
+
+                <div class="table">
+                  <div
+                    class="tr row rx-sc"
+                    v-for="(it, yyIdx) in row.extInfo.batchReportInfo"
+                    :key="$index + yyIdx"
+                  >
+                    <div class="item ww30">
+                      <div v-if="isDetails">{{ it.allFeedQuantity }}</div>
+                      <el-input
+                        v-else
+                        class="content_num"
+                        size="mini"
+                        v-model="it.allFeedQuantity"
+                        @input="blurNum(it, $index, yyIdx)"
+                        type="number"
+                      ></el-input>
+                    </div>
+
+                    <div class="item ww30">
+                      <div v-if="isDetails">{{ it.allReportWeight }}</div>
+                      <el-input
+                        v-else
+                        class="content_num"
+                        size="mini"
+                        v-model="it.allReportWeight"
+                        type="number"
+                      ></el-input>
+                    </div>
+
+                    <div class="item ww30">
+                      <el-select
+                        size="mini"
+                        class="content_num"
+                        filterable
+                        v-model="it.taskId"
+                        placeholder="请选择"
+                      >
+                        <el-option
+                          v-for="item in stepsList"
+                          :label="item.taskTypeName"
+                          :value="item.taskId"
+                          :key="item.taskId"
+                        >
+                        </el-option>
+                      </el-select>
+                    </div>
+
+                    <div
+                      class="item ww10 rx-cc"
+                      @click="handDel3($index, yyIdx)"
+                    >
+                      <el-link type="danger">删除</el-link>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="序号" width="55">
+        <template slot-scope="{ row, $index }">
+          {{ $index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="次数" type="index" width="80">
+        <template slot-scope="{ row, $index }">
+          <div
+            class="tag_box"
+            v-if="
+              Object.prototype.hasOwnProperty.call(row, 'extInfo') &&
+              Object.prototype.hasOwnProperty.call(
+                row.extInfo,
+                'productionTimes'
+              ) &&
+              Object.prototype.hasOwnProperty.call(
+                row.extInfo.productionTimes,
+                item.currentTaskDiagram.taskId
+              )
+            "
+          >
+            {{ row.extInfo.productionTimes[item.currentTaskDiagram.taskId] }}
+          </div>
+
+          <div class="tag_box" v-if="row.isCache">缓</div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="编码" prop="code" minWidth="110">
+        <template slot-scope="{ row, $index }">
+          {{ row.code }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="名称" prop="name" minWidth="140">
+        <template slot-scope="{ row, $index }">
+          {{ row.name }}
+
+          ({{
+            row.rootCategoryLevelId == 2
+              ? '在制品'
+              : row.rootCategoryLevelId == 23
+              ? '半成品'
+              : row.rootCategoryLevelId == 9
+              ? '产品'
+              : row.rootCategoryLevelId == 28
+              ? '废品'
+              : ''
+          }})
+        </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="规格" prop="specification">
+        <template slot-scope="{ row, $index }">
+          {{ row.specification }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="牌号" prop="brandNum">
+        <template slot-scope="{ row, $index }">
+          {{ row.brandNum }}
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="singleReport == 1"
+        :label="
+          item.currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'
+        "
+        prop="weightUnit"
+      >
+        <template slot-scope="{ row, $index }">
+          <div v-if="item.currentTaskDiagram.isFirstTask == 1">
+            {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
+          >
+          <div v-if="item.currentTaskDiagram.isFirstTask == 0">
+            {{ row.extInfo.newWeight || 0 }}
+            {{ row.extInfo.weightUnit }}</div
+          >
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        v-if="deviceList.length > 0"
+        width="140"
+        label="设备"
+        prop="deviceId"
+      >
+        <template slot-scope="{ row, $index }">
+          <el-select
+            class="content_num"
+            v-model="row.deviceId"
+            filterable
+            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="deviceList.length > 0"
+        label="炉次号"
+        width="90"
+        prop="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 label="投料数量" width="90" prop="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 label="操作" width="60px">
+        <template slot-scope="{ $index, row }">
+          <el-link type="danger" @click="getDelete($index)">删除</el-link>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+  import { getTaskInstanceList } from '@/api/produce/job';
+
+  export default {
+    name: 'semiProductJobBom',
+
+    props: {
+      list: {
+        type: Array,
+        default: () => []
+      },
+      equipmentList: {
+        type: Array,
+        default: () => []
+      },
+
+      item: {
+        type: Object,
+        default: () => {}
+      },
+      isDetails: {
+        type: Boolean,
+        default: false
+      },
+      singleReport: {
+        default: null
+      }
+    },
+
+    watch: {
+      equipmentList: {
+        immediate: true,
+        deep: true,
+        handler(newVal) {
+          this.deviceList = newVal;
+          this.changeHeatNumber();
+        }
+      }
+    },
+
+    data() {
+      return {
+        deviceList: [],
+        stepsList: []
+      };
+    },
+
+    methods: {
+      getTaskFn() {
+        getTaskInstanceList(this.item.workOrderId).then((res) => {
+          this.stepsList = res;
+        });
+      },
+
+      changeHeatNumber() {
+        this.deviceList.forEach((f) => {
+          this.list.forEach((o) => {
+            if (
+              o.deviceId &&
+              f.instanceId == o.deviceId &&
+              this.deviceList.length > 1
+            ) {
+              o.extInfo.heatNumber = f.extInfo.heatNumber;
+              this.$forceUpdate();
+            } else if (this.deviceList.length == 1) {
+              o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
+              this.$forceUpdate();
+            }
+          });
+        });
+      },
+
+      getDelete(idx) {
+        this.list.splice(idx, 1);
+      },
+
+      handAddListPL(idx) {
+        this.list[idx].extInfo.batchReportInfo.push({
+          allFeedQuantity: '',
+          allReportWeight: '',
+          taskId: '',
+          taskName: ''
+        });
+      },
+
+      blurNum(it, idx, yyIdx) {
+        let value = it.allFeedQuantity;
+        value = value.replace(/\./g, '');
+        this.$set(
+          this.list[idx].extInfo.batchReportInfo[yyIdx],
+          'allFeedQuantity',
+          value
+        );
+
+        let count = 0;
+        this.list[idx].extInfo.batchReportInfo.forEach((m) => {
+          count = count + Number(m.allFeedQuantity || 0);
+        });
+
+        if (count > this.list[idx].feedQuantity) {
+          this.$set(
+            this.list[idx].extInfo.batchReportInfo[yyIdx],
+            'allFeedQuantity',
+            0
+          );
+          this.$forceUpdate();
+
+        this.$message.info('投料合格品数不能大于投料数量')
+        }
+      },
+
+      handDel3(idx, yyIdx) {
+        this.list[idx].extInfo.batchReportInfo.splice(yyIdx, 1);
+      }
+    },
+
+    created() {
+      this.getTaskFn();
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .tag_box {
+    display: inline-block;
+    padding: 1px 6px;
+    margin-right: 6px;
+    background: #e6a23c;
+    font-size: 11px;
+    color: #fff;
+    border-radius: 2px;
+  }
+
+  .content_num {
+    --input-background-color: #f0f8f2;
+  }
+
+  .numerate {
+    font-size: 22rpx;
+    color: #157a2c;
+    cursor: pointer;
+  }
+
+  .material {
+    width: 90%;
+    margin: auto;
+  }
+
+  .btn_end {
+    text-align: right;
+    margin-bottom: 10px;
+  }
+
+  .content_table2 {
+    width: 100%;
+
+    .row {
+      width: 100%;
+
+      .item {
+        color: #404446;
+        font-size: 14px;
+        padding-left: 6px;
+        text-align: center;
+      }
+
+      .color157 {
+        color: #157a2c;
+      }
+
+      .ww20 {
+        width: 20%;
+      }
+
+      .ww30 {
+        width: 30%;
+      }
+
+      .ww25 {
+        width: 25%;
+      }
+
+      .ww35 {
+        width: 35%;
+      }
+
+      .ww10 {
+        width: 10%;
+      }
+    }
+
+    .head {
+      height: 32px;
+      background: #f7f9fa;
+      border-top: 1px solid #e3e5e5;
+      border-left: 1px solid #e3e5e5;
+
+      .item {
+        height: 32px;
+        line-height: 32px;
+        border-right: 1px solid #e3e5e5;
+        box-sizing: border-box;
+      }
+    }
+
+    .tr {
+      border-top: 1px solid #e3e5e5;
+      border-left: 1px solid #e3e5e5;
+
+      .item {
+        font-size: 12px;
+        min-height: 32px;
+        display: flex;
+        align-items: center;
+        border-right: 1px solid #e3e5e5;
+        box-sizing: border-box;
+        white-space: normal;
+        word-break: break-all;
+      }
+
+      &:last-child {
+        border-bottom: 1px solid #e3e5e5;
+      }
+    }
+  }
+
+  .formula_box {
+    font-size: 12px;
+    font-style: normal;
+    font-weight: 400;
+    margin-top: 15px;
+    color: #157a2c;
+  }
+
+  .reportWeight {
+    font-size: 12px;
+    font-style: normal;
+    font-weight: 400;
+    margin-top: 15px;
+    color: #157a2c;
+  }
+
+  .content_num {
+    display: flex;
+    align-items: center;
+    padding: 2px;
+    --input-background-color: #f0f8f2;
+  }
+</style>

+ 442 - 490
src/views/produce/components/jobBooking/index.vue

@@ -1,589 +1,541 @@
 <template>
   <div>
     <div class="top_fixed">
-      <el-button type="primary" size="mini" @click="save(2, 'all')"
-        >一键报工</el-button
-      >
-      <el-button type="primary" size="mini" @click="removeCacheFn('all')"
-        >清空缓存</el-button
-      >
-      <el-button v-if="taskObj.type == 1" type="primary" size="mini" @click="save(1, 'all')" 
-        >缓存</el-button
-      >
+      <el-button type="primary" size="mini" @click="save(2, 'all')">一键报工</el-button>
+      <el-button type="primary" size="mini" @click="removeCacheFn('all')">清空缓存</el-button>
+      <el-button v-if="taskObj.type == 1" type="primary" size="mini" @click="save(1, 'all')">缓存</el-button>
     </div>
 
     <div class="job_box">
-      <div
-        v-for="(item, index) in List"
-        :key="index"
-        class="card_box"
-        v-if="isLoad"
-      >
+      <div v-for="(item, index) in List" :key="index" class="card_box" v-if="isLoad">
         <div class="title_box rx-bc">
           <div class="name">工单信息 </div>
 
           <div class="rx-bc">
-            <el-button
-              type="text"
-              size="mini"
-              @click="openPicking(item.workOrderId, item)"
-              >添加物料</el-button
-            >
-            <el-button
-              type="text"
-              size="mini"
-              @click="removeCacheFn(item.workOrderId)"
-              >清空缓存</el-button
-            >
-            <el-button v-if="taskObj.type == 1" type="text" size="mini" @click="save(1, index)"
-              >缓存</el-button
-            >
+            <el-button type="text" size="mini" @click="openPicking(item.workOrderId, item)">添加物料</el-button>
+            <el-button type="text" size="mini" @click="removeCacheFn(item.workOrderId)">清空缓存</el-button>
+            <el-button v-if="taskObj.type == 1" type="text" size="mini" @click="save(1, index)">缓存</el-button>
           </div>
         </div>
 
         <workOrderBom :item="item"></workOrderBom>
-        <paramBom
-          v-if="item.paramDetailList.length != 0"
-          :list="item.paramDetailList"
-        ></paramBom>
-
-        <jobBom
-          :item="item"
-          :notFormed="item.notFormedList"
-          :warehouseList="warehouseList"
-        ></jobBom>
-
-        <deviceBom
-          v-if="item.equipmentList.length != 0"
-          :list="item.equipmentList"
-        ></deviceBom>
-
-        <modelBom
-          v-if="item.modelList.length != 0"
-          :list="item.modelList"
-          pattern="job"
-          ref="modelRef"
-        ></modelBom>
-
-        <palletBom
-          v-if="item.palletList.length != 0"
-          :list="item.palletList"
-        ></palletBom>
-
-        <revolvingDiskBom
-          v-if="item.revolvingDiskList.length > 0"
-          pattern="job"
-          :list="objData.revolvingDiskList"
-        >
+        <paramBom v-if="item.paramDetailList.length != 0" :list="item.paramDetailList"></paramBom>
+
+        <jobBom :item="item" :notFormed="item.notFormedList" :warehouseList="warehouseList"></jobBom>
+
+        <deviceBom v-if="item.equipmentList.length != 0" :list="item.equipmentList"></deviceBom>
+
+        <modelBom v-if="item.modelList.length != 0" :list="item.modelList" pattern="job" ref="modelRef"></modelBom>
+
+        <palletBom v-if="item.palletList.length != 0" :list="item.palletList"></palletBom>
+
+        <revolvingDiskBom v-if="item.revolvingDiskList.length > 0" pattern="job" :list="objData.revolvingDiskList">
         </revolvingDiskBom>
 
-        <semiProductJobBom
-          :singleReport="item.singleReport"
-          v-if="
-            item.semiProductList &&
-            item.semiProductList.length != 0 &&
-            taskObj.type != 4 &&
-            taskObj.type != 6
-          "
-          :item="item"
-          :list="item.semiProductList"
-          :equipmentList="item.equipmentList"
-        ></semiProductJobBom>
-
-        <oneJobQualityBom
-          :singleReport="item.singleReport"
-          v-if="
-            item.semiProductList &&
-            item.semiProductList.length != 0 &&
-            taskObj.type == 6 &&
-            item.singleReport == 1
-          "
-          :item="item"
-          :list="item.semiProductList"
-        >
+        <semiProductJobBom :singleReport="item.singleReport" v-if="
+          item.semiProductList &&
+          item.semiProductList.length != 0 &&
+          taskObj.type != 4 &&
+          taskObj.type != 6 && item.singleReport == 1
+        " :item="item" :list="item.semiProductList" :equipmentList="item.equipmentList"></semiProductJobBom>
+
+
+        <semiProductJobBomPL :singleReport="item.singleReport" v-if="
+          item.semiProductList &&
+          item.semiProductList.length != 0 &&
+          taskObj.type != 4 &&
+          taskObj.type != 6 && item.singleReport == 0
+        " :item="item" :list="item.semiProductList" :equipmentList="item.equipmentList"></semiProductJobBomPL>
+
+
+        <oneJobQualityBom :singleReport="item.singleReport" v-if="
+          item.semiProductList &&
+          item.semiProductList.length != 0 &&
+          taskObj.type == 6 &&
+          item.singleReport == 1
+        " :item="item" :list="item.semiProductList">
         </oneJobQualityBom>
 
-        <byProductBom
-          v-if="item.productRecycleList.length != 0"
-          :list="item.productRecycleList"
-        >
+        <byProductBom v-if="item.productRecycleList.length != 0" :list="item.productRecycleList">
         </byProductBom>
 
-        <turnoverBom
-          v-if="item.turnover.length != 0"
-          :list="item.turnover"
-          :wordItem="item"
-          pattern="job"
-        >
+        <turnoverBom v-if="item.turnover.length != 0" :list="item.turnover" :wordItem="item" pattern="job">
         </turnoverBom>
 
-        <aridRegion
-          v-if="item.aridRegionList.length != 0"
-          :list="item.aridRegionList"
-          :isType="true"
-        ></aridRegion>
+        <aridRegion v-if="item.aridRegionList.length != 0" :list="item.aridRegionList" :isType="true"></aridRegion>
 
         <!-- <packingBom :taskId='taskObj.id' :workOrderId="item.workOrderId" :objData="item" ref="packRef"
           v-if='taskObj.type == 4 && clientEnvironmentId != 3 && item'></packingBom> -->
 
-        <packingTgBom
-          v-if="
-            item.pickOutInList &&
-            item.pickOutInList.length != 0 &&
-            taskObj.type == 4 &&
-            clientEnvironmentId == 3
-          "
-          :list="item.pickOutInList"
-          :item="item"
-        ></packingTgBom>
+        <packingTgBom v-if="
+          item.pickOutInList &&
+          item.pickOutInList.length != 0 &&
+          taskObj.type == 4 &&
+          clientEnvironmentId == 3
+        " :list="item.pickOutInList" :item="item"></packingTgBom>
       </div>
     </div>
 
-    <pickingList
-      isType="job"
-      ref="pickingListRef"
-      @allSelection="allSelection"
-    ></pickingList>
+    <pickingList isType="job" ref="pickingListRef" @allSelection="allSelection"></pickingList>
   </div>
 </template>
 
 <script>
-  import { listByIdsReport } from '@/api/produce/job';
-  import { getWarehouseList } from '@/api/produce/index';
-  import {
-    jobSave,
-    saveCache,
-    getCache,
-    removeCache
-  } from '@/api/produce/workOrder';
-  import pickingList from '../picking/pickingList.vue';
-
-  import workOrderBom from '../feeding/components/workOrderBom.vue';
-  import paramBom from '../feeding/components/paramBom.vue';
-  import jobBom from './components/jobBom.vue';
-  import deviceBom from '../feeding/components/deviceBom.vue';
-  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 packingBom from './components/packingBom.vue';
-  import packingTgBom from './components/packingTgBom';
-
-  export default {
-    components: {
-      pickingList,
-
-      workOrderBom,
-      paramBom,
-      jobBom,
-      deviceBom,
-      modelBom,
-      palletBom,
-      revolvingDiskBom,
-      oneJobQualityBom,
-      semiProductJobBom,
-      byProductBom,
-      turnoverBom,
-      aridRegion,
-      packingBom,
-      packingTgBom
-    },
-    props: {
-      workListIds: {
-        type: Array,
-        default() {
-          return [];
-        }
+import { listByIdsReport } from '@/api/produce/job';
+import { getWarehouseList } from '@/api/produce/index';
+import {
+  jobSave,
+  saveCache,
+  getCache,
+  removeCache
+} from '@/api/produce/workOrder';
+import pickingList from '../picking/pickingList.vue';
+
+import workOrderBom from '../feeding/components/workOrderBom.vue';
+import paramBom from '../feeding/components/paramBom.vue';
+import jobBom from './components/jobBom.vue';
+import deviceBom from '../feeding/components/deviceBom.vue';
+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 semiProductJobBomPL from './components/semiProductJobBomPL.vue'
+
+import byProductBom from './components/byProductBom.vue';
+import turnoverBom from './components/turnoverBom.vue';
+import aridRegion from '../feeding/components/aridRegion.vue';
+import packingBom from './components/packingBom.vue';
+import packingTgBom from './components/packingTgBom';
+
+export default {
+  components: {
+    pickingList,
+
+    workOrderBom,
+    paramBom,
+    jobBom,
+    deviceBom,
+    modelBom,
+    palletBom,
+    revolvingDiskBom,
+    oneJobQualityBom,
+    semiProductJobBom,
+    semiProductJobBomPL,
+    byProductBom,
+    turnoverBom,
+    aridRegion,
+    packingBom,
+    packingTgBom
+  },
+  props: {
+    workListIds: {
+      type: Array,
+      default() {
+        return [];
       }
-    },
-
-    computed: {
-      taskObj() {
-        return this.$store.state.user.taskObj;
-      }
-    },
+    }
+  },
 
-    data() {
-      return {
-        List: [],
-        idsList: [],
-        isLoad: false,
+  computed: {
+    taskObj() {
+      return this.$store.state.user.taskObj;
+    }
+  },
 
-        warehouseList: [],
+  data() {
+    return {
+      List: [],
+      idsList: [],
+      isLoad: false,
 
-        loading: null
-      };
-    },
+      warehouseList: [],
 
-    computed: {
-      taskObj() {
-        return this.$store.state.user.taskObj;
-      },
+      loading: null
+    };
+  },
 
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      }
+  computed: {
+    taskObj() {
+      return this.$store.state.user.taskObj;
     },
 
-    watch: {
-      workListIds: {
-        handler(val) {
-          this.getList(val);
-        },
-        deep: true,
-        immediate: true
-      }
-    },
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
 
-    created() {
-      this.getWarehouseListFn();
-    },
+  watch: {
+    workListIds: {
+      handler(val) {
+        this.getList(val);
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+
+  created() {
+    this.getWarehouseListFn();
+  },
+
+  methods: {
+    getList(ids) {
+      this.idsList = ids || [];
+      let param = {
+        ids: ids,
+        taskId: this.taskObj.id,
+        type: 0
+      };
+      this.isLoad = false;
+      listByIdsReport(param)
+        .then((res) => {
+          this.List = res.map((obj) => {
+            if (!Object.prototype.hasOwnProperty.call(obj, 'turnover')) {
+              obj['turnover'] = [];
+            }
+            if (
+              !Object.prototype.hasOwnProperty.call(obj, 'aridRegionList')
+            ) {
+              obj['aridRegionList'] = [];
+            }
 
-    methods: {
-      getList(ids) {
-        this.idsList = ids || [];
-        let param = {
-          ids: ids,
-          taskId: this.taskObj.id,
-          type: 0
-        };
-        this.isLoad = false;
-        listByIdsReport(param)
-          .then((res) => {
-            this.List = res.map((obj) => {
-              if (!Object.prototype.hasOwnProperty.call(obj, 'turnover')) {
-                obj['turnover'] = [];
-              }
-              if (
-                !Object.prototype.hasOwnProperty.call(obj, 'aridRegionList')
-              ) {
-                obj['aridRegionList'] = [];
-              }
+            if (!Object.prototype.hasOwnProperty.call(obj, 'instanceList')) {
+              obj['instanceList'] = [];
+            }
 
-              if (!Object.prototype.hasOwnProperty.call(obj, 'instanceList')) {
-                obj['instanceList'] = [];
-              }
+            if (!Object.prototype.hasOwnProperty.call(obj, 'palletList')) {
+              obj['palletList'] = [];
+            }
 
-              if (!Object.prototype.hasOwnProperty.call(obj, 'palletList')) {
-                obj['palletList'] = [];
-              }
+            if (
+              !Object.prototype.hasOwnProperty.call(obj, 'revolvingDiskList')
+            ) {
+              obj['revolvingDiskList'] = [];
+            }
 
-              if (
-                !Object.prototype.hasOwnProperty.call(obj, 'revolvingDiskList')
-              ) {
-                obj['revolvingDiskList'] = [];
-              }
+            if (obj.palletList.length > 0) {
+              obj.palletList = obj.palletList.map((m) => {
+                return {
+                  hideKc: true, // 不显示库存
+                  quantity: m.feedQuantity,
+                  ...m
+                };
+              });
+            }
 
-              if (obj.palletList.length > 0) {
-                obj.palletList = obj.palletList.map((m) => {
-                  return {
-                    hideKc: true, // 不显示库存
-                    quantity: m.feedQuantity,
-                    ...m
-                  };
-                });
-              }
+            if (this.taskObj.type == 6 && this.clientEnvironmentId == 3) {
+              obj.semiProductList = obj.pickOutInList;
+            }
 
-              if (this.taskObj.type == 6 && this.clientEnvironmentId == 3) {
-                obj.semiProductList = obj.pickOutInList;
-              }
 
-              obj.workReportInfo = {
-                formingNum: null,
-                formingWeight: null,
-                formedNum: null,
-                formedWeight: null,
-                taskId: this.taskObj.id
-              };
+ 
 
-              obj.notFormedList = [
-                {
-                  notFormedNum: null,
-                  notFormedWeight: null,
-                  weightUnit: obj.weightUnit,
-                  unit: obj.unit,
-                  warehouseId: null // 处置 仓库id
+            if (this.clientEnvironmentId == 3 && obj.singleReport == 0) {
+        
+              obj.semiProductList.map(a => {
+                a.extInfo.batchReportInfo = [{ allFeedQuantity: '', allReportWeight: '', taskId: '', taskName: '' }]
+                return {
+                  a
                 }
-              ];
+              })
+              obj.semiProductList = JSON.parse(JSON.stringify(obj.semiProductList)) 
+
+            }
 
-              if (obj.semiProductList.length > 0) {
-                // 预制体报工
-                obj.workReportInfo.formedNum = obj.semiProductList.length;
+            obj.workReportInfo = {
+              formingNum: null,
+              formingWeight: null,
+              formedNum: null,
+              formedWeight: null,
+              taskId: this.taskObj.id
+            };
+
+            obj.notFormedList = [
+              {
+                notFormedNum: null,
+                notFormedWeight: null,
+                weightUnit: obj.weightUnit,
+                unit: obj.unit,
+                warehouseId: null // 处置 仓库id
               }
+            ];
 
-              obj.workReportInfo.formingNum = obj.formingNum;
-              obj.workReportInfo.formingWeight = obj.formingWeight;
-              obj.workReportInfo.unit = obj.unit;
-              obj.workReportInfo.weightUnit = obj.weightUnit;
-              obj.workReportInfo.workOrderId = obj.workOrderId;
+            if (obj.semiProductList.length > 0) {
+              // 预制体报工
+              obj.workReportInfo.formedNum = obj.semiProductList.length;
+            }
 
-              obj.paramDetailList.map((m) => {
-                if (m.extInfo.textType == 5) {
-                  m.remainingTime = m.extInfo.remainingTime;
-                }
-                return {
-                  ...m.extInfo
-                };
-              });
+            obj.workReportInfo.formingNum = obj.formingNum;
+            obj.workReportInfo.formingWeight = obj.formingWeight;
+            obj.workReportInfo.unit = obj.unit;
+            obj.workReportInfo.weightUnit = obj.weightUnit;
+            obj.workReportInfo.workOrderId = obj.workOrderId;
 
+            obj.paramDetailList.map((m) => {
+              if (m.extInfo.textType == 5) {
+                m.remainingTime = m.extInfo.remainingTime;
+              }
               return {
-                ...obj
+                ...m.extInfo
               };
             });
-          })
-          .finally(() => {
-            this.isLoad = true;
+            console.log(obj,444)
 
-            if (this.taskObj.type == 1) {
-              this.getCacheFn();
-            }
+            return {
+              ...obj
+            };
           });
-      },
+        })
+        .finally(() => {
+          this.isLoad = true;
 
-      openPicking(id, item) {
-        this.$refs.pickingListRef.open(id, item);
-      },
+          if (this.taskObj.type == 1) {
+            this.getCacheFn();
+          }
+        });
+    },
 
-      allSelection(id, selectList) {
-        this.List.forEach((m) => {
-          if (m.workOrderId == id) {
-            let turnover = [];
-            let equipmentList = []; // 生产设备
+    openPicking(id, item) {
+      this.$refs.pickingListRef.open(id, item);
+    },
 
-            selectList.forEach((f) => {
-              if (f.rootCategoryLevelId == 4) {
-                equipmentList = equipmentList.concat(f);
-              }
-              if (f.rootCategoryLevelId == 7) {
-                turnover = turnover.concat(f);
-              }
-            });
+    allSelection(id, selectList) {
+      this.List.forEach((m) => {
+        if (m.workOrderId == id) {
+          let turnover = [];
+          let equipmentList = []; // 生产设备
 
-            this.$set(m, 'equipmentList', equipmentList);
-            this.$set(m, 'turnover', turnover);
+          selectList.forEach((f) => {
+            if (f.rootCategoryLevelId == 4) {
+              equipmentList = equipmentList.concat(f);
+            }
+            if (f.rootCategoryLevelId == 7) {
+              turnover = turnover.concat(f);
+            }
+          });
 
-            this.$forceUpdate();
-          }
-        });
-      },
+          this.$set(m, 'equipmentList', equipmentList);
+          this.$set(m, 'turnover', turnover);
 
-      async save(type) {
-        this.loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          background: 'rgba(0, 0, 0, 0.7)'
-        });
+          this.$forceUpdate();
+        }
+      });
+    },
 
-        let bol2;
-        bol2 = this.List.every((e) => {
-          return (
-            e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
-          );
-        });
+    async save(type) {
+      this.loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+
+      let bol2;
+      bol2 = this.List.every((e) => {
+        return (
+          e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
+        );
+      });
+
+      if (!bol2) {
+        this.$message.warning('请输入合格品数量');
+        this.loading.close();
+        return false;
+      }
 
-        if (!bol2) {
-          this.$message.warning('请输入合格品数量');
-          this.loading.close();
-          return false;
+      // 预制体
+
+      let wId;
+      let bol = true;
+      let _i;
+      this.List.forEach((L) => {
+        if (L.semiProductList.length > 0 && this.taskObj.type != 4 && L.singleReport == 1) {
+          bol = L.semiProductList.every((e, i) => {
+            _i = i + 1;
+            wId = L.code;
+
+            if (this.taskObj.type == 6) {
+              return (
+                Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
+                e.extInfo.taskId
+              );
+            } else {
+              return (
+                Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
+                e.extInfo.taskId &&
+                e.extInfo.reportWeight
+              );
+            }
+          });
         }
+      });
 
-        // 预制体
-
-        let wId;
-        let bol = true;
-        let _i;
-        this.List.forEach((L) => {
-          if (L.semiProductList.length > 0 && this.taskObj.type != 4) {
-            bol = L.semiProductList.every((e, i) => {
-              _i = i + 1;
-              wId = L.code;
-
-              if (this.taskObj.type == 6) {
-                return (
-                  Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
-                  e.extInfo.taskId
-                );
-              } else {
-                return (
-                  Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
-                  e.extInfo.taskId &&
-                  e.extInfo.reportWeight
-                );
-              }
-            });
-          }
-        });
-
-        if (!bol) {
-          this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
-          this.loading.close();
+      if (!bol) {
+        this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
+        this.loading.close();
 
-          return false;
-        }
+        return false;
+      }
 
-        if (this.clientEnvironmentId != 2) {
-          let succ = this.List.some((L) => {
-            return L.productRecycleList.length > 0;
-          });
+      if (this.clientEnvironmentId != 2) {
+        let succ = this.List.some((L) => {
+          return L.productRecycleList.length > 0;
+        });
 
-          if (succ) {
-            const isRecycle = await this.checkRecycle();
-            if (!isRecycle) {
-              return false;
-            }
+        if (succ) {
+          const isRecycle = await this.checkRecycle();
+          if (!isRecycle) {
+            return false;
           }
         }
+      }
 
-        // if (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
-        // 	const isPack = await this.checkPack()
+      // if (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
+      // 	const isPack = await this.checkPack()
 
-        // 	if (!isPack) {
-        // 		return false
-        // 	}
-        // }
+      // 	if (!isPack) {
+      // 		return false
+      // 	}
+      // }
 
 
-        if (this.taskObj.type == 1 ) {
-          const isCache = await this.checkCache(type);
+      if (this.taskObj.type == 1) {
+        const isCache = await this.checkCache(type);
 
-          if (!isCache) {
-            return false;
-          }
+        if (!isCache) {
+          return false;
         }
+      }
 
-        jobSave(this.List)
-          .then((res) => {
-            this.loading.close();
-            this.$message.success('报工成功');
-            this.getList(this.idsList);
-          }).catch(() => {
+
+      jobSave(this.List)
+        .then((res) => {
+          this.loading.close();
+          this.$message.success('报工成功');
+          this.getList(this.idsList);
+        }).catch(() => {
+          this.loading.close();
+        })
+        .finally(() => {
+          setTimeout(function () {
             this.loading.close();
+          }, 3000);
+        });
+    },
+
+    checkRecycle() {
+      this.loading.close();
+      return new Promise((resolve) => {
+        this.$confirm('是否跳过副产品回收处置!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            resolve(true);
           })
-          .finally(() => {
-            setTimeout(function () {
-              this.loading.close();
-            }, 3000);
+          .catch(() => {
+            resolve(false);
           });
-      },
+      });
+    },
 
-      checkRecycle() {
-        this.loading.close();
-        return new Promise((resolve) => {
-          this.$confirm('是否跳过副产品回收处置!', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              resolve(true);
-            })
-            .catch(() => {
-              resolve(false);
-            });
-        });
-      },
+    checkCache(type) {
 
-      checkCache(type) {
-  
-        return new Promise((resolve) => {
-          if (type == 1) {
-            saveCache(this.List).then((rr) => {
-              this.$message.success('缓存成功');
-              this.loading.close();
-            });
-            resolve(false);
-          } else if (type == 2) {
-            resolve(true);
-          }
-        });
-      },
+      return new Promise((resolve) => {
+        if (type == 1) {
+          saveCache(this.List).then((rr) => {
+            this.$message.success('缓存成功');
+            this.loading.close();
+          });
+          resolve(false);
+        } else if (type == 2) {
+          resolve(true);
+        }
+      });
+    },
 
-      getCacheFn() {
-        let parma = {
-          workOrderIds: this.idsList,
-          taskId: this.taskObj.id,
-          type: 1
-        };
+    getCacheFn() {
+      let parma = {
+        workOrderIds: this.idsList,
+        taskId: this.taskObj.id,
+        type: 1
+      };
 
-        getCache(parma).then((res) => {
-          console.log(res);
-        });
-      },
+      getCache(parma).then((res) => {
+        console.log(res);
+      });
+    },
 
-      removeCacheFn(type) {
-        this.$confirm('是否清空缓存', '缓存')
-          .then(() => {
-            let parma = {
-              workOrderIds: type == 'all' ? this.idsList : [type],
-              taskId: this.taskObj.id,
-              type: 1
-            };
-            removeCache(parma).then((res) => {
-              this.$message.success('已经清空缓存');
-              this.getList(this.idsList);
-            });
-          })
-          .catch(() => {});
-      },
+    removeCacheFn(type) {
+      this.$confirm('是否清空缓存', '缓存')
+        .then(() => {
+          let parma = {
+            workOrderIds: type == 'all' ? this.idsList : [type],
+            taskId: this.taskObj.id,
+            type: 1
+          };
+          removeCache(parma).then((res) => {
+            this.$message.success('已经清空缓存');
+            this.getList(this.idsList);
+          });
+        })
+        .catch(() => { });
+    },
 
-      getWarehouseListFn() {
-        getWarehouseList().then((res) => {
-          this.warehouseList = res.data;
-        });
-      }
+    getWarehouseListFn() {
+      getWarehouseList().then((res) => {
+        this.warehouseList = res.data;
+      });
     }
-  };
+  }
+};
 </script>
 
 <style scoped lang="scss">
-  .top_fixed {
-    width: 100%;
-    height: 40px;
-    background: #fff;
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-  }
-
-  .title_box {
-    .name {
-      font-size: 14px;
-      font-style: normal;
-      font-weight: 400;
-      color: #157a2c;
-      padding-left: 5px;
-      position: relative;
-
-      &:before {
-        position: absolute;
-        content: '';
-        left: 0px;
-        top: 0px;
-        bottom: 0px;
-        width: 2px;
-        height: 14px;
-        background: #157a2c;
-        margin: auto;
-      }
+.top_fixed {
+  width: 100%;
+  height: 40px;
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.title_box {
+  .name {
+    font-size: 14px;
+    font-style: normal;
+    font-weight: 400;
+    color: #157a2c;
+    padding-left: 5px;
+    position: relative;
+
+    &:before {
+      position: absolute;
+      content: '';
+      left: 0px;
+      top: 0px;
+      bottom: 0px;
+      width: 2px;
+      height: 14px;
+      background: #157a2c;
+      margin: auto;
     }
   }
-
-  .job_box {
-    margin-top: 6px;
-    width: 100%;
-    height: calc(100vh - 70px - 50px - 80px - 60px);
-    overflow-y: scroll;
-    overflow-x: hidden;
-  }
-
-  .card_box {
-    background: #fff;
-    padding: 8px;
-    border-radius: 2px;
-  }
+}
+
+.job_box {
+  margin-top: 6px;
+  width: 100%;
+  height: calc(100vh - 70px - 50px - 80px - 60px);
+  overflow-y: scroll;
+  overflow-x: hidden;
+}
+
+.card_box {
+  background: #fff;
+  padding: 8px;
+  border-radius: 2px;
+}
 </style>