diff --git a/src/views/device/sparePartsLedger/index.vue b/src/views/device/sparePartsLedger/index.vue
index a4f02d3..154da55 100644
--- a/src/views/device/sparePartsLedger/index.vue
+++ b/src/views/device/sparePartsLedger/index.vue
@@ -44,6 +44,27 @@
style="width: 150px"
/>
+
+
+
+
+
+
+
+
@@ -232,10 +234,11 @@
@@ -374,6 +377,8 @@ export default {
delFlag: null,
factoryCode: null,
},
+ // 日期范围
+ dateRange: [],
// 表单参数
form: {},
// 表单校验
@@ -412,12 +417,32 @@ export default {
/** 查询备品备件出入库列表 */
getList() {
this.loading = true;
- listSparepartsInOutStorage(this.queryParams).then((response) => {
+ listSparepartsInOutStorage(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
this.sparepartsInOutStorageList = response.rows;
this.total = response.total;
this.loading = false;
});
},
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ // 初始化所有列
+ columns.forEach((column, index) => {
+ if (index === 1) {
+ sums[index] = '总数'; // 第一列显示固定文本
+ } else if (column.property === 'amount') {
+ // 计算amount列合计
+ const total = data.reduce((sum, item) => {
+ const val = Number(item.amount);
+ return sum + (isNaN(val) ? 0 : val);
+ }, 0);
+ sums[index] = total + ' 个';
+ }
+ });
+
+ return sums;
+ },
// 取消按钮
cancel() {
this.open = false;
@@ -452,6 +477,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
+ this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
diff --git a/src/views/wms/equipment/index.vue b/src/views/wms/equipment/index.vue
index 026bec2..ac294e9 100644
--- a/src/views/wms/equipment/index.vue
+++ b/src/views/wms/equipment/index.vue
@@ -689,6 +689,14 @@
/>
+
+
+
+
+
@@ -1383,6 +1391,7 @@ export default {
equipmentCategory: null,
factoryWorkshop: null,
sapAsset: null,
+ dh: null
},
queryEquipmentHeadParams: {
pageNum: 1,
@@ -1609,6 +1618,7 @@ export default {
sapName: null,
factoryWorkshop: null,
sapAsset: null,
+ dh: null,
};
this.resetForm("form");
},