chencc před 1 rokem
rodič
revize
f35cf44aec

+ 18 - 0
src/api/produce/workOrder.js

@@ -197,3 +197,21 @@ export async function listApplystorage(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+
+// 获取配置信息
+export async function packageDisposition(data) {
+  const res = await request.get('/main/category/packageDisposition/'+data,{});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function packingReport(data) {
+  const res = await request.post('/pda/mes/workreport/packingReport', data);
+
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 0
src/views/produce/components/feeding/index.vue

@@ -22,6 +22,15 @@
 
         <workOrderBom :item="item"></workOrderBom>
 
+        <div v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && item.currentTaskDiagram.type == 1">
+          <div class="title_box rx-bc">
+            <div class="name">投料时间 </div>
+          </div>
+          <el-date-picker v-model="item.executorTime" type="date" value-format="yyyy-MM-dd HH:dd:ss" placeholder="选择日期">
+          </el-date-picker>
+          <!--  -->
+        </div>
+
         <paramBom v-if="item.paramDetailList.length != 0" :list="item.paramDetailList"></paramBom>
 
         <deviceBom v-if="item.equipmentList.length != 0" :list="item.equipmentList"></deviceBom>
@@ -387,6 +396,7 @@ export default {
 }
 
 .title_box {
+  padding: 5px 0;
   .name {
     font-size: 14px;
     font-style: normal;

+ 139 - 104
src/views/produce/components/jobBooking/components/jobBom.vue

@@ -26,10 +26,10 @@
             <div class="content">{{ item.formingWeight }}{{ item.weightUnit }}</div>
           </div>
         </div>
-       
-    
 
-        <div class="item rx-sc" v-if="(clientEnvironmentId == 3 && item.singleReport == 0) ||  taskObj.type == 4 || clientEnvironmentId == 2">
+
+        <!-- v-if="(clientEnvironmentId == 3 && item.singleReport == 0) ||  taskObj.type == 4 || clientEnvironmentId == 2" -->
+        <div class="item rx-sc">
           <div class="rx ww40">
             <div class="lable lable100 rx-cc">合格品数量</div>
             <div class="content content_num rx-sc">
@@ -48,8 +48,9 @@
             </div>
           </div>
         </div>
-
-        <div class="item rx-sc" v-for="(not, notIndex) in notFormedList" :key="notIndex" v-if="(clientEnvironmentId == 3 && item.singleReport == 0) ||  taskObj.type == 4 || clientEnvironmentId == 2">
+        <!-- v-if="(clientEnvironmentId == 3 && item.singleReport == 0) || taskObj.type == 4 || clientEnvironmentId == 2" -->
+        <div class="item rx-sc" v-for="(not, notIndex) in notFormedList" :key="notIndex"
+          >
           <div class="rx ww40">
             <div class="lable lable100 rx-cc">不合格数量</div>
             <div class="content content_num rx-sc">
@@ -68,7 +69,7 @@
             </div>
           </div>
 
-          <div class="rw ww20 rx-cc">
+          <!-- <div class="rw ww20 rx-cc">
             <div class="penalize" v-if="!isDetails" :style="{ background: not.warehouseId ? '#FFA07A' : '' }"
               @click="penalize">
               处置</div>
@@ -76,11 +77,38 @@
               handleView(isDetails ? not.warehouseName : item.warehouseName)
               ">
               查看</div>
+          </div> -->
+        </div>
+
+        <!-- 报工备注 -->
+        <div class="item rx-sc">
+          <div class="rx ww43" v-if="Object.prototype.hasOwnProperty.call(item, 'product') && clientEnvironmentId != 3">
+            <div class="lable lable100 rx-cc">报工备注</div>
+            <div class="content content_num rx-sc">
+              <el-input size="mini" v-model="item.workReportInfo.remark" placeholder="请输入报工备注" >
+
+              </el-input>
+
+            </div>
+          </div>
+
+          <div class="rx ww43">
+            <div class="lable lable100 rx-cc">批次号</div>
+            <div class="content content_num rx-sc">
+              <el-input size="mini" v-model="item.workReportInfo.batchNo" placeholder="请输入批次号"
+                >
+
+              </el-input></div>
           </div>
+
         </div>
       </div>
     </div>
 
+ 
+
+
+
     <el-dialog title="仓库处置" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
       :close-on-press-escape="false" append-to-body width="500px">
       <el-form size="mini" :model="form" label-width="96px">
@@ -100,6 +128,9 @@
   </div>
 </template>
 <script>
+
+
+
 export default {
   props: {
     item: {
@@ -133,8 +164,8 @@ export default {
   computed: {
 
     taskObj() {
-        return this.$store.state.user.taskObj;
-      },
+      return this.$store.state.user.taskObj;
+    },
 
     clientEnvironmentId() {
       return this.$store.state.user.info.clientEnvironmentId;
@@ -194,6 +225,8 @@ export default {
       let total =
         Number(this.item.workReportInfo.formedNum) +
         Number(this.notFormedList[0].notFormedNum);
+
+      console.log(total,'9****');
       this.$emit('modeNum', total);
 
       if (
@@ -221,6 +254,8 @@ export default {
         weight = parseFloat(weight.toFixed(2));
       }
 
+      console.log(this.item,'weight');
+
       this.$set(this.item.workReportInfo, 'formedWeight', weight);
 
       this.$forceUpdate();
@@ -240,7 +275,7 @@ export default {
       this.$set(this.notFormedList[0], 'notFormedWeight', weight)
 
 
-      if (  this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.notFormedList[0].notFormedNum)) {
+      if (this.item.product[0] && this.item.product[0].feedQuantity > 0 && Number(this.notFormedList[0].notFormedNum)) {
         this.$set(this.item.workReportInfo, 'formedNum', this.item.product[0].feedQuantity - Number(this
           .notFormedList[0]
           .notFormedNum))
@@ -291,122 +326,122 @@ export default {
 
 
 .content_table {
-    width: 100%;
-    border: 1px solid #e3e5e5;
-    position: relative;
-
-    .item {
-      display: flex;
-      border-bottom: 1px solid #e3e5e5;
+  width: 100%;
+  border: 1px solid #e3e5e5;
+  position: relative;
 
-      .lable {
-        width: 72px;
-        text-align: center;
-        background-color: #f7f9fa;
-        font-size: 12px;
-        border-right: 1px solid #e3e5e5;
-        flex-shrink: 0;
-      }
-
-      .lable80 {
-        width: 80px !important;
-        font-size: 12px;
-      }
+  .item {
+    display: flex;
+    border-bottom: 1px solid #e3e5e5;
 
-      .lable90 {
-        width: 90px !important;
-      }
-
-      .lable100 {
-        width: 100px !important;
-      }
+    .lable {
+      width: 72px;
+      text-align: center;
+      background-color: #f7f9fa;
+      font-size: 12px;
+      border-right: 1px solid #e3e5e5;
+      flex-shrink: 0;
+    }
 
+    .lable80 {
+      width: 80px !important;
+      font-size: 12px;
+    }
 
-      .ww60 {
-        width: 60px;
-      }
+    .lable90 {
+      width: 90px !important;
+    }
 
-      .content {
-        width: 250px;
-        min-height: 32px;
-        font-size: 14px;
-        line-height: 14px;
-        font-style: normal;
-        font-weight: 400;
-        padding: 9px 4px;
-        box-sizing: border-box;
-        word-wrap: break-word;
-        flex-grow: 1 !important;
-
-        .unit {
-          padding: 0 2px;
-          font-size: 12px;
-          color: #404446;
-        }
-      }
+    .lable100 {
+      width: 100px !important;
+    }
 
-      .content_num {
-        display: flex;
-        align-items: center;
-        padding: 2px;
-        --input-background-color: #f0f8f2;
-      }
 
-      .pd2 {
-        padding: 2px 4px;
-      }
+    .ww60 {
+      width: 60px;
+    }
 
-      &:last-child {
-        border-bottom: none;
+    .content {
+      width: 250px;
+      min-height: 32px;
+      font-size: 14px;
+      line-height: 14px;
+      font-style: normal;
+      font-weight: 400;
+      padding: 9px 4px;
+      box-sizing: border-box;
+      word-wrap: break-word;
+      flex-grow: 1 !important;
+
+      .unit {
+        padding: 0 2px;
+        font-size: 12px;
+        color: #404446;
       }
     }
 
-    .ww55 {
-      width: 55%;
+    .content_num {
+      display: flex;
+      align-items: center;
+      padding: 2px;
+      --input-background-color: #f0f8f2;
     }
 
-    .ww50 {
-      width: 50%;
+    .pd2 {
+      padding: 2px 4px;
     }
 
-    .ww45 {
-      width: 45%;
+    &:last-child {
+      border-bottom: none;
     }
+  }
 
-    .ww40 {
-      width: 40%;
-    }
+  .ww55 {
+    width: 55%;
+  }
 
-    .ww30 {
-      width: 30%;
-    }
+  .ww50 {
+    width: 50%;
+  }
 
-    .ww33 {
-      width: 33.33%;
-    }
+  .ww45 {
+    width: 45%;
+  }
 
-    .ww20 {
-      width: 20%;
-    }
+  .ww40 {
+    width: 40%;
+  }
 
-    .del_box {
-      position: absolute;
-      right: 2px;
-      top: 2px;
-    }
+  .ww30 {
+    width: 30%;
+  }
 
-    .sort_index {
-      position: absolute;
-      left: 2px;
-      top: 2px;
-      width: 14px;
-      height: 14px;
-      line-height: 14px;
-      text-align: center;
-      color: #fff;
-      font-size: 12px;
-      border-radius: 50%;
-      background: rgb(21, 122, 44);
-    }
+  .ww33 {
+    width: 33.33%;
   }
+
+  .ww20 {
+    width: 20%;
+  }
+
+  .del_box {
+    position: absolute;
+    right: 2px;
+    top: 2px;
+  }
+
+  .sort_index {
+    position: absolute;
+    left: 2px;
+    top: 2px;
+    width: 14px;
+    height: 14px;
+    line-height: 14px;
+    text-align: center;
+    color: #fff;
+    font-size: 12px;
+    border-radius: 50%;
+    background: rgb(21, 122, 44);
+  }
+}
 </style>

+ 0 - 1
src/views/produce/components/jobBooking/components/oneJobQualityBom.vue

@@ -2,7 +2,6 @@
   <div>
     <div class="title_box rx-bc mt6">
       <div class="name">报工信息({{ list.length || 0 }})个 </div>
-
       <div class="rx-bc"> </div>
     </div>
 

+ 908 - 0
src/views/produce/components/jobBooking/components/packagingGrouping.vue

@@ -0,0 +1,908 @@
+<template>
+
+    <div>
+        <div class="col userInp " style="display: flex; align-items: center;">
+            <div class="label lable150 rx-cc" style="width: 100px !important;">规格选择:</div>
+            <el-select v-model="Usertype" placeholder="请选择" @change="changeUserType">
+                <el-option v-for="item in localdataList" :key="item.value" :label="item.text" :value="item.value">
+                </el-option>
+            </el-select>
+            <!-- multiple -->
+            <!-- <zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
+				@change="changeUserType"></zxz-uni-data-select> -->
+        </div>
+        <div v-for="(item, i) in DispositionList" :key="i">
+            <div class="title_box rx-bc mt6">
+                <div class="name">{{ item.titel }}</div>
+
+                <div class="rx-bc"> </div>
+            </div>
+
+            <div>
+                <div class="material ">
+
+                    <div class="content_table">
+                        <div class="item">
+                            <div class="lable rx-cc">包装总数 </div>
+                            <div class="content content_num">
+                                <el-input class="uni-el-input" v-model="formedNumLast" type="number"
+                                   v-if="i == 0"  @input="changeinput" style="width: 200px;"></el-input>
+                                <el-input class="uni-el-input" v-model="item.formedNumLast" type="number"
+                                   v-else disabled  style="width: 200px;"></el-input>
+                                <div class="unit">{{ item.packageUnit }}</div>
+
+                            </div>
+                        </div>
+
+                        <div class="item rx-sc">
+                            <div class="rx ww55 ">
+                                <div class="lable lable200 rx-cc ">{{ item.titel }}单元</div>
+                                <div class="content content_num">
+                                    <el-input class="uni-el-input" v-model="item.packageCell" disabled
+                                        style="width: 200px;"></el-input>
+                                    <div class="unit">{{ item.packageUnit }}</div>/<div class="unit">{{
+                                        item.conversionUnit }}</div>
+                                </div>
+                            </div>
+
+                        </div>
+
+                    </div>
+
+                    <div class="content_table2" v-if='item.splitList.length'>
+                        <el-table :data="item.splitList" style="width: 100%">
+                            <el-table-column prop="computeSize" label="序号" width="65">
+                                <template v-slot="{ row, $index }">
+                                    {{ row.computeSize }}
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="name" label="数量">
+                                <template v-slot="{ row, $index }">
+                                    <div style="display: flex;align-items: center;">
+                                        <el-input class="uni-el-input" v-model="row.quantity" disabled type="digit"
+                                            style="width: 200px;"></el-input>
+                                        <div style="width: 260rpx; font-size: 22rpx;"> {{ row.unit }}/{{
+                                            row.packageUnit }}
+                                        </div>
+                                    </div>
+
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="totalQuantity" label="计量数" width="100">
+                            </el-table-column>
+                            <el-table-column prop="code" label="条码">
+                            </el-table-column>
+                        </el-table>
+
+
+                    </div>
+
+
+
+                </div>
+            </div>
+
+            <!-- <SearchPopup mode="center" v-if='show'>
+			<template v-slot:list>
+				<div class="search_list">
+
+					<u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
+
+						<u-form-item label="外包装数:" class="required-form" borderBottom prop="assetType">
+							<el-input class="uni-el-input" v-model="formData.wPackNum" style="width: 280rpx;"
+								placeholder="外包装数"></el-input> / {{ splitList[0].unit }}
+						</u-form-item>
+
+					</u-form>
+
+				</div>
+			</template>
+
+<template v-slot:operate>
+				<div class="operate_box rx-bc">
+					<u-button size="small" class="u-reset-button" @click="calculationClose()">
+						取消
+					</u-button>
+
+					<u-button type="success" size="small" class="u-reset-button" @click="calculationReset()">
+						重置
+					</u-button>
+
+
+					<u-button type="success" size="small" class="u-reset-button" @click="calculationSave()">
+						确定
+					</u-button>
+
+				</div>
+			</template>
+
+</SearchPopup> -->
+        </div>
+    </div>
+</template>
+
+<script>
+import {
+    packageDisposition,
+    packingReport
+} from '@/api/produce/workOrder';
+
+// import {
+// 	getByCode
+// } from '@/api/pda/common.js'
+// import {
+// 	cancelPacking,
+// 	packingReport,
+// 	getPackingReport,
+// 	packingReportRepeat,
+// 	packageDisposition,
+// 	getPackingReportRepeat
+// } from '@/api/pda/workOrder.js'
+// import SearchPopup from '../../components/searchPopup.vue'
+export default {
+    // components: {
+    // 	SearchPopup
+    // },
+    props: {
+        objData: {
+            type: Object,
+            default: () => { }
+        },
+
+        taskId: {
+            type: String,
+            default: ''
+        },
+
+        workOrderId: {
+            type: String,
+            default: ''
+        }
+    },
+    data() {
+        return {
+            formedNumLast: 100,
+
+            quantity: '',
+            unit: '',
+            Usertype: "",// 规格
+            unitList: [],
+            resObj: {},
+            splitList: [],
+            localdataList: [],
+            newDispositionList: [],
+            withinQuantity: '',//内包装数量
+            withinUnit: '',//内包装单位
+            outsideQuantity: '',//外包装数量
+            outsideUnit: '',//外包装单位
+            timeout: null,
+            packUnit: null,
+            temporaryNum: 0,
+            temporaryCount: 0,
+            temporaryList: [],
+            packTwoList: [],
+
+            selectList: [],
+            span: '',
+            value: '',
+            minimumPackage: [],// 最小包装
+            withinPackage: [],// 内包装
+            minimumUnit: '',
+            outsidePackage: [], //外包装
+            newCategoryId: '',
+            DispositionList:[],
+            show: false,
+            formData: {
+                wPackNum: null,
+            },
+            // clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
+
+        }
+    },
+    watch: {
+
+        objData: {
+            handler(newVal) {
+                if (newVal.product && newVal.product.length) {
+
+                    this.newCategoryId = newVal.product[0].categoryId;
+                    this.formedNumLast = newVal.formedNumLast || newVal.product[0].feedQuantity;
+                } else {
+                    this.formedNumLast = 0;
+                }
+
+                console.log(newVal);
+
+                console.log(this.newCategoryId,'5555555555');
+                this.packageDispositionFn();
+                
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    created() {
+        // this.formedNumLast = this.objData.product[0].feedQuantity;
+
+        // this.byCode();
+
+        // this.packageDispositionFn();
+        // this.getPackingDetails()
+        // this.getPackingDetailsTwo()
+    },
+
+    methods: {
+
+
+        // 输入数量变化
+        changeinput(e) {
+
+  
+            clearTimeout(this.timeout)
+            // 设置新的定时器
+            this.timeout = setTimeout(() => {
+                this.formedNumLast = e;
+          
+                this.initFn(this.selectList);
+            }, 500) // 500毫秒后触发
+
+        },
+
+        changeUserType(e) {
+            let list = this.localdataList.find(item => item.value === e)
+            // this.text = e.text;
+            // this.value = e.value;
+            this.selectList = list.arr;
+            this.initFn(list.arr);
+        },
+        groupBy(arr, key) {
+            return arr.reduce((acc, obj) => {
+                const groupKey = obj[key];
+                if (!acc[groupKey]) {
+                    acc[groupKey] = [];
+                }
+                console.log();
+                acc[groupKey].push(obj);
+                return acc;
+            }, {});
+        },
+
+        async packageDispositionFn() {
+            console.log();
+            if(!this.newCategoryId) return;
+            let that = this;
+            const res = await packageDisposition(this.newCategoryId);
+
+            if (res.length) {
+                res.shift();
+                let data = JSON.parse(JSON.stringify(res));
+                let list = this.groupBy(data, 'code');
+                this.localdataList = [];
+                Object.entries(list).forEach(([key, value]) => {
+
+                    let obj = {
+                        text: value[0].name,
+                        arr: value,
+                        value: key
+                    }
+                    this.localdataList.push(obj);
+                });
+
+                this.Usertype = this.localdataList[0].value;
+                this.text = this.localdataList[0].text;
+                this.value = this.localdataList[0].value;
+                res.map(v => {
+                    v.splitList = [];
+                })
+                this.newDispositionList = res;
+                this.selectList = res;
+
+                this.initFn(this.localdataList[0].arr);
+                // this.listFn(this.localdataList[0].arr);
+
+            }
+
+        },
+
+        initFn(v) {
+            if (v.length) {
+                this.withinQuantity = v[1].packageCell;//内包装数量
+                this.withinUnit = v[1].conversionUnit;//内包装单位
+                this.outsideQuantity = v[2].packageCell;//外包装数量
+                this.outsideUnit = v[2].conversionUnit;//外包装单位
+                this.minimumUnit = v[0].conversionUnit;
+            };
+            this.handleSplit(v[0]);
+        },
+
+        async listFn(res) {
+
+            let { minimumPackage, withinQuantity, outsidePackage, outsideQuantity, withinPackage } = res;
+            let textList = ['最小包装', '内包装', '外包装'];
+            let arr = [{ list: minimumPackage }, { list: withinPackage, num: withinQuantity }, { list: outsidePackage, num: outsideQuantity }];
+
+            this.minimumPackage = minimumPackage;// 最小包装
+            this.withinPackage = withinPackage;// 内包装
+            this.outsidePackage = outsidePackage; //外包装
+
+            this.newDispositionList.map((v, i) => {
+                v.splitList = arr[i].list;
+                v.titel = textList[i];
+                if (i == 0) {
+                    v.formedNumLast = this.formedNumLast;
+                } else {
+                    v.formedNumLast = arr[i].num;
+                }
+            })
+            this.$nextTick(() => {
+                this.$set(this, 'DispositionList', this.newDispositionList);
+            })
+        },
+
+
+        sunNum(v, i) {
+            let _this = this;
+            this.$nextTick(() => {
+                switch (i) {
+                    case 0:
+                        console.log(_this.formedNumLast);
+                        return _this.formedNumLast;
+                    case 1:
+                        return v.splitList.length || 0
+                    case 2:
+
+                        return v.splitList.length || 0
+
+                }
+            })
+
+
+        },
+
+        byCode() {
+            getByCode('packing_unit').then(res => {
+
+                this.unitList = []
+
+                res.forEach((obj, index) => {
+                    for (let key in obj) {
+                        if (obj.hasOwnProperty(key)) { // 确保key是对象自身的属性
+
+                            this.unitList.push({
+                                Key: `${key}`,
+                                Value: ` ${obj[key]}`
+                            })
+
+
+                        }
+                    }
+                });
+
+            })
+        },
+
+
+        getPackingDetails() {
+            let param = {
+                workOrderId: this.workOrderId,
+                taskId: this.taskId,
+                tier: 1
+            }
+
+            getPackingReport(param).then(res => {
+                this.splitList = res.detailList
+                this.formedNumLast = res.totalQuantity
+                this.quantity = res.quantity
+                this.unit = res.unit
+
+            })
+        },
+
+
+
+        // 第一次调用
+        handleSplit(v) {
+            console.log(v, 99655);
+
+            if (this.splitList.length) {
+                this.$message.error('产品已分包');
+
+                return false
+            }
+
+            if (!this.formedNumLast) {
+                this.$message.error('包装总数数量不能为空');
+
+                return false
+            }
+
+            if (!v.packageCell) {
+                this.$message.error('内包装数量不能为空');
+
+                return false
+            }
+
+            if (!v.packageUnit) {
+                this.$message.error('包装单位不能为空');
+
+                return false
+
+            }
+           
+            let param = {
+                workOrderId: this.workOrderId,//工单id
+                taskId: this.taskId,
+                tier: 1,
+                totalQuantity: this.formedNumLast,//总数量
+                quantity: v.packageCell,//数量
+                unit: v.packageUnit,//单位
+                minimumUnit: this.minimumUnit,//最小包装单位
+                withinQuantity: this.withinQuantity,//内包装数量
+                withinUnit: this.withinUnit,//内包装单位
+                outsideQuantity: this.outsideQuantity,//外包装数量
+                outsideUnit: this.outsideUnit,//外包装单位
+                packageUnit: v.conversionUnit,
+
+            }
+
+
+            packingReport(param).then(res => {
+
+                this.listFn(res);
+
+            })
+
+
+
+
+        },
+
+        handleCheck(idx, it) {
+
+
+
+            if (it.quantity <= 0) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '数量为空不能勾选'
+                })
+
+                return false
+            }
+
+            this.$set(this.splitList[idx], 'check', it.check ? 0 : 1)
+
+            this.temporaryList = []
+
+
+            this.temporaryList = this.splitList.filter(e => {
+                return e.check == 1
+            })
+            this.temporaryNum = 0
+            this.temporaryCount = 0
+            if (this.temporaryList.length > 0) {
+                this.temporaryList.forEach(e => {
+                    this.temporaryNum = this.temporaryNum + 1
+                    this.temporaryCount = this.temporaryCount + Number(e.quantity)
+                })
+            }
+
+
+        },
+
+
+        handclose(it) {
+            this.splitList.forEach(f => {
+                if (f.computeSize == it.computeSize) {
+                    f.check = 0
+                }
+            })
+
+            this.temporaryList = []
+
+
+            this.temporaryList = this.splitList.filter(e => {
+                return e.check == 1
+            })
+        },
+
+        getPackingDetailsTwo(v) {
+            console.log(v);
+            let param = {
+                totalQuantity: v.formedNumLast,
+                quantity: v.packageCell,
+                unit: v.conversionUnit,
+                workOrderId: this.workOrderId,
+                taskId: this.taskId,
+                tier: 2,
+
+            }
+
+            getPackingReportRepeat(param).then(res => {
+                resolve(res.detailList)
+            })
+
+        },
+
+        handlePack(v, s) {
+            let _arr = []
+            _arr = s.map(m => {
+                return {
+                    ...m,
+                    isChecked: 1
+                }
+            })
+            console.log(_arr, '123');
+
+            let param = {
+                detailList: _arr,
+                quantity: v.temporaryCount,
+                totalQuantity: v.formedNumLast,
+                unit: v.packageUnit,
+                taskId: this.taskId,
+                workOrderId: this.workOrderId,
+                tier: 2
+            }
+            return new Promise((resolve, reject) => {
+                packingReportRepeat(param).then(res => {
+                    console.log(res);
+                    // this.temporaryList = []
+                    this.getPackingDetails()
+                    // this.getPackingDetailsTwo()
+                })
+            })
+        },
+
+
+        scrolltolower() {
+
+        },
+
+        getData() {
+            let _packingReportMarginList = []
+
+            _packingReportMarginList = this.splitList.filter(e => {
+                return !e.parentId
+            })
+
+            console.log(this.DispositionList);
+
+            let packInfo = {
+                // this.DispositionList[0]
+
+
+                specText: this.span,
+                specValue: this.value,
+                minimumPackage: this.minimumPackage,// 最小包装
+                minimumPackageCell: this.DispositionList[0].packageCell,// 最小包装
+                minimumPackageUnit: this.DispositionList[0].packageUnit,// 最小包装单位
+                minimumConversionUnit: this.DispositionList[0].conversionUnit,// 最小包装单位
+                minimumFormedNumLast: this.DispositionList[0].formedNumLast,// 总包装数量
+
+
+                withinPackage: this.withinPackage,// 内包装
+
+                withinPackageCell: this.DispositionList[1].packageCell,// 最小包装名称
+                withinPackageUnit: this.DispositionList[1].packageUnit,// 最小包装单位
+                withinConversionUnit: this.DispositionList[1].conversionUnit,// 最小包装单位
+                withinFormedNumLast: this.DispositionList[1].formedNumLast,// 总包装数量
+                // packingReportList: this.packTwoList,
+                // packingReportMarginList: _packingReportMarginList,
+                outsidePackage: this.outsidePackage, //外包装
+                outsidePackageCell: this.DispositionList[2].packageCell,// 最小包装名称
+                outsidePackageUnit: this.DispositionList[2].packageUnit,// 最小包装单位
+                outsideConversionUnit: this.DispositionList[2].conversionUnit,// 最小包装单位
+                outsideFormedNumLast: this.DispositionList[2].formedNumLast,// 总包装数量
+            }
+
+            this.objData.packInfo = packInfo;
+            this.objData.taskType = this.objData.currentTaskDiagram.type;
+
+        },
+
+        calculation() {
+            this.show = true
+        },
+
+        calculationSave() {
+            let count = this.splitList.filter(item => item.isChecked != 1).length;
+
+            if (this.formData.wPackNum <= count && count != 0) {
+                for (let i = 0; i < this.formData.wPackNum; i++) {
+                    this.splitList[i].check = 1
+                }
+                this.handleCheck(0, 0)
+                this.calculationClose()
+
+            } else {
+                if (count != 0) {
+                    for (let i = 0; i < count; i++) {
+                        this.splitList[i].check = 1
+                    }
+                    this.handleCheck(0, 0)
+                    this.calculationClose()
+                }
+                uni.showToast({
+                    icon: 'none',
+                    title: '外包装数超出内包装条数'
+                })
+
+
+            }
+
+        },
+
+        calculationClose() {
+            this.show = false
+        },
+
+        calculationReset() {
+
+            this.formData.wPackNum = null
+            this.splitList.forEach(f => {
+                f.check = null
+            })
+            this.temporaryList = []
+            this.show = false
+
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.userInp {
+    border: 1px solid #e5e5e5;
+    border-top: none;
+    padding: 2px 0;
+}
+
+.lable150 {
+    width: 200px;
+}
+
+.title_box {
+    margin-top: 20rpx;
+
+    .ww20 {
+        width: 20%;
+    }
+
+    .name {
+        font-size: 28rpx;
+        font-style: normal;
+        font-weight: 400;
+        padding-left: 20rpx;
+
+        position: relative;
+
+    }
+}
+
+
+.material {
+    margin-top: 10rpx;
+
+
+
+    .content_table {
+        width: 100%;
+
+        .item {
+            display: flex;
+
+
+            .lable {
+                width: 132rpx;
+                span-align: center;
+                background-color: #F7F9FA;
+                font-size: 26rpx;
+                flex-shrink: 0;
+            }
+
+            .lable220 {
+                width: 220rpx !important;
+                font-size: 24rpx;
+            }
+
+            .lable150 {
+                width: 156rpx !important;
+                font-size: 24rpx;
+            }
+
+            .ww80 {
+                width: 80rpx;
+            }
+
+            .content {
+                width: 518rpx;
+                min-height: 64rpx;
+                font-size: 28rpx;
+                line-height: 28rpx;
+                font-style: normal;
+                font-weight: 400;
+                // padding: 18rpx 8rpx;
+                box-sizing: border-box;
+                word-wrap: break-word;
+                flex-grow: 1 !important;
+
+
+                .unit {
+                    padding: 0 4rpx;
+                    font-size: 24rpx;
+                    color: #404446;
+                }
+
+
+
+            }
+
+
+
+
+        }
+
+
+
+        .ww55 {
+            width: 55%;
+        }
+
+        .ww45 {
+            width: 45%;
+        }
+
+
+    }
+}
+
+
+
+
+.content_table2 {
+    width: 100%;
+    margin-top: 16rpx;
+    padding: 10px 0;
+    height: 200px;
+    overflow-y: auto;
+
+    .row {
+        width: 100%;
+
+
+        .item {
+
+            color: #404446;
+            font-size: 28rpx;
+            padding-left: 12rpx;
+
+        }
+
+        .ww30 {
+            width: 30%;
+        }
+
+        .ww50 {
+            width: 50%;
+
+        }
+
+        .ww90 {
+            width: 90%;
+        }
+
+        .ww15 {
+            width: 15%;
+        }
+
+        .ww10 {
+            width: 10%;
+        }
+
+        .ww30 {
+            width: 30%;
+        }
+
+        .ww20 {
+            width: 20%;
+        }
+
+        .ww40 {
+            width: 40%;
+        }
+
+        .jsColor {
+            font-size: 20rpx;
+        }
+
+    }
+
+    .head {
+        height: 64rpx;
+        background: #F7F9FA;
+        border-top: 2rpx solid #E3E5E5;
+        border-left: 2rpx solid #E3E5E5;
+
+        .item {
+            height: 64rpx;
+            line-height: 64rpx;
+            border-right: 2rpx solid #E3E5E5;
+            box-sizing: border-box;
+        }
+    }
+
+
+
+    .tr {
+        border-top: 2rpx solid #E3E5E5;
+        border-left: 2rpx solid #E3E5E5;
+
+
+        .item {
+            font-size: 24rpx;
+            min-height: 64rpx;
+            display: flex;
+            align-items: center;
+            border-right: 2rpx solid #E3E5E5;
+            box-sizing: border-box;
+            white-space: normal;
+            word-break: break-all;
+
+        }
+
+
+    }
+}
+
+.label {
+    display: flex;
+    height: 30px;
+    width: 86px !important;
+    font-size: 13px;
+    align-items: center;
+    justify-content: center;
+    background-color: #F7F9FA;
+}
+
+
+.content_num {
+    display: flex;
+    align-items: center;
+    padding: 0 4rpx;
+
+
+}
+
+.penalize {
+    width: 86rpx;
+    line-height: 60rpx;
+    font-size: 24rpx;
+    span-align: center;
+    color: #fff;
+}
+
+.check {
+    width: 30rpx;
+    height: 30rpx;
+}
+
+.z_list {
+    max-height: 500rpx;
+}
+
+
+.search_list {
+    min-height: 100rpx;
+    width: 80vw;
+}
+
+.operate_box {
+    padding: 10rpx 32rpx;
+
+}
+
+::v-deep .el-input__inner {
+    height: 28px !important;
+    line-height: 28px !important;
+}
+</style>

+ 212 - 272
src/views/produce/components/jobBooking/details.vue

@@ -11,38 +11,22 @@
           </div>
 
           <div class="item_box rx-bc">
-            <div class="time"
-              >工序名称:
+            <div class="time">工序名称:
               {{
                 objData.currentTaskDiagram &&
                 objData.currentTaskDiagram.taskTypeName
-              }}</div
-            >
+              }}</div>
           </div>
         </div>
         <div>
-          <workOrderBom
-            :item="objData"
-            v-if="objData"
-            :isDetails="true"
-          ></workOrderBom>
-          <jobBom
-            :item="objData"
-            v-if="objData.notFormedList"
-            :palletList="objData.palletList"
-            :notFormed="objData.notFormedList"
-            :isDetails="true"
-          ></jobBom>
+          <workOrderBom :item="objData" v-if="objData" :isDetails="true"></workOrderBom>
+          <jobBom :item="objData" v-if="objData.notFormedList" :palletList="objData.palletList"
+            :notFormed="objData.notFormedList" :isDetails="true"></jobBom>
 
-          <deviceBom
-            v-if="objData.equipmentList && objData.equipmentList.length != 0"
-            :list="objData.equipmentList"
-          ></deviceBom>
+          <deviceBom v-if="objData.equipmentList && objData.equipmentList.length != 0" :list="objData.equipmentList">
+          </deviceBom>
 
-          <modelBom
-            v-if="objData.modelList && objData.modelList.length != 0"
-            :list="objData.modelList"
-          >
+          <modelBom v-if="objData.modelList && objData.modelList.length != 0" :list="objData.modelList">
           </modelBom>
           <!-- 
           <qualityStat
@@ -57,103 +41,57 @@
             :isDetails="true"
           ></sampleBom> -->
 
-          <palletBom
-            v-if="objData.palletList && objData.palletList.length != 0"
-            :palletList="objData.palletList"
-            :isDetails="true"
-          >
+          <palletBom v-if="objData.palletList && objData.palletList.length != 0" :palletList="objData.palletList"
+            :isDetails="true">
           </palletBom>
 
-          <revolvingDiskBom
-            v-if="
-              objData.revolvingDiskList && objData.revolvingDiskList.length > 0
-            "
-            pattern="job"
-            :revolvingDiskList="objData.revolvingDiskList"
-          ></revolvingDiskBom>
-
-          <semiProductJobBom
-            v-if="
-              objData.semiProductList &&
-              (objData.semiProductList.length != 0) && (taskType != 6) &&
-              objData.singleReport == 1
-            "
-            :list="objData.semiProductList"
-            :item="objData"
-            :isDetails="true"
-             :singleReport="objData.singleReport"
-          >
+          <revolvingDiskBom v-if="
+            objData.revolvingDiskList && objData.revolvingDiskList.length > 0
+          " pattern="job" :revolvingDiskList="objData.revolvingDiskList"></revolvingDiskBom>
+
+          <semiProductJobBom v-if="
+            objData.semiProductList &&
+            (objData.semiProductList.length != 0) && (taskType != 6) &&
+            objData.singleReport == 1
+          " :list="objData.semiProductList" :item="objData" :isDetails="true" :singleReport="objData.singleReport">
           </semiProductJobBom>
 
-          <semiProductJobBomPL
-            v-if="
-              objData.semiProductList &&
-              (objData.semiProductList.length != 0) && (taskType != 6) &&
-              objData.singleReport == 0
-            "
-            :list="objData.semiProductList"
-            :item="objData"
-            :isDetails="true"
-             :singleReport="objData.singleReport"
-          >
+          <semiProductJobBomPL v-if="
+            objData.semiProductList &&
+            (objData.semiProductList.length != 0) && (taskType != 6) &&
+            objData.singleReport == 0
+          " :list="objData.semiProductList" :item="objData" :isDetails="true" :singleReport="objData.singleReport">
           </semiProductJobBomPL>
 
-          <oneJobQualityBom
-            v-if="
-              objData.semiProductList &&
-              (objData.semiProductList.length != 0) && (taskType == 6)   &&  clientEnvironmentId == 3 &&  objData.singleReport == 1
-            "
-            :list="objData.semiProductList"
-            :item="objData"
-            :isDetails="true"
-          ></oneJobQualityBom>
+          <oneJobQualityBom v-if="
+            objData.semiProductList &&
+            (objData.semiProductList.length != 0) && (taskType == 6) && clientEnvironmentId == 3 && objData.singleReport == 1
+          " :list="objData.semiProductList" :item="objData" :isDetails="true"></oneJobQualityBom>
 
-          <oneJobQualityBomPL
-            v-if=" taskType == 6 &&  clientEnvironmentId == 3  &&  objData.singleReport == 0"
-            :list="objData.semiProductList"
-            :item="objData"
-            :isDetails="true"
-          ></oneJobQualityBomPL>
-
-          <byProductBom
-            v-if="
-              objData.productRecycleList &&
-              objData.productRecycleList.length != 0
-            "
-            :list="objData.productRecycleList"
-            :isDetails="true"
-          >
+          <oneJobQualityBomPL v-if="taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 0"
+            :list="objData.semiProductList" :item="objData" :isDetails="true"></oneJobQualityBomPL>
+
+          <byProductBom v-if="
+            objData.productRecycleList &&
+            objData.productRecycleList.length != 0
+          " :list="objData.productRecycleList" :isDetails="true">
           </byProductBom>
 
-          <turnoverBom
-            v-if="objData.turnover && objData.turnover.length != 0"
-            :list="objData.turnover"
-            :wordItem="objData"
-            pattern="job"
-            :isDetails="true"
-          >
+          <turnoverBom v-if="objData.turnover && objData.turnover.length != 0" :list="objData.turnover"
+            :wordItem="objData" pattern="job" :isDetails="true">
           </turnoverBom>
 
-          <aridRegion
-            v-if="objData.aridRegionList && objData.aridRegionList.length != 0"
-            :list="objData.aridRegionList"
-            :remainingTime="0"
-            :isType="true"
-          ></aridRegion>
-
-          <packingTgBom
-            v-if="
-              objData.packInfo &&
-              objData.packInfo.pickOutInList &&
-              objData.packInfo.pickOutInList != 0 &&
-              taskType == 4 &&
-              clientEnvironmentId == 3
-            "
-            :list="objData.packInfo.pickOutInList"
-            :isWarehousing="true"
-            :isDetails="true"
-            :item="objData"
-          ></packingTgBom>
+          <aridRegion v-if="objData.aridRegionList && objData.aridRegionList.length != 0" :list="objData.aridRegionList"
+            :remainingTime="0" :isType="true"></aridRegion>
+
+          <packingTgBom v-if="
+            objData.packInfo &&
+            objData.packInfo.pickOutInList &&
+            objData.packInfo.pickOutInList != 0 &&
+            taskType == 4 &&
+            clientEnvironmentId == 3
+          " :list="objData.packInfo.pickOutInList" :isWarehousing="true" :isDetails="true" :item="objData">
+          </packingTgBom>
 
           <!-- <packingBom
             v-if="objData.packInfo && clientEnvironmentId == 2"
@@ -171,191 +109,193 @@
           <div>报工时间: {{ objData.createTime }}</div>
         </div>
 
-        <workOrderBom2
-          :item="objData"
-          v-if="objData"
-          :isDetails="true"
-        ></workOrderBom2>
+        <workOrderBom2 :item="objData" v-if="objData" :isDetails="true"></workOrderBom2>
+        <div v-if="objData.detailList && objData.detailList.length">
+          <detailsBom :detailList="objData.detailList"></detailsBom>
+        </div>
 
-        <detailsBom
-          v-if="objData.detailList.length != 0"
-          :detailList="objData.detailList"
-        ></detailsBom>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-  import { listWorkReport, listApplystorage } from '@/api/produce/workOrder';
-  import workOrderBom from '../feeding/components/workOrderBom.vue';
-  import deviceBom from '../feeding/components/deviceBom.vue';
-  import modelBom from '../feeding/components/modelBom.vue';
-  import jobBom from '../jobBooking/components/jobBom.vue';
-
-  import semiProductJobBom from '../jobBooking/components/semiProductJobBom.vue';
-  import semiProductJobBomPL from '../jobBooking/components/semiProductJobBomPL.vue';
-  import oneJobQualityBom from '../jobBooking/components/oneJobQualityBom.vue';
-  import oneJobQualityBomPL from '../jobBooking/components/oneJobQualityBomPL.vue';
-
-  import byProductBom from '../jobBooking/components/byProductBom';
-  import turnoverBom from '../jobBooking/components/turnoverBom.vue';
-  import aridRegion from '../feeding/components/aridRegion.vue';
-  import paramBom from '../feeding/components/paramBom.vue';
-
-  //   import qualityStat from '../sample/components/qualityStat.vue';
-  //   import sampleBom from '../sample/components/sampleBom.vue';
-  import palletBom from '../feeding/components/palletBom.vue';
-
-  import revolvingDiskBom from '../feeding/components/revolvingDiskBom.vue';
-  import packingTgBom from '../jobBooking/components/packingTgBom.vue';
-
-  //   import packingBom from '../jobBooking/components/packingBomDetails.vue';
-
-  import detailsBom from '../warehousing/components/detailsBom.vue';
-  import workOrderBom2 from '../warehousing/components/workOrderBom.vue';
-
-  export default {
-    components: {
-      workOrderBom,
-      workOrderBom,
-      deviceBom,
-      modelBom,
-      jobBom,
-
-      semiProductJobBom,
-      semiProductJobBomPL,
-      oneJobQualityBom,
-      oneJobQualityBomPL,
-
-      byProductBom,
-      turnoverBom,
-      aridRegion,
-      paramBom,
-
-      //   qualityStat,
-      //   sampleBom,
-      palletBom,
-      revolvingDiskBom,
-      packingTgBom,
-      //   packingBom,
-
-      detailsBom,
-      workOrderBom2
+import { listWorkReport, listApplystorage } from '@/api/produce/workOrder';
+import workOrderBom from '../feeding/components/workOrderBom.vue';
+import deviceBom from '../feeding/components/deviceBom.vue';
+import modelBom from '../feeding/components/modelBom.vue';
+import jobBom from '../jobBooking/components/jobBom.vue';
+
+import semiProductJobBom from '../jobBooking/components/semiProductJobBom.vue';
+import semiProductJobBomPL from '../jobBooking/components/semiProductJobBomPL.vue';
+import oneJobQualityBom from '../jobBooking/components/oneJobQualityBom.vue';
+import oneJobQualityBomPL from '../jobBooking/components/oneJobQualityBomPL.vue';
+
+import byProductBom from '../jobBooking/components/byProductBom';
+import turnoverBom from '../jobBooking/components/turnoverBom.vue';
+import aridRegion from '../feeding/components/aridRegion.vue';
+import paramBom from '../feeding/components/paramBom.vue';
+
+//   import qualityStat from '../sample/components/qualityStat.vue';
+//   import sampleBom from '../sample/components/sampleBom.vue';
+import palletBom from '../feeding/components/palletBom.vue';
+
+import revolvingDiskBom from '../feeding/components/revolvingDiskBom.vue';
+import packingTgBom from '../jobBooking/components/packingTgBom.vue';
+
+//   import packingBom from '../jobBooking/components/packingBomDetails.vue';
+
+import detailsBom from '../warehousing/components/detailsBom.vue';
+import workOrderBom2 from '../warehousing/components/workOrderBom.vue';
+
+export default {
+  components: {
+    workOrderBom,
+    workOrderBom,
+    deviceBom,
+    modelBom,
+    jobBom,
+
+    semiProductJobBom,
+    semiProductJobBomPL,
+    oneJobQualityBom,
+    oneJobQualityBomPL,
+
+    byProductBom,
+    turnoverBom,
+    aridRegion,
+    paramBom,
+
+    //   qualityStat,
+    //   sampleBom,
+    palletBom,
+    revolvingDiskBom,
+    packingTgBom,
+    //   packingBom,
+
+    detailsBom,
+    workOrderBom2
+  },
+  props: {
+    routeObj: {
+      type: Object,
+      default() {
+        return {};
+      }
     },
-    props: {
-      routeObj: {
-        type: Object,
-        default() {
-          return {};
+    newId: {
+      type: String,
+      default: ''
+    },
+    curTaskObj: {
+      type: Object,
+      default() {
+        return () => { };
+      }
+    }
+  },
+
+  watch: {
+    curTaskObj: {
+      handler(obj) {
+        if (obj) {
+          console.log(obj, '55555555555');
+          this.taskType = obj.type;
+          this.getList();
         }
       },
-      newId:{
-        type:String,
-        default:''
-      },
-      curTaskObj: {
-        type: Object,
-        default() {
-          return () => {};
-        }
-      }
+      deep: true,
+      immediate: true
     },
-
-    watch: {
-      curTaskObj: {
-        handler(obj) {
-          if (obj) {
-            this.taskType = obj.type;
-            this.getList();
-          }
-        },
-        deep: true,
-        immediate: true
+    newId: {
+      handler(newval) {
+        this.newIdTo = newval;
       },
-      newId:{
-        handler(newval) {
-            this.newIdTo = newval;
-        },
-        deep: true,
-        immediate: true
-      }
-    },
+      deep: true,
+      immediate: true
+    }
+  },
 
-    computed: {
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      }
-    },
+  computed: {
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
+
+  data() {
+    return {
+      taskType: null,
+      list: [],
+      newIdTo: ''
+    };
+  },
+
+  created() { },
 
-    data() {
-      return {
-        taskType: null,
-        list: [],
-        newIdTo:'',
-        taskType: 1
+  methods: {
+    getList() {
+      console.log('出发啊');
+
+      let param = {
+        workOrderId: this.routeObj.id,
+        taskId: this.newId
       };
-    },
 
-    created() {},
-
-    methods: {
-      getList() {
-        let param = {
-          workOrderId: this.routeObj.id,
-          taskId: this.newId
-        };
-        console.log(this.taskType);
-        let URL = this.taskType == 5 ? listApplystorage : listWorkReport;
-        URL(param).then((res) => {
-          this.list = JSON.parse(JSON.stringify(res));
-        });
-      }
-    }
-  };
-</script>
+      console.log(this.taskType, 99999999);
 
-<style scoped lang="scss">
-  .rx-bc {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-  }
+      let URL = this.taskType == 5 ? listApplystorage : listWorkReport;
 
-  .item_box {
-    margin-top: 5px;
-    margin-bottom: 6px;
-    padding: 0 10px;
-
-    .round {
-      width: 20px;
-      height: 20px;
-      line-height: 20px;
-      border-radius: 50%;
-      background: #157a2c;
-      color: #fff;
-      text-align: center;
-      font-size: 12px;
-    }
+      URL(param).then((res) => {
+        console.log(res, 'res');
 
-    .time {
-      color: #157a2c;
-      font-family: PingFang HK;
-      font-size: 14px;
-      font-style: normal;
-      font-weight: 500;
-      margin-left: 8px;
+        this.list = JSON.parse(JSON.stringify(res));
+      });
     }
   }
+};
+</script>
 
-  .title_card {
-    height: 35px;
-    width: 100%;
+<style scoped lang="scss">
+.rx-bc {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.item_box {
+  margin-top: 5px;
+  margin-bottom: 6px;
+  padding: 0 10px;
+
+  .round {
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    border-radius: 50%;
     background: #157a2c;
-    font-size: 16px;
     color: #fff;
-    line-height: 35px;
-    padding: 0 20px;
-    box-sizing: border-box;
+    text-align: center;
+    font-size: 12px;
+  }
+
+  .time {
+    color: #157a2c;
+    font-family: PingFang HK;
+    font-size: 14px;
+    font-style: normal;
+    font-weight: 500;
+    margin-left: 8px;
   }
+}
+
+.title_card {
+  height: 35px;
+  width: 100%;
+  background: #157a2c;
+  font-size: 16px;
+  color: #fff;
+  line-height: 35px;
+  padding: 0 20px;
+  box-sizing: border-box;
+}
 </style>

+ 513 - 577
src/views/produce/components/jobBooking/index.vue

@@ -1,687 +1,623 @@
 <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"
-        >
+
+        <!-- 报工时间 -->
+        <div v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && item.currentTaskDiagram.type == 1">
+          <div class="title_box rx-bc">
+            <div class="name">报工时间 </div>
+          </div>
+          <el-date-picker v-model="item.executorTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
+          </el-date-picker>
+          <!--  -->
+        </div>
+
+
+        <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.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
-          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 v-if="
+          item.semiProductList &&
+          item.semiProductList.length != 0 &&
+          taskObj.type == 6 &&
+          item.singleReport == 1
+        " :item="item" :list="item.semiProductList">
         </oneJobQualityBom>
 
-        <oneJobQualityBomPL
-          v-if="
-            item.semiProductList &&
-            item.semiProductList.length != 0 &&
-            taskObj.type == 6 &&
-            item.singleReport == 0
-          "
-          :item="item"
-          :list="item.semiProductList"
-        >
+        <oneJobQualityBomPL v-if="
+          item.semiProductList &&
+          item.semiProductList.length != 0 &&
+          taskObj.type == 6 &&
+          item.singleReport == 0
+        " :item="item" :list="item.semiProductList">
         </oneJobQualityBomPL>
 
-        <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"
+        <!-- 这里是包装分组 -->
+        <div v-if="clientEnvironmentId != 2&&item&&item.currentTaskDiagram.type == 4 && clientEnvironmentId != 3 ">
+          <packagingGrouping ref="packagingGroupingRef" :objData="item" :workOrderId="item.workOrderId" :taskId="item.currentTaskDiagram.taskId">
+          </packagingGrouping>
+        </div>
+        <!--  <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 oneJobQualityBomPL from './components/oneJobQualityBomPL.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,
-      oneJobQualityBomPL,
-
-      semiProductJobBom,
-      semiProductJobBomPL,
-      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 packagingGrouping from "./components/packagingGrouping.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 oneJobQualityBomPL from './components/oneJobQualityBomPL.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,
+    packagingGrouping,
+    workOrderBom,
+    paramBom,
+    jobBom,
+    deviceBom,
+    modelBom,
+    palletBom,
+    revolvingDiskBom,
+    oneJobQualityBom,
+    oneJobQualityBomPL,
+
+    semiProductJobBom,
+    semiProductJobBomPL,
+    byProductBom,
+    turnoverBom,
+    aridRegion,
+    packingBom,
+    packingTgBom
+  },
+  props: {
+    workListIds: {
+      type: Array,
+      default() {
+        return [];
       }
-    },
+    }
+  },
 
-    computed: {
-      taskObj() {
-        return this.$store.state.user.taskObj;
-      }
-    },
+  computed: {
+    taskObj() {
+      return this.$store.state.user.taskObj;
+    }
+  },
 
-    data() {
-      return {
-        List: [],
-        idsList: [],
-        isLoad: false,
+  data() {
+    return {
+      List: [],
+      idsList: [],
+      isLoad: false,
 
-        warehouseList: [],
+      warehouseList: [],
 
-        loading: null
-      };
+      loading: null
+    };
+  },
+
+  computed: {
+    taskObj() {
+      return this.$store.state.user.taskObj;
     },
 
-    computed: {
-      taskObj() {
-        return this.$store.state.user.taskObj;
-      },
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
 
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      }
-    },
+  watch: {
+    workListIds: {
+      handler(val) {
+        this.getList(val);
+      },
+      deep: true,
+      immediate: true
+    }
+  },
 
-    watch: {
-      workListIds: {
-        handler(val) {
-          this.getList(val);
-        },
-        deep: true,
-        immediate: true
-      }
-    },
+  created() {
+    this.getWarehouseListFn();
+  },
 
-    created() {
-      this.getWarehouseListFn();
+  methods: {
+    checkPack(){
+      this.$refs.packagingGroupingRef[0].getData();
     },
 
-    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, 'palletList')) {
-                obj['palletList'] = [];
-              }
+    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, 'revolvingDiskList')
-              ) {
-                obj['revolvingDiskList'] = [];
-              }
+            if (!Object.prototype.hasOwnProperty.call(obj, 'turnover')) {
+              obj['turnover'] = [];
+            }
+            if (
+              !Object.prototype.hasOwnProperty.call(obj, 'aridRegionList')
+            ) {
+              obj['aridRegionList'] = [];
+            }
 
-              if (obj.palletList.length > 0) {
-                obj.palletList = obj.palletList.map((m) => {
-                  return {
-                    hideKc: true, // 不显示库存
-                    quantity: m.feedQuantity,
-                    ...m
-                  };
-                });
-              }
+            if (!Object.prototype.hasOwnProperty.call(obj, 'instanceList')) {
+              obj['instanceList'] = [];
+            }
 
-              if (this.taskObj.type == 6 && this.clientEnvironmentId == 3) {
-                obj.semiProductList = obj.pickOutInList;
-              }
+            if (!Object.prototype.hasOwnProperty.call(obj, 'palletList')) {
+              obj['palletList'] = [];
+            }
 
-              if (
-                this.clientEnvironmentId == 3 &&
-                obj.singleReport == 0 &&
-                this.taskObj.type != 6
-              ) {
-                obj.semiProductList.map((a) => {
-                  a.extInfo.batchReportInfo = [
-                    {
-                      allFeedQuantity: '',
-                      allReportWeight: '',
-                      taskId: '',
-                      taskName: ''
-                    }
-                  ];
-
-                  a.extInfo.notBatchReportInfo = [
-                    {
-                      allFeedQuantity: '',
-                      notType: '',
-                      taskId: '',
-                      taskName: '',
-                      notReason: ''
-                    }
-                  ];
-
-                  return {
-                    a
-                  };
-                });
-                obj.semiProductList = JSON.parse(
-                  JSON.stringify(obj.semiProductList)
-                );
-              }
+            if (
+              !Object.prototype.hasOwnProperty.call(obj, 'revolvingDiskList')
+            ) {
+              obj['revolvingDiskList'] = [];
+            }
 
-              obj.workReportInfo = {
-                formingNum: null,
-                formingWeight: null,
-                formedNum: null,
-                formedWeight: null,
-                taskId: this.taskObj.id
-              };
+            if (obj.palletList.length > 0) {
+              obj.palletList = obj.palletList.map((m) => {
+                return {
+                  hideKc: true, // 不显示库存
+                  quantity: m.feedQuantity,
+                  ...m
+                };
+              });
+            }
 
-              obj.notFormedList = [
-                {
-                  notFormedNum: null,
-                  notFormedWeight: null,
-                  weightUnit: obj.weightUnit,
-                  unit: obj.unit,
-                  warehouseId: null // 处置 仓库id
-                }
-              ];
-
-              if (obj.semiProductList.length > 0) {
-                // 预制体报工
-                obj.workReportInfo.formedNum = obj.semiProductList.length;
-              }
+            if (this.taskObj.type == 6 && this.clientEnvironmentId == 3) {
+              obj.semiProductList = obj.pickOutInList;
+            }
 
-              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 (
+              this.clientEnvironmentId == 3 &&
+              obj.singleReport == 0 &&
+              this.taskObj.type != 6
+            ) {
+              obj.semiProductList.map((a) => {
+                a.extInfo.batchReportInfo = [
+                  {
+                    allFeedQuantity: '',
+                    allReportWeight: '',
+                    taskId: '',
+                    taskName: ''
+                  }
+                ];
+
+                a.extInfo.notBatchReportInfo = [
+                  {
+                    allFeedQuantity: '',
+                    notType: '',
+                    taskId: '',
+                    taskName: '',
+                    notReason: ''
+                  }
+                ];
 
-              obj.paramDetailList.map((m) => {
-                if (m.extInfo.textType == 5) {
-                  m.remainingTime = m.extInfo.remainingTime;
-                }
                 return {
-                  ...m.extInfo
+                  a
                 };
               });
-              console.log(obj, 444);
+              obj.semiProductList = JSON.parse(
+                JSON.stringify(obj.semiProductList)
+              );
+            }
 
-              return {
-                ...obj
-              };
-            });
-          })
-          .finally(() => {
-            this.isLoad = true;
+            obj.workReportInfo = {
+              formingNum: null,
+              formingWeight: null,
+              formedNum: null,
+              formedWeight: null,
+              taskId: this.taskObj.id
+            };
 
-            if (this.taskObj.type == 1) {
-              this.getCacheFn();
-            }
-          });
-      },
+            obj.notFormedList = [
+              {
+                notFormedNum: null,
+                notFormedWeight: null,
+                weightUnit: obj.weightUnit,
+                unit: obj.unit,
+                warehouseId: null // 处置 仓库id
+              }
+            ];
 
-      openPicking(id, item) {
-        this.$refs.pickingListRef.open(id, item);
-      },
+            if (obj.semiProductList.length > 0) {
+              // 预制体报工
+              obj.workReportInfo.formedNum = obj.semiProductList.length;
+            }
 
-      allSelection(id, selectList) {
-        this.List.forEach((m) => {
-          if (m.workOrderId == id) {
-            let turnover = [];
-            let equipmentList = []; // 生产设备
+            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;
 
-            selectList.forEach((f) => {
-              if (f.rootCategoryLevelId == 4) {
-                equipmentList = equipmentList.concat(f);
-              }
-              if (f.rootCategoryLevelId == 7) {
-                turnover = turnover.concat(f);
+            obj.paramDetailList.map((m) => {
+              if (m.extInfo.textType == 5) {
+                m.remainingTime = m.extInfo.remainingTime;
               }
+              return {
+                ...m.extInfo
+              };
             });
+            console.log(obj, 444);
 
-            this.$set(m, 'equipmentList', equipmentList);
-            this.$set(m, 'turnover', turnover);
+            return {
+              ...obj
+            };
+          });
+
+        })
+        .finally(() => {
+          this.isLoad = true;
 
-            this.$forceUpdate();
+          if (this.taskObj.type == 1) {
+            this.getCacheFn();
           }
         });
-      },
+    },
 
-      async save(type) {
-        this.loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          background: 'rgba(0, 0, 0, 0.7)'
-        });
+    openPicking(id, item) {
+      this.$refs.pickingListRef.open(id, item);
+    },
 
-        let bol2;
-        bol2 = this.List.every((e) => {
-          return (
-            e.workReportInfo['formedNum'] && e.workReportInfo['formedNum'] != 0
-          );
-        });
+    allSelection(id, selectList) {
+      this.List.forEach((m) => {
+        if (m.workOrderId == id) {
+          let turnover = [];
+          let equipmentList = []; // 生产设备
 
-        if (!bol2) {
-          this.$message.warning('请输入合格品数量');
-          this.loading.close();
-          return false;
+          selectList.forEach((f) => {
+            if (f.rootCategoryLevelId == 4) {
+              equipmentList = equipmentList.concat(f);
+            }
+            if (f.rootCategoryLevelId == 7) {
+              turnover = turnover.concat(f);
+            }
+          });
+
+          this.$set(m, 'equipmentList', equipmentList);
+          this.$set(m, 'turnover', turnover);
+
+          this.$forceUpdate();
         }
+      });
+    },
 
-        // 预制体
+    async save(type) {
 
-        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) {
+      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;
+      }
+
+      // 预制体
+
+      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 {
+              if (e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
                 return (
-                  Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
-                  e.extInfo.taskId
-                );
-              } else {
-                if(e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
-                  return (
                   Object.prototype.hasOwnProperty.call(e.extInfo, 'taskId') &&
                   e.extInfo.taskId &&
                   e.extInfo.reportWeight
-                ); 
-                } else {
-                  return (
+                );
+              } else {
+                return (
                   Object.prototype.hasOwnProperty.call(e.extInfo, 'notType') &&
                   e.extInfo.notType
-                ); 
-                }
-          
+                );
               }
-            });
-          }
-        });
 
-        if (!bol) {
-          this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
-          this.loading.close();
-
-          return false;
-        }
-
-        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 (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
-        // 	const isPack = await this.checkPack()
+      if (!bol) {
+        this.$message.warning(`请完善工单${wId}第${_i}处置方式`);
+        this.loading.close();
 
-        // 	if (!isPack) {
-        // 		return false
-        // 	}
-        // }
+        return false;
+      }
 
-        if (this.taskObj.type == 1) {
-          const isCache = await this.checkCache(type);
+      if (this.clientEnvironmentId != 2) {
+        let succ = this.List.some((L) => {
+          return L.productRecycleList.length > 0;
+        });
 
-          if (!isCache) {
+        if (succ) {
+          const isRecycle = await this.checkRecycle();
+          if (!isRecycle) {
             return false;
           }
         }
+      }
 
-        if (
-          this.clientEnvironmentId == 3 &&
-          type == 2 &&
-          this.taskObj.type == 6
-        ) {
-          this.List.forEach((L) => {
-            if (L.singleReport == 0) {
-              L.semiProductList = [];
-            }
-          });
-        }
+      if (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
+      	this.checkPack();
 
-        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);
-          });
-      },
+      	// if (!isPack) {
+      	// 	return false
+      	// }
+      }
 
-      checkRecycle() {
-        this.loading.close();
-        return new Promise((resolve) => {
-          this.$confirm('是否跳过副产品回收处置!', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              resolve(true);
-            })
-            .catch(() => {
-              resolve(false);
-            });
-        });
-      },
+      if (this.taskObj.type == 1) {
+        const isCache = await this.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);
+        if (!isCache) {
+          return false;
+        }
+      }
+
+      if (
+        this.clientEnvironmentId == 3 &&
+        type == 2 &&
+        this.taskObj.type == 6
+      ) {
+        this.List.forEach((L) => {
+          if (L.singleReport == 0) {
+            L.semiProductList = [];
           }
         });
-      },
-
-      getCacheFn() {
-        let parma = {
-          workOrderIds: this.idsList,
-          taskId: this.taskObj.id,
-          type: 1
-        };
+      }
 
-        getCache(parma).then((res) => {
-          console.log(res);
+      console.log(this.List, 'this.List');
+      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);
         });
-      },
+    },
 
-      removeCacheFn(type) {
-        this.$confirm('是否清空缓存', '缓存')
+    checkRecycle() {
+      this.loading.close();
+      return new Promise((resolve) => {
+        this.$confirm('是否跳过副产品回收处置!', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .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);
-            });
+            resolve(true);
           })
-          .catch(() => {});
-      },
+          .catch(() => {
+            resolve(false);
+          });
+      });
+    },
 
-      getWarehouseListFn() {
-        getWarehouseList().then((res) => {
-          this.warehouseList = res.data;
-        });
-      }
-    }
-  };
-</script>
+    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);
+        }
+      });
+    },
 
-<style scoped lang="scss">
-  .top_fixed {
-    width: 100%;
-    height: 40px;
-    background: #fff;
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-  }
+    getCacheFn() {
+      let parma = {
+        workOrderIds: this.idsList,
+        taskId: this.taskObj.id,
+        type: 1
+      };
 
-  .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;
-      }
-    }
-  }
+      getCache(parma).then((res) => {
+        console.log(res);
+      });
+    },
 
-  .job_box {
-    margin-top: 6px;
-    width: 100%;
-    height: calc(100vh - 70px - 50px - 80px - 60px);
-    overflow-y: scroll;
-    overflow-x: hidden;
+    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;
+      });
+    }
   }
