From 70456fc7c68b80a163673cbacb8850700afeead3 Mon Sep 17 00:00:00 2001
From: taozi <1362265981@qq.com>
Date: Wed, 7 Jan 2026 18:17:32 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/consumableDialog.vue | 2 +-
src/views/firstOrder/components/inDialog.vue | 1 -
src/views/firstOrder/components/outDialog.vue | 11 ++-
.../secondOrder/components/categoryDialog.vue | 73 +++++++------------
.../secondOrder/components/outDialog.vue | 8 +-
5 files changed, 39 insertions(+), 56 deletions(-)
diff --git a/src/views/firstOrder/components/consumableDialog.vue b/src/views/firstOrder/components/consumableDialog.vue
index d354c13..e435564 100644
--- a/src/views/firstOrder/components/consumableDialog.vue
+++ b/src/views/firstOrder/components/consumableDialog.vue
@@ -1,6 +1,6 @@
+ :append-to-body="true" width="70%" @close="handleCancel" fullscreen>
@@ -693,9 +693,12 @@ export default {
//关闭新增弹窗
handleCloseDetail() {
this.outDialogVisible = false;
- this.consumableVisible = false;
+
this.$emit("handleCloseDetail");
},
+ closeDialog() {
+ this.consumableVisible = false;
+ },
// 获取批量需求单列表
async getQuarterList() {
try {
@@ -834,8 +837,8 @@ export default {
getDepartmentName(departmentId) {
const department = this.list.find(
(item) => item.departmentId === departmentId
- );
- return department ? department.department : "";
+ )
+ return department ? department.department : ""
},
//获取单条选择的物资名称列表
async getMaterialList() {
diff --git a/src/views/secondOrder/components/categoryDialog.vue b/src/views/secondOrder/components/categoryDialog.vue
index 7857dae..b58a2b6 100644
--- a/src/views/secondOrder/components/categoryDialog.vue
+++ b/src/views/secondOrder/components/categoryDialog.vue
@@ -11,7 +11,7 @@
@refresh-change="refreshChange" @on-load="onLoad" @row-change="handleRowChange">
@@ -31,7 +31,7 @@ export default {
default: ''
},
departmentId: {
- type: [String, Number],
+ type: String,
default: ''
},
selectionData: {
@@ -174,25 +174,23 @@ export default {
// 更新当前页面的勾选状态
updateCurrentPageSelection() {
if (!this.$refs.crud || !this.data) return;
-
this.isUpdatingSelection = true;
-
- const currentPageData = this.data || [];
-
+ const currentPageData = this.data
// 先清除所有选择
this.$refs.crud.toggleSelection();
-
+
// 检查当前页面的数据中有哪些在 allSelectedList 中
currentPageData.forEach((item) => {
- const isSelected = this.allSelectedList.some(selectedItem =>
+ const isSelected = this.allSelectedList.some(selectedItem =>
selectedItem.id === item.id
);
if (isSelected) {
this.$refs.crud.toggleRowSelection(item, true);
}
+
});
-
+
// 延迟 确保选择状态已完全更新
this.$nextTick(() => {
setTimeout(() => {
@@ -201,40 +199,19 @@ export default {
});
},
- //勾选选中
+
selectionChange(selection) {
- if (this.isUpdatingSelection) {
- return;
- }
-
- console.log('当前选择:', selection)
- console.log('当前页面数据:', this.data)
- console.log('当前全部勾选:', this.allSelectedList)
-
- // 获取当前页面的数据ID
- const currentPageIds = this.data.map(item => item.id);
-
- const otherPageSelected = this.allSelectedList.filter(item =>
- !currentPageIds.includes(item.id)
- );
-
- const currentSelected = selection.map(item => ({
+ console.log(selection,'selection-------')
+ console.log(this.selectionData, '---selectionData')
+ const currentPageIds = this.selectionData.map(item => item.id)
+ let arr = selection.filter(item => !currentPageIds.includes(item.id)) //未选择的数据
+ const selectionWithTwoInventoryId = arr.map(item => ({
...item,
twoInventoryId: item.id
- }));
-
- // 组合所有勾选数据
- const combinedSelection = [
- ...otherPageSelected, // 其他页面的数据
- ...currentSelected // 当前页面新勾选的数据
- ];
-
- // 去重并更新 allSelectedList
- this.allSelectedList = this.uniqueById(combinedSelection)
-
- console.log('更新后的allSelectedList:', this.allSelectedList)
+ }))
+ this.allSelectedList.push(...selectionWithTwoInventoryId);
+ this.allSelectedList = this.uniqueById(this.allSelectedList);
},
-
//去重
uniqueById(arr) {
const uniqueObj = {};
@@ -245,24 +222,24 @@ export default {
});
return Object.values(uniqueObj);
},
-
+
//点击确定
handleConfirm() {
const uniqueList = this.uniqueById(this.allSelectedList)
this.$emit("confirm", uniqueList)
},
-
+
handleCloseDetail() {
this.$emit('handleCloseDetail')
},
-
+
selectionClear() {
this.allSelectedList = []
if (this.$refs.crud) {
this.$refs.crud.toggleSelection()
}
},
-
+
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page, this.query)
@@ -272,16 +249,16 @@ export default {
this.page.pageSize = pageSize;
this.onLoad(this.page, this.query)
},
-
+
refreshChange() {
this.onLoad(this.page, this.query)
},
-
+
handleTabClick() {
this.page.currentPage = 1
this.onLoad(this.page)
},
-
+
onLoad(page, params = {}) {
this.loading = true
const requestParams = Object.assign({}, params, this.query, {
@@ -294,7 +271,7 @@ export default {
apiPromise.then((res) => {
this.data = res.data.result.list
this.page.total = res.data.result.total
-
+
// 数据加载完成后,更新当前页面的勾选状态
this.$nextTick(() => {
this.updateCurrentPageSelection()
@@ -305,7 +282,7 @@ export default {
this.loading = false;
})
},
-
+
handleCancel() {
this.categoryVisible = false
}
diff --git a/src/views/secondOrder/components/outDialog.vue b/src/views/secondOrder/components/outDialog.vue
index bdd1459..fa1c0b3 100644
--- a/src/views/secondOrder/components/outDialog.vue
+++ b/src/views/secondOrder/components/outDialog.vue
@@ -137,7 +137,7 @@
+ @confirm="confirm" @handleCloseDetail="closeDialog">
-
From 8fc553bbf4be0d18da0488a7493ebc2910cf5648 Mon Sep 17 00:00:00 2001
From: dengruixue <13029921505@163.com>
Date: Thu, 8 Jan 2026 09:37:35 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'src/views/firstOrder/?=
=?UTF-8?q?components/inDialog=20copy.vue'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../firstOrder/components/inDialog copy.vue | 459 ------------------
1 file changed, 459 deletions(-)
delete mode 100644 src/views/firstOrder/components/inDialog copy.vue
diff --git a/src/views/firstOrder/components/inDialog copy.vue b/src/views/firstOrder/components/inDialog copy.vue
deleted file mode 100644
index 6c96c8f..0000000
--- a/src/views/firstOrder/components/inDialog copy.vue
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
-
-
-
- 基本信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 批量选择
- 单项选择
-
-
-
-
-
-
-
-
-
- {{ inDate }}
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.requiredQuantity || 0 }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 入库账目表格:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ Number(scope.row.inboundQuantity || 0) + Number(scope.row.theInboundQuantity || 0) }}
-
-
-
-
-
-
-
-
- {{ scope.row.userInfoVO ? scope.row.userInfoVO.name : (sizeForm.submitName || '') }}
-
-
-
-
- {{ inDate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From b9b5dcbaa9804f42bada18b9ee0ff3b22bd73cfc Mon Sep 17 00:00:00 2001
From: dengruixue <13029921505@163.com>
Date: Thu, 8 Jan 2026 09:39:26 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'src/views/secondOrder?=
=?UTF-8?q?/components/categoryDialog=20copy.vue'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/categoryDialog copy.vue | 262 ------------------
1 file changed, 262 deletions(-)
delete mode 100644 src/views/secondOrder/components/categoryDialog copy.vue
diff --git a/src/views/secondOrder/components/categoryDialog copy.vue b/src/views/secondOrder/components/categoryDialog copy.vue
deleted file mode 100644
index a35a87f..0000000
--- a/src/views/secondOrder/components/categoryDialog copy.vue
+++ /dev/null
@@ -1,262 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
From f15747ff8d49d6bf8f11b087f4e6fa8d349413bc Mon Sep 17 00:00:00 2001
From: taozi <1362265981@qq.com>
Date: Thu, 8 Jan 2026 14:03:16 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=87=BA=E5=BA=93?=
=?UTF-8?q?=E5=8B=BE=E9=80=89=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/approvalProcessDialog.vue | 9 +++-
src/views/firstOrder/components/outDialog.vue | 16 +++---
.../firstOrder/components/recordDialog.vue | 6 +--
src/views/firstOrder/inbound.vue | 4 ++
src/views/materials/index.vue | 4 ++
.../secondOrder/components/categoryDialog.vue | 52 ++++++-------------
.../secondOrder/components/outDialog.vue | 20 +------
7 files changed, 45 insertions(+), 66 deletions(-)
diff --git a/src/views/firstOrder/components/approvalProcessDialog.vue b/src/views/firstOrder/components/approvalProcessDialog.vue
index 002be0f..6555a49 100644
--- a/src/views/firstOrder/components/approvalProcessDialog.vue
+++ b/src/views/firstOrder/components/approvalProcessDialog.vue
@@ -89,9 +89,16 @@ export default {
}
.teps-con {
- margin: 0 auto 0
+ 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/firstOrder/components/outDialog.vue b/src/views/firstOrder/components/outDialog.vue
index 849305d..fa85953 100644
--- a/src/views/firstOrder/components/outDialog.vue
+++ b/src/views/firstOrder/components/outDialog.vue
@@ -594,20 +594,22 @@ export default {
},
getStatistics() {
getStatistics(this.sizeForm.inTableData).then((res) => {
- this.statisticsList = res.data.result;
+ this.statisticsList = res.data.result
this.statisticsList = this.statisticsList.map((stat) => {
const detail = this.sizeForm.inTableData.find(
(item) => item.materialCode === stat.materialCode
- );
- console.log("detail", detail, stat);
+ )
+ console.log("detail", detail, stat)
return {
...stat,
theOutboundQuantity: detail.theOutboundQuantity, //本次出库数量
unitPrice: detail.unitPrice,
totalQuantity: stat.num - detail.theOutboundQuantity,
- };
- });
- });
+ department: detail.department, // 部门ID
+ departmentName: detail.departmentName || this.getDepartmentName(detail.department),
+ }
+ })
+ })
},
changeDepartment(){
this.getStatistics()
@@ -618,7 +620,7 @@ export default {
selectionChange(row) {
this.batchSelectionVisible = false;
this.sizeForm.inTableData = row;
- this.getStatistics();
+ this.getStatistics();
},
confirm(allSelectedList) {
this.consumableVisible = false;
diff --git a/src/views/firstOrder/components/recordDialog.vue b/src/views/firstOrder/components/recordDialog.vue
index bb83b87..e7e2346 100644
--- a/src/views/firstOrder/components/recordDialog.vue
+++ b/src/views/firstOrder/components/recordDialog.vue
@@ -5,13 +5,12 @@
:visible.sync="openShow"
width="50%"
@close="closeDialog"
- :style="{ height: '600px' }"
>
-
+
@@ -44,7 +44,7 @@ export default {
data() {
return {
openShow: false,
- transactionType: "1",
+ transactionType: "2",
tableData: [],
purchaseTitle: "记录",
data: [],
diff --git a/src/views/firstOrder/inbound.vue b/src/views/firstOrder/inbound.vue
index e3b1c37..f75edd9 100644
--- a/src/views/firstOrder/inbound.vue
+++ b/src/views/firstOrder/inbound.vue
@@ -236,6 +236,10 @@ export default {
label: "已审批",
value: 3,
},
+ {
+ label: "审批失败",
+ value: 4,
+ },
],
},
],
diff --git a/src/views/materials/index.vue b/src/views/materials/index.vue
index 36ad135..b2175df 100644
--- a/src/views/materials/index.vue
+++ b/src/views/materials/index.vue
@@ -76,12 +76,14 @@ export default {
search: true,
headerAlign: "center",
align: "center",
+ rules: [{ required: true, message: "请输入物资名称", trigger: "blur" }]
},
{
label: "规格/型号",
prop: "model",
headerAlign: "center",
align: "center",
+ rules: [{ required: true, message: "请输入规格/型号", trigger: "blur" }]
},
{
label: "物资编码",
@@ -95,12 +97,14 @@ export default {
value: "value",
},
dataType: "string",
+ rules: [{ required: true, message: "请选择物资编码", trigger: "change" }]
},
{
label: "单位",
prop: "unit",
headerAlign: "center",
align: "center",
+ rules: [{ required: true, message: "请输入单位", trigger: "blur" }]
},
{
label: "描述",
diff --git a/src/views/secondOrder/components/categoryDialog.vue b/src/views/secondOrder/components/categoryDialog.vue
index 9e0f06e..2a4f5f3 100644
--- a/src/views/secondOrder/components/categoryDialog.vue
+++ b/src/views/secondOrder/components/categoryDialog.vue
@@ -41,7 +41,6 @@