ソースを参照

fix:5696【收发明细表】进行查下界面增加仓库字段,这样知道出入库是什么仓库

mlchen 2 週間 前
親
コミット
a231675e6d

+ 38 - 2
src/views/warehouseManagement/statisticalReports/transceiverDetails/add.vue

@@ -156,6 +156,24 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="90px" label="仓库:" prop="warehouseId">
+                <el-select
+                  v-model="formData.warehouseId"
+                  filterable
+                  clearable
+                  placeholder="请选择"
+                  :disabled="isView"
+                >
+                  <el-option
+                    v-for="item in warehouseList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col v-if="!isView" :span="12">
               <div class="ele-form-actions filter-actions">
                 <el-button
@@ -241,6 +259,7 @@
   import storageApi from '@/api/warehouseManagement';
   import { allCategoryLevel } from '@/api/classifyManage';
   import { getTreeByGroup } from '@/api/classifyManage';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
   import {
     warehousingType,
     sceneState,
@@ -280,8 +299,10 @@
           categoryCode: '',
           colorKey: '',
           batchNo: '',
+          warehouseId: '',
           type: ''
         },
+        warehouseList: [],
         // 表单验证规则
         rules: {
           name: [
@@ -391,6 +412,13 @@
             showOverflowTooltip: true,
             width: 120
           },
+          {
+            prop: 'warehouseName',
+            label: '仓库名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
           {
             prop: 'modelType',
             label: '型号',
@@ -622,7 +650,8 @@
     },
     created() {
       this.getTypeList();
-      this.getAssetTypeList()
+      this.getAssetTypeList();
+      this.getWarehouseList();
     },
     methods: {
       // 获取物品类型下拉选择树
@@ -632,6 +661,10 @@
           return { dictCode: item.id, dictValue: item.name };
         });
       },
+      // 加载仓库筛选项,选择值作为仓库 ID 参与明细查询。
+      async getWarehouseList() {
+        this.warehouseList = await warehouseDefinition.list({});
+      },
       handleOutInChange() {
         // this.formData.bizType = '';
       },
@@ -761,6 +794,7 @@
           this.formData.categoryCode = row.categoryCode || '';
           this.formData.colorKey = row.colorKey || '';
           this.formData.batchNo = row.batchNo || '';
+          this.formData.warehouseId = row.warehouseId || '';
         } else {
           this.tableList = [];
           this.formData = Object.assign({}, {
@@ -774,7 +808,8 @@
             categoryLevelId: '',
             categoryCode: '',
             colorKey: '',
-            batchNo: ''
+            batchNo: '',
+            warehouseId: ''
           }, searchParams);
         }
         this.isView = isView;
@@ -818,6 +853,7 @@
         this.formData.categoryCode = '';
         this.formData.colorKey = '';
         this.formData.batchNo = '';
+        this.formData.warehouseId = '';
         this.$refs.formRef.resetFields()
         this.search();
       }

+ 38 - 2
src/views/warehouseManagement/statisticalReports/transceiverDetails/transceiver-details.vue

@@ -149,6 +149,24 @@
                 ></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="90px" label="仓库:" prop="warehouseId">
+                <el-select
+                  v-model="formData.warehouseId"
+                  filterable
+                  clearable
+                  placeholder="请选择"
+                  :disabled="isView"
+                >
+                  <el-option
+                    v-for="item in warehouseList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col v-if="!isView" :span="24">
               <div class="ele-form-actions filter-actions">
                 <el-button
@@ -223,6 +241,7 @@
     outintwoPage
   } from '@/api/warehouseManagement/statisticalReports';
   import storageApi from '@/api/warehouseManagement';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
   import { allCategoryLevel } from '@/api/classifyManage';
   import { getTreeByGroup } from '@/api/classifyManage';
   import {
@@ -262,8 +281,10 @@
           categoryCode: '',
           colorKey: '',
           batchNo: '',
+          warehouseId: '',
           type: ''
         },
+        warehouseList: [],
         // 表单验证规则
         rules: {
         //   name: [
@@ -373,6 +394,13 @@
             showOverflowTooltip: true,
             width: 120
           },
+          {
+            prop: 'warehouseName',
+            label: '仓库名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
           {
             prop: 'modelType',
             label: '型号',
@@ -604,9 +632,14 @@
     },
     created() {
       this.getTypeList();
-      this.getAssetTypeList()
+      this.getAssetTypeList();
+      this.getWarehouseList();
     },
     methods: {
+      // 加载仓库筛选项,使用仓库 ID 提交查询条件。
+      async getWarehouseList() {
+        this.warehouseList = await warehouseDefinition.list({});
+      },
       // 获取物品类型下拉选择树
       async getAssetTypeList() {
         const { data } = await getTreeByGroup({ type: 2 });
@@ -743,6 +776,7 @@
           this.formData.categoryCode = row.categoryCode || '';
           this.formData.colorKey = row.colorKey || '';
           this.formData.batchNo = row.batchNo || '';
+          this.formData.warehouseId = row.warehouseId || '';
         } else {
           this.tableList = [];
           this.formData = {
@@ -756,7 +790,8 @@
             categoryLevelId: '',
             categoryCode: '',
             colorKey: '',
-            batchNo: ''
+            batchNo: '',
+            warehouseId: ''
           };
         }
         this.isView = isView;
@@ -805,6 +840,7 @@
         this.formData.categoryCode = '';
         this.formData.colorKey = '';
         this.formData.batchNo = '';
+        this.formData.warehouseId = '';
         this.$refs.formRef.resetFields()
         this.search();
       }

+ 2 - 2
vue.config.js

@@ -2,7 +2,7 @@
  * @Author: mlchen 374826075@qq.com
  * @Date: 2026-07-21 09:26:11
  * @LastEditors: mlchen 374826075@qq.com
- * @LastEditTime: 2026-08-26 14:45:52
+ * @LastEditTime: 2026-09-29 15:53:40
  * @FilePath: /kd-aiot-frontend-wms/vue.config.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -43,7 +43,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.132:18086',
         // target: 'http://192.168.1.105:18086', //开发
-        target: 'http://localhost:18086', //开发
+        target: 'http://localhost:18090', //开发
         // target: 'http://192.168.1.251:18086', //测试
         // target: 'http://192.168.1.116:18086',