Browse Source

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wms into dengfei

695593266@qq.com 8 months ago
parent
commit
d75a780165

+ 37 - 17
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -13,6 +13,7 @@
               <el-select
                 style="width: 100%"
                 @change="changeDimensionHandler"
+                @keyup.enter.native="doSearch"
                 v-model="dimension"
                 placeholder="请选择"
               >
@@ -30,6 +31,7 @@
               type="text"
               placeholder="搜索物品编码"
               v-model="searchForm.categoryCode"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -39,6 +41,7 @@
               type="text"
               placeholder="搜索物品名称"
               v-model="searchForm.categoryName"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -48,6 +51,7 @@
               type="text"
               placeholder="搜索批次号"
               v-model="searchForm.batchNo"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -57,6 +61,7 @@
               type="text"
               placeholder="搜索物品刻码"
               v-model="searchForm.engrave"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -66,6 +71,7 @@
               type="text"
               placeholder="搜索物料代号"
               v-model="searchForm.materielDesignation"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -75,6 +81,7 @@
               type="text"
               placeholder="搜索发货码"
               v-model="searchForm.barcodes"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -84,42 +91,46 @@
               type="text"
               placeholder="搜索牌号"
               v-model="searchForm.brandNum"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="仓库">
+          <el-form-item label="所属工厂" prop="factoryId">
             <el-select
-              clearable
-              style="width: 100%"
-              v-model="searchForm.warehouseId"
+              filterable
               placeholder="请选择"
+              v-model="searchForm.factoryId"
+              clearable
+              class="w100"
+              @keyup.enter.native="doSearch"
+              @change="getWarehouseListHandle"
             >
               <el-option
-                v-for="item in warehouseList"
+                v-for="item in factoryList"
+                :key="item.id"
                 :label="item.name"
                 :value="item.id"
-                :key="item.id"
-              >
-              </el-option>
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="所属工厂" prop="factoryId">
+          <el-form-item label="仓库">
             <el-select
-              filterable
-              placeholder="请选择"
-              v-model="searchForm.factoryId"
               clearable
-              class="w100"
+              style="width: 100%"
+              v-model="searchForm.warehouseId"
+              placeholder="请选择"
+              @keyup.enter.native="doSearch"
             >
               <el-option
-                v-for="item in factoryList"
-                :key="item.id"
+                v-for="item in warehouseList"
                 :label="item.name"
                 :value="item.id"
-              ></el-option>
+                :key="item.id"
+              >
+              </el-option>
             </el-select>
           </el-form-item>
         </el-col>
@@ -131,6 +142,7 @@
               type="text"
               placeholder="请输入"
               v-model="searchForm.keyWord"
+              @keyup.enter.native="doSearch"
             ></el-input>
           </el-form-item>
         </el-col>
@@ -247,6 +259,7 @@
         selectionList: [],
         materialType: '',
         warehouseList: [],
+        allWarehouseList:[],
         dimension: '1',
         productLists: [],
         columnsVersion: 1,
@@ -497,7 +510,14 @@
 
       async getWarehouse() {
         const { data } = await getWarehouseList();
-        this.warehouseList = data;
+        this.allWarehouseList = data;
+      },
+
+      getWarehouseListHandle(val) {
+        this.searchForm.warehouseId = '';
+        this.warehouseList = this.allWarehouseList.filter(
+          (item) => item.factoryId === val
+        );
       },
 
       // 获取动态表头

+ 25 - 11
src/views/warehouseManagement/components/WarehousingDialog.vue

@@ -24,7 +24,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="4" style="margin-top: 3px;">
+        <el-col :span="4" style="margin-top: 3px">
           <el-button type="primary" @click="addTableData">添加</el-button>
         </el-col>
         <el-col :span="6">
