소스 검색

fix:5425【库存调拨】调拨单-列表页码数量:增加到500-100条,翻页记住勾选

mlchen 1 주 전
부모
커밋
31d10a90ef

+ 19 - 3
src/views/warehouseManagement/inventoryAllocation/components/inventory-search.vue

@@ -64,6 +64,20 @@
           </el-select>
         </el-form-item>
       </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="调拨时间" prop="time">
+          <el-date-picker
+            class="w100"
+            size="small"
+            v-model="where.time"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
+          ></el-date-picker>
+        </el-form-item>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="调出仓库" prop="sourceWarehouse">
           <el-select
@@ -260,10 +274,12 @@
         categoryCode: '',
         targetWarehouse: '',
         sourceWarehouse: '',
-        isReconciliation: ''
+        isReconciliation: '',
+        time: []
       };
       return {
         // 表单数据
+        defaultWhere,
         where: { ...defaultWhere },
         treeLoading: false,
         allocationType,
@@ -287,8 +303,8 @@
         ],
         isReconciliationOp: [
           { value: 0, label: '未对账' },
-          { value: 1, label: '已对账' },
-        ],
+          { value: 1, label: '已对账' }
+        ]
       };
     },
     computed: {

+ 12 - 4
src/views/warehouseManagement/inventoryAllocation/index.vue

@@ -8,8 +8,10 @@
         :columns="columns"
         height="calc(100vh-300px)"
         :pageSize="20"
+        :pageSizes="[10,20,30,40, 50, 100, 200, 500,1000]"
         :datasource="datasource"
         cache-key="systemRoleTable"
+        row-key="id"
         :selection.sync="selection"
       >
         <template v-slot:toolbar>
@@ -191,6 +193,7 @@
             width: 45,
             type: 'selection',
             columnKey: 'selection',
+            reserveSelection: true,
             align: 'center',
             fixed: 'left'
           },
@@ -348,7 +351,7 @@
           this.$message.warning('请选择要生成对账单的记录');
           return;
         }
-        
+
         // 检查选中的记录状态是否为2
         const invalidRecords = this.selection.filter(item => item.status != 2);
         if (invalidRecords.length > 0) {
@@ -362,7 +365,7 @@
           this.$message.warning('请选择批次维度或包装维度调拨单生成对账单');
           return;
         }
-        
+
         this.generateStatementFlag = true;
         this.$nextTick(() => {
           this.$refs.generateStatementRef.open(type, this.selection);
@@ -445,10 +448,16 @@
       },
       /* 表格数据源 */
       datasource({ page, limit, where }) {
+        const params = Object.assign({}, where);
+        if (params.time?.length) {
+          params.startTime = params.time[0];
+          params.endTime = params.time[1];
+        }
+        delete params.time;
         return storageApi.getAllotApplyPage({
           pageNum: page,
           size: limit,
-          ...where
+          ...params
         });
       },
       /* 刷新表格 */
@@ -500,4 +509,3 @@
     }
   }
 </style>
-