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/collaborativeApproval/approvalProcess/components/approvalDia.vue | 100 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 96 insertions(+), 4 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index aad5b23..c38d349 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -39,6 +39,59 @@
</el-form-item>
</el-col>
</el-row>
+ <!-- 鍏ュ簱瀹℃壒锛氬睍绀哄叆搴撲俊鎭� -->
+ <!-- <el-row v-if="isInventoryApproval">
+ <el-col :span="24">
+ <el-form-item label="鏄惁鍏ュ簱瀹℃牳閫氳繃锛�">
+ <el-tag :type="form.inventoryReview ? 'success' : 'danger'">
+ {{ form.inventoryReview ? '鏄�' : '鍚�' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ </el-row> -->
+ <el-row v-if="isInventoryApproval">
+ <el-col :span="12">
+ <el-form-item label="鍏ュ簱绫诲瀷锛�">
+ <el-tag type="info">
+ {{ form.storageType || '-' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍏ュ簱鏁伴噺锛�">
+ <el-tag type="warning">
+ {{ form.stockInNum ?? '-' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <!-- 鍏ュ簱瀹℃壒锛氬睍绀哄叆搴撳彴璐︽槑缁嗭紙瀛楁褰㈠紡锛� -->
+ <el-row v-if="isInventoryApproval" style="margin-top: 10px">
+ <el-col :span="12">
+ <el-form-item label="浜у搧鍚嶇О锛�">
+ <el-tag type="info">
+ {{ currentStockIn.productName || '-' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="瑙勬牸鍨嬪彿锛�">
+ <el-tag type="info">
+ {{ currentStockIn.model || '-' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="isInventoryApproval">
+
+ <el-col :span="24">
+ <el-form-item label="鐢熶骇璁㈠崟鍙凤細">
+ <el-tag type="info">
+ {{ currentStockIn.productionOrderNo || '-' }}
+ </el-tag>
+ </el-form-item>
+ </el-col>
+ </el-row>
<!-- 瀹℃壒浜洪�夋嫨锛堝姩鎬佽妭鐐癸級 -->
<el-row :gutter="30">
<el-col :span="12">
@@ -168,6 +221,8 @@
</el-skeleton>
</div>
+
+
<el-form :model="{ activities }" ref="formRef" label-position="top">
<el-steps :active="getActiveStep()" finish-status="success" process-status="process" align-center direction="vertical">
<el-step
@@ -196,10 +251,6 @@
</div>
<div v-if="!activity.isShen" class="node-reason">
<span>瀹℃壒鎰忚锛�</span>{{ activity.approveNodeReason }}
- </div>
- <div v-if="!activity.isShen" class="node-reason">
- <span>绛惧悕锛�</span>
- <img :src="activity.urlTem" class="signImg" alt="" v-if="activity.urlTem"/>
</div>
<div v-else-if="activity.isShen">
<el-form-item
@@ -236,6 +287,7 @@
import { WarningFilled, Edit, Check, MoreFilled } from '@element-plus/icons-vue'
import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js";
+import { getStockInRecordById } from "@/api/inventoryManagement/stockInRecord.js";
const emit = defineEmits(['close'])
const { proxy } = getCurrentInstance()
@@ -257,8 +309,11 @@
const currentQuotation = ref({})
const purchaseLoading = ref(false)
const currentPurchase = ref({})
+const stockInLoading = ref(false)
+const currentStockIn = ref({})
const isQuotationApproval = computed(() => Number(props.approveType) === 6)
const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
+const isInventoryApproval = computed(() => Number(props.approveType) === 9)
const data = reactive({
form: {
@@ -268,6 +323,10 @@
approveDeptId: "",
approveReason: "",
checkResult: "",
+ inventoryReview: false,
+ storageType: "",
+ stockInNum: null,
+ recordId: null,
},
});
const { form } = toRefs(data);
@@ -299,6 +358,7 @@
dialogFormVisible.value = true;
currentQuotation.value = {}
currentPurchase.value = {}
+ currentStockIn.value = {}
userListNoPageByTenantId().then((res) => {
userList.value = res.data;
});
@@ -359,6 +419,28 @@
}
}
+ // 鍏ュ簱瀹℃壒锛氭牴鎹� recordId 鏌ヨ鍏ュ簱鍙拌处璇︽儏
+ if (isInventoryApproval.value) {
+ const recordId = row?.recordId;
+ form.value.recordId = recordId ?? form.value.recordId;
+ form.value.inventoryReview = row?.inventoryReview ?? form.value.inventoryReview;
+ form.value.storageType = row?.storageType ?? form.value.storageType;
+ if (recordId) {
+ stockInLoading.value = true;
+ getStockInRecordById(recordId)
+ .then((res) => {
+ currentStockIn.value = res?.data || res || {};
+ })
+ .catch((err) => {
+ console.error("鏌ヨ鍏ュ簱璁板綍澶辫触:", err);
+ proxy.$modal.msgError("鏌ヨ鍏ュ簱璁板綍澶辫触");
+ })
+ .finally(() => {
+ stockInLoading.value = false;
+ });
+ }
+ }
+
approveProcessDetails(row.approveId).then((res) => {
activities.value = res.data
// 澧炲姞isApproval瀛楁
@@ -396,6 +478,14 @@
return;
}
currentActivity.approveNodeStatus = status;
+ // 濮嬬粓甯︿笂褰撳墠瀹℃壒绫诲瀷锛堝叆搴撳鎵逛负 9锛�
+ currentActivity.approveType = Number(props.approveType);
+ // 鍏ュ簱瀹℃壒锛氭妸鍏ュ簱鐩稿叧瀛楁鍐欏叆褰撳墠鑺傜偣
+ if (isInventoryApproval.value) {
+ currentActivity.recordId = form.value.recordId;
+ currentActivity.storageType = form.value.storageType;
+ currentActivity.inventoryReview = status === 1;
+ }
// 鍒ゆ柇鏄惁涓烘渶鍚庝竴姝�
const isLast = activities.value.findIndex(a => a.isShen) === activities.value.length-1;
updateApproveNode({ ...currentActivity, isLast }).then(() => {
@@ -411,6 +501,8 @@
currentQuotation.value = {}
purchaseLoading.value = false
currentPurchase.value = {}
+ stockInLoading.value = false
+ currentStockIn.value = {}
emit('close')
};
defineExpose({
--
Gitblit v1.9.3