diff --git a/src/views/firstOrder/components/recordDialog.vue b/src/views/firstOrder/components/recordDialog.vue
index e7e2346..d52e3d2 100644
--- a/src/views/firstOrder/components/recordDialog.vue
+++ b/src/views/firstOrder/components/recordDialog.vue
@@ -10,18 +10,22 @@
-
-
+
@@ -176,4 +180,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/src/views/firstOrder/list.vue b/src/views/firstOrder/list.vue
index 4a6709b..5f9bd55 100644
--- a/src/views/firstOrder/list.vue
+++ b/src/views/firstOrder/list.vue
@@ -7,7 +7,7 @@
@refresh-change="refreshChange" @on-load="onLoad">
- 记录
+ 记录
diff --git a/src/views/materials/expend.vue b/src/views/materials/expend.vue
index 9bf4593..dbb72ac 100644
--- a/src/views/materials/expend.vue
+++ b/src/views/materials/expend.vue
@@ -145,10 +145,10 @@ export default {
{
label: "类别",
prop: "type",
+ type: "select",
headerAlign: "center",
align: "center",
- type: "select",
- dicDta: [
+ dicData: [
{
label: "易耗品",
value: "YH",
@@ -215,18 +215,9 @@ export default {
activeName: "first",
tableData: [],
- ckTable: [
- { str1: "3", str2: "2025-04-09", str3: "部门一" },
- { str1: "37", str2: "2025-04-03", str3: "部门一" },
- ],
- rkTable: [
- { str1: "5", str2: "2025-03-19", str3: "部门二" },
- { str1: "12", str2: "2025-03-19", str3: "部门二" },
- ],
- bfTable: [
- { str1: "9", str2: "2025-03-19", str3: "部门三" },
- { str1: "19", str2: "2025-03-19", str3: "部门三" },
- ],
+ ckTable: [],
+ rkTable: [],
+ bfTable: [],
};
},
diff --git a/src/views/secondOrder/components/approvalProcessDialog.vue b/src/views/secondOrder/components/approvalProcessDialog.vue
index e88d350..b524069 100644
--- a/src/views/secondOrder/components/approvalProcessDialog.vue
+++ b/src/views/secondOrder/components/approvalProcessDialog.vue
@@ -81,6 +81,12 @@ export default {
}
.teps-con {
margin: 0 auto 0;
+ :deep(.el-step) {
+ margin-bottom: 10px;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
}
// :deep(.el-dialog__body) {
// height: 300px;
diff --git a/src/views/secondOrder/components/categoryDialog.vue b/src/views/secondOrder/components/categoryDialog.vue
index 2a4f5f3..e2db870 100644
--- a/src/views/secondOrder/components/categoryDialog.vue
+++ b/src/views/secondOrder/components/categoryDialog.vue
@@ -262,6 +262,7 @@ export default {
//点击确定
handleConfirm() {
const uniqueList = this.uniqueById(this.allSelectedList);
+ console.log(uniqueList, 'uniqueList----')
this.$emit("confirm", uniqueList);
this.allSelectedList = []
},
diff --git a/src/views/secondOrder/components/outDialog.vue b/src/views/secondOrder/components/outDialog.vue
index 1434cda..0414763 100644
--- a/src/views/secondOrder/components/outDialog.vue
+++ b/src/views/secondOrder/components/outDialog.vue
@@ -79,7 +79,11 @@
- handleQuantityChange(newValue, scope.$index)
">
@@ -105,7 +109,17 @@
-
+
+
+ {{
+ scope.row.type === "NY"
+ ? "耐用品"
+ : scope.row.type === "YH"
+ ? "易耗品"
+ : ""
+ }}
+
+
@@ -303,9 +317,16 @@ export default {
});
});
},
-
+ // 最大数量
+ getMaxQuantity(row) {
+ const stockInfo = this.statisticsList.find(stat => stat.materialCode === row.materialCode)
+ if (row.type === 'NY') {
+ return 1
+ } else {
+ return stockInfo ? stockInfo.num : 999999;
+ }
+ },
categoryHandle() {
-
if ((!this.sizeForm.ldTwoOutStorage.proposerInfo) || (!this.sizeForm.ldTwoOutStorage.departmentInfo)) {
this.$message.error('请先选择部门和领用人');
return false
@@ -313,9 +334,25 @@ export default {
this.categoryVisible = true;
},
confirm(allSelectedList) {
- this.selectionData = allSelectedList
+ // 保存已选数量
+ const existingQuantities = {};
+ this.sizeForm.ldTwoOutStorageDetailList.forEach(item => {
+ existingQuantities[item.id] = item.num
+ })
+ const updatedList = allSelectedList.map(item => {
+ const existingNum = existingQuantities[item.id];
+ if (existingNum !== undefined) {
+ return {
+ ...item,
+ num: existingNum
+ };
+ }
+ return item;
+ });
+
+ this.selectionData = updatedList;
this.categoryVisible = false;
- this.sizeForm.ldTwoOutStorageDetailList = allSelectedList;
+ this.sizeForm.ldTwoOutStorageDetailList = updatedList;
this.getStatistics();
},
// 删除表格行数据
@@ -329,43 +366,17 @@ export default {
JSON.stringify(this.sizeForm.ldTwoOutStorageDetailList)
);
},
- handleQuantityChange(newValue, index) {
- console.log(newValue,'点击数量变化数量的值')
- const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index];
- // 核心:获取selectionData中对应行的库存数据(你的代码中已有的selectionData数组)
- const selectionItem = this.selectionData[index]; // 这里定义selectionItem,指向对应行的库存数据
-
- if (!currentRow) return;
-
- // 耐用品逻辑保持不变
- if (currentRow.type === "NY") {
- currentRow.num = 1;
- this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
- this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
- return;
- }
-
- // 新增:校验输入数量不能超过库存数量
- if (selectionItem && newValue > selectionItem.num) {
- this.$message.warning(`出库数量不能超过库存数量【${selectionItem.num}】!`);
- // 超出则重置为最大库存数
- currentRow.num = selectionItem.num;
- this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
- this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
- this.getStatistics();
- return;
- }
-
- // 原有库存计算逻辑(调整为基于selectionData的库存数)
- const stockNum = selectionItem ? selectionItem.num : currentRow.oldNum || currentRow.num;
- currentRow.oldNum = stockNum; // 出库前库存
- currentRow.num = newValue; // 出库数量
- currentRow.newNum = stockNum - newValue; // 出库后库存
-
- this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
- this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
- this.getStatistics();
-},
+ handleQuantityChange(newValue, index) {
+ console.log(newValue, '点击数量变化数量的值')
+ const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index];
+ if (!currentRow) return;
+
+ // 易耗品的有效数量
+ currentRow.num = newValue;
+ this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
+ this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
+ this.getStatistics()
+ },
// 更新全局总计
updateGlobalTotal() {
@@ -499,4 +510,4 @@ export default {
padding-right: 10px;
/* 预留滚动条空间 */
}
-
+
\ No newline at end of file