From 905cfed9b092caf16143e2a2a21bc740d268c1dc Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 08 一月 2026 14:06:29 +0800
Subject: [PATCH] 产出数量字段名修改

---
 src/views/productionManagement/productionReporting/Output.vue |  163 +++++++++++++++++++++++++++---------------------------
 src/views/productionManagement/workOrder/index.vue            |   13 +++-
 2 files changed, 90 insertions(+), 86 deletions(-)

diff --git a/src/views/productionManagement/productionReporting/Output.vue b/src/views/productionManagement/productionReporting/Output.vue
index 0f49a55..4eeac43 100644
--- a/src/views/productionManagement/productionReporting/Output.vue
+++ b/src/views/productionManagement/productionReporting/Output.vue
@@ -1,21 +1,18 @@
 <template>
   <div>
-    <el-dialog
-        v-model="isShow"
-        title="浜у嚭"
-        @close="closeModal"
-    >
-      <PIMTable
-          rowKey="id"
-          :column="tableColumn"
-          :tableData="data"
-          :page="page"
-          :tableLoading="tableLoading"
-          @pagination="pagination"
-      ></PIMTable>
+    <el-dialog v-model="isShow"
+               title="浜у嚭"
+               @close="closeModal">
+      <PIMTable rowKey="id"
+                :column="tableColumn"
+                :tableData="data"
+                :page="page"
+                :tableLoading="tableLoading"
+                @pagination="pagination"></PIMTable>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="closeModal">鍏抽棴</el-button>
+          <el-button type="primary"
+                     @click="closeModal">鍏抽棴</el-button>
         </div>
       </template>
     </el-dialog>
@@ -23,85 +20,87 @@
 </template>
 
 <script setup>
-import {ref, computed, onMounted} from "vue";
-import { productionProductOutputListPage } from "@/api/productionManagement/productionProductOutput.js";
+  import { ref, computed, onMounted } from "vue";
+  import { productionProductOutputListPage } from "@/api/productionManagement/productionProductOutput.js";
 
-const props = defineProps({
-  visible: {
-    type: Boolean,
-    required: true,
-  },
-  productionProductMainId: {
-    type: Number,
-    required: true,
-  },
-});
+  const props = defineProps({
+    visible: {
+      type: Boolean,
+      required: true,
+    },
+    productionProductMainId: {
+      type: Number,
+      required: true,
+    },
+  });
 
-const emit = defineEmits(['update:visible', 'completed']);
+  const emit = defineEmits(["update:visible", "completed"]);
 
-const page = reactive({
-  current: 1,
-  size: 100,
-  total: 0
-});
+  const page = reactive({
+    current: 1,
+    size: 100,
+    total: 0,
+  });
 
-const pagination = (obj) => {
-  page.current = obj.page;
-  page.size = obj.limit;
-  fetchData();
-};
+  const pagination = obj => {
+    page.current = obj.page;
+    page.size = obj.limit;
+    fetchData();
+  };
 
-const tableLoading = ref(false);
+  const tableLoading = ref(false);
 
-const tableColumn = [
-  {
-    label: '鎶ュ伐鍗曞彿',
-    prop: 'productNo',
-  },
-  {
-    label: '浜у搧鍨嬪彿',
-    prop: 'model',
-  },
-  {
-    label: '鎶曞叆鏁伴噺',
-    prop: 'quantity',
-  },
-]
+  const tableColumn = [
+    {
+      label: "鎶ュ伐鍗曞彿",
+      prop: "productNo",
+    },
+    {
+      label: "浜у搧鍨嬪彿",
+      prop: "model",
+    },
+    {
+      label: "浜у嚭鏁伴噺",
+      prop: "quantity",
+    },
+  ];
 
-const isShow = computed({
-  get() {
-    return props.visible;
-  },
-  set(val) {
-    emit('update:visible', val);
-  },
-});
+  const isShow = computed({
+    get() {
+      return props.visible;
+    },
+    set(val) {
+      emit("update:visible", val);
+    },
+  });
 
-const data = ref([])
+  const data = ref([]);
 
-const closeModal = () => {
-  isShow.value = false;
-};
+  const closeModal = () => {
+    isShow.value = false;
+  };
 
-const fetchData = () => {
-  tableLoading.value = true;
-  const params = { productMainId: props.productionProductMainId, ...page };
+  const fetchData = () => {
+    tableLoading.value = true;
+    const params = { productMainId: props.productionProductMainId, ...page };
 
-  productionProductOutputListPage(params).then(res => {
-    tableLoading.value = false;
-    data.value = res.data.records;
-    page.total = res.data.total;
-  }).catch(err => {
-    tableLoading.value = false;
-  })
-};
+    productionProductOutputListPage(params)
+      .then(res => {
+        tableLoading.value = false;
+        data.value = res.data.records;
+        page.total = res.data.total;
+      })
+      .catch(err => {
+        tableLoading.value = false;
+      });
+  };
 
-defineExpose({
-  closeModal,
-  isShow,
-});
+  defineExpose({
+    closeModal,
+    isShow,
+  });
 
-onMounted(() => {
-  fetchData()
-})
+  onMounted(() => {
+    fetchData();
+  });
 </script>
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index f120ae7..a538c1d 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -164,7 +164,7 @@
       <el-form :model="reportForm"
                label-width="120px">
         <el-form-item label="寰呯敓浜ф暟閲�">
-          <el-input v-model="reportForm.remainingQuantity"
+          <el-input v-model="reportForm.planQuantity"
                     readonly
                     style="width: 300px" />
         </el-form-item>
@@ -231,6 +231,11 @@
       prop: "processName",
     },
     {
+      label: "寰呯敓浜ф暟閲�",
+      prop: "planQuantity",
+      width: "140",
+    },
+    {
       label: "璁″垝鐢熶骇鏁伴噺",
       prop: "quantity",
       width: "140",
@@ -294,7 +299,7 @@
   const transferCardRowData = ref(null);
   const reportDialogVisible = ref(false);
   const reportForm = reactive({
-    remainingQuantity: 0,
+    planQuantity: 0,
     quantity: 0,
     userName: "",
     workOrderId: "",
@@ -378,7 +383,7 @@
 
   const showReportDialog = row => {
     currentReportRowData.value = row;
-    reportForm.remainingQuantity = 1;
+    reportForm.planQuantity = row.planQuantity;
     reportForm.quantity = row.quantity;
     reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
     reportForm.workOrderId = row.id;
@@ -396,7 +401,7 @@
       });
       return;
     }
-    if (reportForm.quantity > reportForm.remainingQuantity) {
+    if (reportForm.quantity > reportForm.planQuantity) {
       ElMessageBox.alert("鏈鐢熶骇鏁伴噺涓嶈兘瓒呰繃寰呯敓浜ф暟閲�", "鎻愮ず", {
         confirmButtonText: "纭畾",
       });

--
Gitblit v1.9.3