Просмотр исходного кода

添加仓库首页 拣货 入库BUG

huang_an 1 год назад
Родитель
Сommit
5cb4d1d694
29 измененных файлов с 6342 добавлено и 287 удалено
  1. 49 0
      src/api/inventory/index.js
  2. 10 0
      src/api/warehouseManagement/index.js
  3. BIN
      src/assets/index/Vector@2x.png
  4. BIN
      src/assets/index/circle_bg.png
  5. 1 0
      src/views/warehouseManagement/components/outboundRequisitionDialog.vue
  6. 376 0
      src/views/warehouseManagement/inboundRequests/components/allTable.vue
  7. 79 18
      src/views/warehouseManagement/inboundRequests/components/search.vue
  8. 9 1
      src/views/warehouseManagement/inboundRequests/components/tgDetails.vue
  9. 3 1
      src/views/warehouseManagement/inboundRequests/components/tgTable.vue
  10. 11 2
      src/views/warehouseManagement/inboundRequests/index.vue
  11. 740 0
      src/views/warehouseManagement/index/index.vue
  12. 665 0
      src/views/warehouseManagement/picking/add copy.vue
  13. 768 0
      src/views/warehouseManagement/picking/add.vue
  14. 230 0
      src/views/warehouseManagement/picking/components/AssetsCell.vue
  15. 181 0
      src/views/warehouseManagement/picking/components/CargoSpaceInfoDialog.vue
  16. 275 0
      src/views/warehouseManagement/picking/components/DetailDialog.vue
  17. 241 0
      src/views/warehouseManagement/picking/components/WareHouseAllocationDailog.vue
  18. 186 0
      src/views/warehouseManagement/picking/components/inventory-search.vue
  19. 407 0
      src/views/warehouseManagement/picking/details.vue
  20. 240 0
      src/views/warehouseManagement/picking/index.vue
  21. 7 0
      src/views/warehouseManagement/stockLedger/components/item-list.vue
  22. 529 225
      src/views/warehouseManagement/stockManagement/add.vue
  23. 7 0
      src/views/warehouseManagement/stockManagement/components/priceMaintenanceDialog.vue
  24. 759 0
      src/views/warehouseManagement/stocktaking/reportLoss/components/addReportDialog.vue
  25. 371 0
      src/views/warehouseManagement/stocktaking/reportLoss/components/reportProcuts.vue
  26. 62 34
      src/views/warehouseManagement/stocktaking/reportLoss/index.vue
  27. 27 2
      src/views/warehouseManagement/stocktaking/work/components/disposeDialog.vue
  28. 108 3
      src/views/warehouseManagement/stocktaking/work/details.vue
  29. 1 1
      src/views/warehouseManagement/stocktaking/work/index.vue

+ 49 - 0
src/api/inventory/index.js

