huang_an преди 1 година
родител
ревизия
91c0cfd153

+ 12 - 2
src/api/warehouseManagement/index.js

@@ -174,9 +174,19 @@ export default {
     }
     return Promise.reject(new Error(res.data.message));
   },
-  // 入库申请列表
+  // 出入库申请列表
   getinboundRequestsList: async (data) => {
-    const res = await request.get('/mes/applystorage/page', {
+    const res = await request.get('/wms/applystorage/page', {
+      params: data
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  // 出入库申请列表通过入库申请单查询详情
+  getApplystoragedetail: async (data) => {
+    const res = await request.get('/wms/applystoragedetail/list', {
       params: data
     });
     if (res.data.code == 0) {

+ 2 - 0
src/main.js

@@ -14,6 +14,7 @@ import HeaderTitle from '@/components/header-title';
 import initParentStore from '../qiankun_config/store';
 import elTableInfiniteScroll from 'el-table-infinite-scroll';
 import { create, all } from 'mathjs'; // 引入mathjs工具并初始化
+import authSelection from '@/components/AuthSelection';
 Vue.use(elTableInfiniteScroll);
 const config = {
   number: 'BigNumber',
@@ -21,6 +22,7 @@ const config = {
 };
 Vue.prototype.$math = create(all, config);
 Vue.component('HeaderTitle', HeaderTitle);
+Vue.component('authSelection', authSelection);
 // // register globally
 import '@/icons';
 

+ 4 - 3
src/utils/dict/common.js

@@ -1,8 +1,9 @@
 // 审核状态
 export const auditStatus = [
-  { code: 0, label: '待审核', class: 'ele-text-primary' },
-  { code: 1, label: '已审核', class: 'ele-text-primary' },
-  { code: 2, label: '已驳回', class: 'ele-text-danger' }
+  { code: 0, label: '未提交', class: 'ele-text-primary' },
+  { code: 1, label: '审核中', class: 'ele-text-primary' },
+  { code: 2, label: '审核通过', class: 'ele-text-danger' },
+  { code: 3, label: '已驳回', class: 'ele-text-danger' }
 ];
 
 // 是否

+ 8 - 12
src/views/warehouseManagement/inboundRequests/components/search.vue

@@ -7,27 +7,23 @@
     @submit.native.prevent
   >
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="工单编码:">
-          <el-input
-            clearable
-            v-model="where.workOrderCode"
-            placeholder="请输入"
-          />
+          <el-input clearable v-model="where.code" placeholder="请输入" />
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="仓库名称:">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
+        <el-form-item label="物品编码:">
           <el-input
             clearable
-            v-model="where.warehouseName"
+            v-model="where.categoryCode"
             placeholder="请输入"
           />
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="物品名称:">
           <el-input
             clearable
@@ -37,7 +33,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="组织机构:">
           <auth-selection
             v-model="where.deptIds"
@@ -48,7 +44,7 @@
 
       <el-col
         style="display: flex; justify-content: flex-end"
-        v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }"
+        v-bind="styleResponsive ? { lg: 4, md: 6 } : { span: 4 }"
       >
         <el-form-item label-width="0px">
           <el-button

+ 10 - 119
src/views/warehouseManagement/inboundRequests/components/tgDetails.vue

@@ -1,46 +1,18 @@
 <template>
-  <ele-modal :visible.sync="visible" title="入库详情" width="90%">
+  <ele-modal :visible.sync="visible" title="出入库详情" width="90%">
     <ele-pro-table
-      v-if="clientEnvironmentId == 3"
       :columns="columns"
       :datasource="tableList"
       cache-key="tgDetails"
       height="calc(100vh - 350px)"
       :need-page="false"
     >
-      <template v-slot:packingWeight="{ row }">
-        {{ row.packingWeight }} {{ row.weightUnit }}
-      </template>
-
-      <template v-slot:materielCode="{ row }">
-        {{ row.extInfo.materielCode }}
-      </template>
-
-      <template v-slot:clientCode="{ row }">
-        {{ row.extInfo.clientCode }}
-      </template>
-
-      <template v-slot:engrave="{ row }">
-        {{ row.extInfo.engrave }}
-      </template>
-    </ele-pro-table>
-
-    <ele-pro-table
-      v-if="clientEnvironmentId == 2"
-      :columns="columns2"
-      :datasource="tableList"
-      cache-key="srDetails"
-      height="calc(100vh - 350px)"
-      :need-page="false"
-    >
-      <template v-slot:quantity="{ row }">
-        {{ row.quantity }} {{ row.measuringUnit }}
-      </template>
     </ele-pro-table>
   </ele-modal>
 </template>
 
 <script>
+  import storageApi from '@/api/warehouseManagement';
   export default {
     computed: {
       clientEnvironmentId() {
@@ -58,12 +30,6 @@
             width: 55,
             align: 'center'
           },
-
-          {
-            label: '入库申请单id',
-            prop: 'applyStorageId'
-          },
-
           {
             label: '物品名称',
             prop: 'categoryName'
@@ -85,7 +51,7 @@
 
           {
             label: '包装数量',
-            prop: 'packingCount'
+            prop: 'packingQuantity'
           },
 
           {
@@ -95,85 +61,9 @@
 
           {
             label: '本包重量',
-            slot: 'packingWeight'
-          },
-
-          {
-            label: '包装内总数量',
-            slot: 'quantity'
-          },
-
-          {
-            label: '物料代号',
-            slot: 'materielCode'
-          },
-          {
-            label: '客户代号',
-            slot: 'clientCode'
-          },
-          {
-            label: '刻码',
-            slot: 'engrave'
+            prop: 'weight'
           },
-
-          {
-            label: '发货码',
-            prop: 'sendCode'
-          }
-        ],
-
-        columns2: [
-          {
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center'
-          },
-
-          {
-            label: '入库申请单id',
-            prop: 'applyStorageId'
-          },
-
-          {
-            label: '物品名称',
-            prop: 'categoryName'
-          },
-          {
-            label: '物品分类名称',
-            prop: 'categoryLevelName'
-          },
-
-          {
-            label: '牌号',
-            prop: 'brandNum'
-          },
-
-          {
-            label: '型号',
-            prop: 'modelType'
-          },
-
-          {
-            label: '包装数量',
-            prop: 'packingCount'
-          },
-
-          {
-            label: '包装单位',
-            prop: 'packingUnit'
-          },
-
-          {
-            label: '本包重量',
-            prop: 'packingWeight'
-          },
-
-          {
-            label: '包装内总数量',
-            slot: 'quantity'
-          },
-
+          { label: '重量单位', prop: 'weightUnit' },
           {
             label: '发货码',
             prop: 'sendCode'
@@ -184,10 +74,11 @@
     created() {},
     methods: {
       open(row) {
-        if (row) {
-          this.tableList = [...row.detailList];
-        }
-        this.visible = true;
+        storageApi.getApplystoragedetail({ applyId: row.id }).then((res) => {
+          console.log(res);
+          this.tableList = res;
+          this.visible = true;
+        });
       }
     }
   };

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

@@ -0,0 +1,171 @@
+<template>
+  <div>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      cache-key="workOrderTable"
+    >
+      <template v-slot:totalCount="{ row }">
+        {{ row.totalCount }} {{ row.measuringUnit }}
+      </template>
+
+      <template v-slot:totalPackage="{ row }">
+        {{ row.totalPackage }}
+      </template>
+
+      <template v-slot:totalWeight="{ row }">
+        {{ row.totalWeight }} {{ row.weightUnit }}
+      </template>
+
+      <template v-slot:status="{ row }">
+        <!-- <span :class="{ 'ele-text-danger': row.approvalStatus == 2 }">
+          {{ statusFormatter(row.approvalStatus) }}
+        </span> -->
+        <span>
+          {{ statusFormatter(row.status) }}
+        </span>
+      </template>
+
+      <template v-slot:action="{ row }">
+        <el-link type="primary" :underline="false" @click="details(row)">
+          详情
+        </el-link>
+      </template>
+    </ele-pro-table>
+    <tgDetails ref="tgDetailsRefs"></tgDetails>
+  </div>
+</template>
+
+<script>
+  import { outputSceneState, sceneState } from '@/utils/dict/index';
+  import storageApi from '@/api/warehouseManagement';
+  import tgDetails from './tgDetails.vue';
+  export default {
+    props: {
+      type: {
+        type: String,
+        default: '1'
+      }
+    },
+    components: {
+      tgDetails
+    },
+    data() {
+      return {
+        outputSceneState,
+        sceneState,
+        loading: false,
+        statusOpt: [
+          { label: '待处理', value: 0 },
+          { label: '已处理', value: 1 },
+          { label: '已撤销', value: 2 }
+        ]
+      };
+    },
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'categoryNames',
+            label: '名称',
+            align: 'center'
+          },
+          { label: '型号', prop: 'modelType', width: '150' },
+          { label: '规格', prop: 'specification', width: '150' },
+          { label: '牌号', prop: 'brandNum', width: '100' },
+          {
+            prop: 'sourceType',
+            label: '出入库类型',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              console.log(row);
+              switch (this.type) {
+                case '1':
+                  // 入库
+                  return this.sceneState.filter(
+                    (item) => item.code == row.sourceType
+                  )[0].label;
+                case '2':
+                  // 出库
+                  return this.outputSceneState.filter(
+                    (item) => item.code == row.sourceType
+                  )[0].label;
+              }
+            }
+          },
+          {
+            prop: 'approvalUserName',
+            label: '审核人',
+            align: 'center'
+          },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            slot: 'status',
+            label: '状态',
+            align: 'center'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 120,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ];
+      }
+    },
+    created() {},
+    methods: {
+      statusFormatter(status) {
+        const obj = this.statusOpt.find((i) => i.value == status);
+        return obj && obj.label;
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return storageApi.getinboundRequestsList({
+          pageNum: page,
+          size: limit,
+          type: this.type,
+          ...where
+        });
+      },
+      details(row) {
+        this.$refs.tgDetailsRefs.open(row);
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      }
+    }
+  };
+</script>

+ 48 - 186
src/views/warehouseManagement/inboundRequests/index.vue

@@ -1,214 +1,76 @@
 <template>
-  <div class="ele-body">
+  <div id="inboundRequests">
     <el-card shadow="never" v-loading="loading">
       <search @search="reload" ref="searchRef"> </search>
-
-      <!-- 数据表格 -->
-      <ele-pro-table
-        ref="table"
-        :columns="columns"
-        :datasource="datasource"
-        cache-key="workOrderTable"
-      >
-        <template v-slot:totalCount="{ row }">
-          {{ row.totalCount }} {{ row.measuringUnit }}
-        </template>
-
-        <template v-slot:totalPackage="{ row }">
-          {{ row.totalPackage }}
-        </template>
-
-        <template v-slot:totalWeight="{ row }">
-          {{ row.totalWeight }} {{ row.weightUnit }}
-        </template>
-
-        <template v-slot:approvalStatus="{ row }">
-          <span :class="{ 'ele-text-danger': row.approvalStatus == 2 }">
-            {{ statusFormatter(row.approvalStatus) }}
-          </span>
-        </template>
-
-        <template v-slot:action="{ row }">
-          <!-- <el-link
-            type="primary"
-            v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
-            :underline="false"
-            @click="storage(row)"
-          >
-            入库
-          </el-link> -->
-          <el-link type="primary" :underline="false" @click="details(row)">
-            详情
-          </el-link>
-        </template>
-      </ele-pro-table>
+      <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="入库" name="入库">
+          <tgTable
+            v-if="activeName == '入库'"
+            ref="tableRef"
+            type="1"
+          ></tgTable>
+        </el-tab-pane>
+        <el-tab-pane label="出库" name="出库">
+          <tgTable
+            v-if="activeName == '出库'"
+            ref="tableRef"
+            type="2"
+          ></tgTable>
+        </el-tab-pane>
+      </el-tabs>
     </el-card>
-
-    <tgDetails ref="tgDetailsRefs"></tgDetails>
   </div>
 </template>
 
 <script>
-  import storageApi from '@/api/warehouseManagement';
-
   import search from './components/search.vue';
   import tgDetails from './components/tgDetails.vue';
+  import tgTable from './components/tgTable.vue';
   export default {
     components: {
       search,
-      tgDetails
+      tgDetails,
+      tgTable
     },
     data() {
       return {
-        loading: false,
-
-        statusOpt: [
-          { label: '未提交', value: 0 },
-          { label: '审核中', value: 1 },
-          { label: '审核通过', value: 2 },
-          { label: '审核不通过', value: 3 }
-        ]
+        activeName: '入库',
+        loading: false
       };
     },
-    computed: {
-      // 表格列配置
-      columns() {
-        return [
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'code',
-            label: '编码',
-            align: 'center',
-            minWidth: 110
-          },
-          {
-            prop: 'workOrderCode',
-            label: '工单编码',
-            align: 'center',
-            minWidth: 110
-          },
-          {
-            prop: 'warehouseName',
-            label: '仓库名称	',
-            align: 'center'
-          },
-
-          {
-            prop: 'categoryLevelName',
-            label: '物品分类',
-            minWidth: 200,
-            align: 'center'
-          },
-          {
-            prop: 'categoryName',
-            label: '名称',
-            align: 'center'
-          },
-          { label: '型号', prop: 'modelType', width: '150' },
-          { label: '规格', prop: 'specification', width: '150' },
-          { label: '牌号', prop: 'brandNum', width: '50' },
-          {
-            slot: 'totalCount',
-            label: '总数量',
-            align: 'center'
-          },
-
-          {
-            slot: 'totalPackage',
-            label: '总包装',
-            align: 'center'
-          },
-
-          {
-            slot: 'totalWeight',
-            label: '总重量',
-            align: 'center'
-          },
-          {
-            prop: 'type',
-            label: '入库类型',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              return cellValue == 1 ? '生产入库' : '';
-            }
-          },
-          {
-            prop: 'approvalUserName',
-            label: '审核人',
-            align: 'center'
-          },
-
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            slot: 'approvalStatus',
-            label: '状态',
-            align: 'center'
-          },
-
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 120,
-            align: 'center',
-            resizable: false,
-            fixed: 'right',
-            slot: 'action',
-            showOverflowTooltip: true
-          }
-        ];
-      }
-    },
     created() {},
     methods: {
-      statusFormatter(status) {
-        const obj = this.statusOpt.find((i) => i.value == status);
-        return obj && obj.label;
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return storageApi.getinboundRequestsList({
-          pageNum: page,
-          size: limit,
-          ...where
-        });
+      handleClick(tab) {
+        this.activeName = tab.name;
+        this.$refs.tableRef && this.$refs.tableRef.reload(tab.name);
       },
-
-      details(row) {
-        console.log(row);
-        this.$refs.tgDetailsRefs.open(row);
-      },
-
-      storage(row) {
-        this.$router.push({
-          path: '/warehouseManagement/stockManagement/add',
-          query: {
-            id: row.id
-          }
-        });
-      },
-
       /* 刷新表格 */
       reload(where) {
-        this.$nextTick(() => {
-          this.$refs.table.reload({ page: 1, where });
-        });
+        this.$refs.tableRef.reload(where);
       }
     }
   };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+  #inboundRequests {
+    height: 100%;
+    width: 100%;
+    // :deep(.el-card) {
+    //   height: 100%;
+    //   .el-card__body {
+    //     height: 100%;
+    //     display: flex;
+    //     flex-direction: column;
+    //     .el-tabs--border-card {
+    //       flex: 1;
+    //       display: flex;
+    //       flex-direction: column;
+    //       .el-tabs__content {
+    //         flex: 1;
+    //       }
+    //     }
+    //   }
+    // }
+  }
+</style>

+ 5 - 3
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -137,6 +137,7 @@
             <el-table
               ref="productListTable"
               :data="productList"
+              border
               tooltip-effect="dark"
               :max-height="300"
               :header-cell-style="rowClass"
@@ -283,6 +284,7 @@
               :data="showPackingList"
               tooltip-effect="dark"
               :max-height="300"
+              border
               :row-class-name="tableRowClassName"
               :header-cell-style="rowClass"
               v-el-table-infinite-scroll="pickingHandleScroll"
@@ -406,6 +408,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -740,11 +743,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#EEEEEE', border: 'none' };
+        return { background: '#0000' };
       },
       // 部门点击事件
       async auditorDeptClick(data) {

+ 5 - 3
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -109,6 +109,7 @@
           <el-table
             ref="productListTable"
             :data="productList"
+            border
             tooltip-effect="dark"
             :max-height="300"
             :header-cell-style="rowClass"
@@ -249,6 +250,7 @@
             :data="showPackingList"
             tooltip-effect="dark"
             :max-height="300"
+            border
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             v-el-table-infinite-scroll="pickingHandleScroll"
@@ -371,6 +373,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -582,11 +585,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#0000', border: 'none' };
+        return { background: '#0000' };
       },
       async getAllCategoryType() {
         const { data } = await allCategoryLevel();

+ 60 - 28
src/views/warehouseManagement/outgoingManagement/index.vue

@@ -17,31 +17,57 @@
               ></el-date-picker> </el-form-item
           ></el-col>
           <el-col :span="6">
-            <el-form-item label="出库单号" prop="bizNo">
+            <el-form-item label="出库单号" prop="sourceBizNo">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.bizNo"
+                v-model="formData.sourceBizNo"
               ></el-input> </el-form-item
           ></el-col>
           <el-col :span="6">
-            <el-form-item label="领料人" prop="fromUser">
+            <el-form-item label="出库场景" prop="bizType">
+              <el-select
+                style="width: 100%"
+                filterable
+                placeholder="请选择"
+                v-model="formData.bizType"
+                clearable
+              >
+                <el-option
+                  v-for="item in outputSceneState"
+                  :key="item.code"
+                  :value="item.code + ''"
+                  :label="item.label"
+                ></el-option>
+              </el-select> </el-form-item
+          ></el-col>
+          <el-col :span="6">
+            <el-form-item label="物品编码" prop="categoryCode">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.fromUser"
+                v-model="formData.categoryCode"
+              ></el-input> </el-form-item
+          ></el-col>
+          <el-col :span="6">
+            <el-form-item label="物品名称" prop="categoryName">
+              <el-input
+                size="small"
+                class="w100"
+                placeholder="请输入"
+                v-model="formData.categoryName"
               ></el-input> </el-form-item
           ></el-col>
 
           <el-col :span="6">
-            <el-form-item label="状态" prop="verifyStatus">
+            <el-form-item label="状态" prop="status">
               <el-select
                 filterable
                 size="small"
                 class="w100"
-                v-model="formData.verifyStatus"
+                v-model="formData.status"
                 placeholder="请选择"
                 clearable
               >
@@ -53,25 +79,15 @@
                 ></el-option>
               </el-select> </el-form-item
           ></el-col>
-          <!-- <el-col :lg="6" :sm="8" :xs="8">
-          <el-form-item label="创建时间" prop="time">
-            <el-date-picker
-              class="w100"
-              size="small"
-              v-model="formData.time"
-              type="daterange"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              value-format="yyyy-MM-dd"
-            ></el-date-picker> </el-form-item
-        ></el-col> -->
           <el-col :span="6">
             <el-form-item label="组织机构:" prop="deptIds">
-              <auth-selection v-model="formData.deptIds" style="width: 100%"></auth-selection>
+              <auth-selection
+                v-model="formData.deptIds"
+                style="width: 100%"
+              ></auth-selection>
             </el-form-item>
           </el-col>
-          <el-col  style="display: flex;justify-content: flex-end" :span="18">
+          <el-col :span="6" style="display: flex; justify-content: flex-end">
             <div>
               <el-button icon="el-icon-refresh-left" size="small" @click="reset"
                 >重置</el-button
@@ -196,11 +212,14 @@
         tableData: [],
         fromUserList: [],
         formData: {
-          bizNo: '',
-          fromUser: '',
-          time: [],
-          verifyStatus: ''
-          // type: 1
+          deptIds: '',
+          categoryCode: '',
+          categoryName: '',
+          sourceBizNo: '',
+          startTime: '',
+          endTime: '',
+          status: '',
+          time: []
         },
         total: 0,
         status: [
@@ -236,7 +255,21 @@
           {
             prop: 'assetType',
             slot: 'assetType',
-            label: '出库物品类型',
+            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
@@ -368,7 +401,6 @@
         const res = await storageApi.getInboundList({
           pageNum: page,
           size: limit,
-          bizStatus: 2,
           ...params,
           type: 2
         });

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

@@ -109,11 +109,53 @@
         </el-col>
       </el-row>
     </el-form> -->
-    <el-table
+    <ele-pro-table
+      class="table_list"
+      ref="table"
+      height="calc(100vh - 300px)"
+      :columns="columns"
+      :datasource="getList"
+      row-key="id"
+    >
+      <!-- 展开内容 -->
+      <template v-slot:expand="{ row, $index }">
+        <div
+          style="width: 100%; min-height: 60px"
+          v-if="row.materialDetailResponseList"
+        >
+          <ele-pro-table
+            :toolbar="false"
+            toolsTheme="none"
+            ref="table2"
+            :need-page="false"
+            :datasource="row.materialDetailResponseList"
+            :columns="columns2"
+            :key="row.code + '-' + $index"
+          >
+          </ele-pro-table>
+        </div>
+      </template>
+
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-view"
+          @click="handleCellClick(row)"
+        >
+          详情
+        </el-link>
+      </template>
+    </ele-pro-table>
+    <!-- <el-table
       class="table"
       :data="tableData"
       @cell-click="handleCellClick"
       :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+      :tree-props="{
+        children: 'children'
+      }"
     >
       <el-table-column width="80px" label="序号" type="index" />
       <el-table-column
@@ -144,11 +186,11 @@
         label="仓库"
         prop="warehouseName"
       ></el-table-column>
-      <!-- <el-table-column label="操作人" prop="createUserId">
+      <el-table-column label="操作人" prop="createUserId">
         <template slot-scope="{ row }">
           {{ handleDeta(row.createUserId) }}
         </template>
-      </el-table-column> -->
+      </el-table-column>
       <el-table-column label="审核人" prop="verifyName"></el-table-column>
       <el-table-column
         width="150"
@@ -167,7 +209,7 @@
       ref="detailRef"
       :assetCode="baseInfo.assetCode"
       :baseInfo="baseInfo"
-    />
+    /> -->
   </div>
 </template>
 
@@ -195,6 +237,201 @@
     },
     data() {
       return {
+        columns: [
+          {
+            width: 45,
+            type: 'expand',
+            columnKey: 'materialDetailResponseList',
+            align: 'center',
+            slot: 'expand',
+            className: ''
+          },
+          {
+            prop: 'bizNo',
+            label: '入库单号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 200
+          },
+          {
+            prop: 'name',
+            label: '入库场景',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.getSceneState(+_row.bizType);
+            }
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'measureQuantity',
+            label: '计量数量',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'packingQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'packingUnit',
+            label: '包装单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'verifyName',
+            label: '审核人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'createTime',
+            label: '入库时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 300,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+
+        // 表格列配置
+        columns2: [
+          {
+            prop: 'materialCode',
+            label: '物料编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          // {
+          //   prop: 'measureQuantity',
+          //   label: '计量数量',
+          //   showOverflowTooltip: true,
+          //   align: 'center',
+          //   minWidth: 110,
+          //   formatter: (_row) => {
+          //     return 1;
+          //   }
+          // },
+          // {
+          //   prop: 'measureUnit',
+          //   label: '计量单位',
+          //   showOverflowTooltip: true,
+          //   align: 'center',
+          //   minWidth: 110,
+          // },
+          {
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'result',
+            label: '质检结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row) => {
+              return this.qualityResults[_row.result];
+            }
+          },
+          {
+            prop: 'status',
+            label: '质检状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row) => {
+              return this.qualityStatus[_row.result];
+            }
+          }
+        ],
+        qualityStatus: {
+          0: '未质检',
+          1: '已质检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          1: '合格',
+          2: '不合格'
+        }, // 质检结果 1合格 2不合格
         sceneState,
         sceneState: [],
         searchForm: {
@@ -258,8 +495,11 @@
         if (res) {
           const list = this.$store.state.userPage.userList;
           this.vuexUser = list;
-          this.tableData = res.list;
+          // this.tableData = res.list;
           this.total = res.count;
+          return res;
+        } else {
+          return {};
         }
       }
     }

+ 226 - 6
src/views/warehouseManagement/stockLedger/components/details/OutWarehouse.vue

@@ -109,7 +109,46 @@
         </el-col>
       </el-row>
     </el-form> -->
-    <el-table
+    <ele-pro-table
+      class="table_list"
+      ref="table"
+      height="calc(100vh - 300px)"
+      :columns="columns"
+      :datasource="getList"
+      row-key="id"
+    >
+      <!-- 展开内容 -->
+      <template v-slot:expand="{ row, $index }">
+        <div
+          style="width: 100%; min-height: 60px"
+          v-if="row.materialDetailResponseList"
+        >
+          <ele-pro-table
+            :toolbar="false"
+            toolsTheme="none"
+            ref="table2"
+            :need-page="false"
+            :datasource="row.materialDetailResponseList"
+            :columns="columns2"
+            :key="row.code + '-' + $index"
+          >
+          </ele-pro-table>
+        </div>
+      </template>
+
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-view"
+          @click="handleCellClick(row)"
+        >
+          详情
+        </el-link>
+      </template>
+    </ele-pro-table>
+    <!-- <el-table
       class="table"
       :data="tableData"
       @cell-click="handleCellClick"
@@ -146,11 +185,11 @@
         width="200"
         prop="warehouseName"
       ></el-table-column>
-      <!-- <el-table-column label="操作人" prop="createUserId">
+      <el-table-column label="操作人" prop="createUserId">
         <template slot-scope="{ row }">
           {{ handleDeta(row) }}
         </template>
-      </el-table-column> -->
+      </el-table-column>
       <el-table-column label="审核人" prop="verifyName"></el-table-column>
       <el-table-column
         width="150"
@@ -170,7 +209,7 @@
       :assetCode="baseInfo.assetCode"
       :isUnpack="baseInfo.isUnpack"
       title="物品类型"
-    />
+    /> -->
     <!--    <OutWarehouseDialg
       ref="detailRef"
       :assetCode="baseInfo.assetCode"
@@ -215,6 +254,184 @@
           packetEnd: '',
           packetStart: ''
         },
+        columns: [
+          {
+            width: 45,
+            type: 'expand',
+            columnKey: 'materialDetailResponseList',
+            align: 'center',
+            slot: 'expand',
+            className: ''
+          },
+          {
+            prop: 'bizNo',
+            label: '出库单号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 200
+          },
+          {
+            prop: 'name',
+            label: '出库场景',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.getSceneState(+_row.bizType);
+            }
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'measureQuantity',
+            label: '计量数量',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'packingQuantity',
+            label: '包装数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'packingUnit',
+            label: '包装单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'verifyName',
+            label: '审核人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'createTime',
+            label: '出库时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 300,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+
+        // 表格列配置
+        columns2: [
+          {
+            prop: 'materialCode',
+            label: '物料编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'result',
+            label: '质检结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row) => {
+              return this.qualityResults[_row.result];
+            }
+          },
+          {
+            prop: 'status',
+            label: '质检状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row) => {
+              return this.qualityStatus[_row.result];
+            }
+          }
+        ],
+        qualityStatus: {
+          0: '未质检',
+          1: '已质检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          1: '合格',
+          2: '不合格'
+        }, // 质检结果 1合格 2不合格
         tableData: [],
         size: 10,
         pageNum: 1,
@@ -237,7 +454,7 @@
       },
       handleCellClick(row) {
         this.$router.push({
-          path: '/warehouseManagement/stockManagement/details',
+          path: '/warehouseManagement/outgoingManagement/details',
           query: {
             id: row.outInId
           }
@@ -269,8 +486,11 @@
         if (res) {
           const list = this.$store.state.userPage.userList;
           this.vuexUser = list;
-          this.tableData = res.list;
+          // this.tableData = res.list;
           this.total = res.count;
+          return res;
+        } else {
+          return {};
         }
       }
     }

+ 5 - 3
src/views/warehouseManagement/stockManagement/add.vue

@@ -157,6 +157,7 @@
             <el-table
               :header-cell-style="rowClass"
               :max-height="300"
+              border
               ref="productListTable"
               :data="productList"
               tooltip-effect="dark"
@@ -500,6 +501,7 @@
           :key="formData.bizType"
           :header-cell-style="rowClass"
           style="width: 100%"
+          border
           stripe
           :max-height="300"
           v-el-table-infinite-scroll="pickingHandleScroll"
@@ -700,6 +702,7 @@
           :key="formData.bizType"
           :header-cell-style="rowClass"
           style="width: 100%"
+          border
           stripe
           :max-height="300"
           v-el-table-infinite-scroll="materielHandleScroll"
@@ -1708,11 +1711,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#EEEEEE', border: 'none' };
+        return { background: '#0000' };
       },
       // 添加物品明细
       async addGoods(data) {

+ 5 - 3
src/views/warehouseManagement/stockManagement/details.vue

@@ -106,6 +106,7 @@
             ref="productListTable"
             :data="productList"
             tooltip-effect="dark"
+            border
             :max-height="300"
             :header-cell-style="rowClass"
           >
@@ -277,6 +278,7 @@
             :data="showPackingList"
             tooltip-effect="dark"
             :max-height="300"
+            border
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             v-el-table-infinite-scroll="pickingHandleScroll"
@@ -443,6 +445,7 @@
             :data="showMaterialList"
             tooltip-effect="dark"
             :max-height="300"
+            border
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
             style="width: 100%"
@@ -783,11 +786,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#0000', border: 'none' };
+        return { background: '#0000' };
       },
       async getAllCategoryType() {
         const { data } = await allCategoryLevel();

+ 49 - 16
src/views/warehouseManagement/stockManagement/index.vue

@@ -17,40 +17,57 @@
               ></el-date-picker> </el-form-item
           ></el-col>
           <el-col :span="6">
-            <el-form-item label="入库单号" prop="bizNum">
+            <el-form-item label="入库单号" prop="sourceBizNo">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.bizNum"
+                v-model="formData.sourceBizNo"
               ></el-input> </el-form-item
           ></el-col>
           <el-col :span="6">
-            <el-form-item label="编码" prop="assetCode">
+            <el-form-item label="入库类型" prop="bizType">
+              <el-select
+                style="width: 100%"
+                filterable
+                placeholder="请选择"
+                v-model="formData.bizType"
+                clearable
+              >
+                <el-option
+                  v-for="item in sceneState"
+                  :key="item.code"
+                  :value="item.code + ''"
+                  :label="item.label"
+                ></el-option>
+              </el-select> </el-form-item
+          ></el-col>
+          <el-col :span="6">
+            <el-form-item label="物品编码" prop="categoryCode">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.assetCode"
+                v-model="formData.categoryCode"
               ></el-input> </el-form-item
           ></el-col>
           <el-col :span="6">
-            <el-form-item label="名称" prop="assetName">
+            <el-form-item label="物品名称" prop="categoryName">
               <el-input
                 size="small"
                 class="w100"
                 placeholder="请输入"
-                v-model="formData.assetName"
+                v-model="formData.categoryName"
               ></el-input> </el-form-item
           ></el-col>
 
           <el-col :span="6">
-            <el-form-item label="状态" prop="verifyStatus">
+            <el-form-item label="状态" prop="status">
               <el-select
                 filterable
                 size="small"
                 class="w100"
-                v-model="formData.verifyStatus"
+                v-model="formData.status"
                 placeholder="请选择"
                 clearable
               >
@@ -83,7 +100,7 @@
               value-format="yyyy-MM-dd"
             ></el-date-picker> </el-form-item
         ></el-col> -->
-          <el-col :span="12" style="display: flex; justify-content: flex-end">
+          <el-col :span="6" style="display: flex; justify-content: flex-end">
             <div>
               <el-button icon="el-icon-refresh-left" size="small" @click="reset"
                 >重置</el-button
@@ -192,10 +209,13 @@
         tableData: [],
         formData: {
           deptIds: '',
-          bizNum: '',
-          deliveryName: '',
-          time: [],
-          verifyStatus: ''
+          categoryCode: '',
+          categoryName: '',
+          sourceBizNo: '',
+          startTime: '',
+          endTime: '',
+          status: '',
+          time: []
           // type: 1
         },
         total: 0,
@@ -232,7 +252,21 @@
           {
             prop: 'assetType',
             slot: 'assetType',
-            label: '入库物品类型',
+            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
@@ -336,8 +370,7 @@
           pageNum: page,
           size: limit,
           type: 1,
-          ...params,
-          bizStatus: 1
+          ...params
         });
 
         return res;

+ 1 - 1
vue.config.js

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