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; }; // 按型号汇总所有批次的原料可用库存余量,并记录每个批号对应的库存数量 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; }; 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 或者在设备列表中找不到,则回显为空(null) 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;