huang_an 1 年間 前
コミット
fabbd6130f

+ 3 - 41
src/views/warehouseManagement/components/outboundRequisitionDialog.vue

@@ -72,34 +72,6 @@
               >
             </div>
           </template>
-
-          <template v-slot:action="{ row }">
-            <el-link
-              type="primary"
-              :underline="false"
-              @click="handleDetails(row)"
-            >
-              详情
-            </el-link>
-
-            <el-link
-              type="primary"
-              v-if="row.status == 1"
-              :underline="false"
-              @click="handleFlow(row)"
-            >
-              流程
-            </el-link>
-
-            <el-link
-              type="primary"
-              v-if="row.status != 1"
-              :underline="false"
-              @click="handleRelease(row)"
-            >
-              发布
-            </el-link>
-          </template>
         </ele-pro-table>
       </div>
       <div class="main" v-if="bizType != 10">
@@ -368,17 +340,6 @@
             slot: 'files',
             action: 'files',
             minWidth: 100
-          },
-
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 140,
-            align: 'center',
-            resizable: false,
-            fixed: 'right',
-            slot: 'action',
-            showOverflowTooltip: true
           }
         ];
       }
@@ -457,7 +418,7 @@
       },
       handleMine(val) {
         console.log(val, 'valvalvalvalvalvalvalvalvalvalvalvalvalval确认按钮');
-        console.log(this.bizType, '10000000000000000000000');
+        console.log(this.bizType, 'this.bizType');
         if (this.bizType != 10) {
           let checkRadioData = val ? val : this.checkRadioData;
           if (checkRadioData.length < 1) {
@@ -530,7 +491,8 @@
             }
           });
         } else {
-          this.$emit('detailData', {}, 1, {
+          console.log(this.currentRow10, '10');
+          this.$emit('detailData', [], 1, {
             sourceBizNo: this.currentRow10.code,
             taskId: this.currentRow10.taskId,
             workOrderId: this.currentRow10.workOrderId

ファイルの差分が大きいため隠しています
+ 398 - 316
src/views/warehouseManagement/stockManagement/add.vue


+ 6 - 1
src/views/warehouseManagement/stockManagement/add_2.vue

@@ -987,6 +987,7 @@
       ref="outboundRequisitionDialogRef"
       @detailData="outboundRequisitionSelection"
       type="1"
+      :bizType="formData.bizType"
     />
   </div>
 </template>
@@ -1243,6 +1244,8 @@
           this.formData.bizType = query.bizType;
           this.formData.extInfo.assetType = query.assetType.split(',');
         } else {
+          console.log('query', query);
+
           this.selWWData = query;
           this.formData.sourceBizNo = query.sourceBizNo;
         }
@@ -1783,7 +1786,9 @@
             ...packingItem,
             materialDetailList: this.materialList.filter(
               (item) => item.parentIndex === packingItem.index
-            )
+            ),
+            taskId: this.selWWData.taskId,
+            workOrderId: this.selWWData.workOrderId
           };
         });
         // 处理产品数据

+ 113 - 103
src/views/warehouseManagement/stockManagement/add_3.vue

@@ -918,6 +918,7 @@
       ref="outboundRequisitionDialogRef"
       @detailData="outboundRequisitionSelection"
       type="1"
+      :bizType="formData.bizType"
     />
   </div>
 </template>
