huang_an 1 an în urmă
părinte
comite
a3f1343baf

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

@@ -0,0 +1,481 @@
+import request from '@/utils/request';
+
+export default {
+  // 入库
+  storage: async (data) => {
+    const res = await request.post('/wms/outintwo/inStorage', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 批量获取包装编码
+  getAssetNum: async (data) => {
+    const res = await request.post('/wms/outintwo/getAssetNum', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 提交流程(入库)
+  submitTwo: async (data) => {
+    const res = await request.post('/bpm/outinApprove/submitTwo', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 提交流程(出库)
+  submitInsideTwo: async (data) => {
+    const res = await request.post('/bpm/outApprove/submitInsideTwo', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+
+  // 提交质检流程
+  qualityInspectionTwo: async (data) => {
+    const res = await request.post(
+      '/bpm/outinApprove/qualityInspectionTwo',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取入库列表
+  getList: async (params) => {
+    const res = await request.get(`/wms/outintwo/page`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取入库详情
+  getInboundList: async (params) => {
+    const res = await request.get(`/wms/outintwo/page`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取入库详情
+  getInboundDetailsById: async (id) => {
+    const res = await request.get(`/wms/outintwo/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取入库详情
+  getInboundDetailsByBizNo: async (id) => {
+    const res = await request.get(`/wms/outintwo/getInfoByBizNo/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 删除入库详情
+  delete: async (data) => {
+    const res = await request.delete('/wms/outintwo/delete', { data });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 物品维度台账列表
+  getProductList: async (params) => {
+    const res = await request.get(`/wms/outindetailtwo/page`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 批次维度台账列表
+  getBatchList: async (params) => {
+    const res = await request.get(`/wms/outindetailtwo/batchPage`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 包装维度台账列表
+  getPackingList: async (params) => {
+    const res = await request.get(`/wms/outInDetailRecordTwo/page`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取物料维度台账列表
+  getMaterialList: async (params) => {
+    const res = await request.get(`/wms/materialDetail/page`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 通过台账id获取出库物品详情
+  getHierarchyList: async (params) => {
+    const res = await request.get(`/wms/outintwo/getHierarchyList`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  getHierarchyFifo: async (data) => {
+    const res = await request.post('/wms/outintwo/getHierarchyFifo', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出库
+  outStorage: async (data) => {
+    const res = await request.post('/wms/outintwo/outStorage', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 包装维度流水
+  outInRecordsPage: async (params) => {
+    const res = await request.get(
+      `/wms/outInDetailRecordTwo/outInRecordsPage`,
+      {
+        params
+      }
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 上下架
+  upperLowerShelves: async (data) => {
+    const res = await request.post('/wms/outintwo/listing', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出入库申请列表
+  getinboundRequestsList: async (data) => {
+    const res = await request.get('/wms/applystorage/page', {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出入库申请列表通过入库申请单查询详情
+  getApplystoragedetail: async (data) => {
+    const res = await request.get('/wms/applystoragedetail/list', {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出入库申请列表通过入库申请单查询详情(批量)
+  getApplystoragedetails: async (data) => {
+    const res = await request.post(
+      '/wms/applystoragedetail/listByAppIds',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    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}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 动态表头
+  fieldModel: async (params) => {
+    const res = await request.get(`/main/fieldmodel/list`, { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 单价维护
+  unitPriceMaintenance: async (data) => {
+    const res = await request.put(
+      '/wms/stockpackingtwo/unitPriceMaintenance',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 仓库树
+  getWarehouseTrees: async (data) => {
+    const res = await request.get('/wms/warehouse/getTrees', {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 通过仓库ID获取仓库区域
+  getListByWarehouseId: async (id) => {
+    const res = await request.get(
+      `/wms/warehousearea/getListByWarehouseId/${id}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 根据物品ID获取包装维度
+  getCategoryPackageDisposition: async (data) => {
+    const res = await request.post(
+      '/main/categoryPackageDisposition/list',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 通过入库单号获取入库明细
+  getOutInRecordsPage: async (data) => {
+    const res = await request.get(
+      `/wms/outInDetailRecordTwo/outInRecordsPage`,
+      {
+        params: data
+      }
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 合并拆分包装
+  disassemblyPackage: async (data) => {
+    const res = await request.post(
+      '/wms/outInDetailRecordTwo/disassemblyPackage',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 通过物品id获取供货商列表
+  contactQueryByCategoryIdsAPI: async (data) => {
+    const res = await request.post('/eom/contact/queryByCategoryIds', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 通过销售发货单获取
+  getBySendRecordNo: async (id) => {
+    const res = await request.get(
+      `/eom/saleordersendrecord/getBySendRecordNo/${id}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 调拨保存
+  allotApplySave: async (data) => {
+    const res = await request.post('/wms/allotApply/save', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 库内调拨列表
+  getAllotApplyPage: async (data) => {
+    const res = await request.get(`/wms/allotApply/page`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 库内调拨详情列表
+  getAllotDetailList: async (data) => {
+    const res = await request.get(`/wms/allotDetail/list`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 库内调拨详情
+  getAllotDetail: async (id) => {
+    const res = await request.get(`/wms/allotApply/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 发起库外调拨流程
+  submitAllot: async (data) => {
+    const res = await request.post('/bpm/outinApprove/submitAllot', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  deleteAllot: async (data) => {
+    const res = await request.delete('/wms/allotApply/delete', { data });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出入库列表
+  getOutinList: async (data) => {
+    const res = await request.get(`/wms/outintwo/list`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 拆包
+  takeApartPackage: async (data) => {
+    const res = await request.post(
+      '/wms/outInDetailRecordTwo/takeApartPackage',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 打包
+  combinePackage: async (data) => {
+    const res = await request.post(
+      '/wms/outInDetailRecordTwo/combinePackage',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 保存拣货单
+  savePickgoods: async (data) => {
+    const res = await request.post('/wms/pickgoods/save', data);
+    console.log(res);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 修改拣货单
+  updatePickgoods: async (data) => {
+    const res = await request.post('/wms/pickgoods/update', data);
+    console.log(res);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 拣货列表
+  getPickgoodsList: async (data) => {
+    const res = await request.get(`/wms/pickgoods/page`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 获取拣货详情
+  getPickgoodsDetails: async (id) => {
+    const res = await request.get(`/wms/pickgoods/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 删除入库详情
+  deletePickgoods: async (data) => {
+    const res = await request.delete('/wms/pickgoods/delete', { data });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 拣货出库
+  pickGoodsOutIn: async (data) => {
+    const res = await request.post('/wms/outintwo/pickGoodsOutIn', data);
+    console.log(res);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 台账详情调拨列表
+  getAllotDetails: async (data) => {
+    const res = await request.get(`/wms/allotDetail/page`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 台账详情盘点列表
+  getPlandetails: async (data) => {
+    const res = await request.get(`/wms/plandetail/page`, {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }
+};

+ 180 - 0
src/api/warehouseManagement/outin.js

@@ -0,0 +1,180 @@
+import request from '@/utils/request';
+
+export default {
+  //列表
+  list: async (params) => {
+    const res = await request.get('/wms/outin/page', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //列表
+  getAssetNum: async (data) => {
+    const res = await request.post('/wms/outin/getAssetNum', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //保存
+  save: async (data) => {
+    const res = await request.post('/wms/outin/save', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //新保存
+  saveNew: async (data) => {
+    const res = await request.post('/wms/outin/saveNew', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //删除
+  delete: async (data) => {
+    const res = await request.delete('/wms/outintwo/delete', { data });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //出库实时库存
+  getRealTimeInventory: async (params) => {
+    const res = await request.get(`/wms/outin/getRealTimeInventory`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出库实时库存
+  pageeLedger: async (params) => {
+    const res = await request.get(`/wms/outin/getOutStock`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出库物品实时库存
+  getoutDetail: async (params) => {
+    const res = await request.get(`/wms/outin/getOutDetail`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //详情
+  getById: async (id) => {
+    const res = await request.get(`/wms/outin/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出入库单-新增入库单信息
+  addInOut: async (data) => {
+    const res = await request.post('/wms/inout/addInOut', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //列表
+  pageWms: async (params) => {
+    const res = await request.get('/wms/inout/page', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+
+  //入库详情
+  getWms: async (id) => {
+    const res = await request.get(`/wms/inout/getInfoById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //库存台账-基本信息
+  getBasicInformation: async (categoryId) => {
+    const res = await request.get(
+      `/wms/outin/getBasicInformation/${categoryId}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+
+  //库存台账-库存明细
+
+  getInventoryDetails: async (params) => {
+    const res = await request.get(`/wms/outin/getInventoryDetails`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //库存台账-库存明细-物料维度
+
+  getMaterielDetails: async (params) => {
+    const res = await request.get(`/wms/outin/getMaterielDetails`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApproveQuality: async (params) => {
+    const res = await request.post(
+      `/bpm/outinApprove/qualityInspection`,
+      params
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApprove: async (params) => {
+    const res = await request.post(`/bpm/outApprove/submit`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApproves: async (params) => {
+    const res = await request.post(`/bpm/outinApprove/submit`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApprovesInside: async (params) => {
+    const res = await request.post(`/bpm/outApprove/submitInside`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  update: async (params) => {
+    const res = await request.put(`/wms/outin/update`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  updateOutInRecord: async (params) => {
+    const res = await request.post(`/wms/outin/updateOutInRecord`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  getDetailByCode: async (params) => {
+    const res = await request.post(`/wms/outin/getDetailByCode`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  getListByNameOrModeType: async (data) => {
+    const res = await request.post(
+      `/main/category/getListByNameOrModeType`,
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  }
+};

+ 58 - 0
src/api/warehouseManagement/statisticalReports.js

@@ -0,0 +1,58 @@
+import request from '@/utils/request';
+
+// 获取库存余额列表
+export async function getStatementPage(params) {
+  const res = await request.get(`/wms/statement/page`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取库存余额列表
+export async function exportStockExcel(params) {
+  const res = await request.post(`/wms/statement/exportStockExcel`, params, {
+    responseType: 'blob'
+  });
+  return res.data;
+}
+
+// 库存余额导出记录表
+export async function getStatementLogPage(params) {
+  const res = await request.get(`/wms/statementLog/page`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 库存余额筛选列表
+export async function getStockPage(params) {
+  const res = await request.get(`/wms/statistics/page`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 收发明细表
+export async function sendReceiveExcel(params) {
+  const res = await request.post(`/wms/statement/sendReceiveExcel`, params, {
+    responseType: 'blob'
+  });
+  return res.data;
+}
+
+// 收发汇总表
+export async function sendReceiveGatherExcel(params) {
+  const res = await request.post(`/main/wmsExport/sendReceiveGather`, params, {
+    responseType: 'blob'
+  });
+  return res.data;
+}

+ 175 - 0
src/api/warehouseManagement/warehouseDefinition.js

@@ -0,0 +1,175 @@
+import request from '@/utils/request';
+
+//条件查询工厂
+// export async function getFactoryarea(params) {
+//   const res = await request.get(`/main/factoryarea/page`, {
+//     params
+//   });
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 仓储管理-仓库信息的保存
+// export async function warehouseSave(data) {
+//   return request.post('/warehouseGoodsshelves/newWarehouse/save', data);
+// }
+export default {
+  //条件查询工厂
+  getFactoryarea: async (params) => {
+    const res = await request.get('/main/factoryarea/page', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // /wms/warehouse/page
+  //获取部门
+  tree: async () => {
+    // const res = await request.get('/wms/warehouse/getTrees');
+    const res = await request.get('/main/group/getGroupList');
+    // /wms/warehouse/getTrees
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //根据部门获取员工
+  getUserPage: async (params) => {
+    const res = await request.get('/main/user/getUserPage', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //仓库定义列表
+  list: async (params) => {
+    const res = await request.post(
+      '/wms/warehouse/select/warehouseList',
+      params
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //新增和修改
+  save: function (data) {
+    return request.post('/wms/warehouse/saveNew', data);
+  },
+
+  //新增库区
+  warehouseareaSave: async (data) => {
+    const res = await request.post('/wms/warehouse/save', data);
+
+    return res;
+  },
+  //新增仓库
+  saveOrUpdateWarehouse: async (data) => {
+    const res = await request.post(
+      '/wms/warehouse/saveOrUpdateWarehouse',
+      data
+    );
+
+    return res;
+  },
+  //修改货位状态是不是满的
+  warehouseChangeStatus: async (data) => {
+    const res = await request.put(
+      '/wms/warehouseareagoodsshelvesallocation/update',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.message;
+    }
+  },
+  //删除
+  delete: async (id) => {
+    const res = await request.get(`/wms/warehouse/delete/${id}`);
+    if (res.data.code == 0) {
+      return res.data.message;
+    }
+  },
+  //删除
+  isDelete: async (id) => {
+    const res = await request.get('/wms/warehouse/isDelete/' + id);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //根据ID获取
+  getById: async (params) => {
+    const res = await request.get(`/wms/warehouse/getById/${params.id}`, {});
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //详情
+  info: function (params) {
+    return request.get('/main/org/info/info', { params });
+  },
+  //树
+  // tree: function (params) {
+  //     return http.asyncCall("/main/org/dept/tree", params,'get')
+  // },
+
+  //查询仓库详情
+
+  warehouseDetail: async (warehouseId) => {
+    const res = await request.post(
+      `/wms/warehouse/warehouseDetail/${warehouseId}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //根据仓库查询库区
+  getListByWarehouseId: async (id) => {
+    const res = await request.get(
+      `/wms/warehousearea/getListByWarehouseId/${id}`,
+      {}
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //根据库区查货架
+  getListByAreaId: async (id) => {
+    const res = await request.get(
+      `/wms/warehouseareagoodsshelves/getListByAreaId/${id}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //根据货架查货位
+  getListByGoodId: async (goodId) => {
+    const res = await request.get(
+      `/wms/warehouseareagoodsshelvesallocation/getListByGoodId/${goodId}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  // 批次调拨
+  lotAllot: async (data) => {
+    const res = await request.post(`/wms/outin/lotAllot`, data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  // 包装调拨
+  packageAllot: async (data) => {
+    const res = await request.post(`/wms/outin/packageAllot`, data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  // 调拨记录
+  allotRecord: async (data) => {
+    const res = await request.post(`/wms/allotRecord/page`, data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  }
+};

+ 124 - 0
src/views/rulesManagement/barCodeManagement/components/assetTree.vue

@@ -0,0 +1,124 @@
+<template>
+  <div class="tree-wrapper">
+    <el-tree
+      :data="treeList"
+      :props="defaultProps"
+      v-loading="treeLoading"
+      :node-key="nodeKey"
+      ref="tree"
+      :highlight-current="true"
+      :expand-on-click-node="false"
+      @node-click="handleNodeClick"
+      :default-expanded-keys="current && current.id ? [current.id] : []"
+    >
+    </el-tree>
+  </div>
+</template>
+
+<script>
+  import { getTreeByIds } from '@/api/classifyManage';
+
+  export default {
+    props: {
+      defaultProps: {
+        type: Object,
+        default: function () {
+          return {
+            children: 'children',
+            value: 'id',
+            label: 'name'
+          };
+        }
+      },
+
+      // 初始请求treeList
+      init: {
+        type: Boolean,
+        default: true
+      },
+
+      treeIds: {
+        type: Array,
+        default: []
+      },
+      nodeKey: {
+        type: String,
+        default: 'id'
+      }
+    },
+    data() {
+      return {
+        treeList: [],
+        treeLoading: false,
+        current: {},
+        currentKey: ''
+      };
+    },
+    mounted() {
+      if (this.init) {
+        this.getTreeData();
+      }
+    },
+    methods: {
+      // 获取树结构数据
+      getTreeData() {
+        return new Promise(async (resolve) => {
+          try {
+            this.treeLoading = true;
+
+            const res = await getTreeByIds({ ids: this.treeIds.join(',') });
+            this.treeLoading = false;
+            if (res?.code === '0') {
+              this.treeList = res.data;
+              this.$emit('setRootId', res.data[0]);
+
+              this.$nextTick(() => {
+                // 默认高亮第一级树节点
+                if (this.treeList[0]) {
+                  this.setCurrentKey(this.treeList[0]);
+                  this.current = this.treeList[0];
+                  // 默认点击加载数据
+                  // const firstNode = document.querySelector('.el-tree-node');
+                  // firstNode.click();
+                  resolve(this.current);
+                }
+              });
+              return this.treeList;
+            }
+          } catch (error) {
+            console.log(error);
+          }
+          this.treeLoading = false;
+        });
+      },
+
+      handleNodeClick(data, node) {
+        this.$emit('handleNodeClick', data, node);
+      },
+      // 设置默认高亮行
+      setCurrentKey(id) {
+        this.currentKey = id;
+        this.$refs.tree.setCurrentKey(this.currentKey);
+      },
+
+      // 获取树的选中状态
+      getSelectList() {
+        const selectList = this.$refs.tree.getCurrentNode();
+        return selectList;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .tree-wrapper {
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+
+    :deep(.el-tree) {
+      display: inline-block;
+      min-width: 100%;
+    }
+  }
+</style>

+ 580 - 0
src/views/rulesManagement/barCodeManagement/components/indexMultiple.vue

@@ -0,0 +1,580 @@
+<template>
+  <div>
+    <!-- 打印窗口 -->
+    <el-dialog
+      title="打印条码"
+      :before-close="handleClose"
+      :visible.sync="openBarCode"
+      width="1000px"
+    >
+      <div id="content" ref="print-content">
+        <div
+          v-for="(item, index) in config"
+          :key="index"
+          :class="item.putType == 1 ? 'crosswise' : 'lengthways'"
+          :style="
+            'width:' +
+            item.sizeWide +
+            'cm;' +
+            'height:' +
+            item.sizeLong +
+            'cm;' +
+            'border: 2px black solid;'
+          "
+        >
+          <div class="active-top" v-show="item.putType == 1">
+            <div class="span-con">
+              <div class="con-top">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[0].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[0].fontType]
+                  "
+                  >{{ item.useModeList[0].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[1].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[1].fontType]
+                  "
+                  >{{ item.useModeList[1].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[2].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[2].fontType]
+                  "
+                  >{{ item.useModeList[2].sampleData }}</span
+                >
+              </div>
+              <div class="con-bottom">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[3].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[3].fontType]
+                  "
+                  >{{ item.useModeList[3].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[4].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[4].fontType]
+                  "
+                  >{{ item.useModeList[4].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[5].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[5].fontType]
+                  "
+                  >{{ item.useModeList[5].sampleData }}</span
+                >
+              </div>
+            </div>
+            <!-- <div class="logoImg">
+              <img src="@/assets/img/codeLogo.png" alt="" />
+            </div> -->
+          </div>
+          <div class="active-bottom" v-show="item.putType == 1">
+            <div class="left-con">
+              <div class="span-box">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[6].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[6].fontType]
+                  "
+                  >{{ item.useModeList[6].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[7].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[7].fontType]
+                  "
+                  >{{ item.useModeList[7].sampleData }}</span
+                >
+              </div>
+              <div class="span-box">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[8].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[8].fontType]
+                  "
+                  >{{ item.useModeList[8].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[9].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[9].fontType]
+                  "
+                  >{{ item.useModeList[9].sampleData }}</span
+                >
+              </div>
+              <div class="span-box">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[10].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[10].fontType]
+                  "
+                  >{{ item.useModeList[10].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[11].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[11].fontType]
+                  "
+                  >{{ item.useModeList[11].sampleData }}</span
+                >
+              </div>
+              <div class="span-box">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[12].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[12].fontType]
+                  "
+                  >{{ item.useModeList[12].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[13].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[13].fontType]
+                  "
+                  >{{ item.useModeList[13].sampleData }}</span
+                >
+              </div>
+            </div>
+            <div class="vue-qr">
+              <vue-qr
+                :text="item.value ? item.value : ''"
+                class="vueQrSize"
+              ></vue-qr>
+            </div>
+          </div>
+          <div v-show="item.putType == 2" class="vertical-top1">
+            <div class="top-img">
+              <div class="top-span">
+                <p
+                  :style="
+                    'font-size:' +
+                    item.useModeList[0].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[0].fontType]
+                  "
+                >
+                  {{ item.useModeList[0].sampleData }}
+                </p>
+                <p
+                  :style="
+                    'font-size:' +
+                    item.useModeList[1].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[1].fontType]
+                  "
+                >
+                  {{ item.useModeList[1].sampleData }}
+                </p>
+              </div>
+              <div class="logoImg">
+                <!-- <img src="@/assets/img/codeLogo.png" alt="" /> -->
+              </div>
+            </div>
+            <div class="bottom-span">
+              <div class="top">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[2].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[2].fontType]
+                  "
+                  >{{ item.useModeList[2].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[3].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[3].fontType]
+                  "
+                  >{{ item.useModeList[3].sampleData }}</span
+                >
+              </div>
+              <div class="bottom">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[4].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[4].fontType]
+                  "
+                  >{{ item.useModeList[4].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[5].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[5].fontType]
+                  "
+                  >{{ item.useModeList[5].sampleData }}</span
+                >
+              </div>
+            </div>
+          </div>
+          <div v-show="item.putType == 2" class="vertical-bottom1">
+            <div class="bot-top">
+              <div class="bot-con">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[6].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[6].fontType]
+                  "
+                  >{{ item.useModeList[6].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[7].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[7].fontType]
+                  "
+                  >{{ item.useModeList[7].sampleData }}</span
+                >
+              </div>
+              <div class="bot-con">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[8].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[8].fontType]
+                  "
+                  >{{ item.useModeList[8].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[9].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[9].fontType]
+                  "
+                  >{{ item.useModeList[9].sampleData }}</span
+                >
+              </div>
+              <div class="bot-con">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[10].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[10].fontType]
+                  "
+                  >{{ item.useModeList[10].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[11].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[11].fontType]
+                  "
+                  >{{ item.useModeList[11].sampleData }}</span
+                >
+              </div>
+            </div>
+            <div class="bot-bottom">
+              <div class="qr-span">
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[12].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[12].fontType]
+                  "
+                  >{{ item.useModeList[12].sampleData }}</span
+                >
+                <span
+                  :style="
+                    'font-size:' +
+                    item.useModeList[13].fontSize +
+                    'cm;font-family:' +
+                    fontTypeObj[item.useModeList[13].fontType]
+                  "
+                  >{{ item.useModeList[13].sampleData }}</span
+                >
+              </div>
+              <div class="vue-qr">
+                <vue-qr
+                  :text="item.value ? item.value : ''"
+                  class="vueQrSize"
+                ></vue-qr>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer" style="margin-right: 2%">
+        <el-button size="small" @click="Print" v-show="!isPrint" type="primary"
+          >打印</el-button
+        >
+        <el-button size="small" @click="handleClose">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import VueQr from 'vue-qr';
+  export default {
+    components: {
+      VueQr
+    },
+    props: {
+      config: {
+        type: Array,
+        default() {
+          return [];
+        }
+      },
+      openBarCode: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data() {
+      return {
+        isPrint: false,
+        fontTypeObj: { 1: '宋体', 2: '微软雅黑', 3: 'Arial' }
+      };
+    },
+    mouthed() {
+      console.log('----------');
+      console.log(this.config);
+    },
+    methods: {
+      //打印
+      Print() {
+        this.isPrint = true;
+        setTimeout(() => {
+          this.$print(this.$refs['print-content']); //打印
+          this.isPrint = false;
+        });
+      },
+      handleClose() {
+        this.$emit('update:openBarCode', false);
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  * {
+    letter-spacing: 0.1px !important;
+  }
+  #content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .active-top {
+      width: 100%;
+      height: 40%;
+      display: flex;
+      border-bottom: 2px black solid;
+      .span-con {
+        width: 100%;
+        height: 100%;
+        padding: 5px 10px;
+        .con-top,
+        .con-bottom {
+          width: 100%;
+          height: 50%;
+          display: flex;
+          justify-content: space-between;
+          span {
+            font-weight: bold;
+            display: inline-block;
+            margin-top: 10px;
+          }
+        }
+      }
+      .logoImg {
+        width: 20%;
+        height: 70%;
+        margin: 10px;
+        text-align: right;
+        img {
+          width: 100%;
+          height: 80%;
+        }
+      }
+    }
+    .active-bottom {
+      height: 60%;
+      display: flex;
+      justify-content: space-between;
+      .left-con {
+        padding: 5px;
+        width: 70%;
+        height: 100%;
+        display: flex;
+        flex-wrap: wrap;
+        .span-box {
+          margin-top: 10px;
+          width: 100%;
+          display: flex;
+          justify-content: space-between;
+          span {
+            font-weight: bold;
+            display: inline-block;
+            margin: 0 5px;
+          }
+        }
+      }
+      .vue-qr {
+        width: 40%;
+        height: 100%;
+        border-left: 2px black solid;
+        .vueQrSize {
+          width: 100%;
+          height: 100%;
+          object-fit: contain;
+        }
+      }
+    }
+    .vertical-top1 {
+      width: 100%;
+      height: 40%;
+      border-bottom: 2px black solid;
+      .top-img {
+        width: 100%;
+        height: 50%;
+        padding: 10px;
+        display: flex;
+        .top-span {
+          width: 70%;
+          height: 100%;
+          margin-top: 10px;
+          p {
+            font-weight: bold;
+            height: 50%;
+            line-height: 50%;
+          }
+        }
+        .logoImg {
+          width: 30%;
+          height: 80%;
+          text-align: right;
+          img {
+            width: 100%;
+            height: 100%;
+          }
+        }
+      }
+      .bottom-span {
+        padding: 10px;
+        width: 100%;
+        height: 50%;
+        .top,
+        .bottom {
+          width: 100%;
+          height: 50%;
+          margin-top: 2%;
+          display: flex;
+          justify-content: space-between;
+          span {
+            font-weight: bold;
+            display: inline-block;
+            height: 50%;
+            line-height: 50%;
+          }
+        }
+      }
+    }
+    .vertical-bottom1 {
+      width: 100%;
+      height: 60%;
+      .bot-top {
+        width: 100%;
+        height: 55%;
+        padding: 10px;
+        display: flex;
+        flex-wrap: wrap;
+        .bot-con {
+          width: 100%;
+          display: flex;
+          justify-content: space-between;
+          font-weight: bold;
+          margin-top: 5%;
+          span {
+            font-weight: bold;
+          }
+        }
+      }
+      .bot-bottom {
+        width: 100%;
+        height: 45%;
+        display: flex;
+        .qr-span {
+          width: 60%;
+          height: 100%;
+          padding: 10px;
+          span {
+            display: inline-block;
+            width: 100%;
+            height: 50%;
+            font-weight: bold;
+            line-height: 50%;
+          }
+        }
+        .vue-qr {
+          width: 50%;
+          height: 100%;
+          border-left: 2px black solid;
+          border-top: 2px black solid;
+          .vueQrSize {
+            width: 100%;
+            height: 100%;
+            object-fit: contain;
+          }
+        }
+      }
+    }
+    .crosswise,
+    .lengthways {
+      margin-bottom: 200px;
+      // &:nth-child(2n) {
+      //   margin-bottom: 100px;
+      // }
+      transition: all 0.5s;
+    }
+  }
+</style>

+ 405 - 0
src/views/rulesManagement/barCodeManagement/components/selectType.vue

@@ -0,0 +1,405 @@
+<template>
+  <div>
+    <el-dialog
+      :title="`${title}信息`"
+      append-to-body
+      :close-on-click-modal="false"
+      :visible="visibleDialog"
+      :before-close="closeWindows"
+      width="80vw"
+    >
+      <div class="search_box">
+        <el-row :gutter="15">
+          <el-col :span="6">
+            <el-form label-width="80px" class="ele-form-search">
+              <el-form-item label="所属工厂" prop="factoryId">
+                <el-select
+                  filterable
+                  placeholder="请选择"
+                  v-model="factoryId"
+                  clearable
+                  class="w100"
+                >
+                  <el-option
+                    v-for="item in factoryList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-form>
+          </el-col>
+          <el-col :span="8">
+            <el-input v-model="value" placeholder="搜索物品编码、名称">
+              <el-button
+                slot="append"
+                type="primary"
+                icon="el-icon-search"
+                size="small"
+                @click="handleSearch"
+                >搜索</el-button
+              >
+            </el-input>
+          </el-col>
+        </el-row>
+      </div>
+      <div class="flex_info">
+        <div class="flex_left">
+          <AssetTree
+            ref="treeList"
+            :treeIds="treeIds"
+            @handleNodeClick="handleNodeClick"
+          />
+        </div>
+        <div class="flex_right">
+          <el-table
+            ref="multipleTable"
+            :data="tableData"
+            border
+            tooltip-effect="dark"
+            height="455px"
+            style="width: 100%"
+            highlight-current-row
+            @current-change="handleCurrntChange"
+            :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column
+              width="55px"
+              label="序号"
+              type="index"
+              fixed="left"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="assetCode"
+              label="物品编码"
+              fixed="left"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="assetName"
+              label="物品名称"
+              fixed="left"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="brandNum"
+              label="牌号"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="modelType"
+              label="型号"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="specification"
+              label="规格"
+              :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
+              prop="measuringUnit"
+              label="计量单位"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="weightUnit"
+              label="重量单位"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="roughWeight"
+              label="毛重"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="netWeight"
+              label="净重"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="packingUnit"
+              label="包装单位"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="categoryLevelPath"
+              label="分类"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+          </el-table>
+          <div class="right mt10">
+            <el-pagination
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="total"
+              :page-sizes="[20, 30, 50, 100, 500]"
+              :page-size.sync="pages.size"
+              :current-page.sync="pages.pageNum"
+              @current-change="handleCurrentChange"
+              @size-change="handleSizeChange"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+      <div class="select-btn">
+        <el-button type="primary" @click="onConfirm">确定</el-button>
+        <el-button @click="closeWindows">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import AssetTree from './assetTree.vue';
+  import { getList } from '@/api/classifyManage/itemInformation';
+  import storageApi from '@/api/warehouseManagement/index.js';
+  export default {
+    props: {
+      visibleDialog: {
+        type: Boolean,
+        default: false
+      },
+      title: {
+        type: String,
+        default: ''
+      },
+      treeIds: {
+        type: Array,
+        default: () => []
+      },
+      loadTree: {
+        type: Boolean,
+        default: true
+      }
+    },
+    watch: {
+      tableData(val) {
+        this.doLayout();
+      },
+      visibleDialog: {
+        handler(v) {
+          if (v) {
+            this.getTreeList();
+          }
+        },
+        deep: true
+      }
+    },
+    components: { AssetTree },
+    data() {
+      return {
+        factoryList: [],
+        factoryId: '',
+        value: '',
+        treeType: '',
+        treeList: [],
+        tableData: [],
+        multipleSelection: [],
+        pages1: { classificationIdList: [] },
+        pages: {
+          pageNum: 1,
+          size: 20
+        },
+        total: 0,
+        curType: '',
+        currentRow: null,
+        classificationId: '',
+        memoSelection: [],
+        newColumns: [] // 动态表头
+      };
+    },
+    created() {
+      this.getFieldModel();
+      this.getFactoryList();
+    },
+    methods: {
+      handleCurrntChange(val) {
+        this.currentRow = val;
+      },
+      //获取工厂列表
+      async getFactoryList() {
+        const res = await warehouseDefinition.getFactoryarea({
+          pageNum: 1,
+          size: 9999,
+          type: 1
+        });
+        this.factoryList = res.list;
+      },
+      doLayout() {
+        let that = this;
+        this.$nextTick(() => {
+          that.$refs.multipleTable.doLayout();
+        });
+      },
+      // 获取动态表头
+      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];
+        });
+      },
+      handleSearch() {
+        this.pages.pageNum = 1;
+        this.initData();
+      },
+      onConfirm() {
+        console.log([...this.memoSelection, ...this.multipleSelection]);
+        if (this.currentRow) {
+          this.$emit('selectTableData', this.currentRow);
+          this.closeWindows();
+        } else {
+          this.$message.warning('请选择一条数据!');
+        }
+      },
+      getTreeList() {
+        this.$nextTick(() => {
+          this.$refs.treeList.getTreeData().then((data) => {
+            this.handleNodeClick(data);
+          });
+        });
+      },
+      setclassIds(data, list) {
+        if (data && data.length !== 0) {
+          data.forEach((item) => {
+            if (item.children && item.children.length !== 0) {
+              this.setclassIds(item.children, list);
+            }
+            list.push(item.id);
+          });
+        }
+        return list;
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      handleNodeClick(data) {
+        console.log('-----------------');
+        console.log(data);
+        this.classificationId = data.id;
+        this.curType = data.type;
+        this.initData();
+      },
+      closeWindows() {
+        this.memoSelection = [];
+        this.multipleSelection = [];
+        this.$emit('update:loadTree', false);
+        this.$emit('update:visibleDialog', false);
+        this.pages.pageNum = 1;
+      },
+      handleCurrentChange(e) {
+        this.initData();
+      },
+      handleSizeChange(e) {
+        this.pages.pageNum = 1;
+        this.initData();
+      },
+      initData() {
+        this.memoSelection = this.multipleSelection.reduce((cur, pre) => {
+          if (!this.memoSelection.some((i) => i.curId === pre.curId)) {
+            cur.push(pre);
+          }
+          return cur;
+        }, this.memoSelection.slice(0));
+        this._getInformation();
+      },
+      async _getInformation() {
+        const params = {
+          ...this.pages,
+          // type: this.curType,
+          // code: this.value,
+          factoryId: this.factoryId,
+          searchKey: this.value,
+          categoryLevelId: this.classificationId
+        };
+        console.log(params);
+        const res = await getList(params);
+
+        if (res && this.classificationId == params.categoryLevelId) {
+          const curMap = {
+            assetId: 'id',
+            assetCode: 'code', //编码
+            assetName: 'name', //名称
+            materialId: 'id',
+            materialName: 'informationName',
+            batchNo: '', //批次号
+            unit: 'measuringUnit', //单位
+            minPackUnit: 'packingUnit' //最小包装单位
+          };
+          this.tableData = res.list.map((item) => {
+            for (const key in curMap) {
+              item[key] = curMap[key] ? item[curMap[key]] : '';
+            }
+            item.curId = item.id;
+
+            return item;
+          });
+
+          this.$nextTick(() => {
+            this.tableData.forEach((item) => {
+              const index = this.memoSelection.findIndex(
+                (i) => item.curId === i.curId
+              );
+              if (index > -1) {
+                // 删除还给 multipleSelection
+                this.$refs.multipleTable.toggleRowSelection(item, true);
+                this.memoSelection.splice(index, 1);
+              }
+            });
+          });
+          this.total = res.count;
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .flex_info {
+    display: flex;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    .flex_left {
+      width: 202px;
+      height: 434px;
+      padding: 10px;
+      border: 1px solid #d7d7d7;
+      overflow-y: auto;
+    }
+    .flex_right {
+      flex: 1;
+      margin-left: 10px;
+      overflow: hidden;
+    }
+  }
+  .search_box {
+    overflow: hidden;
+  }
+  .select-btn {
+    text-align: right;
+  }
+  .right {
+    text-align: right;
+  }
+  .mt10 {
+    margin-top: 10px;
+  }
+</style>

+ 1523 - 0
src/views/rulesManagement/barCodeManagement/print.vue

@@ -0,0 +1,1523 @@
+<template>
+  <div class="page">
+    <el-form label-width="150px">
+      <div class="page-title">
+        <div class="page-title-div">
+          <el-page-header @back="$router.go(-1)" content="条码管理">
+          </el-page-header>
+        </div>
+      </div>
+      <!-- tab切换 -->
+      <div class="switch">
+        <div class="switch_left">
+          <ul>
+            <li :class="{ active: num == 1 }" @click="tab(1)">详情</li>
+          </ul>
+        </div>
+        <div class="switch_right">
+          <el-button @click="openPrint" size="small">打印</el-button>
+          <el-button @click="$router.go(-1)" size="small">关闭</el-button>
+        </div>
+      </div>
+      <div class="content-detail" v-show="num == 1">
+        <div class="basic-details">
+          <div class="basic-details-title">
+            <span class="border-span">基本信息</span>
+          </div>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="条码类型">
+                <span>{{ data.dictBarName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="状态">
+                <span v-if="data.status">生效</span>
+                <span v-else>失效</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="条码摆放类型">
+                <span>
+                  {{ data.putType == 1 ? '横向摆放' : '纵向摆放' }}
+                </span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="条码尺寸">
+                <span> {{ data.sizeWide }} cm</span> *
+                <span> {{ data.sizeLong }} cm</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="创建人">
+                <span v-if="data.createUserName">
+                  {{ data.createUserName }}
+                </span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="创建时间">
+                <span> {{ data.createTime }} </span>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <div class="basic-details-title">
+            <span class="border-span">条码信息</span>
+          </div>
+          <el-table
+            ref="singleTable"
+            :data="barCodeList"
+            border
+            tooltip-effect="dark"
+            style="width: 100%"
+            class="el-table__body-wrapper"
+            :header-cell-style="{ background: '#F0F3F3' }"
+            :header-row-style="{ lineHeight: '0' }"
+          >
+            <el-table-column type="index" width="80px" label="序号">
+            </el-table-column>
+            <el-table-column label="字段code值" prop="modeCode">
+            </el-table-column>
+            <el-table-column label="字段名称" prop="modeName">
+            </el-table-column>
+            <el-table-column label="样例数据" prop="sampleData">
+            </el-table-column>
+            <el-table-column label="排序" prop="sort"> </el-table-column>
+            <el-table-column label="分隔符" prop="separ"> </el-table-column>
+            <el-table-column label="字体类型" prop="fontType">
+              <template slot-scope="scope">
+                <span>{{ codeTypeObj[scope.row.fontType] }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="字体大小" prop="fontSize">
+              <template slot-scope="scope">
+                <span>{{ codeIndexList[scope.row.fontSize] }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+          <div class="basic-details-title">
+            <span class="border-span">条码样例</span>
+          </div>
+          <div class="barIcon">
+            <!-- 条码编排设置  -->
+            <div class="mapShow">
+              <div class="type">
+                <div
+                  ><span>条码摆放类型:</span
+                  >{{ form.putType == 1 ? '横向摆放' : '纵向摆放' }}<span></span
+                ></div>
+                <div>
+                  <span>条码尺寸:</span>
+                  <span>{{ form.sizeWide }}</span>
+                  <span> cm</span>
+                  <span class="mult">*</span>
+                  <span>{{ form.sizeLong }}</span>
+                  <span> cm</span>
+                </div>
+              </div>
+              <!-- 动态图示模板 -->
+              <div class="activeMode">
+                <div
+                  v-if="horizontalBool"
+                  ref="print-content"
+                  :class="horizontalBool == true ? 'crosswise' : 'lengthways'"
+                  :style="
+                    'width:' +
+                    horWidth +
+                    'cm;' +
+                    'height:' +
+                    horHeight +
+                    'cm;' +
+                    'border: 2px black solid;'
+                  "
+                >
+                  <div class="active-top" v-show="horizontalBool == true">
+                    <div class="span-con">
+                      <div class="con-top">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode1 +
+                            'cm;font-family:' +
+                            form.typefaceCode1
+                          "
+                          >{{ form.code1 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode2 +
+                            'cm;font-family:' +
+                            form.typefaceCode2
+                          "
+                          >{{ form.code2 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode3 +
+                            'cm;font-family:' +
+                            form.typefaceCode3
+                          "
+                          >{{ form.code3 }}</span
+                        >
+                      </div>
+                      <div class="con-bottom">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode4 +
+                            'cm;font-family:' +
+                            form.typefaceCode4
+                          "
+                          >{{ form.code4 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode5 +
+                            'cm;font-family:' +
+                            form.typefaceCode5
+                          "
+                          >{{ form.code5 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode6 +
+                            'cm;font-family:' +
+                            form.typefaceCode6
+                          "
+                          >{{ form.code6 }}</span
+                        >
+                      </div>
+                    </div>
+                    <div class="logoImg">
+                      <!-- <img src="@/assets/img/codeLogo.png" alt="" /> -->
+                    </div>
+                  </div>
+                  <div class="active-bottom" v-show="horizontalBool == true">
+                    <div class="left-con">
+                      <div class="span-box">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode7 +
+                            'cm;font-family:' +
+                            form.typefaceCode7
+                          "
+                          >{{ form.code7 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode8 +
+                            'cm;font-family:' +
+                            form.typefaceCode8
+                          "
+                          >{{ form.code8 }}</span
+                        >
+                      </div>
+                      <div class="span-box">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode9 +
+                            'cm;font-family:' +
+                            form.typefaceCode9
+                          "
+                          >{{ form.code9 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode10 +
+                            'cm;font-family:' +
+                            form.typefaceCode10
+                          "
+                          >{{ form.code10 }}</span
+                        >
+                      </div>
+                      <div class="span-box">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode11 +
+                            'cm;font-family:' +
+                            form.typefaceCode11
+                          "
+                          >{{ form.code11 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode12 +
+                            'cm;font-family:' +
+                            form.typefaceCode12
+                          "
+                          >{{ form.code12 }}</span
+                        >
+                      </div>
+                      <div class="span-box">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode13 +
+                            'cm;font-family:' +
+                            form.typefaceCode13
+                          "
+                          >{{ form.code13 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode14 +
+                            'cm;font-family:' +
+                            form.typefaceCode14
+                          "
+                          >{{ form.code14 }}</span
+                        >
+                      </div>
+                    </div>
+                    <div class="vue-qr">
+                      <vue-qr
+                        :text="(form && form.value) || ''"
+                        class="vueQrSize"
+                      ></vue-qr>
+                    </div>
+                  </div>
+                  <div v-show="horizontalBool == false" class="vertical-top1">
+                    <div class="top-img">
+                      <div class="top-span">
+                        <p
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode1 +
+                            'cm;font-family:' +
+                            form.typefaceCode1
+                          "
+                        >
+                          {{ form.code1 }}
+                        </p>
+                        <p
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode2 +
+                            'cm;font-family:' +
+                            form.typefaceCode2
+                          "
+                        >
+                          {{ form.code2 }}
+                        </p>
+                      </div>
+                      <div class="logoImg">
+                        <!-- <img src="@/assets/img/codeLogo.png" alt="" /> -->
+                      </div>
+                    </div>
+                    <div class="bottom-span">
+                      <div class="top">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode3 +
+                            'cm;font-family:' +
+                            form.typefaceCode3
+                          "
+                          >{{ form.code3 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode4 +
+                            'cm;font-family:' +
+                            form.typefaceCode4
+                          "
+                          >{{ form.code4 }}</span
+                        >
+                      </div>
+                      <div class="bottom">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode5 +
+                            'cm;font-family:' +
+                            form.typefaceCode5
+                          "
+                          >{{ form.code5 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode6 +
+                            'cm;font-family:' +
+                            form.typefaceCode6
+                          "
+                          >{{ form.code6 }}</span
+                        >
+                      </div>
+                    </div>
+                  </div>
+                  <div
+                    v-show="horizontalBool == false"
+                    class="vertical-bottom1"
+                  >
+                    <div class="bot-top">
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode7 +
+                            'cm;font-family:' +
+                            form.typefaceCode7
+                          "
+                          >{{ form.code7 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode8 +
+                            'cm;font-family:' +
+                            form.typefaceCode8
+                          "
+                          >{{ form.code8 }}</span
+                        >
+                      </div>
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode9 +
+                            'cm;font-family:' +
+                            form.typefaceCode9
+                          "
+                          >{{ form.code9 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode10 +
+                            'cm;font-family:' +
+                            form.typefaceCode10
+                          "
+                          >{{ form.code10 }}</span
+                        >
+                      </div>
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode11 +
+                            'cm;font-family:' +
+                            form.typefaceCode11
+                          "
+                          >{{ form.code11 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode12 +
+                            'cm;font-family:' +
+                            form.typefaceCode12
+                          "
+                          >{{ form.code12 }}</span
+                        >
+                      </div>
+                    </div>
+                    <div class="bot-bottom">
+                      <div class="qr-span">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode13 +
+                            'cm;font-family:' +
+                            form.typefaceCode13
+                          "
+                          >{{ form.code13 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode14 +
+                            'cm;font-family:' +
+                            form.typefaceCode14
+                          "
+                          >{{ form.code14 }}</span
+                        >
+                      </div>
+                      <div class="vue-qr">
+                        <vue-qr
+                          :text="(form && form.qrCode) || ''"
+                          class="vueQrSize"
+                        ></vue-qr>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <div
+                  v-else
+                  ref="print-content"
+                  class="lengthways"
+                  :style="
+                    'width:' +
+                    verWidth +
+                    'cm;' +
+                    'height:' +
+                    verHeight +
+                    'cm;' +
+                    'border: 2px black solid;'
+                  "
+                >
+                  <div class="vertical-top1">
+                    <div class="top-img">
+                      <div class="top-span">
+                        <p
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode1 +
+                            'cm;font-family:' +
+                            form.typefaceCode1
+                          "
+                        >
+                          {{ form.code1 }}
+                        </p>
+                        <p
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode2 +
+                            'cm;font-family:' +
+                            form.typefaceCode2
+                          "
+                        >
+                          {{ form.code2 }}
+                        </p>
+                      </div>
+                      <div class="logoImg">
+                        <!-- <img src="@/assets/img/codeLogo.png" alt="" /> -->
+                      </div>
+                    </div>
+                    <div class="bottom-span">
+                      <div class="top">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode3 +
+                            'cm;font-family:' +
+                            form.typefaceCode3
+                          "
+                          >{{ form.code3 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode4 +
+                            'cm;font-family:' +
+                            form.typefaceCode4
+                          "
+                          >{{ form.code4 }}</span
+                        >
+                      </div>
+                      <div class="bottom">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode5 +
+                            'cm;font-family:' +
+                            form.typefaceCode5
+                          "
+                          >{{ form.code5 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode6 +
+                            'cm;font-family:' +
+                            form.typefaceCode6
+                          "
+                          >{{ form.code6 }}</span
+                        >
+                      </div>
+                    </div>
+                  </div>
+                  <div class="vertical-bottom1">
+                    <div class="bot-top">
+                      <div class="vue-qr">
+                        <vue-qr
+                          :text="(form && form.value) || ''"
+                          class="vueQrSize"
+                        ></vue-qr>
+                      </div>
+                    </div>
+                    <div class="bot-bottom">
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode7 +
+                            'cm;font-family:' +
+                            form.typefaceCode7
+                          "
+                          >{{ form.code7 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode8 +
+                            'cm;font-family:' +
+                            form.typefaceCode8
+                          "
+                          >{{ form.code8 }}</span
+                        >
+                      </div>
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode9 +
+                            'cm;font-family:' +
+                            form.typefaceCode9
+                          "
+                          >{{ form.code9 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode10 +
+                            'cm;font-family:' +
+                            form.typefaceCode10
+                          "
+                          >{{ form.code10 }}</span
+                        >
+                      </div>
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode11 +
+                            'cm;font-family:' +
+                            form.typefaceCode11
+                          "
+                          >{{ form.code11 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode12 +
+                            'cm;font-family:' +
+                            form.typefaceCode12
+                          "
+                          >{{ form.code12 }}</span
+                        >
+                      </div>
+                      <div class="bot-con">
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode13 +
+                            'cm;font-family:' +
+                            form.typefaceCode13
+                          "
+                          >{{ form.code13 }}</span
+                        >
+                        <span
+                          :style="
+                            'font-size:' +
+                            form.fontSizeCode14 +
+                            'cm;font-family:' +
+                            form.typefaceCode14
+                          "
+                          >{{ form.code14 }}</span
+                        >
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <div class="selectModel">
+                  <div class="btn"
+                    ><el-button type="primary" @click="addPacking"
+                      >添加物品</el-button
+                    ><el-button type="primary" @click="printPreview"
+                      >打印预览</el-button
+                    ></div
+                  >
+                  <div class="list">
+                    <div v-for="item in barCodeList"
+                      ><span>{{ item.modeName }}:</span>
+                      {{ packingObj[item.modeCode] }}</div
+                    >
+                    <div class="count">
+                      <span>批次号:</span>
+                      <el-input
+                        style="width: 200px"
+                        type="number"
+                        v-model="packingObj['batchNo']"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div class="count">
+                      <span>包装数量:</span>
+                      <el-input
+                        style="width: 200px"
+                        type="number"
+                        v-model="packingObj['packingQuantity']"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div>包装单位:{{ packingObj.packingUnit }}</div>
+                    <div class="count">
+                      <span>计量数量:</span>
+                      <el-input
+                        style="width: 200px"
+                        type="number"
+                        v-model="packingObj['measureQuantity']"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div>计量单位:{{ packingObj.measuringUnit }}</div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </el-form>
+    <!-- 打印 -->
+    <print :openBarCode.sync="openWindows" :config="newConfig"></print>
+    <!-- 产品选择弹框 -->
+    <selectType
+      :visibleDialog.sync="visibleDialog"
+      title="选择包装"
+      :treeIds="[0]"
+      :loadTree.sync="loadTree"
+      @selectTableData="addGoods"
+    />
+  </div>
+</template>
+<script>
+  import { getCode } from '@/api/ruleManagement/earlyWarning';
+  import selectType from './components/selectType';
+  import barCode from '@/api/barCodeManagement';
+  import { deepClone } from '@/utils/index';
+  import selectUpload from '@/components/selectUpload';
+  import print from './components/indexMultiple.vue';
+  import addComponent from './add.vue';
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import VueQr from 'vue-qr';
+  export default {
+    components: { selectUpload, print, addComponent, VueQr, selectType },
+    data() {
+      return {
+        options: [],
+        packingObj: {},
+        visibleDialog: false,
+        loadTree: true,
+        horizontalBool: false,
+        horWidth: 0,
+        horHeight: 0,
+        verWidth: 0,
+        verHeight: 0,
+        num: 1,
+        dialogVisible: false, //编辑弹窗
+        data: {},
+        typeValue: null,
+        form: {},
+        type: [],
+        barCodeList: [], //条码信息列表
+        openWindows: false, //打印弹窗
+        config: {},
+        newConfig: {},
+        viewData: {},
+        codeIndexList: { 0.3: '小', 0.5: '中', 0.8: '大' },
+        codeTypeList: [
+          { id: 1, text: '宋体' },
+          { id: 2, text: '微软雅黑' },
+          { id: 3, text: 'Arial' }
+        ],
+        codeTypeObj: {
+          1: '宋体',
+          2: '微软雅黑',
+          3: 'Arial'
+        }
+      };
+    },
+    async created() {
+      this.getInfo();
+    },
+    methods: {
+      addPacking() {
+        this.visibleDialog = true;
+      },
+      // 添加物品明细
+      async addGoods(data) {
+        console.log(data);
+        let batchNo = await getCode('lot_number_code');
+        console.log('batchNo---------', batchNo);
+        this.packingObj.categoryName = data.assetName;
+        this.packingObj.categoryModel = data.modelType;
+        this.packingObj.categoryCode = data.assetCode;
+        this.packingObj.clientCode = data.clientCode;
+        this.packingObj.batchNo = batchNo;
+        this.packingObj.measuringUnit = data.measuringUnit;
+        this.packingObj.packingUnit = data.packingUnit;
+        console.log('this.packingObj', this.packingObj);
+        this.$forceUpdate();
+      },
+      async printPreview() {
+        if (this.packingObj.categoryCode) {
+          let { data } = await storageApi.getAssetNum([
+            {
+              assetCode: this.packingObj.categoryCode + 0,
+              batchNum: this.packingObj.batchNo,
+              num: this.packingObj.packingQuantity
+            }
+          ]);
+          console.log('data-----------', data);
+          this.newConfig = data.map((item) => {
+            console.log('item-------', item.modeCode);
+            let obj = {
+              putType: this.config.putType,
+              sizeWide: this.config.sizeWide,
+              sizeLong: this.config.sizeLong,
+              value:
+                item.onlyCode +
+                '/' +
+                this.packingObj.categoryCode +
+                '/' +
+                this.packingObj.packingQuantity +
+                '/' +
+                this.packingObj.measureQuantity +
+                '/' +
+                this.packingObj.batchNo,
+              useModeList: this.useModeList.map((ite) => {
+                return {
+                  ...ite,
+                  sampleData:
+                    ite.modeCode == 'categoryCode'
+                      ? item.onlyCode
+                      : this.packingObj[ite.modeCode]
+                };
+              })
+            };
+            obj.useModeList = obj.useModeList.sort((a, b) => {
+              return a.barAvg.substr(4) - b.barAvg.substr(4);
+            });
+            return obj;
+          });
+          this.openWindows = true;
+          console.log(this.newConfig);
+        } else {
+          this.$message.warning('请添加物品!');
+        }
+        return;
+        if (this.checkRadioData?.length > 0) {
+          let params = this.checkRadioData.map((m) => {
+            return {
+              bizId: m.id,
+              qrcodeType: 6
+            };
+          });
+          barCode.batchBarPrint(params).then((res) => {
+            console.log('--------res---------------');
+            console.log(res);
+            this.config = [];
+            res.map((item, index) => {
+              let obj = {
+                putType: item.putType,
+                sizeWide: item.sizeWide,
+                sizeLong: item.sizeLong,
+                value: this.checkRadioData[index].packageNo + '/6',
+                useModeList: item.useModeList
+              };
+              obj.useModeList = obj.useModeList.sort((a, b) => {
+                return a.barAvg.substr(4) - b.barAvg.substr(4);
+              });
+              this.config.push(obj);
+            });
+            console.log('this.config--------', this.config);
+            this.openWindows = true;
+          });
+        } else {
+          return this.$message.warning('请选择要打印的数据!');
+        }
+      },
+      mapSetArray(arr, prop) {
+        let map = new Map();
+        for (let item of arr) {
+          if (!map.has(item[prop])) {
+            map.set(item[prop], item);
+          }
+        }
+        return [...map.values()];
+      },
+      tab(index) {
+        this.num = index;
+      },
+      // 表格数据
+      async getInfo() {
+        let res = await barCode.infoApi(this.$route.query.id);
+        // if (res) {
+        // console.log(res.data)
+        // if (res.success) {
+        this.data = res.data;
+        // 排序code1 - code14
+        let arr = res.data.useModeList.sort((a, b) => {
+          return a.barAvg.substr(4) - b.barAvg.substr(4);
+        });
+        console.log(arr);
+        let newArr = [];
+        arr.forEach((item) => {
+          if (item.modeCode) {
+            newArr.push(item);
+          }
+        });
+        this.barCodeList = this.mapSetArray(newArr, 'modeCode');
+        // 将表格数据按 modeCode 去重
+
+        const fontTypeObj = { 1: '宋体', 2: '微软雅黑', 3: 'Arial' };
+        const useModeList = res.data.useModeList;
+        this.useModeList = useModeList;
+        // 回显条码模板14个下拉数据
+        this.horizontalBool = res.data.putType == 1 ? true : false;
+        this.horWidth = res.data.sizeWide;
+        this.horHeight = res.data.sizeLong;
+        this.verWidth = res.data.sizeWide;
+        this.verHeight = res.data.sizeLong;
+        this.config = {
+          putType: res.data.putType,
+          sizeWide: res.data.sizeWide,
+          sizeLong: res.data.sizeLong,
+          value: res.data.qrCode,
+          code1: useModeList[0].sampleData,
+          code2: useModeList[1].sampleData,
+          code3: useModeList[2].sampleData,
+          code4: useModeList[3].sampleData,
+          code5: useModeList[4].sampleData,
+          code6: useModeList[5].sampleData,
+          code7: useModeList[6].sampleData,
+          code8: useModeList[7].sampleData,
+          code9: useModeList[8].sampleData,
+          code10: useModeList[9].sampleData,
+          code11: useModeList[10].sampleData,
+          code12: useModeList[11].sampleData,
+          code13: useModeList[12].sampleData,
+          code14: useModeList[13].sampleData,
+          fontSizeCode1: useModeList[0].fontSize,
+          fontSizeCode2: useModeList[1].fontSize,
+          fontSizeCode3: useModeList[2].fontSize,
+          fontSizeCode4: useModeList[3].fontSize,
+          fontSizeCode5: useModeList[4].fontSize,
+          fontSizeCode6: useModeList[5].fontSize,
+          fontSizeCode7: useModeList[6].fontSize,
+          fontSizeCode8: useModeList[7].fontSize,
+          fontSizeCode9: useModeList[8].fontSize,
+          fontSizeCode10: useModeList[9].fontSize,
+          fontSizeCode11: useModeList[10].fontSize,
+          fontSizeCode12: useModeList[11].fontSize,
+          fontSizeCode13: useModeList[12].fontSize,
+          fontSizeCode14: useModeList[13].fontSize,
+          typefaceCode1: fontTypeObj[useModeList[0].fontType],
+          typefaceCode2: fontTypeObj[useModeList[1].fontType],
+          typefaceCode3: fontTypeObj[useModeList[2].fontType],
+          typefaceCode4: fontTypeObj[useModeList[3].fontType],
+          typefaceCode5: fontTypeObj[useModeList[4].fontType],
+          typefaceCode6: fontTypeObj[useModeList[5].fontType],
+          typefaceCode7: fontTypeObj[useModeList[6].fontType],
+          typefaceCode8: fontTypeObj[useModeList[7].fontType],
+          typefaceCode9: fontTypeObj[useModeList[8].fontType],
+          typefaceCode10: fontTypeObj[useModeList[9].fontType],
+          typefaceCode11: fontTypeObj[useModeList[10].fontType],
+          typefaceCode12: fontTypeObj[useModeList[11].fontType],
+          typefaceCode13: fontTypeObj[useModeList[12].fontType],
+          typefaceCode14: fontTypeObj[useModeList[13].fontType]
+        };
+        this.form = deepClone(this.config);
+        // console.log(this.barCodeList)
+        // this.config = {
+        //   imagePath: '',
+        //   put_type: res.data.put_type,
+        //   width:
+        //     res.data.put_type == 0
+        //       ? res.data.size_wide * 25
+        //       : res.data.size_wide * 8,
+        //   height:
+        //     res.data.put_type == 0
+        //       ? res.data.size_long * 25
+        //       : res.data.size_long * 8,
+        //   value: res.data.qrCode,
+        //   code1: res.data.code1,
+        //   code2: res.data.code2,
+        //   code3: res.data.code3,
+        //   code4: res.data.code4,
+        //   code5: res.data.code5,
+        //   code6: res.data.code6,
+        //   code7: res.data.code7,
+        //   code8: res.data.code8,
+        //   code9: res.data.code9,
+        //   code10: res.data.code10,
+        //   code11: res.data.code11,
+        //   code12: res.data.code12,
+        //   code13: res.data.code13,
+        //   code14: res.data.code14,
+        //   fontSizeCode1: res.data.fontSizeCode1,
+        //   fontSizeCode2: res.data.fontSizeCode2,
+        //   fontSizeCode3: res.data.fontSizeCode3,
+        //   fontSizeCode4: res.data.fontSizeCode4,
+        //   fontSizeCode5: res.data.fontSizeCode5,
+        //   fontSizeCode6: res.data.fontSizeCode6,
+        //   fontSizeCode7: res.data.fontSizeCode7,
+        //   fontSizeCode8: res.data.fontSizeCode8,
+        //   fontSizeCode9: res.data.fontSizeCode9,
+        //   fontSizeCode10: res.data.fontSizeCode10,
+        //   fontSizeCode11: res.data.fontSizeCode11,
+        //   fontSizeCode12: res.data.fontSizeCode12,
+        //   fontSizeCode13: res.data.fontSizeCode13,
+        //   fontSizeCode14: res.data.fontSizeCode14,
+        //   typefaceCode1: res.data.typefaceCode1,
+        //   typefaceCode2: res.data.typefaceCode2,
+        //   typefaceCode3: res.data.typefaceCode3,
+        //   typefaceCode4: res.data.typefaceCode4,
+        //   typefaceCode5: res.data.typefaceCode5,
+        //   typefaceCode6: res.data.typefaceCode6,
+        //   typefaceCode7: res.data.typefaceCode7,
+        //   typefaceCode8: res.data.typefaceCode8,
+        //   typefaceCode9: res.data.typefaceCode9,
+        //   typefaceCode10: res.data.typefaceCode10,
+        //   typefaceCode11: res.data.typefaceCode11,
+        //   typefaceCode12: res.data.typefaceCode12,
+        //   typefaceCode13: res.data.typefaceCode13,
+        //   typefaceCode14: res.data.typefaceCode14
+        // };
+        // }
+        // }
+      },
+      //打印弹窗
+      openPrint() {
+        this.openWindows = true;
+        console.log(this.config);
+      },
+      //编辑弹窗
+      edit() {
+        this.viewData = deepClone(this.data);
+        this.dialogVisible = true;
+      },
+      // 修改提交
+      async submit(info) {
+        info.id = this.$route.query.id;
+        let res = await barCode.saveBarcode(info);
+        if (res.code == 0) {
+          this.$message.success('修改成功!');
+          this.getInfo();
+          this.dialogVisible = false;
+        }
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .page {
+    padding: 10px;
+  }
+  .vue-qr {
+    width: 200px;
+    height: 200px;
+    .vueQrSize {
+      width: 100%;
+      height: 100%;
+    }
+  }
+  .page-title {
+    background: #fff;
+    font-size: 18px;
+    padding: 6px 20px;
+    font-weight: 500;
+    .page-title-div {
+      margin: 5px 0;
+      height: 30px;
+      line-height: 30px;
+      border-bottom: 1px solid #eaeefb;
+      .title-div-no {
+        margin-left: 10px;
+        font-weight: 400;
+        color: #909090;
+        font-size: 14px;
+      }
+    }
+  }
+  .page-data {
+    padding-top: 10px;
+  }
+  .content-detail {
+    background: #fff;
+    padding: 20px;
+  }
+  .flows {
+    .flow-left {
+      width: 156px;
+      height: 70px;
+      border: 1px dashed #ccc;
+      padding: 10px;
+    }
+    .row {
+      margin-top: 13px;
+    }
+  }
+  .basic-details-title {
+    margin-bottom: 12px;
+    margin-top: 20px;
+    border-bottom: 1px solid #157a2c;
+    padding-bottom: 8px;
+    display: flex;
+    justify-content: space-between;
+  }
+  .basic-details-title .border-span {
+    height: 18px;
+    font-size: 16px;
+    border-left: 4px solid #157a2c;
+    padding-left: 8px;
+
+    font-weight: 500;
+  }
+  .heade-right {
+    // float: right;
+    .heade-right-content {
+      margin-right: 12px;
+      font-size: 14px;
+      display: inline-block;
+      .content-key {
+        color: #3e3e3e;
+        margin-right: 12px;
+        font-weight: 500;
+      }
+      .content-value {
+        color: #000;
+      }
+    }
+  }
+  .list-title {
+    font-size: 14px;
+    color: #3e3e3e;
+    margin: 10px 0px;
+  }
+  .goods {
+    background: #a30014;
+    border: 1px solid #a30014;
+  }
+  .details-title {
+    display: inline-block;
+    color: #6e6e6e;
+    font-size: 14px;
+    font-weight: bold;
+    margin-right: 13px;
+    width: 70px;
+    text-align: right;
+  }
+  .details-con {
+    color: #3e3e3e;
+    font-size: 14px;
+  }
+  .detailed-tab {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  ::v-deep .el-form-item--medium .el-form-item__label {
+    color: #6e6e6e;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .warehouse {
+    display: block;
+    border-bottom: 1px solid #eaeefb;
+    padding: 10px 0;
+  }
+  .box-card {
+    .store-box {
+      width: 80%;
+      .store-box-span {
+        display: inline-block;
+        font-size: 14px;
+        height: 50px;
+        width: 50px;
+        text-align: center;
+        line-height: 50px;
+        color: #fff;
+        margin: 2px;
+      }
+    }
+  }
+  .vacant {
+    background: #3196fb;
+  }
+  .inUse {
+    background: #157a2c;
+  }
+  .invalid {
+    background: #cccccc;
+  }
+  .full {
+    background: #cc3300;
+  }
+  .barIcon {
+    .barCodeSize {
+      display: flex;
+      span {
+        display: inline-block;
+        width: 30px;
+        margin: 0 5px;
+      }
+      .mult {
+        display: inline-block;
+        width: 10px;
+        margin-left: -5px;
+      }
+    }
+    .mapShow {
+      width: 100%;
+      display: flex;
+      flex-direction: column;
+      margin: 20px 0;
+      .type {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 16px;
+        > div:first-child {
+          margin-right: 20px;
+        }
+      }
+      .staticMode {
+        width: 42%;
+        height: 300px;
+        display: flex;
+        align-items: center;
+        .modelicon {
+          border: 2px black solid;
+          height: 300px;
+          margin: 0;
+          padding: 0;
+          .modelicon-top {
+            width: 100%;
+            height: 40%;
+            display: flex;
+            border-bottom: 2px black solid;
+            .sel {
+              width: 80%;
+              padding: 5px;
+              .sel-top,
+              .sel-bottom {
+                display: flex;
+                .el-select {
+                  margin: 10px 5px;
+                  width: 30%;
+                }
+              }
+            }
+            .logoImg {
+              width: 20%;
+              height: 70%;
+              margin: 10px;
+              text-align: right;
+              img {
+                width: 80%;
+                height: 80%;
+              }
+            }
+          }
+          .modelicon-bottom {
+            height: 60%;
+            display: flex;
+            justify-content: space-between;
+            .left-con {
+              width: 70%;
+              height: 100%;
+              display: flex;
+              flex-wrap: wrap;
+              .sel-box {
+                margin: 5px;
+                display: flex;
+                justify-content: space-between;
+                .el-select {
+                  margin: 0 5px;
+                  width: 50%;
+                }
+              }
+            }
+            .vue-qr {
+              width: 30%;
+              height: 100%;
+              border-left: 2px black solid;
+              .vueQrSize {
+                width: 100%;
+                height: 100%;
+              }
+            }
+          }
+        }
+      }
+
+      .activeMode {
+        width: 100%;
+        flex: 1;
+        display: flex;
+        justify-content: center;
+        padding: 20px;
+        overflow: auto;
+        // .crosswise,
+        // .lengthways {
+        //   flex: 1;
+        // }
+        .selectModel {
+          flex: 1;
+          flex-grow: 1;
+          display: flex;
+          flex-direction: column;
+          padding: 10px 20px;
+          box-sizing: border-box;
+          .btn {
+            margin-bottom: 10px;
+          }
+          .list {
+            flex: 1;
+            > div {
+              > span {
+                display: inline-block;
+                width: 100px;
+              }
+              display: inline-block;
+              width: 33%;
+              margin-bottom: 10px;
+              font-size: 20px;
+            }
+          }
+        }
+        .active-top {
+          width: 100%;
+          height: 40%;
+          display: flex;
+          border-bottom: 2px black solid;
+          .span-con {
+            width: 80%;
+            height: 100%;
+            padding: 5px 10px;
+            .con-top,
+            .con-bottom {
+              width: 100%;
+              height: 50%;
+              display: flex;
+              justify-content: space-between;
+              span {
+                display: inline-block;
+                font-weight: bold;
+                margin-top: 10px;
+              }
+            }
+          }
+          .logoImg {
+            width: 20%;
+            height: 70%;
+            margin: 10px;
+            text-align: right;
+            img {
+              width: 100%;
+              height: 80%;
+            }
+          }
+        }
+        .active-bottom {
+          height: 60%;
+          display: flex;
+          justify-content: space-between;
+          .left-con {
+            padding: 5px;
+            width: 70%;
+            height: 100%;
+            display: flex;
+            flex-wrap: wrap;
+            .span-box {
+              margin-top: 10px;
+              width: 100%;
+              display: flex;
+              justify-content: space-between;
+              span {
+                font-weight: bold;
+                display: inline-block;
+                margin: 0 5px;
+              }
+            }
+          }
+          .vue-qr {
+            width: 40%;
+            height: 100%;
+            border-left: 2px black solid;
+            .vueQrSize {
+              width: 100%;
+              height: 100%;
+            }
+          }
+        }
+        .vertical-top1 {
+          width: 100%;
+          height: 40%;
+          border-bottom: 2px black solid;
+          .top-img {
+            width: 100%;
+            height: 50%;
+            padding: 10px;
+            display: flex;
+            .top-span {
+              width: 70%;
+              height: 100%;
+              margin-top: 10px;
+              p {
+                font-weight: bold;
+                height: 50%;
+                line-height: 50%;
+              }
+            }
+            .logoImg {
+              width: 30%;
+              height: 80%;
+              text-align: right;
+              img {
+                width: 100%;
+                height: 100%;
+              }
+            }
+          }
+          .bottom-span {
+            padding: 10px;
+            width: 100%;
+            height: 50%;
+            .top,
+            .bottom {
+              width: 100%;
+              height: 50%;
+              margin-top: 2%;
+              display: flex;
+              justify-content: space-between;
+              span {
+                font-weight: bold;
+                display: inline-block;
+                height: 50%;
+                line-height: 50%;
+              }
+            }
+          }
+        }
+        .vertical-bottom1 {
+          width: 100%;
+          height: 60%;
+          .bot-top {
+            width: 100%;
+            height: 55%;
+            padding: 10px;
+            display: flex;
+            flex-wrap: wrap;
+            .bot-con {
+              width: 100%;
+              display: flex;
+              justify-content: space-between;
+              margin-top: 5%;
+              span {
+                font-weight: bold;
+              }
+            }
+          }
+          .bot-bottom {
+            width: 100%;
+            height: 45%;
+            display: flex;
+            .qr-span {
+              width: 60%;
+              height: 100%;
+              padding: 10px;
+              span {
+                font-weight: bold;
+                display: inline-block;
+                width: 100%;
+                height: 50%;
+                line-height: 50%;
+              }
+            }
+            .vue-qr {
+              width: 50%;
+              height: 100%;
+              border-left: 2px black solid;
+              border-top: 2px black solid;
+              .vueQrSize {
+                width: 100%;
+                height: 100%;
+              }
+            }
+          }
+        }
+        // .vertical-top2 {
+        //   width: 100%;
+        //   height: 30%;
+        //   border-bottom: 2px black solid;
+        // }
+        // .vertical-bottom2 {
+        //   .vue-qr {
+        //     width: 100%;
+        //     text-align: center;
+        //     .vueQrSize {
+        //       width: 60%;
+        //       height: 100%;
+        //     }
+        //   }
+        // }
+      }
+    }
+    .lengthways {
+      .vue-qr {
+        width: 65% !important;
+        display: block;
+        margin: 0 auto;
+        img {
+          width: 100%;
+        }
+      }
+      .bottom-span,
+      .top-img {
+        padding: 0 10px !important;
+
+        span {
+          line-height: 1 !important;
+        }
+      }
+
+      .vertical-top1 {
+        height: 30% !important;
+      }
+
+      .vertical-bottom1 {
+        display: flex;
+        flex-direction: column;
+        height: 70% !important;
+        .bot-top {
+          height: auto !important;
+        }
+
+        .bot-bottom {
+          width: auto !important;
+          height: auto !important;
+          flex: 1;
+          flex-wrap: wrap;
+
+          .bot-con {
+            width: 100%;
+            display: flex;
+            justify-content: space-between;
+            font-weight: bold;
+            padding: 0 10px;
+          }
+        }
+      }
+    }
+
+    .crosswise,
+    .lengthways {
+      transition: all 0.5s;
+    }
+  }
+</style>