@@ -149,24 +149,38 @@
         this.tableDate.splice(index, 1);
       },
       async getWarehouseList(categoryType) {
-        const res = await warehouseDefinition.list({
+        let params = {
           inventoryType: categoryType
-        });
+        };
+
+        if (this.$store.state.user.info.factoryId) {
+          params['factoryId'] = this.$store.state.user.info.factoryId;
+        }
+        const res = await warehouseDefinition.list(params);
         this.warehouseList = res.map((item) => {
           return { ...item, name: item.name };
         });
       },
       async getBatchWarehouseList(batch) {
-        const res = await warehouseDefinition.list({});
-        if (!batch.length) {
-          this.warehouseList = res.map((item) => {
-            return { ...item, name: item.name };
-          });
-          return;
+        let params = {};
+
+        if (this.$store.state.user.info.factoryId) {
+          params['factoryId'] = this.$store.state.user.info.factoryId;
         }
+        if (batch?.length == 1) {
+          params['inventoryType'] = batch[0];
+        }
+
+        const res = await warehouseDefinition.list(params);
+        // if (!batch.length) {
+        //   this.warehouseList = res.map((item) => {
+        //     return { ...item, name: item.name };
+        //   });
+        //   return;
+        // }
 
-        let filter = res.filter((item) => batch.includes(item.inventoryType));
-        this.warehouseList = filter.map((item) => {
+        // let filter = res.filter((item) => batch.includes(item.inventoryType));
+        this.warehouseList = res.map((item) => {
           return { ...item, name: item.name };
         });
       },

+ 187 - 174
src/views/warehouseManagement/inboundRequests/components/tgTable.vue

@@ -1,10 +1,18 @@
 <template>
   <div class="tgTable">
     <!-- 数据表格 -->
-    <ele-pro-table ref="table1" :columns="columns" height="calc(100vh-300px)" :pageSize="20" :datasource="datasource"
-      cache-key="workOrderTable">
+    <ele-pro-table
+      ref="table1"
+      :columns="columns"
+      height="calc(100vh-300px)"
+      :pageSize="20"
+      :datasource="datasource"
+      cache-key="workOrderTable"
+    >
       <template v-slot:code="{ row }">
-        <el-link type="primary" :underline="false" @click="details(row)">{{ row.code }}</el-link>
+        <el-link type="primary" :underline="false" @click="details(row)">{{
+          row.code
+        }}</el-link>
       </template>
       <template v-slot:totalCount="{ row }">
         {{ row.totalCount }} {{ row.measuringUnit }}
@@ -28,7 +36,11 @@
       </template>
 
       <template v-slot:action="{ row }">
-        <el-link type="primary" :underline="false" @click="depotInOut(row, type)">
+        <el-link
+          type="primary"
+          :underline="false"
+          @click="depotInOut(row, type)"
+        >
           {{ type == 1 ? '入库' : '出库' }}
         </el-link>
       </template>
@@ -38,192 +50,193 @@
 </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: ''
-    }
-  },
-  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',
-          slot: 'code',
-          label: '编码',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 100
-        },
-        {
-          prop: 'categoryNames',
-          label: '名称',
-          showOverflowTooltip: true,
-          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: 'createUserName',
-          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;
+  import { outputSceneState, sceneState } from '@/utils/dict/index';
+  import storageApi from '@/api/warehouseManagement';
+  import tgDetails from './tgDetails.vue';
+  export default {
+    props: {
+      type: {
+        type: String,
+        default: ''
+      }
     },
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      return storageApi.getinboundRequestsList({
-        pageNum: page,
-        size: limit,
-        type: this.type,
-        ...where
-      });
+    components: {
+      tgDetails
     },
-    details(row) {
-      this.$refs.tgDetailsRefs.open(row);
+    data() {
+      return {
+        outputSceneState,
+        sceneState,
+        loading: false,
+        statusOpt: [
+          { label: '待处理', value: 0 },
+          { label: '已处理', value: 1 },
+          { label: '已撤销', value: 2 }
+        ]
+      };
     },
-    depotInOut(row, type) {
-      console.log(row, type);
-      if (type == 1) {
-        this.$router.push({
-          path: '/warehouseManagement/stockManagement/add',
-          query: {
-            code: row.code,
-            inId: row.id,
-            type: '1',
-            sourceType: row.sourceType,
-            name: 'inboundRequests'
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            slot: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'categoryNames',
+            label: '名称',
+            showOverflowTooltip: true,
+            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: 'createUserName',
+            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
         });
-      } else {
-        this.$router.push({
-          path: '/warehouseManagement/outgoingManagement/add',
-          query: {
-            code: row.code,
-            id: row.id,
-            type: '2',
-            sourceType: row.sourceType
+      },
+      details(row) {
+        this.$refs.tgDetailsRefs.open(row);
+      },
+      depotInOut(row, type) {
+        console.log(row, type);
+        if (type == 1) {
+          this.$router.push({
+            path: '/warehouseManagement/stockManagement/add',
+            query: {
+              code: row.code,
+              inId: row.id,
+              type: '1',
+              sourceType: row.sourceType,
+              name: 'inboundRequests'
+            }
+          });
+        } else {
+          this.$router.push({
+            path: '/warehouseManagement/outgoingManagement/add',
+            query: {
+              code: row.code,
+              id: row.id,
+              type: '2',
+              sourceType: row.sourceType,
+              fromId: row.createUserId,
+            }
+          });
+        }
+      },
+      /* 刷新表格 */
+      reload(where) {
+        console.log(where, '11111where');
+        this.$nextTick(() => {
+          if (this.$refs.table1 && this.$refs.table1.loading) {
+            this.$refs.table1.reload({ page: 1, where });
           }
         });
       }
-    },
-    /* 刷新表格 */
-    reload(where) {
-      console.log(where, '11111where')
-      this.$nextTick(() => {
-        if (this.$refs.table1 && this.$refs.table1.loading) {
-          this.$refs.table1.reload({ page: 1, where });
-        }
-      });
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.tgTable {
-  height: 100%;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-
-  .ele-pro-table {
-    flex: 1;
+  .tgTable {
+    height: 100%;
+    box-sizing: border-box;
     display: flex;
     flex-direction: column;
 
-    .el-table {
+    .ele-pro-table {
       flex: 1;
-      // display: flex;
-      // flex-direction: column;
-      // .el-table__body-wrapper {
-      //   flex: 1;
-      // }
+      display: flex;
+      flex-direction: column;
+
+      .el-table {
+        flex: 1;
+        // display: flex;
+        // flex-direction: column;
+        // .el-table__body-wrapper {
+        //   flex: 1;
+        // }
+      }
     }
   }
-}
 </style>

+ 51 - 3
src/views/warehouseManagement/inventoryAllocation/add.vue

@@ -177,7 +177,26 @@
               </el-col>
             </el-row>
             <el-row :gutter="15">
-              <el-col :span="18">
+              <el-col :span="9">
+                <el-form-item
+                  label="列表维度:"
+                  label-width="65px"
+                  prop="dimension"
+                >
+                  <template>
+                    <el-select
+                      clearable
+                      @change="handledime"
+                      v-model="dimension"
+                      placeholder="请选择"
+                    >
+                      <el-option label="批次维度" value="2"> </el-option>
+                      <el-option label="包装维度" value="3"> </el-option>
+                    </el-select>
+                  </template>
+                </el-form-item>
+              </el-col>
+              <el-col :span="10">
                 <el-input
                   placeholder="请输入名称/编码/批次号/型号/规格/客户代号/刻码"
                   v-model="query.keyWord"
@@ -192,7 +211,7 @@
                   >
                 </el-input>
               </el-col>
-              <el-col :span="6">
+              <el-col :span="5">
                 <div
                   style="
                     display: flex;
@@ -288,15 +307,18 @@
             <el-table-column
               label="包装编码"
               prop="packageNo"
+              v-if="dimension == 3"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
+              v-if="dimension == 3"
               label="包装数量"
               prop="packingQuantity"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="包装单位"
+              v-if="dimension == 3"
               prop="packingUnit"
               :show-overflow-tooltip="true"
             ></el-table-column>
@@ -529,18 +551,26 @@
               prop="specification"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
             <el-table-column
               label="包装编码"
+              v-if="dimension == 3"
               prop="packageNo"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="包装数量"
+              v-if="dimension == 3"
               prop="packingQuantity"
               :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="包装单位"
+              v-if="dimension == 3"
               prop="packingUnit"
               :show-overflow-tooltip="true"
             ></el-table-column>
@@ -613,6 +643,7 @@
         tuneLibrary: [], // 调入库
         outWarehouseList: [],
         inWarehouseList: [],
+        dimension: '3',
         params: {
           code: '',
           name: '',
@@ -704,6 +735,14 @@
           inFreightId: '', // 调入货位
           inFreightName: ''
         };
+        if (dataList?.length) {
+          if (dataList[0].packageNo) {
+            this.dimension = '3';
+          }else{
+            this.dimension = '2';
+
+          }
+        }
         if (this.allocateId == 1) {
           // 库内调拨
           await this.outWarehouseChange(baseInfo.sourceWarehouseId); // 加载调出库区
@@ -712,6 +751,7 @@
           await this.outWarehouseChange(baseInfo.sourceWarehouseId); // 加载调出库区
           this.inWarehouseChange(baseInfo.targetWarehouseId); // 加载调入库区
         }
+
         // 处理右边显示数据
         this.selectionIds = dataList.map((item) => item.outInDetailRecordId);
         this.selection = this.productList.filter((item) => {
@@ -1048,6 +1088,12 @@
       inChange(val) {
         let obj = this.$refs.outTree.getNodeByValue(val);
       },
+      handledime() {
+        this.getProductList();
+        this.selection=[]
+        this.$refs.table.clearSelection()
+        this.tableData=[]
+      },
       async getProductList() {
         let params = {
           ...this.query,
@@ -1056,7 +1102,9 @@
           warehouseAreaGoodsId: this.params.outShelvesId,
           warehouseAreaGoodsShelvesId: this.params.outFreightId
         };
-        const data = await storageApi.getPackingList({
+        const data = await storageApi[
+          this.dimension == 2 ? 'getBatchList' : 'getPackingList'
+        ]({
           ...params,
           pageNum: this.page,
           size: this.size

+ 86 - 7
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -73,6 +73,16 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="6">
+            <el-form-item label="出库时间">
+              <el-date-picker
+                v-model="formData.storageTime"
+                type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                placeholder="选择日期时间"
+              >
+              </el-date-picker></el-form-item
+          ></el-col>
           <el-col :span="6">
             <el-form-item label="出库登记人">
               <el-input
@@ -338,6 +348,28 @@
                 min-width="200"
                 :show-overflow-tooltip="true"
               ></el-table-column>
+              <el-table-column
+                fixed="right"
+                label="操作"
+                align="center"
+                width="70"
+              >
+                <template slot-scope="scope">
+                  <el-popconfirm
+                    title="确定删除吗?"
+                    @confirm="handleDeleteClick(scope.row, scope.$index)"
+                  >
+                    <el-link
+                      slot="reference"
+                      type="danger"
+                      :underline="false"
+                      icon="el-icon-delete"
+                    >
+                      删除
+                    </el-link>
+                  </el-popconfirm>
+                </template>
+              </el-table-column>
             </el-table>
           </div>
           <header-title class="mt20" title="包装清单"></header-title>
@@ -594,6 +626,7 @@
         treeList: [],
         isPrice: 1,
         formData: {
+          storageTime: '',
           extInfo: {
             assetType: [], //物品类型id
             assetTypeName: '', //物品类型名称
@@ -652,6 +685,7 @@
       this.getListItems();
       this.initUserInfo();
       this.initDeptData();
+      this.getNowFormatDate();
       //仓库出入库是否显示金额(0:不显示 1:显示)
       parameterGetByCode({
         code: 'wms_price'
@@ -681,8 +715,32 @@
       }
     },
     methods: {
+      // 获取当前时间函数
+      getNowDate() {
+        let date = new Date(),
+          obj = {
+            year: date.getFullYear(), //获取完整的年份(4位)
+            month: date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+            strDate: date.getDate(), // 获取当前日(1-31)
+            hour: date.getHours(), //获取当前小时(0 ~ 23)
+            minute: date.getMinutes(), //获取当前分钟(0 ~ 59)
+            second: date.getSeconds() //获取当前秒数(0 ~ 59)
+          };
+        Object.keys(obj).forEach((key) => {
+          if (obj[key] < 10) obj[key] = `0${obj[key]}`;
+        });
+        return obj;
+      },
+      // 赋值出库时间
+      getNowFormatDate() {
+        let obj = this.getNowDate();
+        this.formData.storageTime = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
+      },
+
       outboundRequisitionSelection(data, dimension, query) {
-        console.log(data, dimension, query);
+        console.log(data, 'd');
+        console.log(dimension, 'sss');
+        console.log(query, 'dsd');
         this.formData.sourceBizNo = query.sourceBizNo;
         this.formData.bizType = Number(query.bizType);
         this.formData.extInfo.assetType = query.assetType.split(',');
@@ -763,9 +821,7 @@
       },
       // getDeptName() {
       //   if (this.formData?.extInfo?.createUserId) {
-      //     storageApi.getGroupById(this.formData.extInfo.createUserId).then((res) => {
-      //       this.formData.extInfo.deptName = res?.groupName
-      //     });
+
       //   }
       // },
       async _getInfo(detailId) {
@@ -982,12 +1038,14 @@
                 } else {
                   this.$message.success('保存成功!');
                 }
-                this.$router.push('/warehouseManagement/outgoingManagement');
+                // this.$router.push('/warehouseManagement/outgoingManagement');
+                this.$router.go(-1);
               }
               this.saveLoading = false;
             } catch (error) {
               this.saveLoading = false;
-              this.$router.push('/warehouseManagement/outgoingManagement');
+              // this.$router.push('/warehouseManagement/outgoingManagement');
+              this.$router.go(-1);
               this.$message.error('保存失败!');
             }
           } else {
@@ -1072,7 +1130,7 @@
 
         console.log(this.$route.query.detailId);
 
-        if (!this.$route.query.detailId) {
+        if (!this.$route.query.detailId && !this.$route.query?.fromId) {
           // 默认领料人部门
           this.$set(this.formData.extInfo, 'verifyDeptCode', info?.groupId);
           this.$set(this.formData.extInfo, 'verifyDeptName', info?.groupName);
@@ -1083,6 +1141,18 @@
           this.$set(this.formData, 'fromUser', info.name);
           this.$set(this.formData, 'fromUserPhone', info.phone);
         }
+        if (this.$route.query?.fromId) {
+          storageApi.getGroupById(this.$route.query?.fromId).then((res) => {
+            console.log(res, 'dsdsd');
+            this.$set(this.formData.extInfo, 'verifyDeptCode', res.groupId);
+            this.$set(this.formData.extInfo, 'verifyDeptName', res.groupName);
+            this.$set(this.formData, 'fromId', res.id);
+            this.$set(this.formData, 'fromUser', res.name);
+            this.$set(this.formData, 'fromUserPhone', res.phone);
+
+            this.getStaffList({ id: res.groupId });
+          });
+        }
       },
       // 初始化部门数据
       async initDeptData() {
@@ -1106,6 +1176,15 @@
 
         this.$refs.assetsDialogRef.open(this.productList);
       },
+      //
+      handleDeleteClick(row, index) {
+        console.log('删除', row.id);
+        this.productList.splice(index, 1);
+        console.log('删除后', this.packingList);
+        this.packingList = this.packingList.filter(
+          (item) => item.outInDetailId !== row.id
+        );
+      },
       handleBizSceneChange() {
         if (this.formData.extInfo.assetType == 7) {
           this.formData.extInfo.sourceBizNo = '';

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

@@ -61,6 +61,11 @@
                   <span>{{ infoData.fromUserPhone }}</span>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="出库时间:">
+                   <span>{{ infoData.storageTime||infoData.createTime }}</span>
+                </el-form-item>
+              </el-col>
               <el-col :span="8">
                 <el-form-item label="出库登记人:">
                   <span>{{ extInfo?.createUserName }}</span>

+ 35 - 11
src/views/warehouseManagement/statisticalReports/transceiverSummary/index.vue

@@ -17,6 +17,7 @@
         :needPage="false"
         :cell-class-name="setCellClass"
         :span-method="spanMethod"
+        :cache-key="cacheKeyUrl"
       >
         <!-- <template v-slot:action="{ row }">
           <el-link
@@ -78,28 +79,32 @@
             type: 'index',
             label: '序号',
             width: 50,
-            align: 'center'
+            align: 'center',
+            fixed: 'left'
           },
           {
             prop: 'clientName',
             label: '客户',
             align: 'center',
             width: 200,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'categoryCode',
             label: '编码',
             align: 'center',
             width: 180,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'categoryName',
             label: '名称',
             align: 'center',
             width: 180,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'startNum',
@@ -107,26 +112,37 @@
             slot: 'startTime',
             align: 'center',
             width: 80,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'endNum',
             label: '结存\n合计',
             align: 'center',
             width: 0,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'totalNum',
-            label: '小计',
+            label: '数量',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'category',
             label: '类别',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'categoryNum',
+            label: '类别小计',
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
           {
             prop: 'dateList',
@@ -143,7 +159,9 @@
 
     data() {
       return {
-        date: ''
+        date: '',
+        cacheKeyUrl:
+          'wms-warehouseManagement-statisticalReports-transceiverSummary'
       };
     },
     methods: {
@@ -158,9 +176,10 @@
       },
 
       spanMethod({ row, column, rowIndex, columnIndex }) {
+        
         if (
           column.property === 'startNum' ||
-          column.property === 'endNum' ||
+          // column.property === 'endNum' ||
           column.property === 'totalNum'
         ) {
           const groupStartIndex = Math.floor(rowIndex / 5) * 5;
@@ -178,6 +197,11 @@
             };
           }
         }
+        if(row.dateList?.length){
+          row.categoryNum = row.dateList.reduce((total, item) => {
+            return total + item.dateTotalNum;
+          }, 0);
+        }
         // 其他列不进行合并
         return {
           rowspan: 1,

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

@@ -184,13 +184,13 @@ export default {
     },
     methods: {
         datasource({ page, limit, where }) {
-            const data = storageApi.getPackingList({ ...where, page, limit });
+            const data = storageApi.getPackingList({ ...where, pageNum:page, size:limit });
             return data;
         },
         reload(where) {
             this.$nextTick(() => {
                 if (this.$refs.table1 && this.$refs.table1.reload)
-                    this.$refs.table1.reload({ page: 1, where: where });
+                    this.$refs.table1.reload({ pageNum: 1, where: where });
             })
         },
 

+ 88 - 24
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -20,6 +20,8 @@
       @select-all="changeSelectAll"
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
+      :summary-method="getSummaries"
+      show-summary
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar="{ row }">
@@ -212,10 +214,7 @@
         >
       </span>
     </el-dialog>
-    <printQRCode
-      ref="printQRCodeRef"
-
-    ></printQRCode>
+    <printQRCode ref="printQRCodeRef"></printQRCode>
     <importDialog
       :defModule="moudleName"
       ref="importDialogRef"
@@ -256,7 +255,14 @@
 
   export default {
     mixins: [tabMixins],
-    components: { ItemSearch, print, allot, importDialog, exportButton,printQRCode },
+    components: {
+      ItemSearch,
+      print,
+      allot,
+      importDialog,
+      exportButton,
+      printQRCode
+    },
     props: {
       // 机构id
       organizationId: [Number, String],
@@ -275,6 +281,7 @@
       return {
         params: {},
         moudleName: 'stock',
+        totalMoney: '',
         qualityStatus,
         qualityResults,
         config: [],
@@ -387,15 +394,7 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          this.selectedDime == 2
-            ? {
-                prop: 'supplierName',
-                label: '供应商',
-                showOverflowTooltip: true,
-                width: 130,
-                align: 'center'
-              }
-            : '',
+
           {
             prop: 'level',
             label: '级别',
@@ -490,7 +489,7 @@
               }
             : '',
 
-          this.selectedDime == 3||this.selectedDime == 2
+          this.selectedDime == 3 || this.selectedDime == 2
             ? {
                 prop: 'warehouseName',
                 label: '仓库名称',
@@ -561,19 +560,20 @@
                 showOverflowTooltip: true
               }
             : '',
-          // {
-          //   prop: 'supplierName',
-          //   label: '供应商',
-          //   width: 120,
-          //   showOverflowTooltip: true
-          // },
+          {
+            prop: 'supplierName',
+            label: '供应商',
+            width: 120,
+            showOverflowTooltip: true
+          },
           {
             prop: 'supplierCode',
             label: '供应商代号',
             width: 120,
             showOverflowTooltip: true
           },
-          this.selectedDime != 1
+
+          this.selectedDime == 1
             ? {
                 prop: 'provenance',
                 label: '产地',
@@ -586,8 +586,25 @@
                 label: '单价',
                 showOverflowTooltip: true
               }
+            : '',
+          this.isPrice == 1
+            ? {
+                prop: 'totalMoney',
+                label: '金额',
+                showOverflowTooltip: true
+              }
+            : '',
+
+          this.selectedDime == 2
+            ? {
+                prop: 'createTime',
+                width: 120,
+                label: '入库时间',
+                showOverflowTooltip: true
+              }
             : ''
         ];
+
         if (this.selectedDime == 1) {
           return arr.filter((item) => item != '').concat(this.newColumns);
         } else {
@@ -599,8 +616,7 @@
       }
     },
     methods: {
-
-     openQRCode(row, type) {
+      openQRCode(row, type) {
         this.$refs.printQRCodeRef.open(row, type);
       },
 
@@ -687,6 +703,47 @@
         this.cacheKeyUrl = this.diffCacheKeyUrl + val;
         this.getTabColumns();
       },
+      setCacheKeyUrl(val) {
+        this.cacheKeyUrl = val;
+        this.getTabColumns();
+      },
+      getSummaries(param) {
+        let key = ['totalMoney'];
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+
+          if (key.includes(column.property)) {
+            const values = data.map((item) => Number(item[column.property]));
+            console.log(values);
+
+            if (!values.every((value) => isNaN(value))) {
+              sums[index] = values.reduce((prev, curr) => {
+                const value = Number(curr);
+                if (!isNaN(value)) {
+                  return prev + curr;
+                } else {
+                  return prev;
+                }
+              }, 0);
+              sums[index] = parseFloat(sums[index])
+                .toFixed(3)
+                .replace(/\.?0+$/, '');
+            } else {
+              sums[index] = '';
+            }
+          } else {
+            sums[index] = '';
+          }
+        });
+        console.log('sums', sums);
+
+        return sums;
+      },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         console.log('this.selectedDime-----------', this.selectedDime);
@@ -760,6 +817,8 @@
             pageNum: page,
             size: limit
           });
+          console.log(data, 'data');
+          // this.totalMoney=data
           return data;
         }
       },
@@ -879,4 +938,9 @@
     width: 100%;
     margin-left: 10px;
   }
+  .header_view {
+    display: flex;
+    flex: 1;
+    justify-content: flex-end;
+  }
 </style>

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

@@ -55,7 +55,7 @@
             ></auth-selection>
           </el-form-item>
         </el-col> -->
-        <el-col  :span="6">
+        <el-col :span="6">
           <el-form-item label="列表维度:" prop="dimension">
             <template>
               <el-select
@@ -65,7 +65,12 @@
                 v-model="dimension"
                 placeholder="请选择"
               >
-                <el-option label="物品维度" value="1" v-if="type === 'products'"> </el-option>
+                <el-option
+                  label="物品维度"
+                  value="1"
+                  v-if="type === 'products'"
+                >
+                </el-option>
                 <el-option label="批次维度" value="2"> </el-option>
                 <el-option label="包装维度" value="3"> </el-option>
                 <!-- <el-option
@@ -87,6 +92,19 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="6" v-if="dimension == 2">
+          <el-form-item label="入库时间:" prop="startTime">
+            <el-date-picker
+              style="width: 100%;"
+              size="small"
+              v-model="params.startTime"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
         <!-- <el-col :span="6">
           <el-form-item label="物品编码:" prop="categoryCode">
             <el-input
@@ -123,7 +141,7 @@
               placeholder="请输入"
             ></el-input>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="6">
           <el-form-item label="型号:" prop="categoryModel">
             <el-input
@@ -142,7 +160,7 @@
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col v-if="dimension == 3 || dimension == 4" :span="6">
+        <!-- <el-col v-if="dimension == 3 || dimension == 4" :span="6">
           <el-form-item label="客户代号:" prop="clientCode">
             <el-input
               clearable
@@ -160,7 +178,7 @@
             ></el-input>
           </el-form-item>
         </el-col> -->
-        <el-col :span="type === 'products' ? 24 : 12">
+        <el-col :span="6">
           <div class="ele-form-actions">
             <el-button
               type="primary"
@@ -187,6 +205,7 @@
 <script>
   import { getWarehouseList } from '@/api/classifyManage/itemInformation';
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import en from '@/i18n/lang/en';
   export default {
     data() {
       // 默认表单数据
@@ -206,7 +225,9 @@
         factoryId: '',
         keyWord: '',
         deptIds: '',
-        warehouseId: ''
+        warehouseId: '',
+        startTime: '',
+        endTime: ''
       };
       return {
         // 表单数据
@@ -289,7 +310,8 @@
       },
       /* 搜索 */
       search() {
-        console.log(this.current);
+        this.params.endTime = this.params.startTime;
+
         this.$emit('search', {
           ...this.params
         });

+ 2 - 3
src/views/warehouseManagement/stockLedger/index.vue

@@ -80,7 +80,6 @@
         currentId: '',
         treeList: [],
         treeLoading: false,
-        cacheKeyUrl: 'eos-439decaa-warehouseManagement-stockLedger-products2'
       };
     },
     async created() {
@@ -95,10 +94,10 @@
         if (val === 'products') {
           this.cacheKeyUrl= "eos-439decaa-warehouseManagement-stockLedger-products2"
         } else if (val === 'warehouse') {
-          this.cacheKeyUrl= "eos-439decaa-warehouseManagement-stockLedger-warehouse"
+          this.cacheKeyUrl= "eos-439decaa-warehouseManagement-stockLedger-products3"
         }
 
-        this.$refs.listRef.getTabColumns(this.cacheKeyUrl)
+        this.$refs.listRef.setCacheKeyUrl(this.cacheKeyUrl)
       },
       async getTreeData() {
         try {

+ 32 - 18
src/views/warehouseManagement/stockManagement/add.vue

@@ -1369,7 +1369,7 @@
                 categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
-                batchNo: batchNo, // 批次号
+                batchNo: item.batchNo || batchNo, // 批次号
                 minPackingQuantity: item.quantity, // 最小包装单元数量
                 packingQuantity: 1, // 包装数量
                 packingUnit: item.packingUnit, // 单位
@@ -1446,7 +1446,7 @@
                   //
                   packingSpecificationLabel:
                     productItem.extField?.packingSpecification?.split(','),
-                  batchNo: batchNo, // 批次号
+                  batchNo: productItem.batchNo || batchNo, // 批次号
                   warehouseIds: [productItem.warehouseId], // 仓库Id
                   warehouseNames: [productItem.warehouseName], // 仓库名称
                   outInDetailRecordRequestList:
@@ -1460,7 +1460,7 @@
                                 productIndex +
                                 '-' +
                                 packingIndex, // 包装索引
-                              batchNo: batchNo, // 批次号
+                              batchNo: productItem.batchNo || batchNo, // 批次号
                               parentIndex:
                                 this.productList.length + productIndex, // 物品索引
                               categoryName: productItem.categoryName,
@@ -1765,7 +1765,10 @@
             productItem.materielCode = productItem.materielCode;
             productItem.categoryModel = productItem.modelType; // 物品型号
             productItem.specification = productItem.specification; // 规格
-            productItem.batchNo = batchNo; // 批次号
+            productItem.engrave = productItem.engrave; // 刻码
+            materielDesignation = productItem.materielDesignation; //物料代号
+            productItem.clientCode = productItem.clientCode; // 客户代号
+            productItem.batchNo = productItem.batchNo || batchNo; // 批次号
             productItem.warehouseIds = [productItem.warehouseId]; // 仓库Id
             productItem.warehouseNames = [productItem.warehouseName]; // 仓库名称
             productItem.packingSpecificationOption =
@@ -1782,7 +1785,7 @@
                           productIndex +
                           '-' +
                           packingIndex, // 包装索引
-                        batchNo: batchNo, // 批次号
+                        batchNo: productItem.batchNo || batchNo, // 批次号
                         parentIndex: this.productList.length + productIndex, // 物品索引
                         categoryName: productItem.categoryName,
                         categoryCode: productItem.categoryCode,
@@ -1819,9 +1822,8 @@
             if (item.weight === null || item.weight === undefined) {
               item.weight = 0;
             }
-            item.supplierListOptions=supplierList[item.categoryId], // 供应商列表
- 
-            item.packingUnit = item.measuringUnit; // 单位
+            (item.supplierListOptions = supplierList[item.categoryId]), // 供应商列表
+              (item.packingUnit = item.measuringUnit); // 单位
             item.packingUnitId = item.packingSpecificationOption.find(
               (v) => v.conversionUnit == item.measuringUnit
             )?.id; // 单位
@@ -2226,7 +2228,7 @@
                 categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
-                batchNo: batchNo, // 批次号
+                batchNo: item.batchNo || batchNo, // 批次号
                 minPackingQuantity: 1, // 最小包装单元数量
                 packingQuantity: filterArray[0]['数量'], // 包装数量
                 packingUnit: item.packingUnit, // 单位
@@ -2357,10 +2359,12 @@
                     // 委外入库(非采购)
 
                     this.saveLoading = false;
-                    this.$router.push('/warehouseManagement/stockManagement');
+                    // this.$router.push('/warehouseManagement/stockManagement');
+                    this.back();
                   } catch (error) {
                     this.saveLoading = false;
-                    this.$router.push('/warehouseManagement/stockManagement');
+                    // this.$router.push('/warehouseManagement/stockManagement');
+                    this.back();
                     console.log('提交流程失败', error);
                   }
                 }
@@ -2746,7 +2750,7 @@
             colorKey: item.colorKey ? item.colorKey.split(',') : '', // 颜色
             color: item.color,
             brandNum: item.brandNum, // 牌号
-            batchNo: batchNo, // 批次号
+            batchNo: item.batchNo || batchNo, // 批次号
             supplierListOptions: supplierList[item.id], // 供应商列表
             supplierId: '', // 供应商id
             supplierName: '', // 供应商名称
@@ -3142,7 +3146,9 @@
               netWeight: row.netWeight, // 净重
               barcodes: '', // 发货条码
               clientCode: row.extInfo ? row.extInfo.clientCode : '', // 客户代号
-              materielDesignation: row.extInfo ? row.extInfo.materielCode : '', // 物料代号
+              materielDesignation:
+                row.materielDesignation ||
+                (row.extInfo ? row.extInfo.materielCode : ''), // 物料代号
               supplierName: row.supplierName, // 供应商名称
               supplierCode: row.supplierCode, // 供应商代号
               engrave: '', // 刻码
@@ -3243,6 +3249,10 @@
             } else {
               measureQuantity = row.packingSpecificationOption[1].packageCell;
             }
+            console.log(
+              'meadasdassureQuantity',
+              row.weight / row.packingQuantity
+            );
             let item = {
               index: row.index + '-' + index, // 包装索引
               warehouseId: row.warehouseId, // 仓库id
@@ -3252,6 +3262,7 @@
               categoryModel: row.categoryModel, // 物品型号
               specification: row.specification, // 规格
               supplierCode: row.supplierCode, // 供应商编码
+
               brandNum: row.brandNum, // 牌号
               parentIndex: row.index, // 产品索引
               modelKey: row.modelKey, // 机型
@@ -3267,16 +3278,19 @@
                     : row.packingSpecificationOption[0].packageUnit
                   : row.measureUnit
                 : row.measureUnit, // 计量单位
-              weight: 0, // 重量
+              weight: row.weight / row.packingQuantity,
               packingSpecificationOption: row.packingSpecificationOption, // 包装规格
               weightUnit: row.weightUnit, // 重量单位
               netWeight: row.netWeight, // 净重
               barcodes: '', // 发货条码
-              clientCode: row.extInfo ? row.extInfo.clientCode : '', // 客户代号
-              materielDesignation: row.extInfo ? row.extInfo.materielCode : '', // 物料代号
+              clientCode:
+                row.clientCode || (row.extInfo ? row.extInfo.clientCode : ''), // 客户代号
+              materielDesignation:
+                row.materielDesignation ||
+                (row.extInfo ? row.extInfo.materielCode : ''), // 物料代号
               supplierName: row.supplierName, // 供应商名称
               supplierCode: row.supplierCode, // 供应商代号
-              engrave: '', // 刻码
+              engrave: row.engrave, // 刻码
               isUnpack: row.isUnpack, // 是否允许拆包
               productionDate: productionDate, // 生产日期
               purchaseDate: purchaseDate, // 采购时间
@@ -3365,7 +3379,7 @@
                     item.weight =
                       Number(item.measureQuantity) * Number(row.singleWeight);
                   } else {
-                    item.weight = 0;
+                    item.weight = item.weight || 0;
                   }
                 }
               }

+ 200 - 0
src/views/warehouseManagement/stockManagement/components/printStockEnter.vue

@@ -0,0 +1,200 @@
+<template>
+  <ele-modal
+    title="入库单"
+    :visible.sync="QRvisible"
+    v-if="QRvisible"
+    width="80%"
+    @close="close"
+  >
+    <div
+      id="printSection"
+      style="
+        font-family: SimSun, serif;
+        padding: 20px;
+      "
+    >
+      <!-- 入库单标题 -->
+      <div style="text-align: center; margin-bottom: 20px;">
+        <h2 style="margin: 0; font-size: 24px; font-weight: bold;">入库单</h2>
+      </div>
+      
+      <!-- 供应商信息 -->
+      <div style="margin-bottom: 20px; width: 100%;">
+        <div style="width: 100%; display: flex;">
+          <div style="width: 40%;">
+            <strong>供应商名称:</strong>{{ rowList.extInfo?.supplierName || '' }}
+          </div>
+          <div style="width: 30%;">
+            <strong>日期:</strong>{{ rowList.storageTime || '' }}
+          </div>
+          <div style="width: 30%;">
+            <strong>编号:</strong>{{ rowList.bizNo || '' }}
+          </div>
+        </div>
+      </div>
+      
+      <!-- 入库物品表格 -->
+      <table
+        border="1"
+        cellspacing="0"
+        style="
+          width: 100%;
+          border-collapse: collapse;
+          font-size: 14px;
+        "
+      >
+        <thead>
+          <tr>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">编号</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center; width: 180px;">名称</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center; width: 140px;">规格</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">单位</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">入库数量</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">单价</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">金额</th>
+            <th style="border: 1px solid #000; padding: 8px; text-align: center;">批次号</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr v-for="(row, index) in rowList.outInDetailList" :key="index">
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ index + 1 }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.categoryName || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.specification || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.measureUnit || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.measureQuantity || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.unitPrice || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.totalMoney || ''}}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ row?.batchNo || '' }}</td>
+          </tr>
+          
+          <!-- 合计金额行 -->
+          <tr>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;" colspan="2">合计:</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ totalAmount || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;">{{ totalAllPrice || '' }}</td>
+            <td style="border: 1px solid #000; padding: 8px; text-align: center;"></td>
+          </tr>
+        </tbody>
+      </table>
+      
+      <!-- 签字区域 -->
+      <div style="margin-top: 20px; display: flex; width: 100%;">
+        <div style="width: 25%;">
+          <strong>主管:</strong>{{ rowList.verifyName || '' }}
+        </div>
+        <div style="width: 25%;">
+          <strong>仓库:</strong>{{ row?.warehouseName || '' }}
+        </div>
+        <div style="width: 25%;">
+          <strong>记账:</strong>{{ rowList.extInfo?.createUserName || '' }}
+        </div>
+        <div style="width: 25%;">
+          <strong>经手人:</strong>{{ rowList?.fromUser || '' }}
+        </div>
+      </div>
+    </div>
+
+    <div slot="footer">
+      <el-button @click="print">打印预览</el-button>
+      <el-button @click="close">关闭</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import storageApi from '@/api/warehouseManagement';
+  export default {
+    name: 'print',
+    components: {},
+    computed: {
+      // 计算总数量
+      totalAmount() {
+        if (!this.rowList?.outInDetailList || !Array.isArray(this.rowList.outInDetailList)) {
+          return 0;
+        }
+        
+        return this.rowList.outInDetailList.reduce((sum, row) => {
+          const amount = parseFloat(row.measureQuantity || 0);
+          return sum + (isNaN(amount) ? 0 : amount);
+        }, 0);
+      },
+      
+      // 计算总金额
+      totalAllPrice() {
+        if (!this.rowList?.outInDetailList || !Array.isArray(this.rowList.outInDetailList)) {
+          return 0;
+        }
+        
+        return this.rowList.outInDetailList.reduce((sum, row) => {
+          const amount = parseFloat(row.totalMoney || 0);
+          return sum + (isNaN(amount) ? 0 : amount);
+        }, 0);
+      }
+    },
+    props: {},
+    data() {
+      return {
+        QRvisible: false,
+        rowList: [],
+        row: {}
+      };
+    },
+
+    methods: {
+
+      async init(id, row) {
+        this.row = row;
+        const res = await storageApi.getInboundDetailsById(id);
+        console.log('res', res);
+        this.rowList = res;
+        this.QRvisible = true;
+      },
+
+      close() {
+        this.rowList = [];
+        this.QRvisible = false;
+      },
+      
+      print() {
+        const printSection = document.getElementById('printSection');
+        
+        // 创建打印任务
+        const printWindow = window.open('', '_blank');
+        printWindow.document.open();
+        printWindow.document.write('<html><head><title>打印预览</title>');
+        printWindow.document.write(
+          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        );
+        printWindow.document.write('</head><body>');
+        printWindow.document.write(printSection.innerHTML);
+        printWindow.document.write('</body></html>');
+        printWindow.document.close();
+        printWindow.onload = function () {
+          printWindow.print();
+        };
+      }
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  #printSection {
+    
+  }
+  table {
+    border-collapse: collapse;
+  }
+  th, td {
+    border: 1px solid #000;
+    text-align: center;
+    padding: 8px;
+  }
+  @media print {
+    .no-print {
+      display: none;
+    }
+  }
+</style>

+ 1 - 1
src/views/warehouseManagement/stockManagement/components/selectType.vue

@@ -375,7 +375,7 @@
           size: limit,
           ...where,
           factoryId: this.factoryId,
-          searchKey: this.value,
+          searchKey: encodeURIComponent(this.value),
           categoryLevelId: this.classificationId
         };
         let res = await getList(params);

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

@@ -55,7 +55,7 @@
               </el-col> -->
               <el-col :span="8">
                 <el-form-item label="入库时间:">
-                  <span>{{ infoData.createTime }}</span>
+                  <span>{{ infoData.storageTime }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">

+ 20 - 1
src/views/warehouseManagement/stockManagement/index.vue

@@ -188,6 +188,11 @@
           <el-button icon="el-icon-printer" type="primary" @click="print"
             >打印</el-button
           >
+
+          <el-button icon="el-icon-printer" type="primary" @click="printkEnter"
+            >打印入库单</el-button
+          >
+
           <!-- <el-button
             icon="el-icon-plus"
             v-if="clientEnvironmentId == 4"
@@ -271,6 +276,7 @@
     </el-card>
 
     <printQRCode ref="printQRCodeRef"></printQRCode>
+    <printStockEnter ref="printStockEnterRef"></printStockEnter>
 
     <!--  <priceMaintenanceDialog ref="priceMaintenanceDialogRef" /> -->
   </div>
@@ -286,6 +292,7 @@
   ('@/view/warehouseManagement/stockManagement/components/priceMaintenanceDialog.vue');
 
   import printQRCode from './components/printQRCode.vue';
+  import printStockEnter from './components/printStockEnter.vue';
   import {
     warehousingType,
     sceneState,
@@ -293,7 +300,7 @@
     useDict
   } from '@/utils/dict/index';
   export default {
-    components: { printQRCode },
+    components: { printQRCode, printStockEnter },
     data() {
       return {
         auditStatus,
@@ -704,6 +711,18 @@
         this.$refs.printQRCodeRef.init(this.currentRow.id);
 
         console.log('print');
+      },
+
+      printkEnter() {
+        if (!this.currentRow.id) {
+          return this.$message({
+            message: '请先选择单据',
+            type: 'warning',
+            duration: 2000
+          });
+        }
+
+        this.$refs.printStockEnterRef.init(this.currentRow.id, this.currentRow);
       }
     }
   };

+ 4 - 1
src/views/warehouseManagement/stocktaking/plan/components/assignDialog.vue

@@ -286,7 +286,10 @@
       async _getInformation() {
         getInventoryPlanDetailById(this.planId).then((data) => {
           this.formData = data;
-          this.getUserList({ groupId: data.executeGroupId });
+          if(data.executeGroupId) {
+            this.getUserList({ groupId: data.executeGroupId });
+          }
+          
           this.tableData = data.planDetailVOS;
         });
       }

+ 21 - 15
src/views/warehouseManagement/warehouseDefinition/components/WarehouseEdit.vue

@@ -37,9 +37,10 @@
           filterable
           size="small"
           class="w100"
+          multiple
           v-model="formData.inventoryType"
           placeholder="请选择"
-          @visible-change="changeInventoryType"
+          @change="changeInventoryType"
         >
           <el-option
             v-for="item in inventoryTypeList"
@@ -175,8 +176,8 @@
         formData: {
           code: '',
           name: '',
-          inventoryType: '',
-          inventoryName: '',
+          inventoryType: [],
+          inventoryName: [],
           remarks: '',
           factoryId: '',
           status: 1,
@@ -233,8 +234,8 @@
             this.formData = {
               code: '',
               name: '',
-              inventoryType: '',
-              inventoryName: '',
+              inventoryType: [],
+              inventoryName: [],
               remarks: '',
               factoryId: '',
               status: 1,
@@ -276,7 +277,8 @@
                   warehouseVO.city,
                   warehouseVO.area
                 ],
-                inventoryType: warehouseVO.inventoryType + ''
+                inventoryType: warehouseVO.inventoryType.split(','),
+                inventoryName: warehouseVO.inventoryName.split(',')
               };
               this.loadingVis = false;
             }, 2000);
@@ -285,8 +287,8 @@
           this.formData = {
             code: '',
             name: '',
-            inventoryType: '',
-            inventoryName: '',
+            inventoryType: [],
+            inventoryName: [],
             remarks: '',
             factoryId: '',
             status: 1,
@@ -334,18 +336,22 @@
       },
       changeInventoryType(val) {
         console.log(val, '1');
-        let data = this.inventoryTypeList.find((item) => {
-          return item.id == this.formData.inventoryType;
-        });
-        console.log(data);
-        this.formData.inventoryName = data?.name;
-        console.log(this.formData.inventoryName);
+        // 根据选中的仓库类型ID数组,获取对应的名称数组
+        const inventoryNames = val.map(typeId => {
+          const item = this.inventoryTypeList.find(item => item.id === typeId);
+          return item ? item.name : '';
+        }).filter(name => name !== '');
+        
+        this.formData.inventoryName = inventoryNames;
+        console.log('仓库类型名称数组:', this.formData.inventoryName);
       },
 
       handleSave() {
         this.$refs.formRef.validate(async (value) => {
           if (value) {
-            const params = Object.assign(this.formData);
+            let params = Object.assign(this.formData);
+            params.inventoryType = params.inventoryType.join(',');
+            params.inventoryName = params.inventoryName.join(',');
 
             // if (params.location?.length) {
             //   const [province, city, area] = params.location;