From b8416f4c7ebf230a92e11c2ef39348fef7e162bd Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 20 十月 2026 15:17:21 +0800
Subject: [PATCH] feat: 工序添加是否领料,用于后续生产订单领料
---
src/views/productionManagement/productionProcess/index.vue | 21 +++++++++++++++++++++
src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue | 11 +++++++++++
src/views/productionManagement/productionProcess/ProcessSelectDialog.vue | 6 ++++++
3 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue b/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
index d066899..c8730e6 100644
--- a/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
+++ b/src/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue
@@ -11,6 +11,12 @@
<el-button type="primary"
@click="handleAddMaterialRow">鏂板</el-button>
</div>
+ <el-alert v-if="!materialTableLoading && bomRowCount === 0"
+ type="warning"
+ :closable="false"
+ show-icon
+ style="margin-bottom: 12px"
+ title="褰撳墠璁㈠崟娌℃湁鍙鏂欑殑BOM鐗╂枡锛氳纭BOM缁撴瀯宸茬淮鎶わ紝骞跺湪宸ュ簭绠$悊涓皢闇�瑕侀鏂欑殑宸ュ簭寮�鍚�滄槸鍚﹂鏂欌��" />
<el-table v-loading="materialTableLoading"
:data="materialTableData"
border
@@ -190,6 +196,8 @@
const materialTableLoading = ref(false);
const materialSaving = ref(false);
const materialTableData = ref([]);
+ // BOM涓爣璁颁簡鈥滄槸鍚﹂鏂欌�濈殑鐗╂枡琛屾暟锛屼负0鏃舵彁绀哄厛鍘诲伐搴忕鐞嗗紑鍚鏂欐爣璁�
+ const bomRowCount = ref(0);
const selectedMaterialRows = ref([]);
const purchaseLedgerDialogVisible = ref(false);
const purchaseLedgerAddDialogRef = ref(null);
@@ -302,6 +310,8 @@
const detailList = Array.isArray(detailRes?.data)
? detailRes.data
: detailRes?.data?.records || [];
+ // 鍚庣鍙繑鍥炲伐搴忓凡鏍囪鈥滄槸鍚﹂鏂欌�濈殑BOM鐗╂枡锛岃鏁颁负0鏃剁粰鍑烘搷浣滄彁绀�
+ bomRowCount.value = bomList.length;
// 鎸夆�滃伐搴�+鍘熸枡鈥濇眹鎬诲巻鍙查鏂欙細宸查鏁伴噺銆侀��鏂欐暟閲�
const pickedMap = new Map();
@@ -405,6 +415,7 @@
materialTableData.value = [];
selectedMaterialRows.value = [];
currentMaterialSelectRowIndex.value = -1;
+ bomRowCount.value = 0;
};
// 鎸夊瀷鍙锋眹鎬绘墍鏈夋壒娆$殑鍘熸枡鍙敤搴撳瓨浣欓噺锛屽苟璁板綍姣忎釜鎵瑰彿瀵瑰簲鐨勫簱瀛樻暟閲�
diff --git a/src/views/productionManagement/productionProcess/ProcessSelectDialog.vue b/src/views/productionManagement/productionProcess/ProcessSelectDialog.vue
index 9ece5b8..166c894 100644
--- a/src/views/productionManagement/productionProcess/ProcessSelectDialog.vue
+++ b/src/views/productionManagement/productionProcess/ProcessSelectDialog.vue
@@ -28,6 +28,11 @@
<el-tag size="small" :type="row.isProduction ? 'success' : 'info'">{{ row.isProduction ? '鏄�' : '鍚�' }}</el-tag>
</template>
</el-table-column>
+ <el-table-column prop="isPick" label="鏄惁棰嗘枡" min-width="90">
+ <template #default="{ row }">
+ <el-tag size="small" :type="row.isPick ? 'success' : 'info'">{{ row.isPick ? '鏄�' : '鍚�' }}</el-tag>
+ </template>
+ </el-table-column>
<el-table-column prop="remark" label="澶囨敞" min-width="120" show-overflow-tooltip />
</el-table>
@@ -55,6 +60,7 @@
name: string;
isQuality?: boolean;
isProduction?: boolean;
+ isPick?: boolean;
remark?: string;
};
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index ee49657..1423eac 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -57,6 +57,11 @@
:type="process.isProduction ? 'warning' : 'info'">
{{ process.isProduction ? '鐢熶骇' : '涓嶇敓浜�' }}
</el-tag>
+ <el-tag size="small"
+ style="margin-left: 8px"
+ :type="process.isPick ? 'success' : 'info'">
+ {{ process.isPick ? '棰嗘枡' : '涓嶉鏂�' }}
+ </el-tag>
<el-tag v-if="process.type !== null && process.type !== undefined"
size="small"
:type="process.type == 1 ? 'primary' : 'success'"
@@ -131,6 +136,11 @@
<el-form-item label="鏄惁鐢熶骇"
prop="isProduction">
<el-switch v-model="processForm.isProduction" />
+ </el-form-item>
+ <el-form-item label="鏄惁棰嗘枡"
+ prop="isPick">
+ <el-switch v-model="processForm.isPick" />
+ <div class="form-tip">寮�鍚悗锛岃宸ュ簭娑堣�楃殑鐗╂枡鎵嶄細杩涘叆鐢熶骇璁㈠崟鐨勯鏂欏彴璐�</div>
</el-form-item>
<el-form-item label="璁¤垂绫诲瀷"
prop="type">
@@ -344,6 +354,7 @@
salaryQuota: null,
isQuality: false,
isProduction: false,
+ isPick: false,
remark: "",
deviceLedgerId: null,
type: 0,
@@ -555,6 +566,7 @@
processForm.salaryQuota = null;
processForm.isQuality = false;
processForm.isProduction = false;
+ processForm.isPick = false;
processForm.remark = "";
processForm.deviceLedgerId = null;
processForm.type = 0;
@@ -569,6 +581,7 @@
processForm.salaryQuota = process.salaryQuota;
processForm.isQuality = !!process.isQuality;
processForm.isProduction = !!process.isProduction;
+ processForm.isPick = !!process.isPick;
processForm.remark = process.remark || "";
// 濡傛灉璁惧 ID 涓� 0 鎴栬�呭湪璁惧鍒楄〃涓壘涓嶅埌锛屽垯鍥炴樉涓虹┖锛坣ull锛�
const deviceId = Number(process.deviceLedgerId);
@@ -805,6 +818,14 @@
min-height: calc(100vh - 84px);
}
+ .form-tip {
+ width: 100%;
+ margin-top: 4px;
+ font-size: 12px;
+ line-height: 18px;
+ color: #909399;
+ }
+
.process-config-container {
display: flex;
gap: 20px;
--
Gitblit v1.9.3