From 5eef21ed1f6e1c97e048dd07543f21bc868f9bba Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 10 三月 2026 14:38:16 +0800
Subject: [PATCH] fix: 入库前需加上仓库管理员审审批这一流程,审核通过后才能入库。另外在消息通知中需要展示这个审批信息
---
src/views/inventoryManagement/receiptManagement/Record.vue | 69 ++++++++++++++++++++++++++++++++++
1 files changed, 68 insertions(+), 1 deletions(-)
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index cd103ea..11ee21d 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -73,6 +73,25 @@
<el-table-column label="鍏ュ簱鏁伴噺"
prop="stockInNum"
show-overflow-tooltip/>
+ <el-table-column label="瀹℃壒鐘舵��"
+ prop="approveStatus"
+ align="center"
+ width="180">
+ <template #default="scope">
+ <el-tag :type="getApproveStatusType(scope.row.approveStatus)">
+ {{ getApproveStatusText(scope.row.approveStatus) }}
+ </el-tag>
+ <el-button
+ v-if="scope.row.approveStatus === 3"
+ type="primary"
+ link
+ style="margin-left: 8px"
+ @click="handleReApprove(scope.row)"
+ >
+ 閲嶆柊鎻愯捣瀹℃壒
+ </el-button>
+ </template>
+ </el-table-column>
<el-table-column label="鍏ュ簱浜�"
prop="createBy"
show-overflow-tooltip/>
@@ -107,6 +126,7 @@
import {
getStockInRecordListPage,
batchDeleteStockInRecords,
+ updateStockInRecordForReApprove,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
@@ -129,7 +149,7 @@
const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
- size: 100,
+ size: 10,
});
const total = ref(0);
@@ -152,6 +172,24 @@
return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
}
+const getApproveStatusText = (status) => {
+ if (status === 0) return "寰呭鏍�";
+ if (status === 1) return "瀹℃牳涓�";
+ if (status === 2) return "瀹℃牳瀹屾垚";
+ if (status === 3) return "瀹℃牳鏈�氳繃";
+ if (status === 4) return "宸查噸鏂版彁浜�";
+ return "-";
+};
+
+const getApproveStatusType = (status) => {
+ if (status === 0) return "warning";
+ if (status === 1) return "primary";
+ if (status === 2) return "success";
+ if (status === 3) return "danger";
+ if (status === 4) return "info";
+ return "";
+};
+
const pageProductChange = obj => {
page.current = obj.page;
page.size = obj.limit;
@@ -167,6 +205,7 @@
getStockInRecordListPage(params)
.then(res => {
tableData.value = res.data.records;
+ total.value = res.data.total || 0;
}).finally(() => {
tableLoading.value = false;
})
@@ -194,6 +233,34 @@
const expandedRowKeys = ref([]);
+const handleReApprove = (row) => {
+ if (!row || !row.id) {
+ return;
+ }
+ ElMessageBox.confirm(
+ "璇ヨ褰曞鏍告湭閫氳繃锛屾槸鍚﹂噸鏂版彁璧峰叆搴撳鎵癸紵",
+ "閲嶆柊鎻愯捣瀹℃壒",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }
+ )
+ .then(() => {
+ updateStockInRecordForReApprove({ ...row })
+ .then(() => {
+ proxy.$modal.msgSuccess("宸查噸鏂板彂璧峰鎵�");
+ getList();
+ })
+ .catch(() => {
+ proxy.$modal.msgError("閲嶆柊鍙戣捣瀹℃壒澶辫触");
+ });
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
--
Gitblit v1.9.3