@@ -103,3 +103,52 @@ export async function reportWork(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 报损报溢列表
+export async function getReportsList(params) {
+  const res = await request.get('/wms/planProfitLoss/page', {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取临时盘点计划详情
+export async function getReportPlanDetailById(id) {
+  const res = await request.get('/wms/planProfitLoss/getById/' + id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 报损报溢保存
+export async function saveReportsList(data) {
+  const res = await request.post('/wms/planProfitLoss/save', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 报损报溢修改
+export async function updateReportsList(data) {
+  const res = await request.post('/wms/planProfitLoss/update', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 报损报溢列表
+export async function getReportList(params) {
+  const res = await request.get('/wms/plandetail/list', {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

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

@@ -344,5 +344,15 @@ export default {
       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));
   }
 };

BIN
src/assets/index/Vector@2x.png


BIN
src/assets/index/circle_bg.png


+ 1 - 0
src/views/warehouseManagement/components/outboundRequisitionDialog.vue

@@ -229,6 +229,7 @@
         return storageApi.getinboundRequestsList({
           pageNum: page,
           size: limit,
+          status: 0,
           type: this.type,
           ...where
         });

+ 376 - 0
src/views/warehouseManagement/inboundRequests/components/allTable.vue

@@ -0,0 +1,376 @@
+<template>
+  <div class="stockOrOutgoingManagement_index">
+    <el-card shadow="never">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        @cell-click="cellClick"
+        cache-key="systemRoleTable"
+      >
+        <template v-slot:selection="{ row }">
+          <el-radio class="radio" v-model="currentId" :label="row.id"
+            ><i></i
+          ></el-radio>
+        </template>
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <el-button icon="el-icon-plus" type="primary" @click="downLoad"
+            >导出</el-button
+          >
+        </template>
+        <!-- 状态 -->
+        <template v-slot:verifyStatus="{ row }">
+          <span :class="status[row.verifyStatus].class">
+            {{ status[row.verifyStatus].label }}
+          </span>
+        </template>
+        <template v-slot:bizType="{ row }">
+          {{ handleBizType(row.bizType, row.type) }}
+        </template>
+        <template v-slot:assetType="{ row }">
+          {{ handleAssetType(row.extInfo.assetType) }}
+        </template>
+      </ele-pro-table>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import * as XLSX from 'xlsx';
+  import storageApi from '@/api/warehouseManagement';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { allCategoryLevel } from '@/api/classifyManage';
+  import {
+    warehousingType,
+    sceneState,
+    outputSceneState,
+    auditStatus,
+    useDict
+  } from '@/utils/dict/index';
+  export default {
+    data() {
+      return {
+        type: '',
+        params: {},
+        auditStatus,
+        outputSceneState,
+        warehousingType,
+        sceneState,
+        codeList: [],
+        factoryList: [],
+        tableData: [],
+        formData: {
+          deptIds: '',
+          categoryCode: '',
+          categoryName: '',
+          sourceBizNo: '',
+          startTime: '',
+          endTime: '',
+          status: '',
+          factoryId: '',
+          time: []
+        },
+        total: 0,
+        status: [
+          { label: '未审核', class: 'ele-text-info' },
+          { label: '审核中', class: 'ele-text-primary' },
+          { label: '审核通过', class: 'ele-text-success' },
+          { label: '驳回', class: 'ele-text-danger' }
+        ],
+        currentId: '',
+        currentRow: {},
+        columns: [
+          {
+            slot: 'selection',
+            label: '选择',
+            width: 50,
+            align: 'center'
+          },
+          {
+            type: 'index',
+            label: '序号',
+            width: 50,
+            align: 'center'
+          },
+          {
+            prop: 'bizNo',
+            label: '单号',
+            align: 'center',
+            slot: 'bizNo',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'bizType',
+            slot: 'bizType',
+            label: '出入库类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'assetType',
+            slot: 'assetType',
+            label: '物品类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'categoryNames',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'categoryCodes',
+            label: '物品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'sourceBizNo',
+            label: '来源单据',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'createUserName',
+            label: '操作人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            width: 160,
+            prop: 'storageTime',
+            label: '出入库时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'verifyName',
+            label: '审核人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'verifyStatus',
+            label: '状态',
+            align: 'center',
+            slot: 'verifyStatus',
+            showOverflowTooltip: true,
+            width: 100
+          }
+        ]
+      };
+    },
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+    created() {
+      this.getTypeList();
+    },
+    methods: {
+      downLoad() {
+        if (this.currentId) {
+          storageApi.getOutinList({ id: this.currentId }).then((res) => {
+            console.log(res);
+            let tableData = [
+              [
+                '申请出库编码',
+                '申请人',
+                '申请人部门',
+                '申请时间',
+                '工单编码',
+                '关联设备名称',
+                '设备固资编码',
+                '物品编码',
+                '物品名称',
+                '型号',
+                '规格',
+                '级别',
+                '数量',
+                '计量单位',
+                '用途',
+                '审核人',
+                '仓库',
+                '出库单号',
+                '出库时间'
+              ] //导出表头
+            ];
+            if (res?.length > 0) {
+              res.forEach((item) => {
+                tableData.push([
+                  item.code,
+                  item.applyUserName,
+                  item.applyDeptName,
+                  item.applyTime,
+                  item.orderCode,
+                  item.deviceName,
+                  item.assetsCode,
+                  item.categoryCode,
+                  item.categoryName,
+                  item.categoryModel,
+                  item.specification,
+                  item.level,
+                  item.measureQuantity,
+                  item.measureUnit,
+                  item.purpose,
+                  item.verifyName,
+                  item.warehouseName,
+                  item.bizNo,
+                  item.storageTime
+                ]);
+              });
+              let workSheet = XLSX.utils.aoa_to_sheet(tableData);
+              let bookNew = XLSX.utils.book_new();
+              XLSX.utils.book_append_sheet(bookNew, workSheet, '文件'); // 工作簿名称
+              let name = '导出文件.xlsx';
+              XLSX.writeFile(bookNew, name); // 保存的文件名
+            }
+          });
+        } else {
+          return this.$message.warning('请选择单据');
+        }
+      },
+      // 单击获取id
+      cellClick(row) {
+        this.currentRow = row;
+        this.currentId = row.id;
+      },
+      async getTypeList() {
+        const { data } = await allCategoryLevel();
+        this.codeList = data.map((item) => {
+          return { dictCode: item.id, dictValue: item.name };
+        });
+      },
+      handleAssetType(r) {
+        const code = this.codeList.find((item) => item.dictCode == r);
+        return code?.dictValue;
+      },
+      handleBizType(code, type) {
+        if (type == 1) {
+          // 入库
+          for (const key in this.sceneState) {
+            if (this.sceneState[key].code == code) {
+              return this.sceneState[key].label;
+            }
+          }
+        } else {
+          // 出库
+          for (const key in this.outputSceneState) {
+            if (this.outputSceneState[key].code == code) {
+              return this.outputSceneState[key].label;
+            }
+          }
+        }
+      },
+      async datasource({ page, limit, where }) {
+        if (where.time && where.time.length > 0) {
+          where.startTime = where.time[0];
+          where.endTime = where.time[1];
+          delete where.time;
+        }
+        const res = await storageApi.getInboundList({
+          pageNum: page,
+          size: limit,
+          type: this.type,
+          ...where
+        });
+
+        return res;
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+      getAuditStatus: useDict(auditStatus),
+      getList() {
+        this.$refs.table.reload();
+      },
+      handleCurrentChange() {
+        this.getList();
+      },
+      handleSizeChange() {
+        this.formData.page = 1;
+        this.getList();
+      },
+      search() {
+        this.formData.page = 1;
+        this.getList();
+      },
+      reset() {
+        this.$refs.formName.resetFields();
+        this.search();
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  #stockOrOutgoingManagement_index {
+    height: 100%;
+    width: 100%;
+    padding: 10px;
+    box-sizing: border-box;
+    // element-ui样式穿透
+    ::v-deep .el-card {
+      height: 100%;
+      .el-card__body {
+        height: 100%;
+        box-sizing: border-box;
+        display: flex;
+        flex-direction: column;
+        .ele-pro-table {
+          flex: 1;
+          display: flex;
+          flex-direction: column;
+          .el-table {
+            display: flex;
+            flex-direction: column;
+            .el-table__body-wrapper {
+              flex: 1;
+            }
+          }
+        }
+      }
+    }
+    .w100 {
+      width: 100% !important;
+    }
+    .p20 {
+      padding: 20px;
+    }
+    .mt20 {
+      margin-top: 20px;
+    }
+    .mt10 {
+      margin-top: 10px;
+    }
+    .el-form {
+      overflow: hidden;
+    }
+    .float-right {
+      float: right;
+      text-align: right;
+      margin-right: 20px;
+    }
+    .right {
+      text-align: right;
+    }
+    .col {
+      color: #aaa;
+    }
+    .pr10 {
+      padding-right: 10px;
+    }
+  }
+</style>

+ 79 - 18
src/views/warehouseManagement/inboundRequests/components/search.vue

@@ -7,13 +7,31 @@
     @submit.native.prevent
   >
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
+        <el-form-item label="所属工厂" prop="factoryId">
+          <el-select
+            filterable
+            placeholder="请选择"
+            v-model="where.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-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
         <el-form-item label="工单编码:">
           <el-input clearable v-model="where.code" placeholder="请输入" />
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
         <el-form-item label="物品编码:">
           <el-input
             clearable
@@ -23,7 +41,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
         <el-form-item label="物品名称:">
           <el-input
             clearable
@@ -33,7 +51,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection
             v-model="where.deptIds"
@@ -41,27 +59,57 @@
           ></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
-        <el-form-item label="所属工厂" prop="factoryId">
+      <el-col
+        v-if="activeName == '出入库明细表'"
+        v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }"
+      >
+        <el-form-item label="单号:">
+          <el-input
+            v-model="where.categoryCode"
+            placeholder="请输入内容"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col
+        v-if="activeName == '出入库明细表'"
+        v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }"
+      >
+        <el-form-item label="类型:">
           <el-select
-            filterable
+            style="width: 100%"
+            v-model="where.type"
             placeholder="请选择"
-            v-model="where.factoryId"
-            clearable
-            class="w100"
           >
             <el-option
-              v-for="item in factoryList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
+              v-for="item in typeOption"
+              :label="item.label"
+              :value="item.value"
+              :key="item.value"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
       </el-col>
+      <el-col
+        v-if="activeName == '出入库明细表'"
+        v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }"
+      >
+        <el-form-item label="出入库时间:">
+          <el-date-picker
+            style="width: 100%"
+            size="small"
+            v-model="where.time"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
+          ></el-date-picker>
+        </el-form-item>
+      </el-col>
       <el-col
         style="display: flex; justify-content: flex-end"
-        v-bind="styleResponsive ? { lg: 4, md: 6 } : { span: 4 }"
+        v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }"
       >
         <el-form-item label-width="0px">
           <el-button
@@ -86,6 +134,9 @@
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
   export default {
     components: { AuthSelection },
+    props: {
+      activeName: { type: String, default: '' }
+    },
     data() {
       // 默认表单数据
       const defaultWhere = {
@@ -97,7 +148,12 @@
       return {
         // 表单数据
         where: { ...defaultWhere },
-        factoryList: []
+        factoryList: [],
+        typeOption: [
+          { label: '入库', value: 1 },
+          { label: '出库', value: 2 }
+        ],
+        defaultWhere: { ...defaultWhere }
       };
     },
     computed: {
@@ -106,7 +162,12 @@
         return this.$store.state.theme.styleResponsive;
       }
     },
-    watch: {},
+    watch: {
+      activeName(val) {
+        console.log('val-------', val);
+        this.where = { ...this.defaultWhere };
+      }
+    },
     created() {
       this.getFactoryList();
     },

+ 9 - 1
src/views/warehouseManagement/inboundRequests/components/tgDetails.vue

@@ -76,8 +76,16 @@
             prop: 'purpose'
           },
           {
-            label: '领用人名称',
+            label: '申请人名称',
             prop: 'userName'
+          },
+          {
+            label: '使用人部门',
+            prop: 'employGroupName'
+          },
+          {
+            label: '使用人名称',
+            prop: 'employName'
           }
         ]
       };

+ 3 - 1
src/views/warehouseManagement/inboundRequests/components/tgTable.vue

@@ -46,7 +46,7 @@
     props: {
       type: {
         type: String,
-        default: '1'
+        default: ''
       }
     },
     components: {
@@ -80,12 +80,14 @@
           {
             prop: 'code',
             label: '编码',
+            showOverflowTooltip: true,
             align: 'center',
             minWidth: 100
           },
           {
             prop: 'categoryNames',
             label: '名称',
+            showOverflowTooltip: true,
             align: 'center'
           },
           { label: '型号', prop: 'modelType', width: '150' },

+ 11 - 2
src/views/warehouseManagement/inboundRequests/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div id="inboundRequests">
     <el-card shadow="never" v-loading="loading">
-      <search @search="reload" ref="searchRef"> </search>
+      <search @search="reload" :activeName="activeName" ref="searchRef">
+      </search>
       <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="入库" name="入库">
           <tgTable
@@ -17,6 +18,12 @@
             type="2"
           ></tgTable>
         </el-tab-pane>
+        <el-tab-pane label="出入库明细表" name="出入库明细表">
+          <allTable
+            v-if="activeName == '出入库明细表'"
+            ref="tableRef"
+          ></allTable>
+        </el-tab-pane>
       </el-tabs>
     </el-card>
   </div>
@@ -26,11 +33,13 @@
   import search from './components/search.vue';
   import tgDetails from './components/tgDetails.vue';
   import tgTable from './components/tgTable.vue';
+  import allTable from './components/allTable.vue';
   export default {
     components: {
       search,
       tgDetails,
-      tgTable
+      tgTable,
+      allTable
     },
     data() {
       return {

+ 740 - 0
src/views/warehouseManagement/index/index.vue

@@ -0,0 +1,740 @@
+<template>
+  <div id="my_index">
+    <div class="viewBar">
+      <div v-for="item in list">
+        <div class="item">
+          <div class="title"
+            >{{ item.title }}<span>{{ item.unit }}</span></div
+          >
+          <div class="count">{{ item.count }}</div>
+        </div>
+        <div class="icon">
+          <img :src="item.icon" />
+        </div>
+      </div>
+    </div>
+    <div class="echart_box">
+      <div class="left">
+        <div>
+          <div class="title_box">库总量同比及趋势分析</div>
+          <div class="erchats1"></div>
+        </div>
+        <div>
+          <div class="title_box">库存周转趋势分析</div>
+          <div class="erchats2"></div>
+        </div>
+      </div>
+      <div class="right">
+        <div>
+          <div class="title_box">在库总量分析</div>
+          <div class="erchats3"></div>
+        </div>
+        <div>
+          <div class="title_box">呆滞品总量分析</div>
+          <div class="erchats4"></div>
+        </div>
+        <div>
+          <div class="title_box">在库总量分析</div>
+          <div class="erchats5"></div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import * as echarts from 'echarts';
+  export default {
+    data() {
+      return {
+        list: [
+          {
+            title: '库存总量',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          },
+          {
+            title: '库存周转天数',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          },
+          {
+            title: '库存周转率',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          },
+          {
+            title: '呆滞品总量',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          },
+          {
+            title: '产成品总量',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          },
+          {
+            title: '原材料总量',
+            unit: '(单位)',
+            count: 1557,
+            icon: require('../../../assets/index/Vector@2x.png')
+          }
+        ]
+      };
+    },
+    mounted() {
+      this.initCharts1();
+      this.initCharts2();
+      this.initCharts3();
+      this.initCircle1();
+      this.initCircle2();
+    },
+    methods: {
+      initCharts3() {
+        var myChart = echarts.init(document.querySelector('.erchats4'));
+        let option = {
+          tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+              type: 'shadow'
+            }
+          },
+          grid: {
+            top: '10%',
+            left: '3%',
+            right: '4%',
+            bottom: '3%',
+            containLabel: true
+          },
+          xAxis: [
+            {
+              type: 'category',
+              data: [
+                '轴承',
+                '升降机',
+                '冲压杆',
+                '冷却水管',
+                '液压机',
+                '电机',
+                '水泵机'
+              ],
+              axisTick: {
+                alignWithLabel: true
+              }
+            }
+          ],
+          yAxis: [
+            {
+              type: 'value'
+            }
+          ],
+          series: [
+            {
+              name: '个',
+              type: 'bar',
+              barWidth: '30%',
+              itemStyle: {
+                color: '#20BE4B'
+              },
+              data: [200, 152, 200, 334, 390, 330, 220]
+            }
+          ]
+        };
+        myChart.setOption(option);
+      },
+      initCircle1() {
+        var myChart = echarts.init(document.querySelector('.erchats3'));
+        let option = {
+          tooltip: {
+            trigger: 'item'
+          },
+          graphic: {
+            //图形中间图片
+            elements: [
+              {
+                type: 'text', //通过不同top值可以设置上下显示
+                left: '14.5%',
+                top: '44%',
+                style: {
+                  text: '在库总量(台)',
+                  fill: '#000', //文字的颜色
+                  width: 30,
+                  height: 30,
+                  fontSize: 12,
+                  color: '#000',
+                  fontFamily: 'Microsoft YaHei'
+                }
+              },
+              {
+                type: 'text', //通过不同top值可以设置上下显示
+                left: '17.5%',
+                top: '53%',
+                style: {
+                  text: '100',
+                  fill: '#000', //文字的颜色
+                  width: 30,
+                  height: 30,
+                  fontSize: 18,
+                  color: '#000',
+                  fontFamily: 'Microsoft YaHei'
+                }
+              }
+            ]
+          },
+          legend: {
+            top: 'center',
+            right: '15%',
+            type: 'scroll',
+            orient: 'vertical',
+            itemGap: 15,
+            textStyle: {
+              rich: {
+                // 通过富文本rich给每个项设置样式,下面的oneone、twotwo、threethree可以理解为"每一列"的样式
+                oneone: {
+                  // 设置文字、数学、英语这一列的样式
+                  width: 100,
+                  color: '#000',
+                  fontSize: 12,
+                  fontWeight: 'bolder'
+                },
+                twotwo: {
+                  // 设置10分、20分、30分这一列的样式
+                  width: 35,
+                  color: '#000',
+                  fontSize: 12
+                },
+                threethree: {
+                  // 设置百分比这一列的样式
+                  width: 20,
+                  color: '#000',
+                  fontSize: 12
+                }
+              }
+            },
+            formatter: (name) => {
+              return `{oneone|${name}}  {twotwo|40}   {threethree|(40%)}`;
+            }
+          },
+          series: [
+            {
+              name: '工单',
+              type: 'pie',
+              radius: ['70%', '90%'],
+              center: ['20%', '50%'], //图的位置,距离左跟上的位置
+              avoidLabelOverlap: false,
+              padAngle: 5,
+              label: {
+                show: false,
+                position: 'center'
+              },
+              emphasis: {
+                label: {
+                  show: false,
+                  fontSize: 40,
+                  fontWeight: 'bold'
+                }
+              },
+              labelLine: {
+                show: false
+              },
+              data: [
+                { value: 12, name: '进行中(正常)' },
+                { value: 33, name: '进行中(延期)' },
+                { value: 44, name: '未开始' },
+                { value: 22, name: '已验收' },
+                { value: 10, name: '已结束' },
+                { value: 30, name: '已暂停' }
+              ]
+            }
+          ]
+        };
+        myChart.setOption(option);
+      },
+      initCircle2() {
+        var myChart = echarts.init(document.querySelector('.erchats5'));
+        let option = {
+          tooltip: {
+            trigger: 'item'
+          },
+          graphic: {
+            //图形中间图片
+            elements: [
+              {
+                type: 'text', //通过不同top值可以设置上下显示
+                left: '14.5%',
+                top: '44%',
+                style: {
+                  text: '在库总量(台)',
+                  fill: '#000', //文字的颜色
+                  width: 30,
+                  height: 30,
+                  fontSize: 12,
+                  color: '#000',
+                  fontFamily: 'Microsoft YaHei'
+                }
+              },
+              {
+                type: 'text', //通过不同top值可以设置上下显示
+                left: '17.5%',
+                top: '53%',
+                style: {
+                  text: '100',
+                  fill: '#000', //文字的颜色
+                  width: 30,
+                  height: 30,
+                  fontSize: 18,
+                  color: '#000',
+                  fontFamily: 'Microsoft YaHei'
+                }
+              }
+            ]
+          },
+          legend: {
+            top: 'center',
+            right: '15%',
+            type: 'scroll',
+            orient: 'vertical',
+            itemGap: 15,
+            textStyle: {
+              rich: {
+                // 通过富文本rich给每个项设置样式,下面的oneone、twotwo、threethree可以理解为"每一列"的样式
+                oneone: {
+                  // 设置文字、数学、英语这一列的样式
+                  width: 100,
+                  color: '#000',
+                  fontSize: 12,
+                  fontWeight: 'bolder'
+                },
+                twotwo: {
+                  // 设置10分、20分、30分这一列的样式
+                  width: 35,
+                  color: '#000',
+                  fontSize: 12
+                },
+                threethree: {
+                  // 设置百分比这一列的样式
+                  width: 20,
+                  color: '#000',
+                  fontSize: 12
+                }
+              }
+            },
+            formatter: (name) => {
+              return `{oneone|${name}}  {twotwo|40}   {threethree|(40%)}`;
+            }
+          },
+          series: [
+            {
+              name: '工单',
+              type: 'pie',
+              radius: ['70%', '90%'],
+              center: ['20%', '50%'], //图的位置,距离左跟上的位置
+              avoidLabelOverlap: false,
+              padAngle: 5,
+              label: {
+                show: false,
+                position: 'center'
+              },
+              emphasis: {
+                label: {
+                  show: false,
+                  fontSize: 40,
+                  fontWeight: 'bold'
+                }
+              },
+              labelLine: {
+                show: false
+              },
+              data: [
+                { value: 12, name: '进行中(正常)' },
+                { value: 33, name: '进行中(延期)' },
+                { value: 44, name: '未开始' },
+                { value: 22, name: '已验收' },
+                { value: 10, name: '已结束' },
+                { value: 30, name: '已暂停' }
+              ]
+            }
+          ]
+        };
+        myChart.setOption(option);
+      },
+      initCharts1() {
+        const colors = ['#5470C6', '#91CC75', '#EE6666'];
+        var myChart = echarts.init(document.querySelector('.erchats1'));
+        myChart.setOption({
+          color: colors,
+          tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+              type: 'cross'
+            }
+          },
+          grid: {
+            left: '5%',
+            right: '5%',
+            bottom: '8%'
+          },
+          legend: {
+            data: ['2023', '2024', '趋势']
+          },
+          xAxis: [
+            {
+              type: 'category',
+              axisTick: {
+                alignWithLabel: true
+              },
+              data: [
+                '1月',
+                '2月',
+                '3月',
+                '4月',
+                '5月',
+                '6月',
+                '7月',
+                '8月',
+                '9月',
+                '10月',
+                '11月',
+                '12月'
+              ]
+            }
+          ],
+          yAxis: [
+            {
+              type: 'value',
+              name: '',
+              position: 'right',
+              alignTicks: true,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value}%'
+              }
+            },
+            {
+              type: 'value',
+              name: '2024',
+              show: false,
+              position: 'right',
+              alignTicks: true,
+              offset: 80,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value} ml'
+              }
+            },
+            {
+              type: 'value',
+              name: '(单位:pcs)',
+              position: 'left',
+              alignTicks: true,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value}'
+              }
+            }
+          ],
+          series: [
+            {
+              name: '2023',
+              type: 'bar',
+              barWidth: '20%',
+              itemStyle: {
+                color: '#3976F1'
+              },
+              data: [
+                212.0, 144.9, 127.0, 223.2, 225.6, 176.7, 135.6, 162.2, 232.6,
+                220.0, 186.4, 213.3
+              ]
+            },
+            {
+              name: '2024',
+              type: 'bar',
+              yAxisIndex: 1,
+              barWidth: '20%',
+              itemStyle: {
+                color: '#5DD07C'
+              },
+              data: [
+                212.6, 215.9, 189.0, 126.4, 228.7, 170.7, 175.6, 182.2, 248.7,
+                118.8, 226.0, 222.3
+              ]
+            },
+            {
+              name: '趋势',
+              type: 'line',
+              yAxisIndex: 2,
+              itemStyle: {
+                color: '#FF9669'
+              },
+              data: [
+                2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2
+              ]
+            }
+          ]
+        });
+      },
+      initCharts2() {
+        var myChart = echarts.init(document.querySelector('.erchats2'));
+        myChart.setOption({
+          tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+              type: 'cross'
+            }
+          },
+          grid: {
+            left: '5%',
+            right: '5%',
+            bottom: '8%'
+          },
+          legend: {
+            data: ['当年存货周转率', '去年存货周转率', '当年趋势', '去年趋势']
+          },
+          xAxis: [
+            {
+              type: 'category',
+              axisTick: {
+                alignWithLabel: true
+              },
+              data: [
+                '1月',
+                '2月',
+                '3月',
+                '4月',
+                '5月',
+                '6月',
+                '7月',
+                '8月',
+                '9月',
+                '10月',
+                '11月',
+                '12月'
+              ]
+            }
+          ],
+          yAxis: [
+            {
+              type: 'value',
+              name: '',
+              position: 'right',
+              alignTicks: true,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value}%'
+              }
+            },
+            {
+              type: 'value',
+              name: '2024',
+              show: false,
+              position: 'right',
+              alignTicks: true,
+              offset: 80,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value} ml'
+              }
+            },
+            {
+              type: 'value',
+              name: '(单位:pcs)',
+              position: 'left',
+              alignTicks: true,
+              axisLine: {
+                show: false
+              },
+              axisLabel: {
+                formatter: '{value}'
+              }
+            }
+          ],
+          series: [
+            {
+              name: '当年存货周转率',
+              type: 'bar',
+              barWidth: '20%',
+              itemStyle: {
+                color: '#FF9669'
+              },
+              data: [
+                200.0, 112.9, 177.0, 223.2, 125.6, 176.7, 135.6, 162.2, 132.6,
+                120.0, 186.4, 193.3
+              ]
+            },
+            {
+              name: '去年存货周转率',
+              type: 'bar',
+              yAxisIndex: 1,
+              barWidth: '20%',
+              itemStyle: {
+                color: '#26ADAD'
+              },
+              data: [
+                222.6, 115.9, 219.0, 226.4, 128.7, 270.7, 175.6, 182.2, 248.7,
+                188.8, 216.0, 192.3
+              ]
+            },
+            {
+              name: '当年趋势',
+              type: 'line',
+              yAxisIndex: 2,
+              itemStyle: {
+                color: '#FF8855'
+              },
+              data: [
+                22.0, 12.2, 23.3, 14.5, 26.3, 10.2, 20.3, 23.4, 23.0, 16.5,
+                12.0, 16.2
+              ]
+            },
+            {
+              name: '去年趋势',
+              type: 'line',
+              yAxisIndex: 2,
+              itemStyle: {
+                color: '#095BFF'
+              },
+              data: [
+                2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0,
+                2.3
+              ]
+            }
+          ]
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  #my_index {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    padding: 10px 0 10px 10px;
+    box-sizing: border-box;
+    background-color: #dbdbdb;
+    .viewBar {
+      height: 93px;
+      width: 100%;
+      display: flex;
+      margin-bottom: 10px;
+      > div {
+        flex: 1;
+        margin-right: 10px;
+        background: linear-gradient(to right, #2d80ee 100%, #e9f2ff 50%);
+        border-radius: 8px;
+        display: flex;
+        padding: 0 20px;
+        box-sizing: border-box;
+        .item {
+          flex: 1;
+          display: flex;
+          flex-direction: column;
+          .title {
+            flex: 1;
+            display: flex;
+            align-items: center;
+            font-size: 16px;
+            color: rgba(255, 255, 255, 1);
+            > span {
+              font-size: 12px;
+            }
+          }
+          .count {
+            flex: 1;
+            display: flex;
+            align-items: center;
+            font-size: 35px;
+            color: rgba(255, 255, 255, 1);
+          }
+        }
+        .icon {
+          width: 50px;
+          height: 100%;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          > img {
+            height: 50px;
+            width: 50px;
+          }
+        }
+      }
+    }
+    .echart_box {
+      display: flex;
+      flex: 1;
+      .left {
+        flex: 5;
+        display: flex;
+        flex-direction: column;
+        margin-right: 10px;
+        height: 100%;
+        > div:first-child {
+          margin-bottom: 10px;
+        }
+        > div {
+          flex: 1;
+          background-color: #fff;
+          padding: 10px;
+          box-sizing: border-box;
+          border-radius: 6px;
+          display: flex;
+          flex-direction: column;
+          .title_box {
+            font-size: 14px;
+            padding-bottom: 10px;
+            box-sizing: border-box;
+            border-bottom: 1px solid #e6e8e8;
+          }
+          > div:last-child {
+            flex: 1;
+          }
+        }
+      }
+      .right {
+        flex: 3;
+        display: flex;
+        flex-direction: column;
+        height: 100%;
+        > div {
+          flex: 1;
+          padding: 10px;
+          box-sizing: border-box;
+          background-color: #fff;
+          margin-bottom: 10px;
+          border-radius: 6px;
+          display: flex;
+          flex-direction: column;
+          .title_box {
+            font-size: 14px;
+            padding-bottom: 10px;
+            box-sizing: border-box;
+            border-bottom: 1px solid #e6e8e8;
+          }
+          > div:last-child {
+            flex: 1;
+          }
+        }
+        > div:last-child {
+          margin-bottom: 0;
+        }
+      }
+    }
+  }
+</style>

