瀏覽代碼

新增手动拆包

695593266@qq.com 9 月之前
父節點
當前提交
3ba2eb0ba9

+ 11 - 5
src/views/outsourcing/index.vue

@@ -8,7 +8,7 @@
         ref="table"
         :columns="columns"
         :datasource="datasource"
-        cache-key="workOrderTable"
+        cache-key="outsourcingListDatas"
       >
         <template v-slot:code="{ row }">
           <el-link
@@ -42,8 +42,8 @@
           <div v-if="row.type == 1">采购委外</div>
           <div v-if="row.type == 2">直接发货委外</div>
           <div v-if="row.type == 3">无采购委外</div>
-          <div v-if="row.type == 4">料委外</div>
-          <div v-if="row.type == 5">料委外</div>
+          <div v-if="row.type == 4">料委外</div>
+          <div v-if="row.type == 5">不带料委外</div>
         </template>
 
         <template v-slot:status="{ row }">
@@ -278,6 +278,12 @@
             align: 'center'
           },
 
+          {
+            prop: 'createUserName',
+            label: '申请人',
+            align: 'center'
+          },
+
           {
             prop: 'createTime',
             label: '创建时间',
@@ -301,14 +307,14 @@
           {
             label: '图片附件',
             slot: 'technicalDrawings',
-            action: 'technicalDrawings',
+            prop: 'technicalDrawings',
             minWidth: 100
           },
 
           {
             label: '附件',
             slot: 'files',
-            action: 'files',
+            prop: 'files',
             minWidth: 100
           },
 

+ 9 - 9
src/views/produce/components/bom/detailsPop.vue

@@ -438,15 +438,15 @@
         this.drawer = true;
         this.treeList = [];
 
-        if (
-          (this.currentNodeData.bomType == 2 ||
-            this.currentNodeData.bomType == 3) &&
-          !this.isWt
-        ) {
-          this.searchObj.componentAttribute = [1];
-        } else {
-          this.searchObj.componentAttribute = [];
-        }
+        // if (
+        //   (this.currentNodeData.bomType == 2 ||
+        //     this.currentNodeData.bomType == 3) &&
+        //   !this.isWt
+        // ) {
+        //   this.searchObj.componentAttribute = [1];
+        // } else {
+        //   this.searchObj.componentAttribute = [];
+        // }
 
         // this.getTreeData();
         this.getVersion();

+ 1 - 1
src/views/produce/components/feeding/components/batchProductsBom.vue

@@ -61,7 +61,7 @@
         <el-link
           type="text"
           @click="openBatch(row, $index)"
-          v-if="row.feedQuantity > 1"
+          v-if="row.feedQuantity > 1 && row.isAllPackageData != 1"
           >拆批</el-link
         >
         <el-link type="danger" @click="deleteBatch(row, $index)">删除</el-link>

+ 507 - 149
src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue

@@ -5,7 +5,7 @@
         >是否拆包:</div
       >
       <span
-        v-if="objData.isUnpack == '1'"
+        v-if="objData.isUnpack == '1' || isNewUnpack == 1"
         style="
           color: green;
           font-size: 14px;
@@ -25,15 +25,16 @@
         >否</span
       >
 
-      <!-- <el-button
+      <el-button
         type="primary"
         size="mini"
         style="margin-left: 40px"
         @click="checkUnpack"
-        >拆包</el-button
-      > -->
+        v-if="objData.isUnpack != '1'"
+        >手动拆包</el-button
+      >
     </div>
-    <div v-if="objData.isUnpack == '1'">
+    <div v-if="objData.isUnpack == '1' && (isNewUnpack == 0 || !isNewUnpack)">
       <div class="col userInp" style="display: flex; align-items: center">
         <div class="label lable150 rx-cc" style="width: 100px !important"
           >规格选择:</div
@@ -207,7 +208,7 @@
       </div>
     </div>
 
-    <div v-if="isNewUnpack">
+    <div v-if="isNewUnpack == 1">
       <div class="col userInp" style="display: flex; align-items: center">
         <div class="label lable150 rx-cc" style="width: 100px !important"
           >规格选择:</div
@@ -227,32 +228,58 @@
         </el-select>
       </div>
 
-      <!-- <div class="material">
+      <div class="material">
         <div class="content_table">
           <div class="item">
-            <div class="lable rx-cc">包装总数 </div>
+            <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"
                 disabled
                 style="width: 200px"
               ></el-input>
+              {{ packageUnit }}
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <div class="material">
+        <div
+          class="content_table"
+          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 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"
+                disabled
+                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 class="unit">{{ item.conversionUnit }}</div>
             </div>
           </div>
-
           <div class="item rx-sc">
             <div class="rx ww55">
               <div class="lable lable200 rx-cc">{{ item.titel }}单元</div>
@@ -260,8 +287,9 @@
                 <el-input
                   class="uni-el-input"
                   v-model="item.packageCell"
-                  disabled
                   style="width: 200px"
+                  @input="changeInputPack(item, i)"
+                  :disabled="!item.conversionUnit"
                 ></el-input>
                 <div class="unit">{{ item.packageUnit }}</div
                 >/<div class="unit">{{ item.conversionUnit }}</div>
@@ -269,7 +297,46 @@
             </div>
           </div>
         </div>
-      </div> -->
+
+        <div v-for="(item, index) in DispositionList" :key="item.id">
+          <div v-if="item.splitList.length">
+            <ele-pro-table
+              ref="table"
+              :needPage="false"
+              :columns="columnsMin"
+              :datasource="item.splitList"
+              class="time-form"
+              max-height="400"
+              row-key="index"
+            >
+              <template v-slot:newWeight="{ row, $index }">
+                <span
+                  >{{ row.extInfo.newWeight }}{{ row.extInfo.weightUnit }}</span
+                >
+              </template>
+
+              <template v-slot:feedQuantity="{ row, $index }">
+                <span>{{ row.feedQuantity }}</span>
+              </template>
+
+              <template v-slot:reportWeight="{ row, $index }">
+                <span
+                  >{{ row.extInfo.reportWeight
+                  }}{{ row.extInfo.weightUnit }}</span
+                >
+              </template>
+
+              <template v-slot:packageQuantity="{ row, $index }">
+                <span>{{ row.packageQuantity }}{{ row.packingUnit }}</span>
+              </template>
+
+              <template v-slot:packageDisposition="{ row, $index }">
+                <el-tag>{{ packageDispositionData }}</el-tag>
+              </template>
+            </ele-pro-table>
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -373,8 +440,17 @@
           }
         ],
         cacheKeyUrlMin: 'cacheKeyUrlMin',
