Browse Source

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

xieyong 15 hours ago
parent
commit
f024f25daf

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

@@ -217,6 +217,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: 18, md: 12 } : { span: 18 }">
         <div class="ele-form-actions">
           <el-button
@@ -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>
-

+ 11 - 1
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -1196,7 +1196,17 @@
       handleDeleteClick(row, index) {
         console.log('删除', row.id);
         this.productList.splice(index, 1);
-        this.formData.outInDetailList.splice(index, 1);
+        // 表格数据会经过去重和排序,不能再用表格下标删除原始明细。
+        const detailIndex = this.formData.outInDetailList.findIndex(
+          (item) =>
+            (row.id != null && item.id === row.id) ||
+            (row.id == null && row.tempId != null && item.tempId === row.tempId) ||
+            (row.id == null && row.tempId == null && row.deliveryDetailId != null
+              && item.deliveryDetailId === row.deliveryDetailId)
+        );
+        if (detailIndex !== -1) {
+          this.formData.outInDetailList.splice(detailIndex, 1);
+        }
         this.packingList = this.packingList.filter(
           (item) => item.outInDetailId !== row.id
         );

+ 6 - 4
src/views/warehouseManagement/stocktaking/reportLoss/components/addReportDialog.vue

@@ -408,7 +408,7 @@
         }
       },
       id: {
-        type: String,
+        type: [String, Number],
         default: ''
       }
     },
@@ -513,8 +513,6 @@
         if (val) {
           // 获取审核人列表数据
           this.getUserList();
-          // 获取计划单号
-          this.getOrderCode();
           if (
             this.dialogTile === '修改报损报溢' ||
             this.dialogTile === '报损报溢详情'
@@ -545,6 +543,10 @@
               approvalUserName: '' // 审核人name
             };
           }
+          // 仅新增单据生成编码,编辑时保留原单号。
+          if (!this.id) {
+            this.getOrderCode();
+          }
         }
       }
     },
@@ -783,7 +785,7 @@
               params.status = 0;
             }
             if (this.productList?.length > 0) {
-              if (this.dialogTile === '修改报损报溢') {
+              if (params.id) {
                 res = await updateReportsList(params);
               } else {
                 res = await saveReportsList(params);