+ 665 - 0
src/views/warehouseManagement/picking/add copy.vue

@@ -0,0 +1,665 @@
+<template>
+  <div id="inventoryAllocate">
+    <el-card class="box-card">
+      <div class="selectBox">
+        <el-form
+          label-width="80px"
+          label-position="left"
+          class="ele-form-search"
+        >
+          <el-row :gutter="15">
+            <el-col :span="6">
+              <el-form-item label="调拨类型:" prop="warehouseId">
+                <template>
+                  <el-select
+                    clearable
+                    @change="allocateChange"
+                    style="width: 100%"
+                    v-model="allocateId"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in typeOptions"
+                      :label="item.label"
+                      :value="item.value"
+                      :key="item.value"
+                    >
+                    </el-option>
+                  </el-select>
+                </template>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="调出仓库:" prop="warehouseId">
+                <template>
+                  <el-select
+                    clearable
+                    style="width: 100%"
+                    v-model="params.outWarehouseId"
+                    @change="warehouseChange($event, '调出')"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in outWarehouseList"
+                      :label="item.name"
+                      :value="item.id"
+                      :key="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </template>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="调入仓库:" prop="warehouseId">
+                <template>
+                  <el-select
+                    :disabled="allocateId == 1"
+                    clearable
+                    style="width: 100%"
+                    v-model="params.inWarehouseId"
+                    @change="warehouseChange($event, '调入')"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in inWarehouseList"
+                      :label="item.name"
+                      :value="item.id"
+                      :key="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </template>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div class="reservoirArea">
+        <div>
+          <div
+            >调出库区{{
+              currentPullAreaName ? `(${currentPullAreaName})` : '(未选)'
+            }}</div
+          >
+          <div class="box">
+            <div
+              :class="currentPullAreaId == item.id ? 'click_border' : ''"
+              v-for="item in pullLibrary"
+              @click="pullClick(item.id, item.name)"
+              >{{ item.name }}</div
+            >
+          </div>
+        </div>
+        <div>
+          <div
+            >调入库区{{
+              currentTuneAreaName ? `(${currentTuneAreaName})` : '(未选)'
+            }}</div
+          >
+          <div class="box">
+            <div
+              :class="
+                allocateId == 1 && currentPullAreaId === item.id
+                  ? 'unClick_color'
+                  : currentTuneAreaId === item.id
+                  ? 'click_border'
+                  : ''
+              "
+              v-for="item in tuneLibrary"
+              @click="
+                tuneClick(
+                  item.id,
+                  item.name,
+                  allocateId == 1 && currentPullAreaId === item.id
+                )
+              "
+              >{{ item.name }}</div
+            >
+          </div>
+        </div>
+      </div>
+    </el-card>
+    <el-card class="box-card">
+      <div class="productsList">
+        <header-title
+          :title="`物品信息${
+            currentPullAreaName ? `(${currentPullAreaName})` : '(未选)'
+          }`"
+          ><el-button type="primary" @click="merge"
+            >调入</el-button
+          ></header-title
+        >
+        <el-table
+          ref="table"
+          :data="productList"
+          @selection-change="selecctedRow"
+          tooltip-effect="dark"
+          :max-height="500"
+          border
+        >
+          <el-table-column
+            align="center"
+            width="50"
+            :selectable="checkSelectable"
+            type="selection"
+          ></el-table-column>
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <el-table-column
+            label="物品编码"
+            prop="categoryCode"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="物品名称"
+            prop="categoryName"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="牌号"
+            prop="brandNum"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="型号"
+            prop="categoryModel"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="规格"
+            prop="specification"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装编码"
+            prop="packageNo"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装数量"
+            prop="packingQuantity"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装单位"
+            prop="packingUnit"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="计量数量"
+            prop="measureQuantity"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="计量单位"
+            prop="measureUnit"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="重量"
+            prop="weight"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="重量单位"
+            prop="weightUnit"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="仓库"
+            prop="warehouseName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="货区"
+            prop="areaName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="货架"
+            prop="goodsAllocationName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="货位"
+            prop="goodsShelfName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="生产日期"
+            prop="productionDate"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="采购日期"
+            prop="purchaseDate"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="发货条码"
+            prop="barcodes"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="客户代号"
+            prop="clientCode"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="刻码"
+            prop="engrave"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="物料代号"
+            prop="materielDesignation"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="allocateDetails">
+        <header-title :title="`调拨明细`"
+          ><el-button type="primary" @click="submit"
+            >保存</el-button
+          ></header-title
+        >
+        <el-table
+          ref="detailTable"
+          :data="tableData"
+          tooltip-effect="dark"
+          :max-height="500"
+          border
+        >
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <el-table-column
+            label="物品编码"
+            prop="categoryCode"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="物品名称"
+            prop="categoryName"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="牌号"
+            prop="brandNum"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="型号"
+            prop="categoryModel"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="规格"
+            prop="specification"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装编码"
+            prop="packageNo"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装数量"
+            prop="packingQuantity"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="包装单位"
+            prop="packingUnit"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="计量数量"
+            prop="measureQuantity"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="计量单位"
+            prop="measureUnit"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            label="重量"
+            prop="weight"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="重量单位"
+            prop="weightUnit"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="调出库区"
+            prop="outWarehouseAreaName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column
+            label="调入库区"
+            prop="inWarehouseName"
+            :show-overflow-tooltip="true"
+          >
+          </el-table-column>
+          <el-table-column label="操作" width="100">
+            <template slot-scope="{ row, $index }">
+              <el-button @click="deleted(row, $index)" type="text" size="small"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-card>
+  </div>
+</template>
+<script>
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import { getWarehouseList } from '@/api/classifyManage/itemInformation';
+  export default {
+    data() {
+      return {
+        typeOptions: [
+          { label: '库内调拨', value: 1 },
+          { label: '库外调拨', value: 2 }
+        ],
+        selectionIds: [],
+        selection: [],
+        tableData: [],
+        productList: [],
+        allocateId: 1,
+        currentPullAreaId: '',
+        currentPullAreaName: '',
+        currentTuneAreaId: '',
+        currentTuneAreaName: '',
+        pullLibrary: [], // 调出库
+        tuneLibrary: [], // 调入库
+        outWarehouseList: [],
+        inWarehouseList: [],
+        params: {
+          outWarehouseId: '',
+          outWarehouseName: '',
+          inWarehouseId: '',
+          inWarehouseName: ''
+        }
+      };
+    },
+    created() {
+      this.getWarehouseOptions();
+    },
+    methods: {
+      deleted(row, index) {
+        this.tableData.splice(index, 1);
+        console.log(this.selectionIds);
+        this.selectionIds = this.selectionIds.filter((item) => item !== row.id);
+      },
+      submit() {
+        if (this.tableData.length > 0) {
+          let params = {
+            categoryCode: this.tableData
+              .map((item) => item.categoryCode)
+              .join(','),
+            categoryName: this.tableData
+              .map((item) => item.categoryName)
+              .join(','),
+            outInDetailRecordId: this.tableData.map((item) => item.id),
+            sourceWarehouse: this.params.outWarehouseName,
+            sourceWarehouseId: this.params.outWarehouseId,
+            sourceWarehouseArea: this.currentPullAreaName,
+            sourceWarehouseAreaId: this.currentPullAreaId,
+            targetWarehouse: this.params.inWarehouseName,
+            targetWarehouseId: this.params.inWarehouseId,
+            targetWarehouseArea: this.currentTuneAreaName,
+            targetWarehouseAreaId: this.currentTuneAreaId,
+            status: 0,
+            type: this.allocateId
+          };
+          console.log('params------------', params);
+          storageApi.allotApplySave(params).then(() => {
+            this.$message.success('保存成功');
+            this.$router.go(-1);
+          });
+        } else {
+          this.$message.error('请调入相关数据');
+        }
+      },
+      checkSelectable(row) {
+        return !this.selectionIds.includes(row.id);
+      },
+      allocateChange(val) {
+        this.allocateId = val;
+        this.params = {
+          outWarehouseId: '',
+          outWarehouseName: '',
+          inWarehouseId: '',
+          inWarehouseName: ''
+        };
+        this.currentPullAreaId = '';
+        this.currentPullAreaName = '';
+        this.currentTuneAreaId = '';
+        this.currentTuneAreaName = '';
+        this.pullLibrary = [];
+        this.tuneLibrary = [];
+        this.productList = [];
+        this.tableData = [];
+        this.productList = [];
+        this.getWarehouseOptions();
+      },
+      pullClick(id, name) {
+        if (this.currentPullAreaId == id) {
+          return false;
+        } else {
+          console.log('-------------');
+          this.currentPullAreaId = id;
+          this.currentPullAreaName = name;
+          this.currentTuneAreaId = '';
+          this.currentTuneAreaName = '';
+        }
+
+        storageApi
+          .getPackingList({
+            warehouseAreaId: id,
+            pageNum: 1,
+            size: 9999
+          })
+          .then(({ list }) => {
+            this.productList = list;
+          });
+      },
+      tuneClick(id, name, boolen) {
+        if (!this.currentPullAreaId) {
+          return this.$message.error('请先选择调出库');
+        }
+        if (boolen) {
+          return false;
+        }
+        this.currentTuneAreaId = id;
+        this.currentTuneAreaName = name;
+      },
+      selecctedRow(val) {
+        this.selection = val;
+      },
+      async warehouseChange(val, type) {
+        console.log(val);
+        console.log(type);
+        storageApi.getListByWarehouseId(val).then((data) => {
+          console.log(data);
+          if (this.allocateId == 1) {
+            // 库内调拨同步选择仓库
+            this.params.inWarehouseId = val;
+            this.pullLibrary = data;
+            this.tuneLibrary = data;
+            this.params = {
+              outWarehouseId: val,
+              outWarehouseName: this.outWarehouseList.filter(
+                (item) => item.id == val
+              )[0].name,
+              inWarehouseId: val,
+              inWarehouseName: this.inWarehouseList.filter(
+                (item) => item.id == val
+              )[0].name
+            };
+            console.log(this.params);
+          } else {
+            if (type === '调出') {
+              this.pullLibrary = data;
+              this.currentPullAreaId = '';
+              this.currentPullAreaName = '';
+              this.currentTuneAreaId = '';
+              this.currentTuneAreaName = '';
+              this.inWarehouseList = this.inWarehouseList.filter(
+                (item) => item.id !== val
+              );
+              this.params.outWarehouseId = val;
+              this.params.outWarehouseName = this.outWarehouseList.filter(
+                (item) => item.id === val
+              )[0].name;
+              this.productList = [];
+            } else {
+              this.tuneLibrary = data;
+              this.outWarehouseList = this.outWarehouseList.filter(
+                (item) => item.id !== val
+              );
+              this.params.inWarehouseId = val;
+              this.params.inWarehouseName = this.inWarehouseList.filter(
+                (item) => item.id === val
+              )[0].name;
+            }
+          }
+        });
+      },
+      async getWarehouseOptions() {
+        const { data } = await storageApi.getWarehouseTrees();
+        this.outWarehouseList = data;
+        this.inWarehouseList = data;
+      },
+      getAreaData() {
+        console.log('this.current----', this.current.data);
+        params = {
+          warehouseId:
+            this.current.data?.level == 0 ? this.current.data.id : '',
+          warehouseAreaId:
+            this.current.data?.level == 1 ? this.current.data.id : '',
+          warehouseAreaGoodsId:
+            this.current.data?.level == 2 ? this.current.data.id : '',
+          ...where,
+          ...order
+        };
+        const data = storageApi.getPackingList({
+          ...params,
+          pageNum: page,
+          size: limit
+        });
+      },
+      async merge() {
+        if (
+          this.selection.length > 0 &&
+          this.currentPullAreaId &&
+          this.currentTuneAreaId
+        ) {
+          console.log(this.selection);
+          console.log(this.selectionIds);
+          let boolen = this.selection.every((item) =>
+            this.selectionIds.includes(item.id)
+          );
+          if (this.selection.length > 0 && !boolen) {
+            this.selection = this.selection.filter(
+              (item) => !this.selectionIds.includes(item.id)
+            );
+            this.selectionIds = this.selectionIds.concat(
+              this.selection.map((item) => item.id)
+            );
+            console.log('this.selection---------', this.selection);
+            console.log('this.selectionIds---', this.selectionIds);
+            this.tableData = this.tableData.concat(
+              this.selection.map((item) => {
+                return {
+                  ...item,
+                  outWarehouseAreaId: this.currentPullAreaId,
+                  outWarehouseAreaName: this.currentPullAreaName,
+                  inWarehouseId: this.currentTuneAreaId,
+                  inWarehouseName: this.currentTuneAreaName
+                };
+              })
+            );
+            console.log('this.tableData---------', this.tableData);
+          } else {
+            this.$message.error('请选择正确的行');
+          }
+        } else {
+          this.$message.error('请选择调入库和调出库以及物品信息');
+        }
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  #inventoryAllocate {
+    .selectBox {
+      padding: 20px;
+    }
+    .box-card {
+      margin: 20px;
+    }
+    .click_border {
+      box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px,
+        rgb(51, 51, 51) 0px 0px 0px 5px;
+    }
+    .unClick_color {
+      background-color: #ccc !important;
+    }
+    .reservoirArea {
+      display: flex;
+      padding: 5px 20px;
+      > div {
+        flex: 1;
+        .box {
+          > div {
+            display: inline-block;
+            width: 120px;
+            height: 80px;
+            margin: 10px;
+            margin-left: 0;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            border-radius: 10px;
+            color: #fff;
+            background-color: #409eff;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+    .allocateDetails {
+      padding: 5px 20px;
+      > div {
+        padding: 10px;
+      }
+    }
+    .productsList {
+      padding: 5px 20px;
+      > div {
+        padding: 10px;
+      }
+    }
+  }
+</style>

+ 768 - 0
src/views/warehouseManagement/picking/add.vue

@@ -0,0 +1,768 @@
+<template>
+  <div id="inventoryAllocate">
+    <el-card class="box-card">
+      <header-title title="基本信息"></header-title>
+      <el-form label-width="65px" label-position="left" class="ele-form-search">
+        <el-row :gutter="15">
+          <el-col :span="8" class="col_height">
+            <el-form-item label="拣货编码:" prop="code">
+              <template>
+                <el-input :disabled="true" v-model="params.code"></el-input>
+              </template>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" class="col_height">
+            <el-form-item label="拣货类型:" prop="warehouseId">
+              <template>
+                <el-select
+                  :disabled="isEdit"
+                  @change="allocateChange"
+                  style="width: 100%"
+                  v-model="typeId"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in typeOptions"
+                    :label="item.label"
+                    :value="item.value"
+                    :key="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" class="col_height">
+            <el-form-item label="拣货名称:" prop="name">
+              <template>
+                <el-input
+                  :disabled="isEdit"
+                  v-model="params.name"
+                  placeholder="请输入内容"
+                ></el-input>
+              </template>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div class="productBox">
+        <div class="productsList">
+          <header-title title="物品明细"></header-title>
+          <el-form
+            label-position="left"
+            class="ele-form-search"
+            @keyup.enter.native="search"
+            @submit.native.prevent
+          >
+            <el-row :gutter="10">
+              <el-col :span="12">
+                <el-form-item
+                  label-width="65px"
+                  label="所属工厂:"
+                  prop="factoryId"
+                >
+                  <el-select
+                    :disabled="isEdit"
+                    style="width: 100%"
+                    @change="factoryChange"
+                    v-model="factoryId"
+                    placeholder="请选择工厂"
+                  >
+                    <el-option
+                      v-for="item in factoryList"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item
+                  label-width="65px"
+                  label="仓库:"
+                  prop="warehouseId"
+                >
+                  <template>
+                    <el-select
+                      :disabled="isEdit"
+                      style="width: 100%"
+                      @change="outWarehouseChange"
+                      v-model="params.warehouseId"
+                      placeholder="请选择"
+                    >
+                      <el-option
+                        v-for="item in warehouseList"
+                        :disabled="item.hiden"
+                        :label="item.name"
+                        :value="item.id"
+                        :key="item.name"
+                      >
+                      </el-option>
+                    </el-select>
+                  </template>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row :gutter="15">
+              <el-col :span="18">
+                <el-input
+                  placeholder="请输入名称/编码/批次号/型号/规格/客户代号/刻码"
+                  v-model="query.keyWord"
+                  class="input-with-select"
+                >
+                  <el-button
+                    slot="append"
+                    icon="el-icon-search"
+                    type="primary"
+                    @click="getProductList"
+                    >搜索</el-button
+                  >
+                </el-input>
+              </el-col>
+              <el-col :span="6">
+                <div
+                  style="
+                    display: flex;
+                    justify-content: flex-end;
+                    margin-bottom: 10px;
+                  "
+                >
+                  <el-button
+                    @click="queryReset"
+                    icon="el-icon-refresh-left"
+                    size="small"
+                    type="primary"
+                    >重置</el-button
+                  >
+                  <el-button type="primary" @click="merge">{{
+                    typeName
+                  }}</el-button>
+                </div>
+              </el-col>
+            </el-row>
+          </el-form>
+          <el-table
+            ref="table"
+            :data="productList"
+            row-key="id"
+            @selection-change="selecctedRow"
+            tooltip-effect="dark"
+            border
+          >
+            <el-table-column
+              fixed="left"
+              align="center"
+              width="50"
+              :reserve-selection="true"
+              :selectable="checkSelectable"
+              type="selection"
+            ></el-table-column>
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="物品编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物品名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="型号"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="规格"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="货区"
+              prop="areaName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="货架"
+              prop="goodsAllocationName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="货位"
+              prop="goodsShelfName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              prop="clientCode"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="刻码"
+              prop="engrave"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="物料代号"
+              prop="materielDesignation"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+          <el-pagination
+            background
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+            :page-sizes="[10, 20, 50, 100]"
+            :page-size.sync="size"
+            :current-page.sync="page"
+            @current-change="getProductList"
+            @size-change="getProductList"
+          >
+          </el-pagination>
+        </div>
+        <div class="allocateDetails">
+          <header-title :title="`${typeName}明细`"></header-title>
+          <el-table
+            ref="detailTable"
+            :data="tableData"
+            tooltip-effect="dark"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="物品编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物品名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="型号"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="规格"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="货区"
+              prop="areaName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="货架"
+              prop="goodsAllocationName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="货位"
+              prop="goodsShelfName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              prop="clientCode"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="刻码"
+              prop="engrave"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="物料代号"
+              prop="materielDesignation"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+          <div class="submit_item">
+            <el-button type="primary" @click="submit">保存</el-button></div
+          >
+        </div>
+      </div>
+    </el-card>
+  </div>
+</template>
+<script>
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import { getCode } from '@/api/codeManagement/index.js';
+  import { getWarehouseList } from '@/api/classifyManage/itemInformation';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  export default {
+    data() {
+      return {
+        query: {},
+        typeOptions: [
+          {
+            label: '拆包',
+            value: 1
+          },
+          {
+            label: '打包',
+            value: 2
+          }
+        ],
+        warehouseList: [],
+        inTreeList: [],
+        selectionIds: [],
+        selection: [],
+        tableData: [],
+        productList: [],
+        typeId: 1,
+        typeName: '拆包',
+        currentPullAreaId: '',
+        currentPullAreaName: '',
+        currentTuneAreaId: '',
+        currentTuneAreaName: '',
+        pullLibrary: [], // 调出库
+        tuneLibrary: [], // 调入库
+        outWarehouseList: [],
+        inWarehouseList: [],
+        params: {
+          code: '',
+          name: '',
+          warehouseId: '', // 仓库ID
+          warehouseName: '' // 仓库名称
+        },
+        outCargoAreaList: [], // 调出库区列表
+        outShelvesList: [], // 调出货架列表
+        outFreightList: [], // 调出货位列表
+        inCargoAreaList: [], // 调入库区列表
+        inShelvesList: [], // 调入货架列表
+        inFreightList: [], // 调入货位列表
+        treeLoading: false,
+        currentObj: {},
+        factoryList: [],
+        isEdit: false,
+        factoryId: '', // 工厂ID
+        transferOrderId: '', // 调拨单ID
+        page: 1,
+        size: 10,
+        total: 0
+      };
+    },
+    async created() {
+      const code = await getCode('transfer_no');
+      this.params.code = code;
+      this.getFactoryList();
+      if (this.$route.query.isEdit) {
+        this.isEdit = true;
+        this.getEditInfo();
+      }
+    },
+    methods: {
+      async getEditInfo() {},
+      factoryChange() {
+        this.reset();
+        this.getTreeData();
+      },
+      search() {
+        this.getProductList();
+      },
+      reset() {
+        this.params = {
+          ...this.params
+        };
+        this.total = 0;
+        this.productList = [];
+        this.selection = [];
+        this.selectionIds = [];
+      },
+      queryReset() {
+        if (this.params.warehouseId) {
+          this.query = {};
+          this.getProductList();
+        }
+      },
+      //获取工厂列表
+      async getFactoryList() {
+        const res = await warehouseDefinition.getFactoryarea({
+          pageNum: 1,
+          size: 9999,
+          type: 1
+        });
+        this.factoryList = res.list;
+      },
+      async outWarehouseChange(val) {
+        this.outCargoAreaList = this.warehouseList.filter(
+          (item) => item.id == val
+        )[0].children;
+        this.params.warehouseName = this.warehouseList.filter(
+          (item) => item.id == val
+        )[0].name;
+        this.productList = [];
+        this.tableData = [];
+        this.selection = [];
+        this.selectionIds = [];
+        await this.getProductList();
+      },
+      async getProductList() {
+        let params = {
+          ...this.query,
+          warehouseId: this.params.warehouseId,
+          warehouseAreaId: this.params.outCargoAreaId,
+          warehouseAreaGoodsId: this.params.outShelvesId,
+          warehouseAreaGoodsShelvesId: this.params.outFreightId
+        };
+        const data = await storageApi.getPackingList({
+          ...params,
+          pageNum: this.page,
+          size: this.size
+        });
+        this.total = data.count;
+        this.productList = data.list;
+      },
+      async getTreeData() {
+        try {
+          this.treeLoading = true;
+          let res = await storageApi.getWarehouseTrees({
+            factoriesId: this.factoryId
+          });
+          this.treeLoading = false;
+          if (res?.code === '0') {
+            this.warehouseList = res.data;
+          }
+        } catch (error) {
+          console.log(error);
+        }
+        this.treeLoading = false;
+      },
+      deleted(row, index) {
+        this.tableData.splice(index, 1);
+        console.log(this.selectionIds);
+        this.selectionIds = this.selectionIds.filter((item) => item !== row.id);
+      },
+      submit() {
+        if (this.tableData.length > 0) {
+        } else {
+          this.$message.error('请调入相关数据');
+        }
+      },
+      checkSelectable(row) {
+        return !this.selectionIds.includes(row.id);
+      },
+      allocateChange(val) {
+        this.typeId = val;
+        this.typeName = this.typeOptions.filter(
+          (item) => item.value == val
+        )[0].label;
+        this.total = 0;
+        this.productList = [];
+        this.selectionIds = [];
+        this.selection = [];
+        this.tableData = [];
+        this.$refs.table.clearSelection();
+        this.getTreeData();
+      },
+      selecctedRow(val) {
+        this.selection = val;
+      },
+      async getWarehouseOptions() {
+        const { data } = await storageApi.getWarehouseTrees();
+        this.outWarehouseList = data;
+        this.inWarehouseList = data;
+      },
+      async merge() {
+        if (this.selection.length > 0) {
+          console.log(this.selection);
+          console.log(this.selectionIds);
+          let boolen = this.selection.every((item) =>
+            this.selectionIds.includes(item.id)
+          );
+          if (this.selection.length > 0 && !boolen) {
+            this.selection = this.selection.filter(
+              (item) => !this.selectionIds.includes(item.id)
+            );
+
+            console.log('this.selection---------', this.selection);
+            console.log('this.selectionIds---', this.selectionIds);
+
+            if (this.typeName == '拆包') {
+              // 拆包
+
+              // 获取包装维度
+              let packingSpecification =
+                await storageApi.getCategoryPackageDisposition({
+                  categoryIds: this.selection.map((item) => item.categoryId)
+                });
+              let packingSpecificationOption = this.selection.map((item) => {
+                return packingSpecification
+                  .filter((ite) => item.categoryId == ite.categoryId)
+                  .sort((a, b) => a.sort - b.sort);
+              });
+              let isBoolen = this.selection.every(
+                (item, index) =>
+                  item.packingUnit !==
+                  packingSpecificationOption[index][0].packageUnit
+              );
+              if (isBoolen) {
+                let list = this.selection.map((item, index) => {
+                  let splitIndex = packingSpecificationOption[index].findIndex(
+                    (ite) =>
+                      ite.conversionUnit != ite.packageUnit &&
+                      item.packingUnit == ite.conversionUnit
+                  );
+                  return {
+                    ...item,
+                    packingQuantity: 1,
+                    packingUnit:
+                      packingSpecificationOption[index][splitIndex].packageUnit,
+                    num: packingSpecificationOption[index][splitIndex]
+                      .packageCell,
+                    measureUnit:
+                      packingSpecificationOption[index][splitIndex - 1]
+                        .packageUnit,
+                    measureQuantity:
+                      packingSpecificationOption[index][splitIndex - 1]
+                        .packageCell
+                  };
+                });
+                list.forEach((item) => {
+                  for (let i = 0; i < item.num; i++) {
+                    this.tableData.push({ ...item });
+                  }
+                });
+                console.log(list);
+              } else {
+                return this.$message.error(
+                  `请选择需要正确${this.typeName}选项`
+                );
+              }
+              console.log(
+                'packingSpecificationOption-----',
+                packingSpecificationOption
+              );
+            } else {
+              // 打包
+            }
+            this.selectionIds = this.selectionIds.concat(
+              this.selection.map((item) => item.id)
+            );
+          } else {
+            this.$message.error('请选择正确的行');
+          }
+        } else {
+          this.$message.error('请选择调出物品信息');
+        }
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  #inventoryAllocate {
+    height: 100%;
+    .submit_item {
+      display: flex;
+      justify-content: flex-end;
+      align-items: center;
+      margin-top: 8px;
+      height: 40px;
+    }
+    :deep(.el-form-item__label) {
+      padding-right: 5px !important;
+    }
+    :deep(.el-card) {
+      height: 100%;
+      .el-card__body {
+        height: 100%;
+        box-sizing: border-box;
+        overflow: hidden;
+        display: flex;
+        flex-direction: column;
+      }
+    }
+    .col_height {
+      height: 45px !important;
+    }
+    .productBox {
+      display: flex;
+      flex: 1;
+      > div {
+        flex: 1;
+        overflow: hidden;
+      }
+    }
+    .selectBox {
+      padding: 20px;
+    }
+    .box-card {
+      margin: 20px;
+    }
+    .productsList {
+      margin-right: 10px;
+      display: flex;
+      flex-direction: column;
+      :deep(.el-table) {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        .el-table__body-wrapper {
+          flex: 1;
+        }
+      }
+    }
+    .allocateDetails {
+      display: flex;
+      flex-direction: column;
+      :deep(.el-table) {
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        .el-table__body-wrapper {
+          flex: 1;
+        }
+      }
+    }
+  }
+</style>

+ 230 - 0
src/views/warehouseManagement/picking/components/AssetsCell.vue

@@ -0,0 +1,230 @@
+<template>
+  <div class="assets-cell">
+    <el-form :model="item" ref="formRef" inline :show-message="false">
+      <div class="title">
+        <template v-if="type === 'detail'">
+          <el-link type="primary" @click="handleDetail(item)">{{
+            item.assetCode
+          }}</el-link>
+        </template>
+        <template v-else>{{ item.assetCode }}</template>
+        &nbsp;{{ item.assetName }}
+        <div v-if="type == 'output'">
+          当前货位:{{
+            `${item.outWarehouseAreaName}-${item.outWarehouseAreaGoodsCode}-${item.outGoodsAllocationCode}`
+          }}
+        </div>
+      </div>
+      <div class="col">
+        <div style="flex: 1">
+          <span>物品类型:{{ getDictValue('类型用途', item.assetType) }}</span>
+          <span v-for="(itm, index) in tableHeader(item.assetType)" :key="index"
+            >{{ itm.label }}:
+            <template v-if="itm.formatter">{{ itm.formatter(item) }}</template>
+            <template v-else>{{ item[itm.prop] }}</template>
+          </span>
+          <template v-if="!type">
+            <span v-if="!type" style="flex: 1; text-align: center"
+              >库存数量:{{ item.stocker
+              }}{{ item.isUnpack ? item.unit : item.minPackUnit }}</span
+            >
+            <span v-if="!type"
+              >可调拨数量:{{ item.max
+              }}{{ item.isUnpack ? item.unit : item.minPackUnit }}</span
+            >
+          </template>
+          <template v-if="type">
+            <div style="flex: 1; text-align: right; padding-right: 240px">
+              数量:{{ item.amount
+              }}{{ item.isUnpack ? item.unit : item.minPackUnit }}
+            </div></template
+          >
+        </div>
+
+        <template v-if="type == 'output'">
+          <div class="col-right">
+            选中数量
+            <el-input-number
+              v-if="item.takeStockPattern"
+              v-model="item.curAmount"
+              size="small"
+              :controls="false"
+              :min="0"
+              :max="+item.amount"
+            ></el-input-number>
+            <template v-else
+              ><el-button
+                @click="handleDetail(item)"
+                style="margin-left: 10px"
+                type="text"
+                >{{
+                  (item.curDetailReqList &&
+                    item.curDetailReqList.filter((i) => i.checked).length) ||
+                  '选择'
+                }}</el-button
+              ></template
+            >
+            <i
+              @click="$emit('handleDelete')"
+              class="el-icon-delete danger-text"
+              style="margin-left: 20px; font-size: 26px; cursor: pointer"
+            ></i>
+          </div>
+        </template>
+        <template v-if="type === 'input' || type === 'detail'">
+          <div>
+            <div>
+              <p>
+                当前货位:{{
+                  `${item.outWarehouseAreaName}-${item.outWarehouseAreaGoodsCode}-${item.outGoodsAllocationCode}`
+                }}
+              </p>
+              <p>
+                调入货位:{{
+                  `${item.inWarehouseAreaName}-${item.inWarehouseAreaGoodsCode}-${item.inGoodsAllocationCode}`
+                }}
+              </p>
+            </div>
+            <el-checkbox
+              style="margin-left: 20px"
+              v-model="item.inputChecked"
+              v-if="type != 'detail'"
+            ></el-checkbox>
+          </div>
+        </template>
+
+        <div v-if="!type">
+          调拨数量
+          <el-input-number
+            v-if="item.takeStockPattern"
+            size="small"
+            :controls="false"
+            v-model="item.amount"
+            :min="0"
+            :max="+item.max"
+          ></el-input-number>
+          <template v-else
+            ><el-button
+              @click="handleDetail(item)"
+              style="margin-left: 10px"
+              type="text"
+              >{{
+                (item.detailReqList && item.detailReqList.length) || 0 || '选择'
+              }}</el-button
+            ></template
+          >
+        </div>
+      </div>
+    </el-form>
+    <DetailDialog ref="detailRef" :type="type" />
+  </div>
+</template>
+
+<script>
+  import DetailDialog from './DetailDialog';
+  import { tableHeader } from '../../common';
+  import { mapGetters, mapActions } from 'vuex';
+  export default {
+    components: { DetailDialog },
+    props: {
+      item: {
+        type: Object,
+        default: () => ({})
+      },
+      // 新增 or 反显
+      type: {
+        type: String,
+        default: '' //view
+      },
+      checkbox: {
+        type: Boolean,
+        default: true
+      },
+      cargoSpaceId: {
+        type: [Number, String],
+        default: ''
+      }
+    },
+    data() {
+      return { tableHeader };
+    },
+    computed: {
+      ...mapGetters(['getDictValue'])
+    },
+    created() {
+      this.requestDict('类型用途');
+    },
+    methods: {
+      ...mapActions('dict', ['requestDict']),
+      handleDetail(item) {
+        this.$refs.detailRef.open(item, this.cargoSpaceId, (res) => {
+          if (this.type === 'output') {
+            this.$set(item, 'curDetailReqList', res);
+          } else {
+            this.$set(
+              item,
+              'detailReqList',
+              res.filter((i) => i.checked)
+            );
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .assets-cell {
+    color: #555;
+  }
+  .title {
+    font-size: 16px;
+    text-align: left;
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 5px;
+  }
+  ::v-deep.col {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    font-size: 14px;
+    background-color: rgba(242, 242, 242, 1);
+    padding: 10px;
+    white-space: nowrap;
+    .el-form-item {
+      margin-bottom: 0 !important;
+    }
+    .el-input {
+      width: 100px;
+    }
+    > div {
+      margin-right: 12px;
+      display: flex;
+      align-items: center;
+    }
+    span + span {
+      margin-left: 18px;
+    }
+    .el-input-number {
+      margin-left: 10px;
+      width: 100px !important;
+    }
+    .edit {
+      flex: 1;
+      text-align: right;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+      .cargo-space {
+        margin-right: 20px;
+      }
+    }
+    .col-right {
+      width: 200px;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+</style>

+ 181 - 0
src/views/warehouseManagement/picking/components/CargoSpaceInfoDialog.vue

@@ -0,0 +1,181 @@
+<template>
+  <el-dialog :visible.sync="visible" center append-to-body width="900px">
+    <div slot="title" class="dialog-title">
+      选择
+      <span>货位{{ cargoSpace }}</span>
+    </div>
+    <div class="tool-box">
+      <el-input v-model="searchVal" placeholder="编码、名称"></el-input>
+      <div>选中调拨 {{ selected }}/{{ sum }} 项</div>
+    </div>
+    <div class="scroll-wrapper">
+      <AssetsCell
+        v-for="(item, index) in showList"
+        :key="index"
+        :item="item"
+        :cargoSpaceId="warehouse.cargoSpaceId"
+      />
+      <el-empty description="暂无数据" v-if="!tableData.length"></el-empty>
+    </div>
+    <div slot="footer" style="text-align: right">
+      <el-button type="primary" @click="confirm">确认添加</el-button>
+      <el-button @click="cancel">返回</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+// import { getGoodsInfo } from '@/api/stockManagement/inventoryAllocation'
+import AssetsCell from './AssetsCell'
+export default {
+  components: { AssetsCell },
+  inject: {
+    parentOpt: { value: 'parentOpt', default: null }
+  },
+  props: {},
+  data () {
+    return {
+      searchVal: '',
+      visible: false,
+      tableData: [],
+      cargoSpace: '',
+      warehouse: {}
+    }
+  },
+  computed: {
+    showList () {
+      if (this.searchVal) {
+        return this.tableData.filter(({ batchNum, assetName, assetCode }) => {
+          return (
+            String(assetName).indexOf(this.searchVal) != -1 ||
+            String(assetCode).indexOf(this.searchVal) != -1
+          )
+        })
+      }
+      return this.tableData
+    },
+    sum () {
+      let sum = 0
+      this.tableData.forEach(item => {
+        sum += +item.amount
+      })
+      return sum
+    },
+    selected () {
+      let sum = 0
+      this.tableData.forEach(item => {
+        if (item.takeStockPattern) {
+          sum += +item.amount
+        } else {
+          sum += item.detailReqList?.length || 0
+        }
+      })
+      return sum
+    }
+  },
+  methods: {
+    async open (warehouse) {
+      this.warehouse = warehouse
+      this.cargoSpace =
+        warehouse.warehouseName +
+        '-' +
+        warehouse.areaName +
+        '-' +
+        warehouse.shelfCode +
+        '-' +
+        warehouse.cargoSpaceCode
+      this.visible = true
+      const assetsList = (this.parentOpt && this.parentOpt().assetsList) || []
+      const preAssetsList =
+        (this.parentOpt && this.parentOpt().preAssetsList) || []
+      const res = await getGoodsInfo({ cargoSpaceId: warehouse.cargoSpaceId })
+      if (res?.success) {
+        this.tableData = res.data.map(i => {
+          // 唯一id 添加相同判断
+          i.curId = warehouse.cargoSpaceId + i.assetCode
+
+          let preAmount = 0
+          let tempAmount = 0
+
+          // 预调入数量需展示,但不可修改,展示剩余可调拨
+          const index1 = preAssetsList.findIndex(item => item.curId === i.curId)
+          if (index1 > -1) {
+            preAmount = preAssetsList[index1].amount
+          }
+
+          i.stocker = +i.amount
+
+          i.amount = 0
+
+          const index = assetsList.findIndex(item => item.curId === i.curId)
+          if (index > -1) {
+            tempAmount = assetsList[index].amount
+          }
+
+          i.max = i.stocker - preAmount - tempAmount
+
+          delete i.id
+          return i
+        })
+      }
+    },
+    confirm () {
+      const selection = this.tableData.filter(item => {
+        Object.assign(item, this.warehouse)
+        if (!item.takeStockPattern) {
+          item.amount = item.detailReqList?.length
+        }
+        return item.amount > 0
+      })
+      if (!selection.length) {
+        this.$message.error(`请至少选择一条数据`)
+        return
+      }
+
+      this.$emit('success', selection)
+      this.cancel()
+    },
+    cancel () {
+      this.visible = false
+      this.tableData = []
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep.scroll-wrapper {
+  height: 40vh;
+  overflow: auto;
+
+  .assets-cell {
+    & + .assets-cell {
+      margin-top: 10px;
+    }
+  }
+}
+::v-deep.tool-box {
+  text-align: right;
+  padding-right: 20px;
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 20px;
+  .el-input {
+    width: 320px;
+    margin-right: 20px;
+  }
+}
+.dialog-title {
+  color: #fff;
+  text-align: left;
+  position: relative;
+
+  span {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    font-size: 14px;
+  }
+}
+</style>

+ 275 - 0
src/views/warehouseManagement/picking/components/DetailDialog.vue

@@ -0,0 +1,275 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    center
+    append-to-body
+    width="900px"
+    :close-on-click-modal="false"
+  >
+    <div slot="title" class="dialog-title">
+      选择
+      <span>{{ row.assetName }}-{{ row.assetCode }}</span>
+    </div>
+    <div class="tool-box">
+      <el-input v-model="searchVal" placeholder="编码、批次"></el-input>
+      <div v-if="type != 'detail'">
+        已选 {{ tableData.filter(item => item.checked).length }}/{{
+          tableData.length
+        }}<el-checkbox
+          v-model="checkAll"
+          style="margin-left: 10px"
+        ></el-checkbox>
+      </div>
+    </div>
+    <div class="scroll-wrapper">
+      <div class="assets-cell" v-for="(item, index) in showList" :key="index">
+        <div class="title">{{ item.onlyCode }}</div>
+        <div class="col">
+          <div>
+            <span>批次号:{{ item.batchNo }}</span>
+            <span
+              v-for="(itm, index) in tableHeader(item.assetType)"
+              :key="index"
+              >{{ itm.label }}:
+              <template v-if="itm.formatter">{{
+                itm.formatter(item)
+              }}</template>
+              <template v-else>{{ item[itm.prop] }}</template>
+            </span>
+            <span
+              >最小单元:{{
+                `${item.measurementUnit || ''}${item.unit}/${item.minPackUnit}`
+              }}</span
+            >
+            <span>包装编码:{{ item.num }}</span>
+            <span>入库天数:{{ item.day }}</span>
+            <span style="width: 50%"
+              >{{ item.manufactureTime ? '生产日期' : '采购日期' }}:{{
+                item.manufactureTime || item.procurementTime
+              }}</span
+            >
+            <span style="width: 50%">过期日期:{{ item.expirationTime }}</span>
+          </div>
+          <el-checkbox
+            v-model="item.checked"
+            :disabled="!!item.disabled"
+            v-if="type != 'detail'"
+          ></el-checkbox>
+        </div>
+      </div>
+      <el-empty description="暂无数据" v-if="!tableData.length"></el-empty>
+    </div>
+    <div
+      slot="footer"
+      style="text-align: right"
+      v-if="type != 'input' && type != 'detail'"
+    >
+      <el-button type="primary" @click="confirm">确认添加</el-button>
+      <el-button @click="cancel">返回</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+// import { getGoodsSingle } from '@/api/stockManagement/inventoryAllocation'
+import AssetsCell from './AssetsCell'
+import { tableHeader } from '../../common'
+import { deepClone } from '@/utils'
+export default {
+  components: { AssetsCell },
+  inject: {
+    parentOpt: { value: 'parentOpt', default: null }
+  },
+  props: {
+    // 新增 or 反显
+    type: {
+      type: String,
+      default: '' //新增
+    }
+  },
+  data () {
+    return {
+      tableHeader,
+      searchVal: '',
+      visible: false,
+      tableData: [],
+      cargoSpace: '',
+      row: {},
+      callback: null
+    }
+  },
+  computed: {
+    checkAll: {
+      get () {
+        return this.showList.every(item => item.checked)
+      },
+      set (val) {
+        this.showList.forEach(item => {
+          item.checked = val
+        })
+      }
+    },
+    showList () {
+      if (this.searchVal) {
+        return this.tableData.filter(({ batchNum, assetName, assetCode }) => {
+          return (
+            String(batchNum).indexOf(this.searchVal) != -1 ||
+            String(onlyCode).indexOf(this.searchVal) != -1
+          )
+        })
+      }
+      return this.tableData
+    }
+  },
+  methods: {
+    async open (row, cargoSpaceId, callback) {
+      this.row = row
+      this.callback = callback
+      this.visible = true
+
+      const preAssetsList =
+        (this.parentOpt && this.parentOpt().preAssetsList) || []
+      const assetsList = (this.parentOpt && this.parentOpt().assetsList) || []
+
+      const disabledDetailReqList = [
+        ...(preAssetsList.find(i => i.curId == row.curId)?.detailReqList || []),
+        ...(assetsList.find(i => i.curId == row.curId)?.detailReqList || [])
+      ]
+      if (!this.type) {
+        const res = await getGoodsSingle({
+          assetCode: row.assetCode,
+          assetType: row.assetType,
+          cargoSpaceId: cargoSpaceId
+        })
+        if (res?.success) {
+          this.tableData = res.data
+            .map(i => {
+              i.checked = false
+              i.batchNo = i.batchNum
+              if (
+                this.row.detailReqList?.length &&
+                this.row.detailReqList.find(itm => itm.id == i.id)
+              ) {
+                i.checked = true
+              }
+
+              if (disabledDetailReqList.find(p => p.onlyCode == i.onlyCode)) {
+                i.checked = false
+                i.disabled = true
+              }
+              return i
+            })
+            .filter(i => !i.disabled)
+        }
+      } else {
+        // 反显
+        const reList =
+          this.type == 'output' ? 'curDetailReqList' : 'detailReqList' //反显列表
+        this.tableData = deepClone(this.row[reList])
+      }
+    },
+    confirm () {
+      let selection = []
+      if (this.type === 'output') {
+        selection = this.tableData
+      } else {
+        selection = this.tableData.filter(i => i.checked)
+      }
+      this.callback && this.callback(selection)
+      this.cancel()
+    },
+    cancel () {
+      this.visible = false
+      this.tableData = []
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep.scroll-wrapper {
+  height: 40vh;
+  overflow: auto;
+
+  .assets-cell {
+    & + .assets-cell {
+      margin-top: 10px;
+    }
+  }
+}
+::v-deep.tool-box {
+  text-align: right;
+  padding-right: 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 10px;
+  .el-input {
+    width: 320px;
+    margin-right: 20px;
+  }
+}
+.dialog-title {
+  color: #fff;
+  text-align: left;
+  position: relative;
+
+  span {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    font-size: 14px;
+  }
+}
+.assets-cell {
+  color: #555;
+}
+.title {
+  font-size: 16px;
+  text-align: left;
+}
+::v-deep.col {
+  display: flex;
+  justify-content: space-between;
+  padding-right: 20px;
+  align-items: center;
+  font-size: 14px;
+  white-space: nowrap;
+  .el-form-item {
+    margin-bottom: 0 !important;
+  }
+  .el-input {
+    width: 100px;
+  }
+  > div {
+    flex: 1;
+    background-color: rgba(242, 242, 242, 1);
+    margin-right: 12px;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    padding: 10px 10px 0;
+    > span {
+      display: inline-block;
+      width: 20%;
+      margin-right: 20px;
+      margin-bottom: 10px;
+    }
+  }
+  .edit {
+    flex: 1;
+    text-align: right;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    .cargo-space {
+      margin-right: 20px;
+    }
+    .el-input-number {
+      margin-left: 10px;
+      width: 100px;
+    }
+  }
+}
+</style>

+ 241 - 0
src/views/warehouseManagement/picking/components/WareHouseAllocationDailog.vue

@@ -0,0 +1,241 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    title="选择货位"
+    @before-close="cancel"
+    width="874px"
+  >
+    <el-form :model="formData" label-width="100px">
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="选择仓库">
+            {{ formData.warehouse.name }}
+          </el-form-item></el-col
+        >
+        <el-col :span="8">
+          <el-form-item label="选择库区">
+            <el-select filterable v-model="area">
+              <el-option
+                v-for="(item, index) in areaList"
+                :key="index"
+                :label="item.areaCode"
+                :value="item.areaId"
+                @click.native="() => (formData.area = item)"
+              ></el-option>
+            </el-select> </el-form-item
+        ></el-col>
+        <el-col :span="8">
+          <el-form-item label="选择货架">
+            <el-select filterable v-model="shelves">
+              <el-option
+                v-for="(item, index) in shelvesList"
+                :key="index"
+                :label="item.goodsshelvesCode"
+                :value="item.goodsshelvesId"
+                @click.native="() => (formData.shelves = item)"
+              ></el-option>
+            </el-select> </el-form-item
+        ></el-col>
+      </el-row>
+    </el-form>
+    <div class="status-legend">
+      <div
+        v-for="(item, index) in warehouseDefinition_locationStatus"
+        :key="index"
+      >
+        <span :style="{ 'background-color': item.color }"></span
+        >{{ item.label }}
+      </div>
+    </div>
+    <div class="content-box">
+      <div
+        v-for="p in locationList"
+        :key="p.id"
+        class="box"
+        @click="handleSelect(p)"
+        :style="{
+          'background-color': getStatus(p.allocationStatus).color,
+          cursor: [1, 2].includes(p.allocationStatus)
+            ? 'pointer'
+            : 'not-allowed'
+        }"
+      >
+        {{ p.goodsAllocationCode }}
+      </div>
+      <div class="placeholder-box"></div>
+      <div class="placeholder-box"></div>
+      <div class="placeholder-box"></div>
+      <div class="placeholder-box"></div>
+    </div>
+    <template slot="footer">
+      <el-button @click="cancel">关闭</el-button>
+    </template>
+    <CargoSpaceInfoDialog
+      ref="CargoSpaceInfoRef"
+      :assetsList="assetsList"
+      :prAssetsList="prAssetsList"
+      @success="cargoSpaceInfoConfirm"
+    />
+  </el-dialog>
+</template>
+
+<script>
+  // import { getWarehouseChildren } from '@/api/stockManagement/outgoingManagement'
+  import { warehouseDefinition_locationStatus } from '@/utils/dict/warehouseDefinition';
+  import CargoSpaceInfoDialog from './CargoSpaceInfoDialog.vue';
+  import { useDict } from '@/utils/dict/index';
+  import { deepClone } from '@/utils/index';
+  export default {
+    components: {
+      CargoSpaceInfoDialog
+    },
+    props: {
+      warehouseObj: {
+        type: Object,
+        default: () => ({})
+      }
+    },
+    data() {
+      return {
+        warehouseDefinition_locationStatus,
+        visible: false,
+        value: '',
+        row: {},
+        formData: {
+          warehouse: {
+            id: '',
+            name: ''
+          },
+          area: {
+            areaId: '',
+            areaName: ''
+          },
+          shelves: {
+            goodsshelvesId: '',
+            goodsshelvesCode: ''
+          }
+        },
+        warehouse: '',
+        area: '',
+        shelves: '',
+        warehouseList: [],
+        inOrOut: '', //调入调出
+        assetsList: [], //调出已选
+        prAssetsList: [] //预调出已选
+      };
+    },
+    computed: {
+      areaList() {
+        this.area = '';
+        this.shelves = '';
+        return (
+          this.warehouseList.find((i) => i.id === this.formData.warehouse.id)
+            ?.wareHouseArea || []
+        );
+      },
+      shelvesList() {
+        this.shelves = '';
+        return (
+          this.areaList.find((i) => i.areaId === this.area)
+            ?.wareHouseGoodsshelves || []
+        );
+      },
+      locationList() {
+        return (
+          this.shelvesList.find((i) => i.goodsshelvesId === this.shelves)
+            ?.wareHouseGoodsAllocation || []
+        );
+      }
+    },
+    created() {
+      this._getWarehouseChildren();
+    },
+    methods: {
+      getStatus: useDict(warehouseDefinition_locationStatus),
+      open(type, warehouse) {
+        this.inOrOut = type;
+        this.formData.warehouse = warehouse;
+        this.visible = true;
+      },
+      // 选中货位
+      handleSelect(p) {
+        if (![1, 2].includes(p.allocationStatus)) {
+          return;
+        }
+        const { warehouse, area, shelves } = this.formData;
+
+        const data = {
+          warehouseId: warehouse.id,
+          warehouseName: warehouse.name,
+          areaId: area.areaId,
+          areaName: area.areaName,
+          shelfId: shelves.goodsshelvesId,
+          shelfCode: shelves.goodsshelvesCode,
+          cargoSpaceId: p.goodsAllocationId,
+          cargoSpaceCode: p.goodsAllocationCode
+        };
+        if (this.inOrOut === 'output') {
+          this.$refs.CargoSpaceInfoRef.open(data);
+        } else {
+          this.$emit('inputSuccess', data);
+          this.cancel();
+        }
+      },
+      // 选中货位上资产
+      cargoSpaceInfoConfirm(list) {
+        this.$emit('outputSuccess', list);
+        this.cancel();
+      },
+      async _getWarehouseChildren() {
+        const res = await getWarehouseChildren();
+        if (res?.success) {
+          this.warehouseList = res.data;
+        }
+      },
+      cancel() {
+        this.row = {};
+        this.area = '';
+        this.shelves = '';
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .status-legend {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 12px 0;
+    div {
+      margin: 0 12px;
+    }
+    span {
+      display: inline-block;
+      width: 13px;
+      height: 13px;
+      margin: 0 4px;
+    }
+  }
+
+  .content-box {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    max-height: 40vh;
+    overflow: auto;
+    .box {
+      cursor: pointer;
+      width: 134px;
+      height: 64px;
+      background-clip: content-box;
+      margin-bottom: 4px;
+      line-height: 64px;
+      text-align: center;
+    }
+    .placeholder-box {
+      width: 134px;
+    }
+  }
+</style>

+ 186 - 0
src/views/warehouseManagement/picking/components/inventory-search.vue

@@ -0,0 +1,186 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="80px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="所属工厂" prop="factoryId">
+          <el-select
+            filterable
+            placeholder="请选择"
+            @change="getTreeData"
+            v-model="where.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-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="仓库" prop="sourceWarehouse">
+          <el-select
+            filterable
+            placeholder="请选择"
+            v-model="where.warehouseId"
+            clearable
+            class="w100"
+          >
+            <el-option
+              v-for="item in warehouseList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品名称:">
+          <el-input
+            clearable
+            v-model="where.categoryName"
+            placeholder="请输入物品名称"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品编码:">
+          <el-input
+            clearable
+            v-model="where.categoryCode"
+            placeholder="请输入物品编码"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { login } from '@/api/login';
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import { allocationType } from '@/utils/dict/warehouse';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        allotCode: '',
+        type: '',
+        status: '',
+        factoryId: '',
+        categoryName: '',
+        categoryCode: '',
+        targetWarehouse: '',
+        sourceWarehouse: ''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere },
+        treeLoading: false,
+        allocationType,
+        treeData: [],
+        factoryList: [],
+        warehouseList: [],
+        stutusOptions: [
+          {
+            value: 0,
+            label: '未提交'
+          },
+          {
+            value: 1,
+            label: '审核中'
+          },
+          {
+            value: 2,
+            label: '已完成'
+          }
+        ]
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {
+      this.getFactoryList();
+    },
+    methods: {
+      async getTreeData(val) {
+        this.where.warehouseId = '';
+        try {
+          this.treeLoading = true;
+          let res = await storageApi.getWarehouseTrees({
+            factoriesId: val
+          });
+          this.treeLoading = false;
+          if (res?.code === '0') {
+            this.warehouseList = res.data;
+          }
+        } catch (error) {
+          console.log(error);
+        }
+        this.treeLoading = false;
+      },
+      //获取工厂列表
+      async getFactoryList() {
+        const res = await warehouseDefinition.getFactoryarea({
+          pageNum: 1,
+          size: 9999,
+          type: 1
+        });
+        this.factoryList = res.list;
+      },
+      /* 搜索 */
+      search() {
+        console.log(this.where);
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .ele-form-actions {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+  }
+</style>

+ 407 - 0
src/views/warehouseManagement/picking/details.vue

@@ -0,0 +1,407 @@
+<template>
+  <div class="content-height p20">
+    <div class="page-title">
+      <PageHeader title="调拨详情"> </PageHeader>
+    </div>
+    <div>
+      <StatusStep :activeCode="infoData.auditStatus" :statusList="statusList" />
+      <div class="content-detail mt10">
+        <div class="basic-details">
+          <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+        </div>
+        <div class="mt20">
+          <el-form label-width="110px">
+            <el-col :span="8">
+              <el-form-item label="调拨名称">
+                <span>{{ infoData.name }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="调拨单号">
+                <span>{{ infoData.id }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="创建人">
+                <span>{{ infoData.allotName }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="创建时间">
+                <span>{{ infoData.createTime }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="调拨类型">
+                <span>{{
+                  allocationType.filter((item) => item.code == infoData.type)[0]
+                    .label
+                }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="调出库">
+                <span>{{ infoData.sourceWarehouse }}</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="调入库">
+                <span>{{ infoData.targetWarehouse }}</span>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </div>
+      </div>
+      <div
+        v-if="infoData.type == 2"
+        class="content-detail mt20"
+        style="height: 500px"
+      >
+        <HeaderTitle title="流程图" size="16px"></HeaderTitle>
+        <my-process-viewer
+          key="designer"
+          v-model="bpmnXML"
+          v-bind="bpmnControlForm"
+          :activityData="activityList"
+          :processInstanceData="processInstance"
+          :taskData="tasks"
+        />
+      </div>
+      <div class="content-detail mt20">
+        <HeaderTitle title="调拨明细" size="16px"></HeaderTitle>
+        <div class="mt20">
+          <!-- <AssetsCell
+            v-for="(item, index) in detailList"
+            :key="index"
+            :item="item"
+            type="detail"
+          /> -->
+          <el-table
+            ref="table"
+            :data="detailList"
+            tooltip-effect="dark"
+            :max-height="500"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="物品编码"
+              prop="categoryCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物品名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="调出仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调出库区"
+              prop="areaName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调出货架"
+              prop="goodsShelfName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调出货位"
+              prop="goodsAllocationName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调入仓库"
+              prop="targetWarehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调入库区"
+              prop="targetAreaName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调入货架"
+              prop="targetGoodsShelfName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="调入货位"
+              prop="targetGoodsAllocationName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="牌号"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="型号"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import AssetsCell from './components/AssetsCell';
+  import {
+    getProcessInstance,
+    getTaskListByProcessInstanceId,
+    getProcessDefinitionBpmnXML,
+    getActivityList
+  } from '@/api/bpm/index';
+  // import { getDetail } from '@/api/stockManagement/inventoryAllocation'
+  import PageHeader from '@/components/PageHeader';
+  import { allocationType } from '@/utils/dict/warehouse';
+  import { useDictLabelFilter } from '@/utils/dict';
+  import StatusStep from '@/components/StatusStep/index.vue';
+
+  export default {
+    components: { AssetsCell, StatusStep, PageHeader },
+    data() {
+      return {
+        allocationType,
+        auditStatus: [
+          { code: 0, label: '未提交', class: 'danger-text' },
+          { code: 1, label: '审核中', class: 'primary-text' },
+          { code: 2, label: '已完成', class: 'primary-text' }
+        ],
+        detailList: [],
+        infoData: {},
+        // 流程实例
+        id: undefined, // 流程实例的编号
+        processInstance: {},
+
+        // BPMN 数据
+        bpmnXML: null,
+        bpmnControlForm: {
+          prefix: 'flowable'
+        },
+        activityList: [],
+        // 审批记录
+        tasksLoad: true,
+        tasks: []
+      };
+    },
+    created() {
+      this._getDetail();
+    },
+    filters: {
+      dictFilter: useDictLabelFilter
+    },
+    computed: {
+      statusList() {
+        const base = [{ label: '创建' }];
+        console.log(this.infoData.auditStatus, 'this.infoData.auditStatus');
+        base.push({ code: 1, label: '审核中' });
+        if (this.infoData.auditStatus == 0) {
+          base.push({ code: 0, label: '未提交', activeColor: '#cc3300' });
+        } else {
+          if ([2].includes(this.infoData.auditStatus)) {
+            base.push({ code: 2, label: '已完成', activeColor: '#157a2c' });
+          }
+        }
+        console.log(base, 'base');
+        return base;
+      }
+    },
+    methods: {
+      /** 获得流程实例 */
+      getDetail(id) {
+        // 获得流程实例相关
+        this.processInstanceLoading = true;
+        getProcessInstance(id).then((response) => {
+          if (!response) {
+            this.$message.error('查询不到流程信息!');
+            return;
+          }
+          // 设置流程信息
+          this.processInstance = response;
+
+          // //将业务表单,注册为动态组件
+          // const path = this.processInstance.processDefinition.formCustomViewPath;
+          // Vue.component("async-biz-form-component", function (resolve) {
+          //   require([`@/views${path}`], resolve);
+          // });
+          // 加载流程图
+          getProcessDefinitionBpmnXML(
+            this.processInstance.processDefinition.id
+          ).then((response) => {
+            this.bpmnXML = response;
+          });
+          // 加载活动列表
+          getActivityList({
+            processInstanceId: this.processInstance.id
+          }).then((response) => {
+            console.log(response, 'response');
+            this.activityList = response;
+          });
+
+          // 取消加载中
+          this.processInstanceLoading = false;
+        });
+
+        // 获得流程任务列表(审批记录)
+        this.tasksLoad = true;
+        getTaskListByProcessInstanceId(id).then((response) => {
+          // 审批记录
+          this.tasks = [];
+          // 移除已取消的审批
+          response.forEach((task) => {
+            if (task.result !== 4) {
+              this.tasks.push(task);
+            }
+          });
+          // 排序,将未完成的排在前面,已完成的排在后面;
+          this.tasks.sort((a, b) => {
+            // 有已完成的情况,按照完成时间倒序
+            if (a.endTime && b.endTime) {
+              return b.endTime - a.endTime;
+            } else if (a.endTime) {
+              return 1;
+            } else if (b.endTime) {
+              return -1;
+              // 都是未完成,按照创建时间倒序
+            } else {
+              return b.createTime - a.createTime;
+            }
+          });
+
+          // 需要审核的记录
+          const userId = store.getters.userId;
+          this.tasks.forEach((task) => {
+            if (task.result !== 1 && task.result !== 6) {
+              // 只有待处理才需要
+              return;
+            }
+            if (!task.assigneeUser || task.assigneeUser.id !== userId) {
+              // 自己不是处理人
+              return;
+            }
+          });
+
+          // 取消加载中
+          this.tasksLoad = false;
+        });
+      },
+      async _getDetail() {
+        const res = await storageApi.getAllotDetailList({
+          applyId: this.$route.query.id
+        });
+        const data = await storageApi.getAllotDetail(this.$route.query.id);
+        console.log(res);
+        console.log(data);
+        this.infoData = data;
+        this.getDetail(data.flowableTaskId);
+        if (this.infoData.type == 1) {
+          // 库内调拨
+          this.infoData.auditStatus = 2;
+        } else {
+          // 库外调拨
+          this.infoData.auditStatus = data.status;
+        }
+        this.detailList = res.map((item) => {
+          return {
+            ...item,
+            categoryCode: this.infoData.categoryCode,
+            categoryName: this.infoData.categoryName,
+            brandNum: this.infoData.brandNum,
+            categoryModel: this.infoData.model,
+            specification: this.infoData.specification
+          };
+        });
+        // if (res?.success) {
+        //   this.infoData = res.data.conventionalStockTransfer;
+        //   this.detailList = res.data.stockTransferInfoList.map((i) => ({
+        //     batchNum: i.batchNo,
+        //     ...i
+        //   }));
+        // }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  :deep(.el-form-item) {
+    margin-bottom: 0 !important;
+  }
+  .p20 {
+    padding: 20px;
+  }
+  .mt40 {
+    margin-top: 40px;
+  }
+
+  .mt20 {
+    margin-top: 20px;
+  }
+  .content-detail {
+    overflow: hidden;
+  }
+  .content-height {
+    height: auto;
+    background: #fff;
+  }
+</style>

+ 240 - 0
src/views/warehouseManagement/picking/index.vue

@@ -0,0 +1,240 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <inventory-search @search="reload"> </inventory-search>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable"
+      >
+        <template v-slot:toolbar>
+          <el-button icon="el-icon-plus" type="primary" @click="add"
+            >新建</el-button
+          >
+        </template>
+        <template v-slot:action="{ row }">
+          <el-link
+            v-if="row.status == 0 && row.type == 2"
+            type="primary"
+            :underline="false"
+            icon="el-icon-view"
+            @click="submit(row)"
+          >
+            提交
+          </el-link>
+          <el-link
+            v-if="row.status == 0"
+            type="primary"
+            :underline="false"
+            icon="el-icon-view"
+            @click="edit(row)"
+          >
+            修改
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-view"
+            @click="goDetail(row)"
+          >
+            详情
+          </el-link>
+          <el-link
+            v-if="row.status == 0"
+            type="primary"
+            :underline="false"
+            icon="el-icon-delete"
+            @click="deleted(row)"
+          >
+            删除
+          </el-link>
+        </template>
+      </ele-pro-table>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import { allocationType } from '@/utils/dict/warehouse';
+  import storageApi from '@/api/warehouseManagement/index.js';
+  import InventorySearch from './components/inventory-search.vue';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { pageRoles } from '@/api/system/role';
+  export default {
+    components: {
+      InventorySearch
+    },
+    data() {
+      return {
+        allocationType,
+        stutusOptions: {
+          0: '未提交',
+          1: '审核中',
+          2: '已完成'
+        },
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '调拨名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'allotCode',
+            label: '调拨单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'type',
+            label: '调拨类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (row, column, cellValue) => {
+              return this.allocationType.filter(
+                (item) => item.code == row.type
+              )[0].label;
+            }
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sourceWarehouse',
+            label: '来源仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'targetWarehouse',
+            label: '目标仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'allotName',
+            label: '调拨人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'createTime',
+            label: '调拨时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (row, column, cellValue) => {
+              return this.stutusOptions[row.status];
+            }
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 300,
+            align: 'center',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+        // 加载状态
+        loading: false
+      };
+    },
+    computed: {},
+    methods: {
+      // 删除
+      async deleted(row) {
+        const data = await storageApi.deleteAllot([row.id]);
+        if (data.code == '0') {
+          this.$message.success('删除成功!');
+          this.reload();
+        }
+      },
+      // 提交
+      submit(row) {
+        storageApi
+          .submitAllot({
+            id: row.id,
+            enterVerifyUserId: row.sourceWarehouseUserId,
+            outVerifyUserId: row.targetWarehouseUserId
+          })
+          .then(() => {
+            this.$message({
+              type: 'success',
+              message: '提交成功'
+            });
+            this.reload();
+          });
+      },
+      // 修改
+      edit(row) {
+        this.$router.push({
+          path: '/warehouseManagement/inventoryAllocation/add',
+          query: { isEdit: true, id: row.id }
+        });
+      },
+      // 新建
+      add() {
+        this.$router.push({
+          path: '/warehouseManagement/picking/add'
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return storageApi.getAllotApplyPage({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+      // 详情
+      goDetail(row) {
+        this.$router.push({
+          path: '/warehouseManagement/inventoryAllocation/details',
+          query: { id: row.id }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 7 - 0
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -257,6 +257,13 @@
                 align: 'center'
               }
             : '',
+          this.selectedDime == 2
+            ? {
+                prop: 'supplierName',
+                label: '供应商',
+                align: 'center'
+              }
+            : '',
           {
             prop: 'level',
             label: '级别',

Разница между файлами не показана из-за своего большого размера
+ 529 - 225
src/views/warehouseManagement/stockManagement/add.vue


+ 7 - 0
src/views/warehouseManagement/stockManagement/components/priceMaintenanceDialog.vue

@@ -57,6 +57,13 @@
           :show-overflow-tooltip="true"
         >
         </el-table-column>
+        <el-table-column
+          label="供应商"
+          prop="supplierName"
+          align="center"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
         <el-table-column
           label="最小包装单元"
           align="center"

+ 759 - 0
src/views/warehouseManagement/stocktaking/reportLoss/components/addReportDialog.vue

@@ -0,0 +1,759 @@
+<template>
+  <el-dialog
+    :visible.sync="dialogVisible"
+    :title="dialogTile"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    v-loading="addDialogLoading"
+    width="80%"
+  >
+    <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+    <el-form
+      :model="addForm"
+      class="add_form"
+      ref="addFormRef"
+      :rules="rules"
+      label-width="110px"
+    >
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="编码" prop="code">
+            <el-input
+              v-model="addForm.code"
+              placeholder="自动生成"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="名称" prop="name">
+            <el-input
+              :disabled="isBindPlan"
+              v-model="addForm.name"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <!-- <el-col :span="6">
+          <el-form-item label="审核人" prop="approvalUserId">
+            <el-select
+              v-model="addForm.approvalUserId"
+              size="small"
+              style="width: 100%"
+              @change="changeApprovalUser"
+              :disabled="isBindPlan"
+              filterable
+            >
+              <el-option
+                v-for="item in uerList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col> -->
+        <el-col :span="6">
+          <el-form-item label="报损报溢部门" prop="executeGroupId">
+            <deptSelect
+              :isBindPlan="isBindPlan"
+              v-model="addForm.executeGroupId"
+              @changeGroup="searchDeptNodeClick"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="报损报溢人" prop="executorId">
+            <el-select
+              v-model="addForm.executorId"
+              @change="changeExecutor"
+              :disabled="isBindPlan"
+              size="small"
+              style="width: 100%"
+              filterable
+            >
+              <el-option
+                v-for="item in executorList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input
+              placeholder="请输入"
+              type="textarea"
+              :rows="2"
+              resize="none"
+              v-model="addForm.remark"
+              :disabled="isBindPlan"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <div v-if="addForm.status == 1" style="height: 300px">
+        <HeaderTitle title="流程图" size="16px"></HeaderTitle>
+        <my-process-viewer
+          key="designer"
+          v-model="bpmnXML"
+          v-bind="bpmnControlForm"
+          :activityData="activityList"
+          :processInstanceData="processInstance"
+          :taskData="tasks"
+        />
+      </div>
+
+      <HeaderTitle title="报损报溢工单物品信息" size="16px">
+        <el-button
+          v-if="!isBindPlan"
+          style="margin-left: 10px"
+          type="primary"
+          @click="addProducts"
+          >添加物品</el-button
+        >
+      </HeaderTitle>
+      <el-table
+        ref="table"
+        :data="productList"
+        :max-height="500"
+        row-key="id"
+        tooltip-effect="dark"
+        border
+      >
+        <el-table-column width="55px" label="序号" type="index">
+        </el-table-column>
+        <el-table-column
+          prop="code"
+          label="盘点单号"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="planName"
+          label="计划名称"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column label="产品分类" width="180">
+          <template slot-scope="scope">
+            <el-popover trigger="hover" placement="right">
+              <el-table
+                :data="scope.row.planDetailVOList"
+                :max-height="500"
+                border
+              >
+                <el-table-column label="序号" type="index" width="50">
+                </el-table-column>
+                <el-table-column
+                  label="状态"
+                  prop="status"
+                  :show-overflow-tooltip="true"
+                >
+                  <template slot-scope="{ row }">
+                    {{
+                      row.status > 0
+                        ? statusOption.filter(
+                            (item) => item.value == row.status
+                          )[0].label
+                        : ''
+                    }}
+                  </template>
+                </el-table-column>
+                <el-table-column label="数量" :show-overflow-tooltip="true">
+                  <template slot-scope="{ row }">
+                    {{
+                      row.status > 0
+                        ? row[
+                            statusOption.filter(
+                              (item) => item.value == row.status
+                            )[0].numKey
+                          ]
+                        : 0
+                    }}
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  width="150"
+                  label="物品名称"
+                  prop="categoryName"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+                <el-table-column
+                  label="批次号"
+                  prop="batchNo"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+                <el-table-column
+                  width="150"
+                  label="包装编码"
+                  prop="packageNo"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+                <el-table-column
+                  label="包装数量"
+                  prop="info.packingCountBase"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+                <el-table-column
+                  label="包装单位"
+                  prop="info.packingUnit"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+                <el-table-column
+                  label="重量"
+                  prop="info.weight"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  label="重量单位"
+                  prop="info.weightUnit"
+                  :show-overflow-tooltip="true"
+                >
+                </el-table-column>
+                <el-table-column
+                  width="200"
+                  label="仓库"
+                  prop="info.warehouseName"
+                  :show-overflow-tooltip="true"
+                ></el-table-column>
+              </el-table>
+              <div slot="reference" class="name-wrapper">
+                <el-tag size="medium">{{ scope.row.categoryLevelId }}</el-tag>
+              </div>
+            </el-popover>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="warehouseName"
+          label="盘点仓库"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="executeGroupName"
+          label="盘点部门"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="executorName"
+          label="盘点人员"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="surplusQuantity"
+          label="盘盈数量"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="wornQuantity"
+          label="盘亏数量"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="loseQuantity"
+          label="破损数量"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="盘点审核时间"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column v-if="!isBindPlan" label="操作" width="100">
+          <template slot-scope="{ row, $index }">
+            <el-button @click="deleted(row, $index)" type="text" size="small"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-form>
+    <div v-if="!isBindPlan" slot="footer">
+      <el-button
+        v-if="addForm.status == 0"
+        type="primary"
+        size="small"
+        @click="submit"
+        >提交</el-button
+      >
+      <el-button type="primary" size="small" @click="config(false)"
+        >保存</el-button
+      >
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+    <div v-else slot="footer">
+      <el-button
+        v-if="addForm.status == 0"
+        type="primary"
+        size="small"
+        @click="submit"
+        >提交</el-button
+      >
+      <el-button type="primary" size="small" @click="dialogVisible = false"
+        >确定</el-button
+      >
+      <el-button size="small" @click="dialogVisible = false">关闭</el-button>
+    </div>
+    <reportProcuts
+      :visibleDialog.sync="visibleDialog"
+      :treeIds="productType"
+      :dimension="dimension"
+      :statusOption="statusOption"
+      :warehouseId="addForm.warehouseId"
+      :selectionIds="selectionIds"
+      :loadTree.sync="loadTree"
+      @selectTableData="addGoods"
+    />
+  </el-dialog>
+</template>
+
+<script>
+  import {
+    getProcessInstance,
+    getTaskListByProcessInstanceId,
+    getProcessDefinitionBpmnXML,
+    getActivityList
+  } from '@/api/bpm/index';
+  import { getTreeByGroup } from '@/api/classifyManage';
+  import reportProcuts from './reportProcuts.vue';
+  import { getCode } from '@/api/codeManagement';
+  import {
+    getReportPlanDetailById,
+    saveReportsList,
+    updateReportsList
+  } from '@/api/inventory';
+  import {
+    getRule,
+    getWarehouseList,
+    getCategoryLevelIdByWarehouseId
+  } from '@/api/ruleManagement/plan';
+  import { getUserPage } from '@/api/system/organization';
+  import deptSelect from '@/components/CommomSelect/new-dept-select.vue';
+  export default {
+    props: {
+      dialogTile: {
+        type: String,
+        default: '新增临时盘点计划'
+      },
+      isBindPlan: {
+        type: Boolean,
+        default: function () {
+          return false;
+        }
+      },
+      id: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      deptSelect,
+      reportProcuts
+    },
+    data() {
+      return {
+        // 流程实例
+        processId: undefined, // 流程实例的编号
+        processInstance: {},
+        // BPMN 数据
+        bpmnXML: null,
+        bpmnControlForm: {
+          prefix: 'flowable'
+        },
+        activityList: [],
+        // 审批记录
+        tasksLoad: true,
+        tasks: [],
+        processInstanceLoading: false,
+        statusOption: [
+          {
+            label: '盘盈',
+            value: '2',
+            numKey: 'surplusQuantity'
+          },
+          {
+            label: '丢失',
+            value: '3',
+            numKey: 'loseQuantity'
+          },
+          {
+            label: '破损',
+            value: '4',
+            numKey: 'wornQuantity'
+          }
+        ],
+        visibleDialog: false,
+        type: 2, // 盘点类型 2仓储 4资产
+        dimension: 1, // 盘点维度1物品 2批次
+        factoryOptions: [],
+        workshopOptions: [],
+        productionLineOptions: [],
+        stationOptions: [],
+        codeList: [],
+        addDialogLoading: false,
+        dialogVisible: false,
+        wh_checkStatus: [], // 盘点类型
+        warehouseList: [], // 盘点仓库
+        uerList: [], // 审核人
+        executorList: [], // 执行人
+        assetsType: null,
+        planRuleInventoryDetailList: [],
+        tableList: [],
+        newColumns: [],
+        selection: [],
+        keyWord: '',
+        total: 0,
+        page: 1,
+        size: 10,
+        loadTree: true,
+        productList: [],
+        productType: [],
+        addForm: {
+          name: '', // 规则名称
+          code: '', // 计划配置单号
+          name: '', // 计划配置名称
+          executeGroupId: '', // 执行部门code
+          executeGroupName: '', // 执行部门name
+          executorId: '', // 执行人id
+          executorName: '', // 执行人name
+          warehouseId: '', // 盘点仓库Id
+          remark: '', // 备注
+          status: 0, // 状态(待审核)
+          approvalUserId: '', // 审核人Id
+          approvalUserName: '' // 审核人name
+        },
+        rules: {
+          code: [
+            { required: true, message: '请输入计划配置单号', trigger: 'blur' }
+          ],
+          name: [
+            { required: true, message: '请输入计划配置名称', trigger: 'blur' }
+          ],
+          warehouseId: [
+            { required: true, message: '请选择盘点仓库', trigger: 'change' }
+          ],
+          executeGroupId: [
+            { required: true, message: '请选择选择执行部门', trigger: 'change' }
+          ],
+          executorId: [
+            { required: true, message: '请选择选择执行人员', trigger: 'change' }
+          ]
+        },
+        ruleNameList: []
+      };
+    },
+    watch: {
+      dialogVisible(val) {
+        if (val) {
+          // 获取审核人列表数据
+          this.getUserList();
+          // 获取计划单号
+          this.getOrderCode();
+          if (
+            this.dialogTile === '修改报损报溢' ||
+            this.dialogTile === '报损报溢详情'
+          ) {
+            getReportPlanDetailById(this.id).then(async (res) => {
+              this.addForm = res;
+              if (this.addForm.executeGroupId) {
+                this.getUserList({ groupId: this.addForm.executeGroupId });
+              }
+              this.productList = res.info;
+              if (this.addForm.status == 1) {
+                this.getDetail(res.flowableId);
+              }
+            });
+          } else {
+            this.productList = [];
+            this.addForm = {
+              name: '', // 规则名称
+              code: '', // 计划配置单号
+              executeGroupId: '', // 执行部门code
+              executeGroupName: '', // 执行部门name
+              executorId: '', // 执行人id
+              executorName: '', // 执行人name
+              warehouseId: '', // 盘点仓库Id
+              remark: '', // 备注
+              status: 0, // 状态(待审核)
+              approvalUserId: '', // 审核人Id
+              approvalUserName: '' // 审核人name
+            };
+          }
+        }
+      }
+    },
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      },
+      selectionIds() {
+        return this.productList.map((item) => item.categoryId);
+      }
+    },
+    methods: {
+      /** 获得流程实例 */
+      getDetail(id) {
+        // 获得流程实例相关
+        this.processInstanceLoading = true;
+        getProcessInstance(id).then((response) => {
+          if (!response) {
+            this.$message.error('查询不到流程信息!');
+            return;
+          }
+          // 设置流程信息
+          this.processInstance = response;
+
+          // //将业务表单,注册为动态组件
+          // const path = this.processInstance.processDefinition.formCustomViewPath;
+          // Vue.component("async-biz-form-component", function (resolve) {
+          //   require([`@/views${path}`], resolve);
+          // });
+          // 加载流程图
+          getProcessDefinitionBpmnXML(
+            this.processInstance.processDefinition.id
+          ).then((response) => {
+            this.bpmnXML = response;
+          });
+          // 加载活动列表
+          getActivityList({
+            processInstanceId: this.processInstance.id
+          }).then((response) => {
+            console.log(response, 'response');
+            this.activityList = response;
+          });
+
+          // 取消加载中
+          this.processInstanceLoading = false;
+        });
+
+        // 获得流程任务列表(审批记录)
+        this.tasksLoad = true;
+        getTaskListByProcessInstanceId(id).then((response) => {
+          // 审批记录
+          this.tasks = [];
+          // 移除已取消的审批
+          response.forEach((task) => {
+            if (task.result !== 4) {
+              this.tasks.push(task);
+            }
+          });
+          // 排序,将未完成的排在前面,已完成的排在后面;
+          this.tasks.sort((a, b) => {
+            // 有已完成的情况,按照完成时间倒序
+            if (a.endTime && b.endTime) {
+              return b.endTime - a.endTime;
+            } else if (a.endTime) {
+              return 1;
+            } else if (b.endTime) {
+              return -1;
+              // 都是未完成,按照创建时间倒序
+            } else {
+              return b.createTime - a.createTime;
+            }
+          });
+
+          // 需要审核的记录
+          const userId = store.getters.userId;
+          this.tasks.forEach((task) => {
+            if (task.result !== 1 && task.result !== 6) {
+              // 只有待处理才需要
+              return;
+            }
+            if (!task.assigneeUser || task.assigneeUser.id !== userId) {
+              // 自己不是处理人
+              return;
+            }
+          });
+
+          // 取消加载中
+          this.tasksLoad = false;
+        });
+      },
+      // 添加物品明细
+      async addGoods(data) {
+        console.log(data);
+        let productList = data.map((item) => {
+          return {
+            ...item
+          };
+        });
+        console.log('productList------', productList);
+        this.productList = this.productList.concat(productList);
+      },
+      addProducts() {
+        this.visibleDialog = true;
+      },
+      deleted(row, index) {
+        this.productList.splice(index, 1);
+      },
+      selecctedRow(val) {
+        this.selection = val;
+      },
+      dimensionChange() {
+        this.productList = [];
+      },
+      checkSelectable(row) {
+        return true;
+      },
+      // 改变规则名称
+      change_ruleId(val) {
+        this.addForm.ruleName = this.ruleNameList.filter(
+          (item) => item.id === val
+        )[0].name;
+      },
+      // 获取物品类型列表
+      async getGoodsList() {
+        const { data } = await getTreeByGroup({ type: this.type });
+        console.log('data------', data);
+        this.codeList = data;
+      },
+      // 获取规则名列表
+      async _getRuleNameList() {
+        const res = await getRule({ status: 1, type: 4, pageNum: 1, size: -1 });
+        if (res.list) {
+          this.ruleNameList = res.list || [];
+        }
+      },
+      // 获取计划配置单号
+      async getOrderCode(tips) {
+        const code = await getCode('plan_profit_loss');
+        this.$set(this.addForm, 'code', code);
+      },
+      // 执行人选择
+      changeExecutor(val) {
+        if (val) {
+          this.addForm.executorId = val;
+          this.addForm.executorName = this.executorList.filter(
+            (item) => item.id === val
+          )[0].name;
+        }
+      },
+      // 仓库选择
+      changeWarehouse(val) {
+        if (val) {
+          this.addForm.warehouseId = val;
+          this.addForm.warehouseName = this.warehouseList.filter(
+            (item) => item.id === val
+          )[0].name;
+          this.productList = [];
+          getCategoryLevelIdByWarehouseId({ warehouseId: val }).then((data) => {
+            console.log(data);
+            this.productType = Array.from(new Set(data));
+          });
+        }
+      },
+      // 关闭弹窗
+      handleClose() {
+        this.dialogVisible = false;
+        this.$refs.addFormRef.resetFields();
+        this.addForm.assetsName = '';
+        this.assetsType = null;
+        this.addForm = {
+          name: '', // 规则名称
+          code: '', // 计划配置单号
+          executeGroupId: '', // 执行部门code
+          executeGroupName: '', // 执行部门name
+          executorId: '', // 执行人id
+          executorName: '', // 执行人name
+          warehouseId: '', // 盘点仓库Id
+          remark: '', // 备注
+          status: 0, // 状态(待审核)
+          approvalUserId: '', // 审核人Id
+          approvalUserName: '' // 审核人name
+        };
+      },
+
+      // 封装 - 获取盘点仓库
+      async _getWarehouse() {
+        const res = await getWarehouseList({});
+        console.log(res);
+        this.warehouseList = res.map((item) => {
+          return { ...item, name: item.factoryName + '-' + item.name };
+        });
+      },
+
+      //选择部门(搜索)
+      searchDeptNodeClick(info, row) {
+        if (info) {
+          const params = { groupId: info };
+          this.getUserList(params);
+          this.addForm.executeGroupName = row.name;
+        } else {
+          this.addForm.executeGroupId = null;
+        }
+      },
+      // 获取审核人列表、巡点检人员
+      async getUserList(params) {
+        try {
+          let data = { pageNum: 1, size: -1 };
+          // 如果传了参数就是获取巡点检人员数据
+          if (params) {
+            data = Object.assign(data, params);
+          }
+          const res = await getUserPage(data);
+          if (params) {
+            this.executorList = res.list;
+          } else {
+            this.uerList = res.list;
+          }
+        } catch (error) {}
+      },
+      submit() {
+        this.config(true);
+      },
+      config(isProcess) {
+        console.log(this.addForm);
+        console.log('isProcess------------', isProcess);
+        this.$refs.addFormRef.validate(async (valid) => {
+          let res = null;
+          if (valid) {
+            let params = {
+              ...this.addForm,
+              info: this.productList
+            };
+            if (isProcess) {
+              params.status = 1;
+            } else {
+              params.status = 0;
+            }
+            if (this.productList?.length > 0) {
+              if (this.dialogTile === '修改报损报溢') {
+                res = await updateReportsList(params);
+              } else {
+                res = await saveReportsList(params);
+              }
+            } else {
+              return this.$message.error('请选择报损工单物品信息');
+            }
+
+            if (res.code == 0) {
+              this.handleClose();
+              this.$message.success(res.message);
+              this.$emit('refreshList');
+            }
+          }
+        });
+      },
+      handleChangeassetDict(data) {
+        console.log(data);
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-row {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  .add_form {
+    ::v-deep .el-form-item {
+      margin-bottom: 20px !important;
+    }
+  }
+  .table_search {
+    margin-bottom: 5px;
+  }
+</style>

+ 371 - 0
src/views/warehouseManagement/stocktaking/reportLoss/components/reportProcuts.vue

@@ -0,0 +1,371 @@
+<template>
+  <div>
+    <el-dialog
+      :title="`产品信息`"
+      append-to-body
+      :visible="visibleDialog"
+      :before-close="closeWindows"
+      width="80vw"
+    >
+      <div class="search_box">
+        <el-row :gutter="15">
+          <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_right">
+          <el-table
+            ref="multipleTable"
+            :data="tableData"
+            border
+            tooltip-effect="dark"
+            height="455px"
+            row-key="id"
+            style="width: 100%"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column
+              :selectable="selectable"
+              type="selection"
+              width="55"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column width="55px" label="序号" type="index">
+            </el-table-column>
+            <el-table-column
+              prop="code"
+              label="盘点单号"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="planName"
+              label="计划名称"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column label="产品分类" width="180">
+              <template slot-scope="scope">
+                <el-popover trigger="hover" placement="right">
+                  <el-table
+                    :data="scope.row.planDetailVOList"
+                    :max-height="500"
+                    border
+                  >
+                    <el-table-column label="序号" type="index" width="50">
+                    </el-table-column>
+                    <el-table-column
+                      label="状态"
+                      prop="status"
+                      :show-overflow-tooltip="true"
+                    >
+                      <template slot-scope="{ row }">
+                        {{
+                          row.status > 0
+                            ? statusOption.filter(
+                                (item) => item.value == row.status
+                              )[0].label
+                            : ''
+                        }}
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="数量" :show-overflow-tooltip="true">
+                      <template slot-scope="{ row }">
+                        {{
+                          row.status > 0
+                            ? row[
+                                statusOption.filter(
+                                  (item) => item.value == row.status
+                                )[0].numKey
+                              ]
+                            : 0
+                        }}
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                      width="150"
+                      label="物品名称"
+                      prop="categoryName"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                      label="批次号"
+                      prop="batchNo"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                      width="150"
+                      label="包装编码"
+                      prop="packageNo"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                      label="包装数量"
+                      prop="info.packingCountBase"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                      label="包装单位"
+                      prop="info.packingUnit"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                      label="重量"
+                      prop="info.weight"
+                      :show-overflow-tooltip="true"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      label="重量单位"
+                      prop="info.weightUnit"
+                      :show-overflow-tooltip="true"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      width="200"
+                      label="仓库"
+                      prop="info.warehouseName"
+                      :show-overflow-tooltip="true"
+                    ></el-table-column>
+                  </el-table>
+                  <div slot="reference" class="name-wrapper">
+                    <el-tag size="medium">{{
+                      scope.row.categoryLevelId
+                    }}</el-tag>
+                  </div>
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="warehouseName"
+              label="盘点仓库"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="executeGroupName"
+              label="盘点部门"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="executorName"
+              label="盘点人员"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="surplusQuantity"
+              label="盘盈数量"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="wornQuantity"
+              label="盘亏数量"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="loseQuantity"
+              label="破损数量"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              prop="createTime"
+              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="[15, 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 { getPlanOrderList } from '@/api/inventory';
+  export default {
+    props: {
+      visibleDialog: {
+        type: Boolean,
+        default: false
+      },
+      treeIds: {
+        type: Array,
+        default: () => []
+      },
+      warehouseId: {
+        type: String,
+        default: ''
+      },
+      statusOption: {
+        type: Array,
+        default: () => []
+      },
+      selectionIds: {
+        type: Array,
+        default: () => []
+      },
+      dimension: {
+        type: Number,
+        default: 1
+      },
+      loadTree: {
+        type: Boolean,
+        default: true
+      }
+    },
+    watch: {
+      tableData(val) {
+        this.doLayout();
+      },
+      visibleDialog: {
+        handler(v) {
+          if (v) {
+            this.initData();
+          }
+        },
+        deep: true
+      }
+    },
+    data() {
+      return {
+        factoryList: [],
+        factoryId: '',
+        value: '',
+        treeType: '',
+        treeList: [],
+        tableData: [],
+        multipleSelection: [],
+        pages1: { classificationIdList: [] },
+        pages: {
+          pageNum: 1,
+          size: 15
+        },
+        total: 0,
+        curType: '',
+        classificationId: '',
+        memoSelection: [],
+        newColumns: [] // 动态表头
+      };
+    },
+    methods: {
+      selectable(row) {
+        return !this.selectionIds.includes(row.categoryId);
+      },
+      doLayout() {
+        let that = this;
+        this.$nextTick(() => {
+          that.$refs.multipleTable.doLayout();
+        });
+      },
+      handleSearch() {
+        this.pages.pageNum = 1;
+        this.initData();
+      },
+      onConfirm() {
+        this.$emit('selectTableData', [...this.multipleSelection]);
+        this.closeWindows();
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      handleNodeClick(data) {
+        if (data) {
+          this.classificationId = data.id;
+          this.curType = data.type;
+        } else {
+          this.classificationId = '';
+          this.curType = '';
+        }
+        this.initData();
+      },
+      closeWindows() {
+        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._getInformation();
+      },
+      async _getInformation() {
+        console.log(this.warehouseId);
+        const params = {
+          ...this.pages,
+          keyWord: this.value,
+          type: 1
+        };
+        let res = null;
+        res = await getPlanOrderList(params);
+        this.tableData = res.list;
+        this.total = res.count;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  :deep(.el-checkbox__input.is-disabled .el-checkbox__inner) {
+    background-color: #eee !important;
+  }
+  .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>

+ 62 - 34
src/views/warehouseManagement/stocktaking/reportLoss/index.vue

@@ -16,17 +16,18 @@
             type="primary"
             icon="el-icon-plus"
             class="ele-btn-icon"
-            @click="addClick()"
+            @click="openEdit()"
           >
             新建
           </el-button>
         </template>
         <template v-slot:action="{ row }">
           <el-link
+            v-if="row.status == 0"
             type="primary"
             :underline="false"
             icon="el-icon-edit"
-            @click="editRow(row)"
+            @click="openEdit(row)"
           >
             修改
           </el-link>
@@ -41,18 +42,46 @@
         </template>
       </ele-pro-table>
     </el-card>
+    <!-- 新建或编辑弹窗 -->
+    <AddReportDialog
+      ref="addInventoryDialogRef"
+      :dialogTile="dialogTitle"
+      :id="inventoryId"
+      @refreshList="reload"
+      :isBindPlan="isBindPlan"
+    />
   </div>
 </template>
 
 <script>
   import ReportlossSearch from './components/reportloss-search.vue';
-  import { pageRoles } from '@/api/system/role';
+  import AddReportDialog from './components/addReportDialog.vue';
+  import { getReportsList } from '@/api/inventory';
   export default {
     components: {
-      ReportlossSearch
+      ReportlossSearch,
+      AddReportDialog
     },
     data() {
       return {
+        // 0待审核,1=审核中,2=已审核
+        statusOptions: [
+          {
+            value: 0,
+            label: '待审核'
+          },
+          {
+            value: 1,
+            label: '审核中'
+          },
+          {
+            value: 2,
+            label: '已审核'
+          }
+        ],
+        dialogTitle: '',
+        inventoryId: '',
+        isBindPlan: false,
         // 表格列配置
         columns: [
           {
@@ -66,67 +95,57 @@
           },
           {
             prop: 'code',
-            label: '状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'enable',
             label: '单号',
             align: 'center',
             showOverflowTooltip: true,
             slot: 'enable',
             minWidth: 110
           },
-          {
-            prop: 'groupId',
-            label: '名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
           {
             prop: 'name',
-            label: '类型',
+            label: '名称',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            prop: 'groupId',
+            prop: 'warehouseName',
             label: '仓库',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            prop: 'cycle',
+            prop: 'executeGroupName',
             label: '报损报溢部门',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            prop: 'auto',
+            prop: 'executorName',
             label: '报损报溢人',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            prop: 'sk',
+            prop: 'createTime',
             label: '报损时间',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            prop: 'zt',
-            label: '审核人',
+            prop: 'status',
+            label: '状态',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 110
+            formatter: (row) => {
+              return this.statusOptions.filter(
+                (item) => item.value == row.status
+              )[0].label;
+            }
           },
           {
             columnKey: 'action',
@@ -144,9 +163,20 @@
     },
     computed: {},
     methods: {
+      openEdit(row) {
+        if (row) {
+          this.dialogTitle = '修改报损报溢';
+          this.inventoryId = row.id;
+        } else {
+          this.dialogTitle = '新增报损报溢';
+          this.inventoryId = '';
+        }
+        this.isBindPlan = false;
+        this.$refs.addInventoryDialogRef.dialogVisible = true;
+      },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
-        return pageRoles({ pageNum: page, size: limit, ...where });
+        return getReportsList({ pageNum: page, size: limit, ...where });
       },
       async changeEnable(row) {
         const res = await putRoles(row);
@@ -165,13 +195,11 @@
       },
 
       // 详情
-      goDetail() {
-        this.$router.push({
-          path: '/warehouseManagement/stocktaking/reportLoss/details'
-          // query: {
-          //   id
-          // }
-        });
+      goDetail(row) {
+        this.dialogTitle = '报损报溢详情';
+        this.inventoryId = row.id;
+        this.isBindPlan = true;
+        this.$refs.addInventoryDialogRef.dialogVisible = true;
       },
 
       // 新增

+ 27 - 2
src/views/warehouseManagement/stocktaking/work/components/disposeDialog.vue

@@ -141,9 +141,9 @@
             tooltip-effect="dark"
           >
             <el-table-column
-              label="处理状态"
+              label="盘点状态"
               width="100"
-              prop="categoryName"
+              prop="controlStatus"
               :show-overflow-tooltip="true"
             >
               <template slot-scope="{ row }">
@@ -213,6 +213,21 @@
               prop="info.warehouseName"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              v-if="!isBindPlan"
+              label="操作"
+              width="100"
+              fixed="right"
+            >
+              <template slot-scope="{ row, $index }">
+                <el-button
+                  @click="deleted(row, $index)"
+                  type="text"
+                  size="small"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
           </el-table>
         </div>
       </div>
@@ -369,8 +384,18 @@
           this.newColumns = [...newRes];
         });
       },
+      deleted(row, index) {
+        this.controlTableData.splice(index, 1);
+        this.selectionIds = this.selectionIds.filter((item) => item !== row.id);
+      },
       onConfirm() {
         if (this.controlTableData.length > 0) {
+          let isBoolen = this.controlTableData.every(
+            (item) => item.controlStatus > 0 && item.count > 0
+          );
+          if (!isBoolen) {
+            return this.$message.error('请选择盘点状态和数量!');
+          }
           let arr = this.controlTableData.map((item) => {
             let key = null;
             switch (item.controlStatus) {

+ 108 - 3
src/views/warehouseManagement/stocktaking/work/details.vue

@@ -87,6 +87,7 @@
                     ref="filterTable"
                     :data="scope.row.planDetailVOList"
                     style="width: 100%"
+                    :max-height="500"
                     border
                   >
                     <el-table-column width="50" type="index" label="序号">
@@ -162,20 +163,118 @@
           </el-table>
         </div>
       </div>
+      <div class="content-detail mt20">
+        <HeaderTitle title="报损报溢清单" size="16px"></HeaderTitle>
+        <div class="mt20">
+          <el-table :data="reportList" :max-height="500" border>
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                {{
+                  row.status > 0
+                    ? statusOption.filter((item) => item.value == row.status)[0]
+                        .label
+                    : ''
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column label="数量" :show-overflow-tooltip="true">
+              <template slot-scope="{ row }">
+                {{
+                  row.status > 0
+                    ? row[
+                        statusOption.filter(
+                          (item) => item.value == row.status
+                        )[0].numKey
+                      ]
+                    : 0
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              width="150"
+              label="物品名称"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              width="150"
+              label="包装编码"
+              prop="packageNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="info.packingCountBase"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="info.packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="info.weight"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="重量单位"
+              prop="info.weightUnit"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              width="200"
+              label="仓库"
+              prop="info.warehouseName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-  import storageApi from '@/api/warehouseManagement/index.js';
   import PageHeader from '@/components/PageHeader';
-  import { getOrderInfoByPlanId } from '@/api/inventory';
+  import { getOrderInfoByPlanId, getReportList } from '@/api/inventory';
 
   export default {
     components: { PageHeader },
     data() {
       return {
-        infoData: {}
+        infoData: {},
+        reportList: [],
+        statusOption: [
+          {
+            label: '盘盈',
+            value: '2',
+            numKey: 'surplusQuantity'
+          },
+          {
+            label: '丢失',
+            value: '3',
+            numKey: 'loseQuantity'
+          },
+          {
+            label: '破损',
+            value: '4',
+            numKey: 'wornQuantity'
+          }
+        ]
       };
     },
     created() {
@@ -187,6 +286,12 @@
           planOrderId: this.$route.query.id,
           planId: this.$route.query.planId
         });
+        const res = await getReportList({
+          planOrderId: this.$route.query.id,
+          planId: this.$route.query.planId,
+          status: 1
+        });
+        this.reportList = res;
         this.infoData = data;
       }
     }

+ 1 - 1
src/views/warehouseManagement/stocktaking/work/index.vue

@@ -90,7 +90,7 @@
           },
           {
             prop: 'planName',
-            label: '盘点名称',
+            label: '计划名称',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110

Некоторые файлы не были показаны из-за большого количества измененных файлов