-        isNewUnpack: false
-        // clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
+        isNewUnpack: 0,
+        packageCell: '',
+        packageUnit: '',
+        conversionUnit: '',
+        packageOneCell: '',
+        packageOneUnit: '',
+        conversionOneUnit: '',
+        packageTwoCell: '',
+        packageTwoUnit: '',
+        conversionTwoUnit: '',
+        packageDispositionData: ''
       };
     },
     watch: {
@@ -386,10 +462,6 @@
             this.formedNumLast = newVal.product.reduce((acc, pro) => {
               return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
             }, 0);
-
-            console.log(this.formedNumLast);
-            // this.formedNumLast =
-            //   newVal.formedNumLast || newVal.product[0].feedQuantity;
           } else if (newVal.semiProductList && newVal.semiProductList.length) {
             this.newCategoryId = newVal.semiProductList[0].categoryId;
             this.formedNumLast = newVal.semiProductList.reduce((acc, pro) => {
@@ -398,7 +470,6 @@
           } else {
             this.formedNumLast = 0;
           }
-          console.log(newVal);
           if (newVal.isUnpack == '1') {
             this.packageDispositionFn();
           }
@@ -475,6 +546,24 @@
                 : '';
             }
           },
+          {
+            minWidth: 150,
+            prop: 'extInfo.packageDisposition',
+            slot: 'packageDisposition',
+            label: '包装规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            minWidth: 150,
+            prop: 'packageQuantity',
+            slot: 'packageQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
           {
             minWidth: 120,
             prop: 'extInfo.engrave',
@@ -722,11 +811,7 @@
               item.textValue = item.text + `(${this.selectPackInfo(res[2])})`;
             }
           });