@@ -1243,111 +1244,118 @@
       async outboundRequisitionSelection(data, dimension, query) {
         console.log('data-----------', data);
         console.log('query-----------', query);
-        this.formData.sourceBizNo = query.sourceBizNo;
-        this.formData.bizType = query.bizType;
-        this.formData.extInfo.assetType = query.assetType.split(',');
-        const batchNo = await getCode('lot_number_code');
-        // 获取包装规格
-        let packingSpecification =
-          await storageApi.getCategoryPackageDisposition({
-            categoryIds: data.map((item) => item.categoryId)
-          });
-        this.packingSpecificationOption = data.map((item) => {
-          return packingSpecification
-            .filter((ite) => item.categoryId == ite.categoryId)
-            .sort((a, b) => a.sort - b.sort);
-        });
-        console.log(
-          'this.packingSpecificationOption-----------',
-          this.packingSpecificationOption
-        );
-        this.productList = data.map((productItem, productIndex) => {
-          // 显示规格
-          let packingSpecificationLabel = this.packingSpecificationOption[
-            productIndex
-          ]
-            .map((item) => {
-              if (item.sort > 0) {
-                return `${item.packageCell}${item.packageUnit}/${item.conversionUnit}`;
-              }
-            })
-            .filter((item) => !!item);
-          return {
-            ...productItem,
-            index: this.productList.length + productIndex,
-            isSave:
-              productItem.outInDetailRecordRequestList?.length > 0
-                ? true
-                : false,
-            netWeight: productItem.netWeight > 0 ? productItem.netWeight : 0,
-            batchNo: batchNo, // 批次号
-            warehouseIds: [productItem.warehouseId], // 仓库Id
-            warehouseNames: [productItem.warehouseName], // 仓库名称
-            packingSpecificationOption:
-              this.packingSpecificationOption[productIndex], // 包装规格选项
-            packingSpecificationLabel: packingSpecificationLabel, // 包装规格显示
-            outInDetailRecordRequestList:
-              productItem.outInDetailRecordRequestList?.length > 0
-                ? productItem.outInDetailRecordRequestList.map(
-                    (packingItem, packingIndex) => {
-                      return {
-                        ...packingItem,
-                        index:
-                          this.productList.length +
-                          productIndex +
-                          '-' +
-                          packingIndex, // 包装索引
-                        batchNo: batchNo, // 批次号
-                        parentIndex: this.productList.length + productIndex, // 物品索引
-                        categoryName: productItem.categoryName,
-                        categoryCode: productItem.categoryCode,
-                        materialDetailList: packingItem.materialDetailList.map(
-                          (materialItem, materialIndex) => {
-                            return {
-                              ...materialItem,
-                              index:
-                                this.productList.length +
-                                productIndex +
-                                '-' +
-                                packingIndex +
-                                '——' +
-                                materialIndex, // 包装索引
-                              parentIndex:
-                                this.productList.length +
-                                productIndex +
-                                '-' +
-                                packingIndex, // 物品索引
-                              batchNo: batchNo, // 批次号
-                              categoryName: productItem.categoryName,
-                              categoryCode: productItem.categoryCode
-                            };
-                          }
-                        )
-                      };
-                    }
-                  )
-                : []
-          };
-        });
-        console.log('this.productList-----------', this.productList);
-        // 获取包装维度数据
-        const arr = [];
-        for (const key in this.productList) {
-          for (const k in this.productList[key].outInDetailRecordRequestList) {
-            arr.push({
-              ...this.productList[key].outInDetailRecordRequestList[k]
+        if (this.formData.bizType != 10) {
+          this.formData.sourceBizNo = query.sourceBizNo;
+          this.formData.bizType = query.bizType;
+          this.formData.extInfo.assetType = query.assetType.split(',');
+          const batchNo = await getCode('lot_number_code');
+          // 获取包装规格
+          let packingSpecification =
+            await storageApi.getCategoryPackageDisposition({
+              categoryIds: data.map((item) => item.categoryId)
             });
+          this.packingSpecificationOption = data.map((item) => {
+            return packingSpecification
+              .filter((ite) => item.categoryId == ite.categoryId)
+              .sort((a, b) => a.sort - b.sort);
+          });
+          console.log(
+            'this.packingSpecificationOption-----------',
+            this.packingSpecificationOption
+          );
+          this.productList = data.map((productItem, productIndex) => {
+            // 显示规格
+            let packingSpecificationLabel = this.packingSpecificationOption[
+              productIndex
+            ]
+              .map((item) => {
+                if (item.sort > 0) {
+                  return `${item.packageCell}${item.packageUnit}/${item.conversionUnit}`;
+                }
+              })
+              .filter((item) => !!item);
+            return {
+              ...productItem,
+              index: this.productList.length + productIndex,
+              isSave:
+                productItem.outInDetailRecordRequestList?.length > 0
+                  ? true
+                  : false,
+              netWeight: productItem.netWeight > 0 ? productItem.netWeight : 0,
+              batchNo: batchNo, // 批次号
+              warehouseIds: [productItem.warehouseId], // 仓库Id
+              warehouseNames: [productItem.warehouseName], // 仓库名称
+              packingSpecificationOption:
+                this.packingSpecificationOption[productIndex], // 包装规格选项
+              packingSpecificationLabel: packingSpecificationLabel, // 包装规格显示
+              outInDetailRecordRequestList:
+                productItem.outInDetailRecordRequestList?.length > 0
+                  ? productItem.outInDetailRecordRequestList.map(
+                      (packingItem, packingIndex) => {
+                        return {
+                          ...packingItem,
+                          index:
+                            this.productList.length +
+                            productIndex +
+                            '-' +
+                            packingIndex, // 包装索引
+                          batchNo: batchNo, // 批次号
+                          parentIndex: this.productList.length + productIndex, // 物品索引
+                          categoryName: productItem.categoryName,
+                          categoryCode: productItem.categoryCode,
+                          materialDetailList:
+                            packingItem.materialDetailList.map(
+                              (materialItem, materialIndex) => {
+                                return {
+                                  ...materialItem,
+                                  index:
+                                    this.productList.length +
+                                    productIndex +
+                                    '-' +
+                                    packingIndex +
+                                    '——' +
+                                    materialIndex, // 包装索引
+                                  parentIndex:
+                                    this.productList.length +
+                                    productIndex +
+                                    '-' +
+                                    packingIndex, // 物品索引
+                                  batchNo: batchNo, // 批次号
+                                  categoryName: productItem.categoryName,
+                                  categoryCode: productItem.categoryCode
+                                };
+                              }
+                            )
+                        };
+                      }
+                    )
+                  : []
+            };
+          });
+          console.log('this.productList-----------', this.productList);
+          // 获取包装维度数据
+          const arr = [];
+          for (const key in this.productList) {
+            for (const k in this.productList[key]
+              .outInDetailRecordRequestList) {
+              arr.push({
+                ...this.productList[key].outInDetailRecordRequestList[k]
+              });
+            }
           }
-        }
-        this.packingList = arr;
-        // 获取物料维度数据
-        let iArr = [];
-        arr.forEach((item) => {
-          item.materialDetailList.forEach((ele) => {
-            iArr.push({ ...ele });
+          this.packingList = arr;
+          // 获取物料维度数据
+          let iArr = [];
+          arr.forEach((item) => {
+            item.materialDetailList.forEach((ele) => {
+              iArr.push({ ...ele });
+            });
           });
-        });
-        this.materialList = iArr;
+          this.materialList = iArr;
+        } else {
+          this.selWWData = query;
+          this.$set(this.formData, 'sourceBizNo', query.sourceBizNo);
+        }
       },
       // 获取动态表头
       getFieldModel() {
@@ -1712,7 +1720,9 @@
             ...packingItem,
             materialDetailList: this.materialList.filter(
               (item) => item.parentIndex === packingItem.index
-            )
+            ),
+            taskId: this.selWWData.taskId,
+            workOrderId: this.selWWData.workOrderId
           };
         });
         // 处理产品数据

+ 123 - 165
src/views/warehouseManagement/stockManagement/details.vue

@@ -33,7 +33,7 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="关联订单:">
-                  <span>{{ infoData.sourceBizNo }}</span>
+                  <span>{{ extInfo.documentSource }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -101,7 +101,7 @@
           </div>
         </div>
         <div class="content-detail mt20">
-          <header-title title="产品信息" size="16px"> </header-title>
+          <header-title title="产品信息" size="16px"></header-title>
           <el-table
             ref="productListTable"
             :data="productList"
@@ -164,20 +164,26 @@
             >
             </el-table-column>
             <el-table-column
-              label="包装数量"
-              prop="packingQuantity"
+              label="最小包装单元"
               align="center"
+              width="120"
+              prop="minPackingQuantity"
             >
               <template slot-scope="{ row, $index }">
-                {{ row.packingQuantity }}
+                {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
+                  row.packingUnit
+                }}
               </template>
             </el-table-column>
+
             <el-table-column
-              label="包装单位"
+              label="包装数量"
+              prop="packingQuantity"
               align="center"
-              width="120"
-              prop="packingUnit"
             >
+              <template slot-scope="{ row, $index }">
+                {{ row.packingQuantity }} {{ row.packingUnit }}
+              </template>
             </el-table-column>
             <el-table-column
               label="计量数量"
@@ -185,8 +191,23 @@
               width="100"
               align="center"
             >
+              <template slot-scope="{ row, $index }">
+                <template>
+                  {{
+                    $math.format(
+                      row.minPackingQuantity * row.packingQuantity,
+                      14
+                    )
+                  }}
+                </template>
+              </template>
             </el-table-column>
             <el-table-column label="计量单位" prop="measureUnit" align="center">
+              <template slot-scope="{ row, $index }">
+                <template>
+                  {{ row.measureUnit }}
+                </template>
+              </template>
             </el-table-column>
             <el-table-column
               label="重量"
@@ -264,42 +285,17 @@
           </el-table>
         </div>
         <div class="mt20">
-          <header-title :title="`包装明细`" size="16px">
-            <el-button
-              v-for="item in mergeOptions"
-              size="mini"
-              type="primary"
-              @click="openMergeDialog(item)"
-              >合并成{{ item.conversionUnit }}</el-button
-            >
-            <el-button
-              v-for="item in splitOptions"
-              size="mini"
-              type="primary"
-              @click="openSplitDialog(item)"
-              >拆分到{{ item.packageUnit }}</el-button
-            >
-          </header-title>
+          <header-title :title="`包装明细`" size="16px"></header-title>
           <el-table
             ref="showPackingListTable"
-            :data="packingList"
+            :data="showPackingList"
             tooltip-effect="dark"
             :max-height="300"
             border
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
-            @selection-change="productSplit"
+            v-el-table-infinite-scroll="pickingHandleScroll"
           >
-            <el-table-column
-              v-if="infoData.verifyStatus == 2"
-              key="selection"
-              label="选择"
-              type="selection"
-              width="55"
-              align="center"
-              fixed="left"
-            >
-            </el-table-column>
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
             <el-table-column
@@ -454,17 +450,73 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-pagination
-            background
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="total"
-            :page-sizes="[10, 10, 20, 30]"
-            :page-size.sync="pages.size"
-            :current-page.sync="pages.pageNum"
-            @current-change="handleCurrentChange"
-            @size-change="handleSizeChange"
+        </div>
+        <div class="mt20">
+          <header-title :title="`物料明细`" size="16px"> </header-title>
+          <el-table
+            ref="multipleTable"
+            :data="showMaterialList"
+            tooltip-effect="dark"
+            :max-height="300"
+            border
+            :row-class-name="tableRowClassName"
+            :header-cell-style="rowClass"
+            style="width: 100%"
+            stripe
+            height="300px"
+            v-el-table-infinite-scroll="materielHandleScroll"
           >
-          </el-pagination>
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column label="批次号" prop="batchNo"></el-table-column>
+            <el-table-column
+              label="物料编码"
+              prop="materialCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+            ></el-table-column>
+            <el-table-column label="物料代号" prop="materielDesignation">
+            </el-table-column>
+            <el-table-column label="客户代号" prop="clientCode">
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave"> </el-table-column>
+            <el-table-column width="100" label="重量" prop="weight">
+            </el-table-column>
+            <el-table-column label="重量单位" prop="weightUnit">
+            </el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="质检状态" prop="status" width="120">
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
         </div>
       </div>
     </el-card>
@@ -472,40 +524,25 @@
       ref="wareHouseDailogRef"
       @houseData="houseData"
     ></WareHouseDailog>
-    <mergeDetails
-      ref="mergeDetailsRef"
-      @refresh="getPackingList"
-    ></mergeDetails>
-    <splitDetails ref="splitDetailsRef"></splitDetails>
   </div>
 </template>
 
 <script>
-  import mergeDetails from './mergeDetails.vue';
-  import splitDetails from './splitDetails.vue';
   import WareHouseDailog from '../components/warehouseShelvesDialog.vue';
   import elTableInfiniteScroll from 'el-table-infinite-scroll';
   import { getFile } from '@/api/system/file/index.js';
   import PageHeader from '@/components/PageHeader';
   import storageApi from '@/api/warehouseManagement';
-  import { getCode } from '@/api/codeManagement/index.js';
   import { allCategoryLevel } from '@/api/classifyManage';
   import { useDictLabel, sceneState } from '@/utils/dict/index';
   import { mapGetters, mapActions } from 'vuex';
   export default {
-    components: { PageHeader, WareHouseDailog, mergeDetails, splitDetails },
+    components: { PageHeader, WareHouseDailog },
     directives: {
       'el-table-infinite-scroll': elTableInfiniteScroll
     },
     data() {
       return {
-        total: 0,
-        pages: { pageNum: 1, size: 10 },
-        oldSelectionList: [],
-        selectionList: [],
-        mergeOptions: [],
-        splitOptions: [],
-        currentId: '',
         newColumns: [], // 动态表头
         qualityStatus: {
           0: '未质检',
@@ -528,8 +565,7 @@
         infoData: {},
         stepsTitle: '已完成',
         stepsStatus: 'success',
-        active: 0,
-        verifyStatus: ''
+        active: 0
       };
     },
     watch: {
@@ -588,69 +624,10 @@
     created() {
       this.getFieldModel();
       this.requestDict('类型用途');
-      this.requestDict('不拆物料层规格');
       this.getAllCategoryType();
       this._getInfo();
-      this.verifyStatus = this.$route.query.verifyStatus;
     },
     methods: {
-      openMergeDialog(dimensionRow) {
-        this.$refs.mergeDetailsRef.open(dimensionRow, this.selectionList);
-      },
-      openSplitDialog(dimensionRow) {
-        this.$refs.splitDetailsRef.open(dimensionRow, this.selectionList);
-      },
-      productSplit(selectionList) {
-        console.log(selectionList);
-        let isUnification = selectionList.every(
-          (item) =>
-            item.packingUnit == selectionList[0].packingUnit &&
-            item.categoryId == selectionList[0].categoryId
-        );
-        if (isUnification) {
-          if (selectionList.length > 0) {
-            this.selectionList = selectionList;
-            this.oldSelectionList = selectionList;
-            if (this.mergeOptions.length == 0) {
-              storageApi
-                .getCategoryPackageDisposition({
-                  categoryIds: [this.selectionList[0].categoryId]
-                })
-                .then((data) => {
-                  console.log(data);
-                  console.log(this.selectionList[0]);
-                  // 形成合并按钮
-                  let mergeIndex = data.findIndex(
-                    (item) =>
-                      item.packageUnit == this.selectionList[0].packingUnit &&
-                      item.packageUnit != item.conversionUnit
-                  );
-                  console.log(mergeIndex);
-                  this.mergeOptions = data.filter(
-                    (item) => item.sort == data[mergeIndex].sort
-                  );
-                  // 形成拆分按钮
-                  let splitIndex = data.findIndex(
-                    (item) =>
-                      item.conversionUnit ==
-                        this.selectionList[0].packingUnit &&
-                      item.packageUnit != item.conversionUnit
-                  );
-                  this.splitOptions = data.filter(
-                    (item) => item.sort == data[splitIndex].sort
-                  );
-                });
-            }
-          } else {
-            this.mergeOptions = [];
-            this.splitOptions = [];
-          }
-        } else {
-          this.$message.error('请选择相同物品和包装装单位');
-          this.$refs.showPackingListTable.clearSelection();
-        }
-        console.log(isUnification);
-      },
       // 获取动态表头
       getFieldModel() {
         storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
@@ -666,7 +643,6 @@
         });
       },
       isUpper(row) {
-        console.log('this.packingList------', this.packingList);
         let filterPackingList = this.packingList.filter((packingItem) => {
           return packingItem.parentIndex === row.index;
         });
@@ -828,6 +804,7 @@
         return filteredData.map((item) => item.dictValue).join(',');
       },
       tableRowClassName({ row, rowIndex }) {
+        console.log(row);
         if (row.result == 2) {
           return 'warning-row';
         } else {
@@ -904,52 +881,33 @@
             };
           }
         );
-        this.getPackingList();
-        // // 获取包装维度数据
-        // const arr = [];
-        // for (const key in this.productList) {
-        //   for (const k in this.productList[key].outInDetailRecordRequestList) {
-        //     arr.push({
-        //       ...this.productList[key].outInDetailRecordRequestList[k]
-        //     });
-        //   }
-        // }
-        // this.packingList = arr;
-        // // 获取物料维度数据
-        // let iArr = [];
-        // arr.forEach((item) => {
-        //   item.materialDetailList.forEach((ele) => {
-        //     iArr.push({ ...ele });
-        //   });
-        // });
-        // this.materialList = iArr;
-        // console.log(this.packingList);
-        // console.log(this.materialList);
-        // this.pickingFetchData();
-        // this.materielFetchData();
+        // 获取包装维度数据
+        const arr = [];
+        for (const key in this.productList) {
+          for (const k in this.productList[key].outInDetailRecordRequestList) {
+            arr.push({
+              ...this.productList[key].outInDetailRecordRequestList[k]
+            });
+          }
+        }
+        this.packingList = arr;
+        // 获取物料维度数据
+        let iArr = [];
+        arr.forEach((item) => {
+          item.materialDetailList.forEach((ele) => {
+            iArr.push({ ...ele });
+          });
+        });
+        this.materialList = iArr;
+        console.log(this.packingList);
+        console.log(this.materialList);
+        this.pickingFetchData();
+        this.materielFetchData();
       },
       download(row) {
         if (row.storePath) {
           getFile({ objectName: row.storePath }, row.name);
         }
-      },
-      handleCurrentChange(e) {
-        this.getPackingList();
-      },
-      handleSizeChange(e) {
-        this.pages.pageNum = 1;
-        this.getPackingList();
-      },
-      getPackingList() {
-        storageApi
-          .getOutInRecordsPage({
-            ...this.pages,
-            outInId: this.$route.query.id
-          })
-          .then((data) => {
-            this.total = data.count;
-            this.packingList = data.list;
-          });
       }
     }
   };

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません