فهرست منبع

包括:出入库申请页面,操作栏进出库入库。

huang_an 1 سال پیش
والد
کامیت
df0d7b0551

+ 16 - 0
src/api/warehouseManagement/index.js

@@ -206,6 +206,22 @@ export default {
     }
     return Promise.reject(new Error(res.data.message));
   },
+  // 获取物料维度台账列表
+  getInfoBySourceBizNo: async (id) => {
+    const res = await request.get(`/wms/outintwo/getInfoBySourceBizNo/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 质检保存
+  qualityInspection: async (data) => {
+    const res = await request.post(`/wms/outintwo/qualityInspection`, data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
   // 通过入库申请单查询详情
   getApplystorageDetailById: async (id) => {
     const res = await request.get(`/mes/applystorage/getById/${id}`);

+ 49 - 60
src/views/warehouseManagement/components/outboundRequisitionDialog.vue

@@ -45,7 +45,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="handleMine">确 定</el-button>
+        <el-button type="primary" @click="handleMine()">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -122,7 +122,6 @@
             label: '出入库类型',
             align: 'center',
             formatter: (row, column, cellValue) => {
-              console.log(row);
               switch (this.type) {
                 case '1':
                   // 入库
@@ -204,14 +203,16 @@
           this.checkRadioData = [];
         }
       },
-      handleMine() {
-        if (this.checkRadioData.length < 1) {
+      handleMine(val) {
+        console.log(val, 'valvalvalvalvalvalvalvalvalvalvalvalvalval');
+        let checkRadioData = val ? val : this.checkRadioData;
+        if (checkRadioData.length < 1) {
           return this.$message.error(
             `请选择${this.type == 1 ? '入库' : '出库'}申请单`
           );
         }
-        let isBoolean = this.checkRadioData.every(
-          (item) => this.checkRadioData[0].sourceType == item.sourceType
+        let isBoolean = checkRadioData.every(
+          (item) => checkRadioData[0].sourceType == item.sourceType
         );
         if (!isBoolean) {
           return this.$message.error(
@@ -220,69 +221,57 @@
             }申请单出入库类型不一致,请重新选择`
           );
         }
-        storageApi
-          .getApplystoragedetails(this.checkRadioData.map((item) => item.id))
-          .then(async (res) => {
-            if (this.type == 2) {
-              // 出库
-              let data = await storageApi.getHierarchyFifo({
-                type: 1,
-                builders: res.map((item) => {
-                  return {
-                    categoryId: item.categoryId,
-                    num: item.measureQuantity
-                  };
-                })
-              });
-              if (data?.length > 0) {
-                console.log({
-                  sourceBizNo: this.checkRadioData
-                    .map((item) => item.code)
-                    .join(','),
-                  bizType: this.currentRow.sourceType,
-                  assetType: res[0].rootCategoryLevelId
-                });
-                this.$emit('detailData', data, 1, {
-                  sourceBizNo: this.checkRadioData
-                    .map((item) => item.code)
-                    .join(','),
-                  bizType: this.checkRadioData[0].sourceType,
-                  assetType: Array.from(
-                    new Set(res.map((item) => item.rootCategoryLevelId))
-                  ).join(',')
-                });
-                this.dialogVisible = false;
-              } else {
-                this.$message.warning('该出库申请单无库存');
-              }
-            } else {
-              // 入库
-              const batchNo = await getCode('lot_number_code');
-              let data = res.map((item, index) => {
+        let aaa = checkRadioData.map((item) => item.id);
+        storageApi.getApplystoragedetails(aaa).then(async (res) => {
+          if (this.type == 2) {
+            // 出库
+            let data = await storageApi.getHierarchyFifo({
+              type: 1,
+              builders: res.map((item) => {
                 return {
-                  ...item,
-                  index,
-                  packingQuantity: 1,
-                  minPackingQuantity: item.measureQuantity,
-                  measureUnit: item.measuringUnit,
-                  batchNo,
-                  id: '',
-                  warehouseIds: [item.warehouseId],
-                  warehouseNames: [item.warehouseName]
+                  categoryId: item.categoryId,
+                  num: item.measureQuantity
                 };
-              });
+              })
+            });
+            if (data?.length > 0) {
               this.$emit('detailData', data, 1, {
-                sourceBizNo: this.checkRadioData
-                  .map((item) => item.code)
-                  .join(','),
-                bizType: this.checkRadioData[0].sourceType,
+                sourceBizNo: checkRadioData.map((item) => item.code).join(','),
+                bizType: checkRadioData[0].sourceType,
                 assetType: Array.from(
                   new Set(res.map((item) => item.rootCategoryLevelId))
                 ).join(',')
               });
               this.dialogVisible = false;
+            } else {
+              this.$message.warning('该出库申请单无库存');
             }
-          });
+          } else {
+            // 入库
+            const batchNo = await getCode('lot_number_code');
+            let data = res.map((item, index) => {
+              return {
+                ...item,
+                index,
+                packingQuantity: 1,
+                minPackingQuantity: item.measureQuantity,
+                measureUnit: item.measuringUnit,
+                batchNo,
+                id: '',
+                warehouseIds: [item.warehouseId],
+                warehouseNames: [item.warehouseName]
+              };
+            });
+            this.$emit('detailData', data, 1, {
+              sourceBizNo: checkRadioData.map((item) => item.code).join(','),
+              bizType: checkRadioData[0].sourceType,
+              assetType: Array.from(
+                new Set(res.map((item) => item.rootCategoryLevelId))
+              ).join(',')
+            });
+            this.dialogVisible = false;
+          }
+        });
       },
       // 单击获取id
       cellClick(row) {

+ 31 - 0
src/views/warehouseManagement/inboundRequests/components/tgTable.vue

@@ -34,6 +34,13 @@
         <el-link type="primary" :underline="false" @click="details(row)">
           详情
         </el-link>
+        <el-link
+          type="primary"
+          :underline="false"
+          @click="depotInOut(row, type)"
+        >
+          {{ type == 1 ? '入库' : '出库' }}
+        </el-link>
       </template>
     </ele-pro-table>
     <tgDetails ref="tgDetailsRefs"></tgDetails>
@@ -168,6 +175,30 @@
       details(row) {
         this.$refs.tgDetailsRefs.open(row);
       },
+      depotInOut(row, type) {
+        console.log(row, type);
+        if (type == 1) {
+          this.$router.push({
+            path: '/warehouseManagement/stockManagement/add',
+            query: {
+              code: row.code,
+              inId: row.id,
+              type: '1',
+              sourceType: row.sourceType
+            }
+          });
+        } else {
+          this.$router.push({
+            path: '/warehouseManagement/outgoingManagement/add',
+            query: {
+              code: row.code,
+              id: row.id,
+              type: '2',
+              sourceType: row.sourceType
+            }
+          });
+        }
+      },
       /* 刷新表格 */
       reload(where) {
         this.$nextTick(() => {

+ 8 - 1
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -34,7 +34,7 @@
                 @click.native="openDocumentSourceDialog"
               >
                 <el-button
-                  @click="clearDocumentSource"
+                  @click.stop="clearDocumentSource"
                   slot="append"
                   icon="el-icon-circle-close"
                 ></el-button>
@@ -609,9 +609,16 @@
         });
         this.detailData(data, 3);
       }
+      if (queryObj.type) {
+        this.formData.sourceBizNo = queryObj.code;
+        this.$nextTick(() => {
+          this.$refs.outboundRequisitionDialogRef.handleMine([queryObj]);
+        });
+      }
     },
     methods: {
       outboundRequisitionSelection(data, dimension, query) {
+        console.log(data, dimension, query);
         this.formData.sourceBizNo = query.sourceBizNo;
         this.formData.bizType = query.bizType;
         this.formData.extInfo.assetType = query.assetType.split(',');

+ 2 - 1
src/views/warehouseManagement/stockLedger/allBatchDetails.vue

@@ -124,10 +124,11 @@
     methods: {
       async getDetailInfo(row) {
         console.log('===', row);
+        this.categoryId = row.id;
         const res = deepClone(await getDetails(row.id));
         this.$nextTick(() => {
           console.log(res);
-          this.categoryId = res.categoryWms && res.categoryWms.categoryId;
+          // this.categoryId = res.categoryWms && res.categoryWms.categoryId;
           // this.baseInfoData = res.category; //基本信息
           this.$refs.baseInfoRef.getDetailInfoAugr(res.category); //基本信息
           this.$refs.warehouseConfigRef.getDetailInfoAugr(res.categoryWms); //仓库信息

+ 2 - 1
src/views/warehouseManagement/stockLedger/batchDetails.vue

@@ -122,10 +122,11 @@
     methods: {
       async getDetailInfo(row) {
         console.log('===', row);
+        this.categoryId = row.id;
         const res = await getDetails(row.id);
         this.$nextTick(() => {
           console.log(res);
-          this.categoryId = res.categoryWms && res.categoryWms.categoryId;
+          // this.categoryId = res.categoryWms && res.categoryWms.categoryId;
           this.$refs.baseInfoRef.getDetailInfoAugr(res.category); //基本信息
           this.$refs.warehouseConfigRef.getDetailInfoAugr(res.categoryWms);
         });

+ 1 - 0
src/views/warehouseManagement/stockLedger/components/details/BaseInfo.vue

@@ -77,6 +77,7 @@
     },
     methods: {
       async getDetailInfoAugr(data) {
+        // 获取部门用户信息
         const dep = await this.getDepUser(data.deptLeaderId, data.deptId);
         if (data.depId) {
           this.idata = { ...data, groupName: dep.groupName, name: dep.name };

+ 2 - 2
src/views/warehouseManagement/stockLedger/components/details/InWarehouse.vue

@@ -255,7 +255,7 @@
             align: 'center',
             minWidth: 110,
             formatter: (_row) => {
-              return this.getSceneState(+_row.bizType);
+              return this.getSceneState(Number(_row.bizType));
             }
           },
           {
@@ -506,7 +506,7 @@
     box-sizing: border-box;
     display: flex;
     flex-direction: column;
-    ::v-deep .table {
+    :deep(.table) {
       flex: 1;
       display: flex;
       flex-direction: column;

+ 130 - 8
src/views/warehouseManagement/stockLedger/components/details/InventoryAllocation.vue

@@ -26,7 +26,22 @@
         </el-col>
       </el-row>
     </el-form> -->
-    <el-table
+    <ele-pro-table
+      class="table_list"
+      ref="table"
+      height="calc(100vh - 300px)"
+      :columns="columns"
+      :datasource="datasource"
+      :pageSize="20"
+      row-key="id"
+    >
+      <template v-slot:status="{ row }">
+        <span :style="{ color: statusColor[row.status] }">{{
+          statusOpt[row.status]
+        }}</span>
+      </template>
+    </ele-pro-table>
+    <!-- <el-table
       class="table"
       :data="tableData"
       :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
@@ -67,7 +82,7 @@
         :page.sync="page"
         :size.sync="size"
         @pagination="handlePageChange"
-    /></div>
+    /></div> -->
 
     <!-- <InventoryAllocationDialog
       ref="detailRef"
@@ -102,6 +117,105 @@
         searchForm: {
           key: ''
         },
+        columns: [
+          {
+            prop: 'code',
+            label: '调拔单号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 220
+          },
+          {
+            align: 'center',
+            prop: 'name',
+            label: '调拔名称',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 80
+          },
+          {
+            prop: 'packageNo',
+            label: '包装编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'packingQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'packingUnit',
+            label: '包装单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'measureQuantity',
+            label: '计量数量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'measureUnit',
+            label: '计量单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'warehouseName',
+            label: '调出区域',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.warehouseLabel(_row);
+            }
+          },
+          {
+            prop: 'inWarehouseName',
+            label: '调入区域',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.targetWarehouseLabel(_row);
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ],
         tableData: [],
         size: 20,
         page: 1,
@@ -173,6 +287,13 @@
           return row.targetWarehouseName;
         }
       },
+      async datasource({ page, limit, where, order }) {
+        console.log(page);
+        console.log(limit);
+        this.pageNum = page;
+        this.size = limit;
+        return await this.getList();
+      },
       search() {
         this.page = 1;
         this.getList();
@@ -188,16 +309,17 @@
         this.getList();
       },
       async getList() {
-        storageApi
-          .getAllotDetails({
+        console.log(this.baseParams);
+        try {
+          let res = await storageApi.getAllotDetails({
             size: this.size,
             pageNum: this.page,
             ...this.baseParams
-          })
-          .then((res) => {
-            this.tableData = res.list;
-            this.total = res.count;
           });
+          return res.list;
+        } catch (error) {
+          return [];
+        }
       }
     }
   };

+ 99 - 13
src/views/warehouseManagement/stockLedger/components/details/ReportLoss.vue

@@ -1,6 +1,6 @@
 <!-- 报损报溢 -->
 <template>
-  <div class="reportLoss">
+  <div id="reportLoss">
     <el-form label-width="100px">
       <el-row>
         <el-col :span="5">
@@ -53,7 +53,22 @@
         </el-col>
       </el-row>
     </el-form>
-    <el-table
+    <ele-pro-table
+      class="table_list"
+      ref="table"
+      height="calc(100vh - 300px)"
+      :columns="columns"
+      :datasource="datasource"
+      :pageSize="20"
+      row-key="id"
+    >
+      <template v-slot:status="{ row }">
+        <span :style="{ color: statusColor[row.status] }">{{
+          statusOpt[row.status]
+        }}</span>
+      </template>
+    </ele-pro-table>
+    <!-- <el-table
       class="table"
       :data="tableData"
       :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
@@ -106,7 +121,7 @@
         :page.sync="page"
         :size.sync="size"
         @pagination="handlePageChange"
-    /></div>
+    /></div> -->
   </div>
 </template>
 
@@ -152,6 +167,65 @@
           3: '#70B603',
           4: ''
         },
+        columns: [
+          {
+            prop: 'planOrderCode',
+            label: '盘点工单号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 220
+          },
+          {
+            align: 'center',
+            prop: 'categoryName',
+            label: '物品名称',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            slot: 'status',
+            prop: 'status',
+            label: '盈/损/亏',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'count',
+            label: '数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row) => {
+              return _row[this.countKey[_row.status]];
+            }
+          },
+          {
+            prop: 'planProfitLossCode',
+            label: '报损溢单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 220
+          },
+          {
+            prop: 'planProfitLossUserName',
+            label: '报损报溢人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'auditTime',
+            label: '审核时间',
+            align: 'center',
+            showOverflowTooltip: true
+          }
+        ],
         tableData: [],
         size: 20,
         page: 1,
@@ -168,6 +242,13 @@
       }
     },
     methods: {
+      async datasource({ page, limit, where, order }) {
+        console.log(page);
+        console.log(limit);
+        this.pageNum = page;
+        this.size = limit;
+        return await this.getList();
+      },
       search() {
         this.page = 1;
         this.getList();
@@ -181,35 +262,40 @@
       },
       async getList() {
         console.log(this.baseParams);
-        storageApi
-          .getPlandetails({
+        try {
+          let res = await storageApi.getPlandetails({
             size: this.size,
             pageNum: this.page,
             ...this.baseParams,
             ...this.searchForm
-          })
-          .then((res) => {
-            this.tableData = res.list;
-            this.total = res.count;
           });
+          return res.list;
+        } catch (error) {
+          return [];
+        }
       }
     }
   };
 </script>
-<style lang="scss">
-  .reportLoss {
+<style lang="scss" scoped>
+  #reportLoss {
     height: 100%;
     width: 100%;
     padding-top: 10px;
     box-sizing: border-box;
     display: flex;
     flex-direction: column;
-    :deep(.table) {
+    :deep(.ele-pro-table) {
       flex: 1;
       display: flex;
       flex-direction: column;
-      .el-table__body-wrapper {
+      .el-table {
         flex: 1;
+        // display: flex;
+        // flex-direction: column;
+        // .el-table__body-wrapper {
+        //   flex: 1;
+        // }
       }
     }
     .el-form-item {

+ 3 - 3
src/views/warehouseManagement/stockLedger/components/item-search.vue

@@ -46,14 +46,14 @@
             </template>
           </el-form-item>
         </el-col>
-        <el-col :span="6">
+        <!-- <el-col :span="6">
           <el-form-item label="组织机构:">
             <auth-selection
               v-model="params.deptIds"
               style="width: 100%"
             ></auth-selection>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col v-if="type === 'products'" :span="6">
           <el-form-item label="列表维度:" prop="dimension">
             <template>
@@ -159,7 +159,7 @@
             ></el-input>
           </el-form-item>
         </el-col> -->
-        <el-col :span="18">
+        <el-col :span="type === 'products' ? 24 : 12">
           <div class="ele-form-actions">
             <el-button
               type="primary"

+ 47 - 36
src/views/warehouseManagement/stockManagement/add.vue

@@ -1041,46 +1041,57 @@
       this.getListItems();
       this.initUserInfo();
       this.getNowFormatDate();
+      if (this.$route.query.inId) {
+        let queryObj = this.$route.query;
+        queryObj.id = queryObj.inId;
+        this.formData.sourceBizNo = queryObj.code;
+        this.$nextTick(() => {
+          this.$refs.outboundRequisitionDialogRef.handleMine([queryObj]);
+        });
+      }
       if (this.$route.query.id) {
+        console.log(this.$route.query.id, 'this.$route.query.id');
         storageApi
           .getApplystorageDetailById(this.$route.query.id)
           .then(async (data) => {
-            console.log(data);
-            this.formData.extInfo.assetType = [data.rootCategoryLevelId];
-            this.formData.bizType = String(data.type);
-            this.formData.sourceBizNo = data.code;
-            const batchNo = await getCode('lot_number_code');
-            this.productList = data.detailList.map((item, index) => {
-              return {
-                index: this.productList.length + index,
-                categoryId: item.categoryId, // 物品id
-                categoryName: item.categoryName, // 物品名称
-                categoryCode: item.categoryCode, // 物品编码
-                categoryModel: item.modelType, // 物品型号
-                specification: item.specification, // 规格
-                brandNum: item.brandNum, // 牌号
-                batchNo: batchNo, // 批次号
-                minPackingQuantity: item.quantity, // 最小包装单元数量
-                packingQuantity: 1, // 包装数量
-                packingUnit: item.packingUnit, // 包装单位
-                measureQuantity: 0, // 计量数量
-                measureUnit: item.measuringUnit, // 计量单位
-                netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
-                weight: item.packingWeight, // 重量
-                weightUnit: item.weightUnit, // 重量单位
-                totalMoney: '', // 总价
-                price: item.price, // 单价
-                purpose: item.purpose, // 用途
-                isUnpack: item.isUnpack, // 是否允许拆包
-                warehouseId: item.warehouseId, // 仓库Id
-                warehouseName: item.warehouseName, // 仓库名称
-                warehouseIds: [item.warehouseId],
-                warehouseNames: [item.warehouseName]
-              };
-            });
-            this.$nextTick(() => {
-              this.listSaveArrs();
-            });
+            console.log(data, '123');
+            if (data) {
+              this.formData.extInfo.assetType = [data.rootCategoryLevelId];
+              this.formData.bizType = String(data.type);
+              this.formData.sourceBizNo = data.code;
+              const batchNo = await getCode('lot_number_code');
+              this.productList = data.detailList.map((item, index) => {
+                return {
+                  index: this.productList.length + index,
+                  categoryId: item.categoryId, // 物品id
+                  categoryName: item.categoryName, // 物品名称
+                  categoryCode: item.categoryCode, // 物品编码
+                  categoryModel: item.modelType, // 物品型号
+                  specification: item.specification, // 规格
+                  brandNum: item.brandNum, // 牌号
+                  batchNo: batchNo, // 批次号
+                  minPackingQuantity: item.quantity, // 最小包装单元数量
+                  packingQuantity: 1, // 包装数量
+                  packingUnit: item.packingUnit, // 包装单位
+                  measureQuantity: 0, // 计量数量
+                  measureUnit: item.measuringUnit, // 计量单位
+                  netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
+                  weight: item.packingWeight, // 重量
+                  weightUnit: item.weightUnit, // 重量单位
+                  totalMoney: '', // 总价
+                  price: item.price, // 单价
+                  purpose: item.purpose, // 用途
+                  isUnpack: item.isUnpack, // 是否允许拆包
+                  warehouseId: item.warehouseId, // 仓库Id
+                  warehouseName: item.warehouseName, // 仓库名称
+                  warehouseIds: [item.warehouseId],
+                  warehouseNames: [item.warehouseName]
+                };
+              });
+              this.$nextTick(() => {
+                this.listSaveArrs();
+              });
+            }
           });
       }
       if (this.$route.query.detailId) {

+ 120 - 12
src/views/warehouseManagement/stockManagement/add_2.vue

@@ -7,12 +7,23 @@
             ref="fileUploadBtn"
             action="#"
             :auto-upload="false"
+            :on-change="onChange1"
+            :limit="1"
+            :show-file-list="false"
+            accept=".xls,.xlsx"
+          >
+            <el-button type="primary">导入库存excel</el-button>
+          </el-upload>
+          <el-upload
+            ref="fileUploadBtn1"
+            action="#"
+            :auto-upload="false"
             :on-change="onChange"
             :limit="1"
             :show-file-list="false"
             accept=".xls,.xlsx"
           >
-            <el-button type="primary">备品备件导入excel</el-button>
+            <el-button type="primary">导入备品备件excel</el-button>
           </el-upload>
           <el-button type="primary" @click="back">返回</el-button>
         </div>
@@ -1554,7 +1565,10 @@
       handleAvatarSuccess() {
         this.$refs.fileUploadBtn.clearFiles(); //上传成功之后清除历史记录**加粗样式**
       },
-      async onChange(file) {
+      handleAvatarSuccess1() {
+        this.$refs.fileUploadBtn1.clearFiles(); //上传成功之后清除历史记录**加粗样式**
+      },
+      async onChange1(file) {
         console.log(XLSX);
         this.warehousingMaterialList = [];
         this.resultArray = [];
@@ -1600,11 +1614,105 @@
         //   return item['物品名称'];
         // });
         let codeList = xlsxData.map((item) => {
-          return item['sap物料码'];
+          return item['产品编号'];
         });
-        let functionType = {};
-        xlsxData.map((item) => {
-          functionType[item['sap物料码']] = item['采购原因'];
+        this.formData.extInfo.assetType = ['9']; // 产品
+        this.formData.bizType = '1'; // 生产入库
+        outin
+          .getListByNameOrModeType({
+            // modelTypeList,
+            // nameList,
+            codeList,
+            categoryLevelId: '9'
+          })
+          .then(async (data) => {
+            console.log('查询到的备件数据', data);
+            const batchNo = await getCode('lot_number_code');
+            // 添加包装数量和最小包装单元
+            this.productList = data.map((item, index) => {
+              console.log(xlsxData);
+              let filterArray = xlsxData.filter(
+                (xlsxItem) => xlsxItem['产品编号'] == item.code
+              );
+              console.log(filterArray);
+              return {
+                index: this.productList.length + index,
+                categoryId: item.id, // 物品id
+                categoryName: item.name, // 物品名称
+                categoryCode: item.code, // 物品编码
+                categoryModel: item.modelType, // 物品型号
+                specification: item.specification, // 规格
+                brandNum: item.brandNum, // 牌号
+                batchNo: batchNo, // 批次号
+                minPackingQuantity: filterArray[0]['现存量'], // 最小包装单元数量
+                packingQuantity: 1, // 包装数量
+                packingUnit: item.packingUnit, // 包装单位
+                measureQuantity: 0, // 计量数量
+                measureUnit: item.measuringUnit, // 计量单位
+                netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
+                weight: 0, // 重量
+                weightUnit: item.weightUnit, // 重量单位
+                totalMoney: '', // 总价
+                price: item.price, // 单价
+                purpose: '', // 用途
+                isUnpack: false // 是否允许拆包
+              };
+            });
+            console.log(this.productList);
+            this.handleAvatarSuccess();
+            loading.close();
+          })
+          .catch(() => {
+            loading.close();
+          });
+      },
+      async onChange(file) {
+        console.log(XLSX);
+        this.warehousingMaterialList = [];
+        this.resultArray = [];
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中...'
+        });
+        /**
+         * 1. 使用原生api去读取好的文件
+         * */
+        // console.log("原始上传的文件", file);
+        // 读取文件不是立马能够读取到的,所以是异步的,使用Promise
+        let dataBinary = await new Promise((resolve) => {
+          // Web API构造函数FileReader,可实例化对象,去调用其身上方法,去读取解析文件信息
+          let reader = new FileReader(); // https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader
+          // console.log("实例化对象有各种方法", reader);
+          reader.readAsBinaryString(file.raw); // 读取raw的File文件
+          reader.onload = (ev) => {
+            // console.log("文件解析流程进度事件", ev);
+            resolve(ev.target.result); // 将解析好的结果扔出去,以供使用
+          };
+        });
+        // console.log("读取出的流文件", dataBinary);
+
+        /**
+         * 2. 使用xlsx插件去解析已经读取好的二进制excel流文件
+         * */
+        let workBook = XLSX.read(dataBinary, {
+          type: 'binary',
+          cellDates: true
+        });
+        // excel中有很多的sheet,这里取了第一个sheet:workBook.SheetNames[0]
+        let firstWorkSheet = workBook.Sheets[workBook.SheetNames[0]];
+        // 分为第一行的数据,和第一行下方的数据
+        // const header = this.getHeaderRow(firstWorkSheet);
+        // console.log('读取的excel表头数据(第一行)', header);
+        const xlsxData = XLSX.utils.sheet_to_json(firstWorkSheet);
+        console.log('读取所有excel数据', xlsxData);
+        // let modelTypeList = xlsxData.map((item) => {
+        //   return item['型号'];
+        // });
+        // let nameList = xlsxData.map((item) => {
+        //   return item['物品名称'];
+        // });
+        let codeList = xlsxData.map((item) => {
+          return item['产品编号'];
         });
         this.formData.extInfo.assetType = ['6']; //备品备件
         this.formData.bizType = '2'; // 采购入库
@@ -1622,7 +1730,7 @@
             this.productList = data.map((item, index) => {
               console.log(xlsxData);
               let filterArray = xlsxData.filter(
-                (xlsxItem) => xlsxItem['sap物料码'] == item.code
+                (xlsxItem) => xlsxItem['产品编号'] == item.code
               );
               console.log(filterArray);
               return {
@@ -1634,8 +1742,8 @@
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
                 batchNo: batchNo, // 批次号
-                minPackingQuantity: 1, // 最小包装单元数量
-                packingQuantity: filterArray[0]['数量'], // 包装数量
+                minPackingQuantity: filterArray[0]['现存量'], // 最小包装单元数量
+                packingQuantity: 1, // 包装数量
                 packingUnit: item.packingUnit, // 包装单位
                 measureQuantity: 0, // 计量数量
                 measureUnit: item.measuringUnit, // 计量单位
@@ -1644,12 +1752,12 @@
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: '', // 总价
                 price: item.price, // 单价
-                purpose: functionType[item.code], // 用途
-                isUnpack: item.isUnpack // 是否允许拆包
+                purpose: '', // 用途
+                isUnpack: false // 是否允许拆包
               };
             });
             console.log(this.productList);
-            this.handleAvatarSuccess();
+            this.handleAvatarSuccess1();
             loading.close();
           })
           .catch(() => {

+ 1 - 1
src/views/warehouseManagement/stockManagement/add_3.vue

@@ -2903,7 +2903,7 @@
   .right_control {
     display: flex;
     > button {
-      margin-left: 20px;
+      margin-left: 5px;
     }
   }
   .storage_btn {

+ 17 - 0
src/views/warehouseManagement/stockManagement/index.vue

@@ -210,6 +210,15 @@
           >
             详情
           </el-link> -->
+          <el-link
+            v-if="row.verifyStatus == 2 && clientEnvironmentId == 3"
+            type="primary"
+            :underline="false"
+            icon="el-icon-view"
+            @click="quality(row)"
+          >
+            质检
+          </el-link>
           <el-link
             v-if="row.verifyStatus == 2"
             type="primary"
@@ -527,6 +536,14 @@
           // query
         });
       },
+      quality(row) {
+        this.$router.push({
+          path: '/warehouseManagement/stockManagement/quality',
+          query: {
+            id: row.id
+          }
+        });
+      },
       exportExcel() {
         this.$router.push({
           path: '/warehouseManagement/stockManagement/add_export'

+ 1464 - 0
src/views/warehouseManagement/stockManagement/quality.vue

@@ -0,0 +1,1464 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <div>
+        <div class="content-detail">
+          <header-title title="基本信息" size="16px"></header-title>
+          <div class="mt20">
+            <el-form label-width="120px">
+              <el-col :span="8">
+                <el-form-item label="入库单:">
+                  <span>{{ infoData.bizNo }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库物品类型:">
+                  <span>{{ handleAssetType(extInfo.assetType) }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库场景:">
+                  <span>{{ getSceneState(infoData.bizType) }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="关联订单:">
+                  <span>{{ extInfo.documentSource }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="权属部门:">
+                  <span>{{ extInfo.deptName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库登记人:">
+                  <span>{{ extInfo.createUserName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="入库时间:">
+                  <span>{{ infoData.createTime }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="状态:">
+                  <span>{{ stepsTitle }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="审核人:">
+                  <span>{{ infoData.verifyName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="客户:">
+                  <span>{{ infoData.clientName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="供应商:">
+                  <span>{{ extInfo.supplierName }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="送货人:">
+                  <span>{{ infoData.fromUser }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="送货人联系方式:">
+                  <span>{{ extInfo.deliveryPhone }}</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="附件:">
+                  <el-link
+                    type="primary"
+                    v-for="item in infoData.qualityFile"
+                    @click="download(item)"
+                    :key="item.name"
+                    >{{ item.name }}</el-link
+                  >
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="备注:">
+                  <span>{{ infoData.remark }}</span>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </div>
+        </div>
+        <div class="content-detail mt20">
+          <header-title title="产品信息" size="16px"></header-title>
+          <el-table
+            ref="productListTable"
+            :data="productList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :header-cell-style="rowClass"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              align="center"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              align="center"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="级别"
+              prop="level"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              label="型号"
+              align="center"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              align="center"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              align="center"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <!-- <el-table-column
+              label="最小包装单元"
+              align="center"
+              width="120"
+              prop="minPackingQuantity"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
+                  row.packingUnit
+                }}
+              </template>
+            </el-table-column> -->
+
+            <el-table-column
+              label="包装数量"
+              v-if="clientEnvironmentId == 3"
+              prop="packingQuantity"
+              align="center"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.packingQuantity }} {{ row.packingUnit }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              v-else
+              label="包装数量"
+              prop="packingQuantity"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 3"
+              label="最小包装单元"
+              align="center"
+              width="120"
+              prop="minPackingQuantity"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
+                  row.packingUnit
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              v-else
+              label="包装单位"
+              prop="packingUnit"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column label="单价" prop="price" align="center">
+              <template slot-scope="{ row }">
+                <template>
+                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                </template>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="金额"
+              align="center"
+              prop="contentImage"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.totalMoney ? row.totalMoney : 0 }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="采购原因"
+              align="center"
+              prop="purpose"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="供应商"
+              prop="supplierName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="mt20">
+          <header-title :title="`包装明细`" size="16px"></header-title>
+          <el-table
+            ref="showPackingListTable"
+            :data="showPackingList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :row-class-name="tableRowClassName"
+            :header-cell-style="rowClass"
+            border
+            v-el-table-infinite-scroll="pickingHandleScroll"
+          >
+            <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"
+              :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="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物料代号"
+              width="200"
+              prop="materielDesignation"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('materielDesignation')"
+                  :ref="'packing_materielDesignation' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'packing_materielDesignation',
+                      '包装',
+                      row
+                    )
+                  "
+                  v-model="row.materielDesignation"
+                ></el-input>
+                <span v-else>{{ row.materielDesignation }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              prop="clientCode"
+              width="200"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('clientCode')"
+                  :ref="'packing_clientCode' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'packing_clientCode', '包装', row)
+                  "
+                  v-model="row.clientCode"
+                ></el-input>
+                <span v-else>{{ row.clientCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="刻码"
+              prop="engrave"
+              width="200"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('engrave')"
+                  :ref="'packing_engrave' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'packing_engrave', '包装', row)
+                  "
+                  v-model="row.engrave"
+                ></el-input>
+                <span v-else>{{ row.engrave }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="重量" prop="weight" width="100">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="
+                    row.measureUnit != row.weightUnit &&
+                    qualityInspectionItems.includes('weight')
+                  "
+                  :ref="'packing_weight' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'packing_weight', '包装', row)
+                  "
+                  v-model.number="row.weight"
+                  @input="weightInput($event, row, '包装')"
+                ></el-input>
+                <span v-else>{{ row.weight }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <el-select
+                  v-if="qualityInspectionItems.includes('result')"
+                  @change="changeWrapStatus($event, row, '包装')"
+                  v-model="row.result"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in qualityResultsOptions"
+                    :label="item.label"
+                    :value="item.value"
+                    :key="item.value"
+                  >
+                  </el-option>
+                </el-select>
+                <span v-else>{{ qualityResults[row.result] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="质检状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                <span>{{ qualityStatus[row.status] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="mt20">
+          <header-title :title="`物料明细`" size="16px"> </header-title>
+          <el-table
+            ref="multipleTable"
+            :data="showMaterialList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :row-class-name="tableRowClassName"
+            :header-cell-style="rowClass"
+            border
+            style="width: 100%"
+            stripe
+            height="300px"
+            v-el-table-infinite-scroll="materielHandleScroll"
+          >
+            <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"
+              width="200"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('materielDesignation')"
+                  :ref="'material_materielDesignation' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'material_materielDesignation',
+                      '物料',
+                      row
+                    )
+                  "
+                  v-model="row.materielDesignation"
+                ></el-input>
+                <span v-else>{{ row.materielDesignation }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="客户代号" prop="clientCode" width="200">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('clientCode')"
+                  :ref="'material_clientCode' + $index"
+                  @keyup.native="
+                    moveFocus(
+                      $event,
+                      $index,
+                      'material_clientCode',
+                      '物料',
+                      row
+                    )
+                  "
+                  v-model="row.clientCode"
+                ></el-input>
+                <span v-else>{{ row.clientCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="刻码" prop="engrave" width="200">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="qualityInspectionItems.includes('engrave')"
+                  :ref="'material_engrave' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'material_engrave', '物料', row)
+                  "
+                  v-model="row.engrave"
+                ></el-input>
+                <span v-else>{{ row.engrave }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="重量" prop="weight" width="100">
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-if="
+                    row.measureUnit != row.weightUnit &&
+                    qualityInspectionItems.includes('weight')
+                  "
+                  :ref="'material_weight' + $index"
+                  @keyup.native="
+                    moveFocus($event, $index, 'material_weight', '物料', row)
+                  "
+                  v-model.number="row.weight"
+                  @input="weightInput($event, row, '物料')"
+                ></el-input>
+                <span v-else>{{ row.weight }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="重量单位" prop="weightUnit">
+            </el-table-column>
+            <el-table-column label="质检结果" prop="result" width="120">
+              <template slot-scope="{ row }">
+                <el-select
+                  v-if="qualityInspectionItems.includes('result')"
+                  @change="changeWrapStatus($event, row, '物料')"
+                  v-model="row.result"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in qualityResultsOptions"
+                    :label="item.label"
+                    :value="item.value"
+                    :key="item.value"
+                  >
+                  </el-option>
+                </el-select>
+                <span v-else>{{ 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>
+      <div class="submit">
+        <el-button type="primary" @click="getStatus">保存</el-button>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
+  import { getFile } from '@/api/system/file/index.js';
+  import storageApi from '@/api/warehouseManagement';
+  import { allCategoryLevel } from '@/api/classifyManage';
+  import {
+    useDictLabel,
+    sceneState,
+    qualityResultsOptions,
+    qualityResults,
+    qualityStatus
+  } from '@/utils/dict/index';
+  import { mapGetters, mapActions } from 'vuex';
+  import { deepClone } from '@/utils';
+  export default {
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      qualityInspectionItems: {
+        type: Array,
+        default: () => {
+          return [
+            'materielDesignation',
+            'clientCode',
+            'engrave',
+            'weight',
+            'result'
+          ];
+        }
+      }
+    },
+    data() {
+      return {
+        newColumns: [], // 动态表头
+        qualityFile: [], // 回执附件
+        qualityResultsOptions, // 质检结果选项
+        qualityStatus, // 质检状态 0未检 1已检
+        qualityResults, // 质检结果 0无 1合格 2不合格
+        productList: [], // 产品列表
+        showPackingList: [], // 展示的包装列表
+        packingList: [], // 包装列表
+        showMaterialList: [], // 展示物料列表
+        materialList: [], // 物料列表
+        extInfo: {}, // 扩展信息
+        pageSize: 20,
+        pickingPageNum: 1,
+        materielPageNum: 1,
+        codeList: [],
+        infoData: {},
+        stepsTitle: '已完成',
+        stepsStatus: 'success',
+        active: 0
+      };
+    },
+    watch: {
+      'infoData.verifyStatus': {
+        immediate: true,
+        handler(val) {
+          if (val == 0) {
+            this.active = 1;
+            this.stepsTitle = '未审核';
+            this.stepsStatus = 'wait';
+          } else if (val == 1) {
+            this.active = 2;
+            this.stepsTitle = '审核中';
+            this.stepsStatus = 'process';
+          } else if (val == 2) {
+            this.active = 2;
+            this.stepsTitle = '审核通过';
+            this.stepsStatus = 'success';
+          } else if (val == 3) {
+            this.active = 2;
+            this.stepsTitle = '驳回';
+            this.stepsStatus = 'error';
+          }
+        }
+      }
+    },
+    computed: {
+      ...mapGetters(['getDictValue']),
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+    watch: {
+      packingList: {
+        handler(newVal) {
+          console.log('包装列表', newVal);
+          console.log('当前包装列表加载页数', this.pickingPageNum);
+          this.showPackingList = newVal.slice(
+            0,
+            this.pageSize * (this.pickingPageNum > 0 ? this.pickingPageNum : 1)
+          );
+        },
+        deep: true
+      },
+      materialList: {
+        handler(newVal) {
+          console.log('物料列表', newVal);
+          console.log('当前物料列表加载页数', this.materielPageNum);
+          this.showMaterialList = newVal.slice(
+            0,
+            this.pageSize *
+              (this.materielPageNum > 0 ? this.materielPageNum : 1)
+          );
+        },
+        deep: true
+      }
+    },
+    created() {
+      this.getFieldModel();
+      this.requestDict('类型用途');
+      this.getAllCategoryType();
+      console.log('this.$route.query.id--', this.$route.query.id);
+      this._getInfo(this.$route.query.id);
+      console.log(
+        'qualityInspectionItems-----------',
+        this.qualityInspectionItems
+      );
+    },
+    methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
+      pickingHandleScroll() {
+        console.log('---------pickingHandleScroll------------');
+        if (this.showPackingList.length < this.packingList.length) {
+          if (this.packingList.length > this.pageSize) {
+            this.pickingPageNum += 1;
+          }
+          this.pickingFetchData();
+        }
+      },
+      pickingFetchData() {
+        const start = (this.pickingPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showPackingList = this.showPackingList.concat(
+          this.packingList.slice(start, end)
+        );
+      },
+      materielHandleScroll() {
+        console.log('---------materielHandleScroll------------');
+        if (this.showMaterialList.length < this.materialList.length) {
+          if (this.materialList.length > this.pageSize) {
+            this.materielPageNum += 1;
+          }
+          this.materielFetchData();
+        }
+      },
+      materielFetchData() {
+        const start = (this.materielPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showMaterialList = this.showMaterialList.concat(
+          this.materialList.slice(start, end)
+        );
+        console.log(this.showMaterialList);
+      },
+      ...mapActions('dict', ['requestDict']),
+      getSceneState: useDictLabel(sceneState),
+      handleAssetType(r) {
+        const code = this.codeList.find((item) => item.dictCode == r);
+        return code?.dictValue;
+      },
+      tableRowClassName({ row, rowIndex }) {
+        console.log(row);
+        if (row.result == 2) {
+          return 'warning-row';
+        } else {
+          return '';
+        }
+      },
+      rowClass({ row, column, rowIndex, columnIndex }) {
+        if (rowIndex === 1) {
+          return {
+            display: 'none',
+            background: '#EEEEEE'
+          };
+        }
+        return { background: '#0000' };
+      },
+      async getAllCategoryType() {
+        const { data } = await allCategoryLevel();
+        this.codeList = data.map((item) => {
+          return { dictCode: item.id, dictValue: item.name };
+        });
+      },
+      //获取质检状态(全部已检)
+      async getStatus() {
+        let packingAllChecked = true;
+        let materialAllChecked = true;
+        if (this.packingList?.length > 0) {
+          packingAllChecked = this.packingList.every(
+            (item) => item.status == 2
+          );
+        }
+        if (this.materialList?.length > 0) {
+          materialAllChecked = this.materialList.every(
+            (item) => item.status == 2
+          );
+        }
+        if (packingAllChecked && materialAllChecked) {
+          // 处理包装数据
+          this.packingList = this.packingList.map((packingItem) => {
+            return {
+              ...packingItem,
+              materialDetailList: this.materialList.filter(
+                (item) => item.parentIndex === packingItem.index
+              )
+            };
+          });
+          // 处理产品数据
+          this.productList = this.productList.map((productItem) => {
+            return {
+              ...productItem,
+              outInDetailRecordRequestList: this.packingList.filter(
+                (item) => item.parentIndex === productItem.index
+              )
+            };
+          });
+          this.infoData.outInDetailList = this.productList;
+          let obj = deepClone(this.infoData);
+          // 处理仓库id
+          let warehouseId = [];
+          let warehouseName = [];
+          let warehouseIds = this.productList
+            .map((item) => item.warehouseId)
+            .flat();
+          let warehouseNames = this.productList
+            .map((item) => item.warehouseName)
+            .flat();
+          warehouseIds.forEach((item, index) => {
+            if (!warehouseId.includes(item)) {
+              warehouseId.push(item);
+              warehouseName.push(warehouseNames[index]);
+            }
+          });
+          obj.warehouseIds = warehouseId;
+          obj.warehouseNames = warehouseName;
+          console.log(obj);
+          try {
+            await storageApi.qualityInspection(obj);
+            this.$router.push({
+              path: '/warehouseManagement/stockManagement'
+            });
+          } catch (error) {
+            this.$message.error('质检失败');
+            return false;
+          }
+        } else {
+          this.$message.error('请先完成包装和物料质检');
+        }
+      },
+      // 选择质检结果改变质检状态
+      changeWrapStatus(resultValue, row, type) {
+        console.log(resultValue);
+        switch (resultValue) {
+          case 0:
+            // 清空质检状态
+            row.status = 0;
+            break;
+          default:
+            // 默认已检质检状态
+            row.status = 2;
+            break;
+        }
+        if (type === '包装') {
+          this.packingResultCahnge(resultValue, row);
+        } else {
+          this.materialResultCahnge(resultValue, row);
+        }
+      },
+      // 包装质检结果修改
+      packingResultCahnge(value, row) {
+        // 修改物料质检结果( 1合格 2不合格)
+        this.materialList.map((item, index) => {
+          if (item.parentIndex === row.index) {
+            this.$set(this.materialList[index], 'result', value);
+            this.$set(this.materialList[index], 'status', 2);
+          }
+        });
+      },
+      // 物料质量结果修改
+      materialResultCahnge(value, row) {
+        // 修改包装质检结果
+        let filterMaterialList = this.materialList.filter((item) => {
+          return item.parentIndex == row.parentIndex;
+        });
+        let packingIndex = this.packingList.findIndex((item) => {
+          return item.index == row.parentIndex;
+        });
+        let boolen = filterMaterialList.every((item) => {
+          return item.result == 1;
+        });
+        this.$set(this.packingList[packingIndex], 'result', boolen ? 1 : 2);
+        this.$set(this.packingList[packingIndex], 'status', 2);
+      },
+      // 重量限制
+      weightInput(value, row, type) {
+        const newValue = value.replace(/[^\d.]/g, ''); // 保留数字和小数点
+        const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
+        if (row.weight < 0) {
+          row.weight = 0;
+        } else if (row.weight > 9999) {
+          row.weight = 9999;
+        } else {
+          if (decimalCount > 1) {
+            // 如果小数点个数大于1,移除多余的小数点
+            const lastIndex = newValue.lastIndexOf('.');
+            row.weight =
+              newValue.slice(0, lastIndex) + newValue.slice(lastIndex + 1);
+          } else if (decimalCount === 1) {
+            // 如果小数点个数等于1,允许小数点的输入
+            row.weight = newValue;
+          } else {
+            row.weight = newValue === '' ? 0 : parseFloat(newValue); // 如果输入为空,则设为0
+          }
+        }
+        if (type === '包装') {
+          this.packingWeightCahnge(value, row);
+        } else {
+          this.materialWeightCahnge(row);
+        }
+      },
+      // 包装重量修改
+      packingWeightCahnge(value, row) {
+        // 修改物品重量
+        let filterPackingList = this.packingList.filter((item) => {
+          return item.parentIndex === row.parentIndex;
+        });
+        let productIndex = this.productList.findIndex((item) => {
+          return item.index === row.parentIndex;
+        });
+        let totalWeight = filterPackingList.reduce(
+          (accumulator, currentValue) => {
+            return this.$math.format(+accumulator + +currentValue.weight, 14);
+          },
+          0
+        );
+        this.$set(this.productList[productIndex], 'weight', totalWeight);
+        // 修改拆分物料
+        this.materialList.map((item, index) => {
+          if (item.parentIndex === row.index) {
+            console.log(value / row.measureQuantity);
+            this.$set(
+              this.materialList[index],
+              'weight',
+              this.$math.format(value / row.measureQuantity, 14) >= 0
+                ? this.$math.format(value / row.measureQuantity, 14)
+                : 0
+            );
+          }
+        });
+      },
+      // 物料重量修改
+      materialWeightCahnge(row) {
+        // 修改包装重量
+        let filterMaterialList = this.materialList.filter((item) => {
+          return item.parentIndex === row.parentIndex;
+        });
+        let packingIndex = this.packingList.findIndex((item) => {
+          return item.index === row.parentIndex;
+        });
+        let totalMaterialWeight = filterMaterialList.reduce(
+          (accumulator, currentValue) => {
+            return this.$math.format(+accumulator + +currentValue.weight, 14);
+          },
+          0
+        );
+        this.$set(
+          this.packingList[packingIndex],
+          'weight',
+          totalMaterialWeight
+        );
+        // 修改物品重量
+        let filterPackingList = this.packingList.filter((item) => {
+          return (
+            item.parentIndex === this.packingList[packingIndex].parentIndex
+          );
+        });
+        let productIndex = this.productList.findIndex((item) => {
+          return item.index === this.packingList[packingIndex].parentIndex;
+        });
+        let totalWeight = filterPackingList.reduce(
+          (accumulator, currentValue) => {
+            return this.$math.format(+accumulator + +currentValue.weight, 14);
+          },
+          0
+        );
+        this.$set(this.productList[productIndex], 'weight', totalWeight);
+      },
+      async _getInfo(id) {
+        if (!id) return;
+        const res = await storageApi.getInboundDetailsById(id);
+        console.log('===', res);
+        this.infoData = res;
+        this.extInfo = res.extInfo;
+        this.productList = res.outInDetailList.map(
+          (productItem, productIndex) => {
+            return {
+              ...productItem,
+              index: this.productList.length + productIndex,
+              outInDetailRecordRequestList:
+                productItem.outInDetailRecordRequestList.map(
+                  (packingItem, packingIndex) => {
+                    return {
+                      ...packingItem,
+                      index:
+                        this.productList.length +
+                        productIndex +
+                        '-' +
+                        packingIndex, // 包装索引
+                      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, // 物品索引
+                            categoryName: productItem.categoryName,
+                            categoryCode: productItem.categoryCode
+                          };
+                        }
+                      )
+                    };
+                  }
+                )
+            };
+          }
+        );
+        // 获取包装维度数据
+        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);
+        }
+      },
+      // 键盘移动
+      moveFocus(event, index, key, type, row) {
+        let keyfield = [];
+        let listLength = 0;
+        switch (type) {
+          case '包装':
+            listLength = this.showPackingList.length;
+            if (row.measureUnit != row.weightUnit) {
+              keyfield = [
+                'packing_materielDesignation',
+                'packing_clientCode',
+                'packing_engrave',
+                'packing_weight'
+              ];
+            } else {
+              keyfield = [
+                'packing_materielDesignation',
+                'packing_clientCode',
+                'packing_engrave'
+              ];
+            }
+            break;
+          case '物料':
+            listLength = this.showMaterialList.length;
+            if (row.measureUnit != row.weightUnit) {
+              keyfield = [
+                'material_materielDesignation',
+                'material_clientCode',
+                'material_engrave',
+                'material_weight'
+              ];
+            } else {
+              keyfield = [
+                'material_materielDesignation',
+                'material_clientCode',
+                'material_engrave'
+              ];
+            }
+            break;
+        }
+
+        if (event.keyCode === 13) {
+          // 回车
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            return;
+          }
+
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 向上 =38
+        if (event.keyCode === 38) {
+          console.log('向上');
+          if (index === 0) {
+            // 第一行
+            console.log('第一行无法向上');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index - 1)].value == 0) {
+              this.$refs[key + (index - 1)].value = '';
+            }
+            this.$refs[key + (index - 1)].focus();
+          });
+        }
+
+        // 下 = 40
+        if (event.keyCode === 40) {
+          console.log('向下');
+          if (index === listLength - 1) {
+            // 最后一行
+            console.log('最后一行无法向下');
+            return;
+          }
+          this.$refs[key + index].blur();
+          this.$nextTick(() => {
+            if (this.$refs[key + (index + 1)].value == 0) {
+              this.$refs[key + (index + 1)].value = '';
+            }
+            this.$refs[key + (index + 1)].focus();
+          });
+        }
+
+        // 左 = 37
+        if (event.keyCode === 37) {
+          console.log('向左');
+          if (index === 0 && key === keyfield[0]) {
+            // 第一行第一个
+            console.log('第一行第一个无法向左');
+            return;
+          }
+          this.$refs[key + index].blur();
+          if (key === keyfield[0]) {
+            if (
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value == 0
+            ) {
+              this.$refs[keyfield[keyfield.length - 1] + (index - 1)].value =
+                '';
+            }
+            // 当前行第一个,跳转上一行最后一个
+            this.$refs[keyfield[keyfield.length - 1] + (index - 1)].focus();
+          } else {
+            // 跳转上一个
+            const prevkeyindex = keyfield.findIndex((k) => k === key) - 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[prevkeyindex] + index].value == 0) {
+                this.$refs[keyfield[prevkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[prevkeyindex] + index].focus();
+            });
+          }
+        }
+
+        // 右 = 39
+        if (event.keyCode === 39) {
+          console.log('向右');
+          if (
+            index === listLength - 1 &&
+            key === keyfield[keyfield.length - 1]
+          ) {
+            // 最后一行最后一个
+            console.log('最后一行最后一个无法向左');
+            return;
+          }
+          console.log(this.$refs);
+          this.$refs[key + index].blur();
+          if (key === keyfield[keyfield.length - 1]) {
+            // 当前行最后一个,跳转下一行第一个
+            if (this.$refs[keyfield[0] + (index + 1)].value == 0) {
+              this.$refs[keyfield[0] + (index + 1)].value = '';
+            }
+            this.$refs[keyfield[0] + (index + 1)].focus();
+          } else {
+            // 跳转下一个
+            const nextkeyindex = keyfield.findIndex((k) => k === key) + 1;
+            this.$nextTick(() => {
+              if (this.$refs[keyfield[nextkeyindex] + index].value == 0) {
+                this.$refs[keyfield[nextkeyindex] + index].value = '';
+              }
+              this.$refs[keyfield[nextkeyindex] + index].focus();
+            });
+          }
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .submit {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 20px;
+    box-sizing: border-box;
+  }
+  ::v-deep .warning-row {
+    color: red;
+  }
+  ::v-deep .page-title {
+    border-bottom: none;
+  }
+  ::v-deep .page-title-div {
+    width: 100%;
+  }
+  .stepsStatus {
+    width: 40%;
+    margin: 0 auto;
+  }
+  .el-form-item {
+    margin-bottom: 10px;
+  }
+  .p20 {
+    padding: 20px;
+  }
+  .flex {
+    display: flex;
+  }
+  .title {
+    justify-content: space-between;
+    border-bottom: 1px solid #ccc;
+    padding-bottom: 5px;
+    span {
+      font-size: 16px;
+    }
+    .col {
+      padding-left: 40px;
+      font-size: 14px;
+      color: #aaaaaa;
+    }
+  }
+  .degree {
+    margin-right: 10px;
+    padding: 0px 15px;
+    color: #fff;
+    font-size: 13px;
+    line-height: 23px;
+    border-radius: 23px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    span {
+      width: 5px;
+      height: 5px;
+      border-radius: 100%;
+      margin-right: 6px;
+      background-color: #fff;
+    }
+  }
+  .red {
+    background-color: rgb(163, 0, 20);
+  }
+  .blue {
+    background-color: #1989fa;
+  }
+  .createdInfo {
+    justify-content: space-around;
+    margin-top: 10px;
+    font-size: 14px;
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
+    }
+  }
+  .mt40 {
+    margin-top: 40px;
+  }
+
+  .custSteps {
+    margin-top: 20px;
+    margin-left: 70px;
+    .box {
+      width: 158px;
+      border: 1px solid #ccc;
+      padding: 10px;
+      flex-direction: row;
+      flex-wrap: wrap;
+      // justify-content: space-between;
+      font-size: 12px;
+      color: #9e9e9e;
+      .x {
+        width: 20px;
+        height: 15px;
+        margin-right: 5px;
+      }
+      .q {
+        background-color: #d0e4d5;
+      }
+      .b {
+        background-color: #1989fa;
+      }
+      .g {
+        background-color: #157a2c;
+      }
+      .r {
+        background-color: #a30014;
+      }
+      .a {
+        align-items: center;
+        margin-bottom: 10px;
+      }
+      .mr10 {
+        margin-right: 10px;
+      }
+      .mb0 {
+        margin-bottom: 0;
+      }
+    }
+    .stepsInfo {
+      // flex: 1;
+      width: 483px;
+    }
+  }
+  .mt20 {
+    margin-top: 20px;
+  }
+  .content-detail {
+    overflow: hidden;
+  }
+  .executor {
+    font-size: 14px;
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
+    }
+  }
+  .result {
+    justify-content: space-around;
+  }
+  .mr20 {
+    margin-right: 20px;
+  }
+  .details {
+    font-size: 14px;
+    margin-bottom: 10px;
+  }
+
+  .customSteps {
+    margin-top: 40px;
+    font-size: 14px;
+    margin-left: 80px;
+    .time {
+      font-size: 12px;
+      color: #6e6e6e;
+      margin-right: 20px;
+      position: relative;
+      &::after {
+        content: '';
+        width: 1px;
+        height: 100%;
+        background-color: #157a2c;
+        position: absolute;
+        right: -26px;
+      }
+    }
+    .flex:last-child {
+      .time {
+        &::after {
+          display: none;
+        }
+      }
+    }
+    .round {
+      margin-right: 20px;
+      width: 10px;
+      height: 10px;
+      border-radius: 100%;
+      background-color: #157a2c;
+      position: relative;
+      span {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        width: 4px;
+        height: 4px;
+        background-color: #fff;
+        border-radius: 100%;
+        transform: translate(-2px, -2px);
+      }
+    }
+    .text {
+      .info {
+        margin-top: 10px;
+        width: 955px;
+        background-color: #f0f3f3;
+        overflow: hidden;
+        padding: 10px;
+        margin-bottom: 10px;
+      }
+    }
+  }
+  .switch_left li {
+    border-right: 1px solid rgba(222, 222, 222, 1);
+    border-left: 1px solid rgba(222, 222, 222, 1);
+  }
+</style>

+ 2 - 2
vue.config.js

@@ -34,8 +34,8 @@ module.exports = {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.132:18086',
-        target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.116:18086',
+        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''