-
-          // console.log(res[0], res[1], res[2], '555555554444444');
-
           this.initFn(this.localdataList[0].arr);
-          // this.listFn(this.localdataList[0].arr);
         }
       },
 
@@ -777,20 +862,10 @@
           arr.push({ list: outsidePackage, num: outsideQuantity });
         }
 
-        // return;
-
-        // let arr = [
-        //   { list: minimumPackage },
-        //   { list: withinPackage, num: withinQuantity },
-        //   { list: outsidePackage, num: outsideQuantity }
-        // ];
-
         this.minimumPackage = minimumPackage; // 最小包装
         this.withinPackage = withinPackage; // 内包装
         this.outsidePackage = outsidePackage; //外包装
 
-        console.log(this.newDispositionList, 'this.newDispositionList1');
-
         this.newDispositionList.map((v, i) => {
           v.splitList = arr[0].list;
           v.titel = textList[0];
@@ -801,10 +876,9 @@
           }
         });
 
-        console.log(this.newDispositionList, 'this.newDispositionList2');
-
         this.$nextTick(() => {
           this.$set(this, 'DispositionList', this.newDispositionList);
+          this.$forceUpdate();
         });
       },
 
@@ -857,78 +931,324 @@
         });
       },
 
-      // checkUnpack() {
-      //   this.$confirm('此操作将进行拆包, 是否继续?', '提示', {
-      //     confirmButtonText: '确定',
-      //     cancelButtonText: '取消',
-      //     type: 'warning'
-      //   })
-      //     .then(() => {
-      //       this.checkUnpackProduction();
-      //     })
-      //     .catch(() => {});
-      // },
-
-      // checkUnpackProduction() {
-      //   this.isNewUnpack = true;
-      //   this.getPackingData();
-      // },
-
-      // async getPackingData() {
-      //   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;
-      //     // if (this.warehouseId == 2) {
-      //     //   this.newDispositionList = [res[0]];
-      //     // } else if (this.warehouseId == 3) {
-      //     //   this.newDispositionList = [res[1]];
-      //     // } else if (this.warehouseId == 4) {
-      //     //   this.newDispositionList = [res[2]];
-      //     // }
-      //     this.selectList = res;
-      //     this.initData(this.localdataList[0].arr);
-
-      //     console.log(this.newDispositionList, 'this.newDispositionList');
-      //     // this.initFn(this.localdataList[0].arr);
-      //   }
-      // },
-
-      // initData(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;
-      //   }
-
-      //   console.log(v[0], 'v[0]');
-      //   // this.handleSplit(v[0]);
-      // },
+      checkUnpack() {
+        this.$confirm('此操作将进行拆包, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            this.checkUnpackProduction();
+          })
+          .catch(() => {});
+      },
+
+      checkUnpackProduction() {
+        this.isNewUnpack = 1;
+        this.getPackingData();
+      },
+
+      async getPackingData() {
+        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.initData(this.localdataList[0].arr);
+        }
+      },
+
+      initData(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.handleSplit1(v[0]);
+      },
+
+      handleSplit1(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;
+        }
+
+        this.packageCell = this.formedNumLast;
+        this.packageUnit = v.packageUnit;
+
+        let param = {
+          workOrderId: this.workOrderId, //工单id
+          taskId: this.taskId,
+          tier: '',
+          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,
+          isNewUnpack: this.isNewUnpack
+        };
+
+        getPackingList(param).then((res) => {
+          console.log(res, '111111111111');
+
+          if (this.warehouseId != 1) {
+            this.listFn1(res);
+          }
+        });
+      },
+
+      async listFn1(res) {
+        let {
+          minimumPackage,
+          withinQuantity,
+          outsidePackage,
+          outsideQuantity,
+          withinPackage,
+          minimumQuantity
+        } = res;
+        let textList = ['最小包装', '内包装', '外包装'];
+        let arr = [
+          { list: minimumPackage, num: minimumQuantity },
+          { 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.newDispositionList.forEach((item, index) => {
+            if (index == 0) {
+              this.packageCell = item.formedNumLast ? item.formedNumLast : '';
+              this.packageUnit = item.packageUnit ? item.packageUnit : '';
+              this.conversionUnit = item.conversionUnit
+                ? item.conversionUnit
+                : '';
+            } else if (index == 1) {
+              this.packageOneCell = item.formedNumLast
+                ? item.formedNumLast
+                : '';
+              this.packageOneUnit = item.packageUnit ? item.packageUnit : '';
+              this.conversionOneUnit = item.conversionUnit
+                ? item.conversionUnit
+                : '';
+            } else if (index == 2) {
+              this.packageTwoCell = item.formedNumLast
+                ? item.formedNumLast
+                : '';
+              this.packageTwoUnit = item.packageUnit ? item.packageUnit : '';
+              this.conversionTwoUnit = item.conversionUnit
+                ? item.conversionUnit
+                : '';
+            }
+          });
+          this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
+          this.newDispositionList.forEach((item, index) => {
+            if (item.splitList.length != 0) {
+              item.splitList[0].extInfo.packageDisposition =
+                this.packageDispositionData;
+              if (index == 0) {
+                this.warehouseId = 2;
+              } else if (index == 1) {
+                this.warehouseId = 3;
+              } else if (index == 2) {
+                this.warehouseId = 4;
+              }
+            }
+          });
+          this.$set(this, 'DispositionList', this.newDispositionList);
+          this.$forceUpdate();
+        });
+      },
+
+      debounce(func, wait, immediate = false) {
+        let timeout = null;
+
+        // 返回包装后的防抖函数
+        return function (...args) {
+          const context = this;
+
+          // 如果定时器存在,清除之前的定时器(取消未执行的延迟操作)
+          if (timeout) clearTimeout(timeout);
+
+          if (immediate) {
+            // 立即执行模式:首次触发立即执行,后续在 wait 时间内触发则重新计时
+            const callNow = !timeout;
+            timeout = setTimeout(() => {
+              timeout = null; // 恢复可执行状态
+            }, wait);
+            if (callNow) func.apply(context, args);
+          } else {
+            // 延迟执行模式:最后一次触发后等待 wait 时间再执行
+            timeout = setTimeout(() => {
+              func.apply(context, args);
+            }, wait);
+          }
+        };
+      },
+
+      changeInputPack(item, index) {
+        setTimeout(() => {
+          if (this.DispositionList[index]) {
+            if (!this.DispositionList[index].packageCell) {
+              if (index <= this.DispositionList.length - 1) {
+                this.DispositionList[index].formedNumLast = '';
+
+                if (index + 1 <= this.DispositionList.length - 1) {
+                  this.DispositionList[index + 1].formedNumLast = '';
+                }
+
+                if (index + 2 <= this.DispositionList.length - 1) {
+                  this.DispositionList[index + 2].formedNumLast = '';
+                }
+              }
+
+              this.newDispositionList.forEach((item, index) => {
+                if (index == 0) {
+                  this.packageCell = item.formedNumLast
+                    ? item.formedNumLast
+                    : '';
+                  this.packageUnit = item.packageUnit ? item.packageUnit : '';
+                  this.conversionUnit = item.conversionUnit
+                    ? item.conversionUnit
+                    : '';
+                } else if (index == 1) {
+                  this.packageOneCell = item.formedNumLast
+                    ? item.formedNumLast
+                    : '';
+                  this.packageOneUnit = item.packageUnit
+                    ? item.packageUnit
+                    : '';
+                  this.conversionOneUnit = item.conversionUnit
+                    ? item.conversionUnit
+                    : '';
+                } else if (index == 2) {
+                  this.packageTwoCell = item.formedNumLast
+                    ? item.formedNumLast
+                    : '';
+                  this.packageTwoUnit = item.packageUnit
+                    ? item.packageUnit
+                    : '';
+                  this.conversionTwoUnit = item.conversionUnit
+                    ? item.conversionUnit
+                    : '';
+                }
+              });
+              this.packageDispositionData = `${this.formedNumLast}${this.packageUnit}/${this.packageCell}${this.conversionUnit}/${this.packageOneCell}${this.conversionOneUnit}/${this.packageTwoCell}${this.conversionTwoUnit}`;
+
+              this.DispositionList.forEach((item, index) => {
+                if (item.splitList.length != 0) {
+                  this.DispositionList[
+                    index
+                  ].splitList[0].extInfo.packageDisposition =
+                    this.packageDispositionData;
+                }
+              });
+              this.$forceUpdate();
+              return;
+            }
+          }
+
+          if (this.DispositionList[index]) {
+            if (this.DispositionList[index].titel == '最小包装') {
+              if (
+                this.DispositionList[index].formedNumLast &&
+                Number(this.DispositionList[index].packageCell) >
+                  Number(this.formedNumLast)
+              ) {
+                this.DispositionList[index].packageCell = Number(
+                  this.formedNumLast
+                );
+              }
+            } else if (this.DispositionList[index].titel == '内包装') {
+              if (
+                this.DispositionList[index - 1].formedNumLast &&
+                Number(this.DispositionList[index].packageCell) >
+                  Number(this.DispositionList[index - 1].formedNumLast)
+              ) {
+                this.DispositionList[index].packageCell = Number(
+                  this.DispositionList[index - 1].formedNumLast
+                );
+              }
+            } else if (this.DispositionList[index].titel == '外包装') {
+              if (
+                this.DispositionList[index - 1].formedNumLast &&
+                Number(this.DispositionList[index].packageCell) >
+                  Number(this.DispositionList[index - 1].formedNumLast)
+              ) {
+                this.DispositionList[index].packageCell = Number(
+                  this.DispositionList[index - 1].formedNumLast
+                );
+              }
+            }
+          }
+
+          console.log(this.DispositionList, '返回的数据');
+          this.initData(this.DispositionList);
+        }, 500);
+      },
 
       // 第一次调用
       handleSplit(v) {
@@ -1084,7 +1404,7 @@
 
         console.log(this.DispositionList, 'this.DispositionList');
         let packInfo = {};
-        if (this.warehouseId == 2) {
+        if (this.isNewUnpack == 1) {
           if (this.DispositionList && this.DispositionList.length != 0) {
             packInfo = {
               // this.DispositionList[0]
@@ -1092,56 +1412,94 @@
               specText: this.text,
               specValue: this.value,
               minimumPackage: this.minimumPackage, // 最小包装
+              withinPackage: this.withinPackage,
+              outsidePackage: this.outsidePackage,
               tier: this.warehouseId,
               isUnpack: this.objData.isUnpack,
-              packUnitInfo: this.warehouseSpecTypeList[1].textValue,
+              packageUnit: this.packageUnit,
+              formedNumLast: this.formedNumLast,
               minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
               minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
               minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
-              minimumFormedNumLast: this.DispositionList[0].formedNumLast // 总包装数量
+              minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
+              withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
+              withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
+              withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
+              withinFormedNumLast: this.DispositionList[1].formedNumLast, // 总包装数量
+              outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
+              outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
+              outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
+              outsideFormedNumLast: this.DispositionList[2].formedNumLast,
+              isNewUnpack: this.isNewUnpack
             };
           } else {
             packInfo = {
               isUnpack: this.objData.isUnpack
             };
           }
-        } else if (this.warehouseId == 3) {
-          if (this.DispositionList && this.DispositionList.length != 0) {
-            packInfo = {
-              specText: this.text,
-              specValue: this.value,
-              withinPackage: this.withinPackage, // 内包装
-              tier: this.warehouseId,
-              isUnpack: this.objData.isUnpack,
-              packUnitInfo: this.warehouseSpecTypeList[2].textValue,
-              withinPackageCell: this.DispositionList[0].packageCell, // 最小包装名称
-              withinPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
-              withinConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
-              withinFormedNumLast: this.DispositionList[0].formedNumLast // 总包装数量
-            };
-          } else {
-            packInfo = {
-              isUnpack: this.objData.isUnpack
-            };
-          }
-        } else if (this.warehouseId == 4) {
-          if (this.DispositionList && this.DispositionList.length != 0) {
-            packInfo = {
-              specText: this.text,
-              specValue: this.value,
-              outsidePackage: this.outsidePackage, //外包装
-              tier: this.warehouseId,
-              isUnpack: this.objData.isUnpack,
-              packUnitInfo: this.warehouseSpecTypeList[3].textValue,
-              outsidePackageCell: this.DispositionList[0].packageCell, // 最小包装名称
-              outsidePackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
-              outsideConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
-              outsideFormedNumLast: this.DispositionList[0].formedNumLast
-            }; // 总包装数量
-          } else {
-            packInfo = {
-              isUnpack: this.objData.isUnpack
-            };
+        } else {
+          if (this.warehouseId == 2) {
+            if (this.DispositionList && this.DispositionList.length != 0) {
+              packInfo = {
+                // this.DispositionList[0]
+
+                specText: this.text,
+                specValue: this.value,
+                minimumPackage: this.minimumPackage, // 最小包装
+                tier: this.warehouseId,
+                isUnpack: this.objData.isUnpack,
+                packUnitInfo: this.warehouseSpecTypeList[1].textValue,
+                minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
+                minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
+                minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
+                minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
+                isNewUnpack: this.isNewUnpack
+              };
+            } else {
+              packInfo = {
+                isUnpack: this.objData.isUnpack
+              };
+            }
+          } else if (this.warehouseId == 3) {
+            if (this.DispositionList && this.DispositionList.length != 0) {
+              packInfo = {
+                specText: this.text,
+                specValue: this.value,
+                withinPackage: this.withinPackage, // 内包装
+                tier: this.warehouseId,
+                isUnpack: this.objData.isUnpack,
+                packUnitInfo: this.warehouseSpecTypeList[2].textValue,
+                withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
+                withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
+                withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
+                withinFormedNumLast: this.DispositionList[1].formedNumLast, // 总包装数量
+                isNewUnpack: this.isNewUnpack
+              };
+            } else {
+              packInfo = {
+                isUnpack: this.objData.isUnpack
+              };
+            }
+          } else if (this.warehouseId == 4) {
+            if (this.DispositionList && this.DispositionList.length != 0) {
+              packInfo = {
+                specText: this.text,
+                specValue: this.value,
+                outsidePackage: this.outsidePackage, //外包装
+                tier: this.warehouseId,
+                isUnpack: this.objData.isUnpack,
+                packUnitInfo: this.warehouseSpecTypeList[3].textValue,
+                outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
+                outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
+                outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
+                outsideFormedNumLast: this.DispositionList[2].formedNumLast,
+                isNewUnpack: this.isNewUnpack
+              }; // 总包装数量
+            } else {
+              packInfo = {
+                isUnpack: this.objData.isUnpack
+              };
+            }
           }
         }
 

+ 24 - 1
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -133,6 +133,11 @@
           placeholder="数量"
         />
       </template>
+
+      <template v-slot:packageQuantity="{ row, $index }">
+        <span>{{ row.packageQuantity }}{{ row.packingUnit }}</span>
+      </template>
+
       <template v-slot:position="{ row, $index }">
         <span v-if="isDetails">{{ row.extInfo.position }}</span>
         <el-input
@@ -310,7 +315,9 @@
           type="text"
           @click="openBatch(row, $index)"
           v-if="
-            row.feedQuantity > 1 && item.currentTaskDiagram.isFirstTask != 1
+            row.feedQuantity > 1 &&
+            item.currentTaskDiagram.isFirstTask != 1 &&
+            row.isAllPackageData != 1
           "
           >拆批</el-link
         >
@@ -959,6 +966,22 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            minWidth: 160,
+            prop: 'extInfo.packageDisposition',
+            slot: 'packageDisposition',
+            label: '包装规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 160,
+            prop: 'packageQuantity',
+            slot: 'packageQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             columnKey: 'action',
             label: '操作',

+ 185 - 1
src/views/produce/components/jobBooking/components/detailPackagingGrouping.vue

@@ -18,6 +18,17 @@
         "
         >是</span
       >
+
+      <span
+        v-else-if="objData.packInfo.isNewUnpack == 1"
+        style="
+          color: green;
+          font-size: 14px;
+          font-weight: 700;
+          margin-left: 15px;
+        "
+        >手动拆包</span
+      >
       <span
         v-else
         style="
@@ -67,7 +78,13 @@
       <!-- <zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
 				@change="changeUserType"></zxz-uni-data-select> -->
     </div>
-    <div v-if="warehouseId != 1 && objData.packInfo.isUnpack == '1'">
+    <div
+      v-if="
+        warehouseId != 1 &&
+        objData.packInfo.isUnpack == '1' &&
+        objData.packInfo.isNewUnpack != 1
+      "
+    >
       <div v-for="(item, i) in DispositionList" :key="i">
         <div class="title_box rx-bc mt6">
           <div class="name">{{ item.titel }}</div>
@@ -165,6 +182,129 @@
 </SearchPopup> -->
       </div>
     </div>
+
+    <div v-if="warehouseId != 1 && objData.packInfo.isNewUnpack == 1">
+      <div class="title_box rx-bc mt6">
+        <div class="name">包装信息</div>
+
+        <div class="rx-bc"> </div>
+      </div>
+      <div class="material">
+        <div
+          class="content_table"
+          v-for="(item, i) in DispositionList"
+          :key="i"
+        >
+          <div class="item">
+            <div class="lable rx-cc">总数 </div>
+            <div class="content content_num">
+              <span>{{ item.formedNumLast }}</span>
+              <div class="unit">{{ item.packageUnit }}</div>
+            </div>
+          </div>
+
+          <div class="title_box rx-bc mt6">
+            <div class="name">最小包装</div>
+
+            <div class="rx-bc"> </div>
+          </div>
+
+          <div class="item">
+            <div class="lable rx-cc">包装总数 </div>
+            <div class="content content_num">
+              <span>{{ item.minimumFormedNumLast }}</span>
+              <div class="unit">{{ item.minimumConversionUnit }}</div>
+            </div>
+          </div>
+
+          <div class="item rx-sc">
+            <div class="rx ww55">
+              <div class="lable lable200 rx-cc">最小包装单元</div>
+              <div class="content content_num">
+                <span>{{ item.minimumPackageCell }}</span>
+                <div class="unit">{{ item.minimumPackageUnit }}</div
+                >/<div class="unit">{{ item.minimumConversionUnit }}</div>
+              </div>
+            </div>
+          </div>
+
+          <div class="title_box rx-bc mt6">
+            <div class="name">内包装</div>
+
+            <div class="rx-bc"> </div>
+          </div>
+
+          <div class="item">
+            <div class="lable rx-cc">包装总数 </div>
+            <div class="content content_num">
+              <span>{{ item.withinFormedNumLast }}</span>
+              <div class="unit">{{ item.withinConversionUnit }}</div>
+            </div>
+          </div>
+
+          <div class="item rx-sc">
+            <div class="rx ww55">
+              <div class="lable lable200 rx-cc">内包装单元</div>
+              <div class="content content_num">
+                <span>{{ item.withinPackageCell }}</span>
+                <div class="unit">{{ item.withinPackageUnit }}</div
+                >/<div class="unit">{{ item.withinConversionUnit }}</div>
+              </div>
+            </div>
+          </div>
+
+          <div class="title_box rx-bc mt6">
+            <div class="name">外包装</div>
+
+            <div class="rx-bc"> </div>
+          </div>
+
+          <div class="item">
+            <div class="lable rx-cc">包装总数 </div>
+            <div class="content content_num">
+              <span>{{ item.outsideFormedNumLast }}</span>
+              <div class="unit">{{ item.outsideConversionUnit }}</div>
+            </div>
+          </div>
+
+          <div class="item rx-sc">
+            <div class="rx ww55">
+              <div class="lable lable200 rx-cc">外包装单元</div>
+              <div class="content content_num">
+                <span>{{ item.outsidePackageCell }}</span>
+                <div class="unit">{{ item.outsidePackageUnit }}</div
+                >/<div class="unit">{{ item.outsideConversionUnit }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <div v-for="(it, i) in DispositionList" :key="it.id">
+        <div v-if="it.splitList.length">
+          <ele-pro-table
+            ref="table"
+            :needPage="false"
+            :columns="columnsMin"
+            :datasource="it.splitList"
+            class="time-form"
+            max-height="400"
+            row-key="index"
+          >
+            <template v-slot:feedQuantity="{ row, $index }">
+              <span>{{ row.feedQuantity }}{{ row.packingUnit }}</span>
+            </template>
+
+            <template v-slot:packageQuantity="{ row, $index }">
+              <span
+                >{{ row.packageQuantity ? row.packageQuantity : ''
+                }}{{ row.packingUnit ? row.packingUnit : '' }}</span
+              >
+            </template>
+          </ele-pro-table>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -365,6 +505,23 @@
                 : '';
             }
           },
+          {
+            minWidth: 120,
+            prop: 'extInfo.packageDisposition',
+            slot: 'packageDisposition',
+            label: '包装规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            minWidth: 150,
+            prop: 'packageQuantity',
+            slot: 'packageQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             minWidth: 120,
             prop: 'extInfo.engrave',
@@ -519,6 +676,7 @@
     },
 
     created() {
+      console.log(this.objData, 'objDataobjDataobjData');
       if (this.objData.packInfo && !this.storeType) {
         this.warehouseId = this.objData.packInfo.tier;
         if (this.objData.packInfo.isUnpack == '1') {
@@ -529,6 +687,32 @@
             packageUnit: this.objData.packInfo.minimumPackageUnit,
             conversionUnit: this.objData.packInfo.minimumConversionUnit
           });
+        } else if (this.objData.packInfo.isNewUnpack == 1) {
+          this.DispositionList.push({
+            titel: '',
+            splitList:
+              this.objData.packInfo.minimumPackage.length != 0
+                ? this.objData.packInfo.minimumPackage
+                : this.objData.packInfo.withinPackage.length != 0
+                ? this.objData.packInfo.withinPackage
+                : this.objData.packInfo.outsidePackage.length != 0
+                ? this.objData.packInfo.outsidePackage
+                : [],
+            minimumPackageCell: this.objData.packInfo.minimumPackageCell,
+            minimumPackageUnit: this.objData.packInfo.minimumPackageUnit,
+            minimumConversionUnit: this.objData.packInfo.minimumConversionUnit,
+            minimumFormedNumLast: this.objData.packInfo.minimumFormedNumLast,
+            withinPackageCell: this.objData.packInfo.withinPackageCell,
+            withinPackageUnit: this.objData.packInfo.withinPackageUnit,
+            withinConversionUnit: this.objData.packInfo.withinConversionUnit,
+            withinFormedNumLast: this.objData.packInfo.withinFormedNumLast,
+            outsidePackageCell: this.objData.packInfo.outsidePackageCell,
+            outsidePackageUnit: this.objData.packInfo.outsidePackageUnit,
+            outsideConversionUnit: this.objData.packInfo.outsideConversionUnit,
+            outsideFormedNumLast: this.objData.packInfo.outsideFormedNumLast,
+            formedNumLast: this.objData.formingNum,
+            packageUnit: this.objData.unit
+          });
         }
       } else {
         if (this.objData.packInfo.isUnpack == '1') {

+ 2 - 2
src/views/produce/components/jobBooking/details.vue

@@ -288,7 +288,7 @@
           >
           </packingTgBom>
 
-          <div
+          <!-- <div
             v-if="
               taskType == 4 &&
               clientEnvironmentId != 3 &&
@@ -304,7 +304,7 @@
               "
               :equipmentList="objData.equipmentList"
             ></semiProductJobBom>
-          </div>
+          </div> -->
         </div>
       </div>
     </div>

+ 2 - 0
src/views/produce/components/jobBooking/index.vue

@@ -1418,6 +1418,8 @@
 
         console.log(this.List, 'this.List');
 
+        return;
+
         // this.List[0].product = this.List[0].semiProductList;
         this.loadingBtn = true;
         jobSave(this.List)

+ 10 - 0
src/views/warehousing/components/tgDetails.vue

@@ -120,6 +120,10 @@
         {{ row.packingWeight }} {{ row.weightUnit }}
       </template>
 
+      <template v-slot:quantity="{ row }">
+        {{ row.quantity }}{{ row.measuringUnit }}
+      </template>
+
       <template v-slot:materielCode="{ row }">
         {{ row.extInfo.materielCode }}
       </template>
@@ -205,6 +209,12 @@
             showOverflowTooltip: true
           },
 
+          {
+            label: '包装规格',
+            prop: 'extInfo.packageDisposition',
+            showOverflowTooltip: true
+          },
+
           {
             label: '本包重量',
             slot: 'packingWeight',