From df605c69a17bb548e3f98e10f7cc3c3298e5d8f7 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 25 三月 2026 16:31:10 +0800
Subject: [PATCH] 过程检验列表加上不良数量、合格数量字段。过程检验编辑页面也加上不良数量、合格数量字段,不良数量输入框手填,合格数量,数量输入框置灰,根据根据不良数量+合格数量=数量这一逻辑计算。若不填默认不良数量为0。数量是订单本次生产数量-报废数量
---
src/views/productionManagement/productionReporting/components/Detail.vue | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/components/Detail.vue b/src/views/productionManagement/productionReporting/components/Detail.vue
index 5983d1c..f4d964e 100644
--- a/src/views/productionManagement/productionReporting/components/Detail.vue
+++ b/src/views/productionManagement/productionReporting/components/Detail.vue
@@ -1,5 +1,5 @@
<script setup lang="ts">
-import {computed} from "vue";
+import {computed, onMounted, ref} from "vue";
defineOptions({
name: "ReportingDetail"
@@ -16,11 +16,32 @@
}
});
+const emits = defineEmits(["update:isShow"]);
const visible = computed({
get: () => props.isShow,
set: (value: boolean) => emits("update:isShow", value),
});
+
+const otherData = ref({})
+const otherDataEntries = computed(() => {
+ return Object.entries(otherData.value || {})
+ .filter(([key]) => key !== "rows")
+ .map(([key, value]) => ({key, value}));
+});
+const init = () => {
+ if (props.row.otherData !== null && props.row.otherData !== '') {
+ try {
+ otherData.value = JSON.parse(props.row.otherData);
+ } catch {
+ otherData.value = {};
+ }
+ }
+};
+
+onMounted(() => {
+ init();
+})
</script>
@@ -33,12 +54,26 @@
<el-descriptions-item label="鎶ュ伐浜哄憳">{{ row.nickName || '-' }}</el-descriptions-item>
<el-descriptions-item label="宸ュ簭">{{ row.process || '-' }}</el-descriptions-item>
<el-descriptions-item label="宸ュ崟缂栧彿">{{ row.workOrderNo || '-' }}</el-descriptions-item>
- <el-descriptions-item label="浜у搧鍚嶇О">{{ row.salesContractNo || '-' }}</el-descriptions-item>
- <el-descriptions-item label="浜у搧瑙勬牸鍨嬪彿">{{ row.productName || '-' }}</el-descriptions-item>
- <el-descriptions-item label="浜у嚭鏁伴噺">{{ row.productModelName || '-' }}</el-descriptions-item>
- <el-descriptions-item label="鎶ュ簾鏁伴噺">{{ row.quantity || '-' }}</el-descriptions-item>
- <el-descriptions-item label="鍗曚綅">{{ row.scrapQty || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="浜у搧鍚嶇О">{{ row.productName || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="浜у搧瑙勬牸鍨嬪彿">{{ row.productModelName || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="浜у嚭鏁伴噺">{{ row.quantity || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鎶ュ簾鏁伴噺">{{ row.scrapQty || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鍗曚綅">{{ row.unit || '-' }}</el-descriptions-item>
<el-descriptions-item label="鍒涘缓鏃堕棿">{{ row.createTime || '-' }}</el-descriptions-item>
+ <el-descriptions-item
+ v-for="item in otherDataEntries"
+ :key="item.key"
+ :label="item.key"
+ >
+ {{ item.value || '-' }}
+ </el-descriptions-item>
+ <el-descriptions-item
+ v-for="item in (otherData.rows || [])"
+ :key="item.parameterItem"
+ :label="`${item.parameterItem}`"
+ >
+ {{ item.value || '-' }}
+ </el-descriptions-item>
</el-descriptions>
<template #footer>
<span class="dialog-footer">
--
Gitblit v1.9.3