From 1160de5142cd2bc08ebc61c247a4857f0c4ab7f1 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 10:45:11 +0800
Subject: [PATCH] 特色功能:丰富报销清单并添加审批流程详情——新增功能以丰富报销清单行内容,为费用和差旅报销提供审批流程详情。——引入新的实用函数来处理审批流程节点和汇总信息。——更新组件以利用丰富后的审批流程数据,从而更好地展示审批进度。
---
src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue b/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
index d058896..09e7421 100644
--- a/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
+++ b/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
@@ -111,6 +111,7 @@
<span class="dialog-footer">
<el-button type="primary"
:loading="materialSaving"
+ :disabled="isSaveDisabled"
@click="handleMaterialSave">淇濆瓨</el-button>
<el-button @click="dialogVisible = false">鍙栨秷</el-button>
</span>
@@ -155,6 +156,33 @@
const materialTableLoading = ref(false);
const materialSaving = ref(false);
const materialTableData = ref([]);
+
+ const isSaveDisabled = computed(() => {
+ if (materialTableData.value.length === 0) return true;
+ return !materialTableData.value.some(row => {
+ // 妫�鏌ユ槸鍚︽湁浠讳綍鐢ㄦ埛杈撳叆鍐呭
+ const hasBatch = Array.isArray(row.batchNo) && row.batchNo.length > 0;
+ const hasPickQty =
+ row.pickQty !== null && row.pickQty !== undefined && row.pickQty !== 0;
+
+ if (row.bom) {
+ // 瀵逛簬鏉ヨ嚜BOM鐨勮锛岃緭鍏ユ鍙湁鈥滄壒鍙封�濆拰鈥滈鐢ㄦ暟閲忊��
+ return hasBatch || hasPickQty;
+ } else {
+ // 瀵逛簬鏂板琛岋紝杈撳叆妗嗗寘鎷�滃伐搴忊�濄�佲�滃師鏂欌�濄�佲�滈渶姹傛暟閲忊�濄�佲�滄壒鍙封�濆拰鈥滈鐢ㄦ暟閲忊��
+ const hasOperation = !!row.operationName;
+ const hasMaterial = !!row.materialName;
+ const hasDemanded =
+ row.demandedQuantity !== null &&
+ row.demandedQuantity !== undefined &&
+ row.demandedQuantity !== 0;
+ return (
+ hasBatch || hasPickQty || hasOperation || hasMaterial || hasDemanded
+ );
+ }
+ });
+ });
+
const processOptions = ref([]);
const currentMaterialSelectRowIndex = ref(-1);
let materialTempId = 0;
--
Gitblit v1.9.3