+};
+</script>
 
-  .card_box {
-    background: #fff;
-    padding: 8px;
-    border-radius: 2px;
+<style scoped lang="scss">
+.top_fixed {
+  width: 100%;
+  height: 40px;
+  background: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.title_box {
+  padding: 10px 0;
+
+  .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;
+}
 </style>

+ 13 - 5
src/views/produce/components/routings.vue

@@ -23,10 +23,10 @@
             :description="desIndex == index ? '此处' : ''"
           ></el-step>
         </el-steps>
-
         <el-tabs type="border-card">
-          <el-tab-pane label="投料详情">
+          <el-tab-pane label="投料详情" >
             <feedDetails
+              v-if="newId!=='-1'"
               :routeObj="routeObj"
               :curTaskObj="curTaskObj"
             ></feedDetails>
@@ -66,15 +66,17 @@
         routeList: [],
         activeIndex: 0,
         desIndex: 0,
-        newId:-1,
+        newId:'',
         curTaskObj: null
       };
     },
     methods: {
       getTaskFn() {
+        
+
         getTaskInstanceList(this.routeObj.id).then((res) => {
           this.routeList = res;
-
+         
           // 使用findIndex方法查找
           const index = this.routeList.findIndex(
             (item) => Number(item.taskId) == Number(this.routeObj.taskId)
@@ -82,8 +84,14 @@
 
           this.desIndex = index;
 
+
+          this.newId = res[index].taskId;
+
+          console.log(this.routeObj,666666);
+
           if (this.routeObj.taskId != -2) {
             this.curTaskObj = JSON.parse(JSON.stringify( this.routeObj));
+           
           } else {
             this.curTaskObj  =  JSON.parse(JSON.stringify( this.routeList[0])); 
             this.desIndex = 0;
@@ -99,7 +107,7 @@
       },
 
       handIdx(index, item) {
-        console.log(index, item);
+        
         this.curTaskObj = JSON.parse(JSON.stringify(item));
         if (item.taskId == -2) {
           this.$message.info('完结状态不能点击');

+ 0 - 1
src/views/produce/components/search.vue

@@ -76,7 +76,6 @@ export default {
     changeSelect(e) {
       let taskObj = {};
       taskObj = this.produceTaskList.find((item) => item.id === e);
-
       this.$store.commit('user/setTaskObj', taskObj);
     },
     back() {

+ 6 - 1
src/views/produce/components/warehousing/index.vue

@@ -1,5 +1,8 @@
 <template>
+  <!-- 入库报工 报工列表 -->
+
   <div>
+
     <div class="top_fixed">
       <el-button type="primary" size="mini" @click="save">一键报工</el-button>
     </div>
@@ -7,8 +10,9 @@
     <div class="warehousing_box">
       <div v-for="(item, index) in List" :key="index" class="card_box">
         <div class="title_box rx-bc">
-          <div class="name">工单信息 </div>
+          <div class="name">工单信息</div>
         </div>
+        
         <workOrderBom :item="item" v-if="item"></workOrderBom>
 
         <div
@@ -48,6 +52,7 @@
         <div v-else>
           <el-empty :image-size="30" description="暂无数据"></el-empty>
         </div>
+
       </div>
     </div>
   </div>

+ 9 - 2
src/views/produce/index.vue

@@ -2,10 +2,9 @@
   <div class="index_box">
     <div class="content_box">
 
+      <!-- 工序名称 -->
       <Search></Search>
 
-
-
       <ele-split-layout space="0px" width="45%" :resizable="true" :min-size="200" :max-size="-200" :left-style="{
         overflow: 'hidden',
         width: '100%'
@@ -31,13 +30,19 @@
             </div>
 
             <div v-if="operationType == 'feed'">
+              <!-- 投料 -->
               <feeding :workListIds="workListIds"></feeding>
             </div>
 
             <div v-if="operationType == 'job'">
+              <!-- // 报工列表 入库 -->
+
               <warehousing v-if="taskObj.id == -1" :workListIds="workListIds" ref="wareRef"></warehousing>
 
+              <!-- // 设备 入库 -->
+
               <jobBooking v-else :workListIds="workListIds" ref="jobRef"></jobBooking>
+
             </div>
 
 
@@ -152,6 +157,8 @@ export default {
     },
 
     workSelect(data) {
+      console.log(data,'data1111111111');
+
       this.isStep = true; 
       this.operationType = null;
       this.workListIds = data;