From 05116fb8d24fd1b49d0f4fbbffec959152842ebd Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 28 四月 2026 11:52:36 +0800
Subject: [PATCH] 排产和报工字段名修改

---
 src/views/productionManagement/workOrderEdit/index.vue       |  447 ++++++++++++++++++++++++-------------------------
 src/views/productionManagement/workOrderManagement/index.vue |   36 +--
 2 files changed, 235 insertions(+), 248 deletions(-)

diff --git a/src/views/productionManagement/workOrderEdit/index.vue b/src/views/productionManagement/workOrderEdit/index.vue
index 52a36cd..b919973 100644
--- a/src/views/productionManagement/workOrderEdit/index.vue
+++ b/src/views/productionManagement/workOrderEdit/index.vue
@@ -4,74 +4,66 @@
       <div class="search-row">
         <div class="search-item">
           <span class="search_title">宸ュ崟缂栧彿锛�</span>
-          <el-input
-            v-model="searchForm.workOrderNo"
-            style="width: 240px"
-            placeholder="璇疯緭鍏�"
-            @change="handleQuery"
-            clearable
-            prefix-icon="Search"
-          />
+          <el-input v-model="searchForm.workOrderNo"
+                    style="width: 240px"
+                    placeholder="璇疯緭鍏�"
+                    @change="handleQuery"
+                    clearable
+                    prefix-icon="Search" />
         </div>
         <div class="search-item">
           <span class="search_title">鐢熶骇璁㈠崟鍙凤細</span>
-          <el-input
-            v-model="searchForm.productOrderNpsNo"
-            style="width: 240px"
-            placeholder="璇疯緭鍏�"
-            @change="handleQuery"
-            clearable
-            prefix-icon="Search"
-          />
+          <el-input v-model="searchForm.productOrderNpsNo"
+                    style="width: 240px"
+                    placeholder="璇疯緭鍏�"
+                    @change="handleQuery"
+                    clearable
+                    prefix-icon="Search" />
         </div>
         <div class="search-item">
-          <el-button type="primary" @click="handleQuery">鎼滅储</el-button>
+          <el-button type="primary"
+                     @click="handleQuery">鎼滅储</el-button>
         </div>
       </div>
     </div>
     <div class="table_list">
-      <PIMTable
-        rowKey="id"
-        :column="tableColumn"
-        :tableData="tableData"
-        :page="page"
-        :tableLoading="tableLoading"
-        @pagination="pagination"
-      >
+      <PIMTable rowKey="id"
+                :column="tableColumn"
+                :tableData="tableData"
+                :page="page"
+                :tableLoading="tableLoading"
+                @pagination="pagination">
         <template #completionStatus="{ row }">
-          <el-progress
-            :percentage="toProgressPercentage(row?.completionStatus)"
-            :color="progressColor(toProgressPercentage(row?.completionStatus))"
-            :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''"
-          />
+          <el-progress :percentage="toProgressPercentage(row?.completionStatus)"
+                       :color="progressColor(toProgressPercentage(row?.completionStatus))"
+                       :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
         </template>
       </PIMTable>
     </div>
-
-    <el-dialog v-model="editDialogVisible" title="缂栬緫璁″垝鏃堕棿" width="500px">
-      <el-form :model="editrow" label-width="120px">
+    <el-dialog v-model="editDialogVisible"
+               title="缂栬緫璁″垝鏃堕棿"
+               width="500px">
+      <el-form :model="editrow"
+               label-width="120px">
         <el-form-item label="璁″垝寮�濮嬫椂闂�">
-          <el-date-picker
-            v-model="editrow.planStartTime"
-            type="date"
-            placeholder="璇烽�夋嫨"
-            value-format="YYYY-MM-DD"
-            style="width: 300px"
-          />
+          <el-date-picker v-model="editrow.planStartTime"
+                          type="date"
+                          placeholder="璇烽�夋嫨"
+                          value-format="YYYY-MM-DD"
+                          style="width: 300px" />
         </el-form-item>
         <el-form-item label="璁″垝缁撴潫鏃堕棿">
-          <el-date-picker
-            v-model="editrow.planEndTime"
-            type="date"
-            placeholder="璇烽�夋嫨"
-            value-format="YYYY-MM-DD"
-            style="width: 300px"
-          />
+          <el-date-picker v-model="editrow.planEndTime"
+                          type="date"
+                          placeholder="璇烽�夋嫨"
+                          value-format="YYYY-MM-DD"
+                          style="width: 300px" />
         </el-form-item>
       </el-form>
       <template #footer>
         <span class="dialog-footer">
-          <el-button type="primary" @click="handleUpdate">纭畾</el-button>
+          <el-button type="primary"
+                     @click="handleUpdate">纭畾</el-button>
           <el-button @click="editDialogVisible = false">鍙栨秷</el-button>
         </span>
       </template>
@@ -80,200 +72,201 @@
 </template>
 
 <script setup>
-import { getCurrentInstance, onMounted, reactive, ref, toRefs } from "vue";
-import { ElMessageBox } from "element-plus";
-import {
-  productWorkOrderPage,
-  updateProductWorkOrder,
-} from "@/api/productionManagement/workOrder.js";
+  import { getCurrentInstance, onMounted, reactive, ref, toRefs } from "vue";
+  import { ElMessageBox } from "element-plus";
+  import {
+    productWorkOrderPage,
+    updateProductWorkOrder,
+  } from "@/api/productionManagement/workOrder.js";
 
-const { proxy } = getCurrentInstance();
+  const { proxy } = getCurrentInstance();
 
-const tableColumn = ref([
-  {
-    label: "宸ュ崟绫诲瀷",
-    prop: "workOrderType",
-    width: "80",
-  },
-  {
-    label: "宸ュ崟缂栧彿",
-    prop: "workOrderNo",
-    width: "140",
-  },
-  {
-    label: "鐢熶骇璁㈠崟鍙�",
-    prop: "productOrderNpsNo",
-    width: "140",
-  },
-  {
-    label: "浜у搧鍚嶇О",
-    prop: "productName",
-    width: "140",
-  },
-  {
-    label: "瑙勬牸",
-    prop: "model",
-  },
-  {
-    label: "鍗曚綅",
-    prop: "unit",
-  },
-  {
-    label: "宸ュ簭鍚嶇О",
-    prop: "processName",
-  },
-  {
-    label: "闇�姹傛暟閲�",
-    prop: "planQuantity",
-    width: "140",
-  },
-  {
-    label: "瀹屾垚鏁伴噺",
-    prop: "completeQuantity",
-    width: "140",
-  },
-  {
-    label: "瀹屾垚杩涘害",
-    prop: "completionStatus",
-    dataType: "slot",
-    slot: "completionStatus",
-    width: "140",
-  },
-  {
-    label: "璁″垝寮�濮嬫椂闂�",
-    prop: "planStartTime",
-    width: "140",
-  },
-  {
-    label: "璁″垝缁撴潫鏃堕棿",
-    prop: "planEndTime",
-    width: "140",
-  },
-  {
-    label: "瀹為檯寮�濮嬫椂闂�",
-    prop: "actualStartTime",
-    width: "140",
-  },
-  {
-    label: "瀹為檯缁撴潫鏃堕棿",
-    prop: "actualEndTime",
-    width: "140",
-  },
-  {
-    label: "鎿嶄綔",
-    width: "100",
-    align: "center",
-    dataType: "action",
-    fixed: "right",
-    operation: [
-      {
-        name: "璁″垝鏃堕棿",
-        clickFun: row => {
-          handleEdit(row);
+  const tableColumn = ref([
+    {
+      label: "宸ュ崟绫诲瀷",
+      prop: "workOrderType",
+      width: "80",
+    },
+    {
+      label: "宸ュ崟缂栧彿",
+      prop: "workOrderNo",
+      width: "140",
+    },
+    {
+      label: "鐢熶骇璁㈠崟鍙�",
+      prop: "npsNo",
+      width: "140",
+    },
+    {
+      label: "浜у搧鍚嶇О",
+      prop: "productName",
+      width: "140",
+    },
+    {
+      label: "瑙勬牸",
+      prop: "model",
+    },
+    {
+      label: "鍗曚綅",
+      prop: "unit",
+    },
+    {
+      label: "宸ュ簭鍚嶇О",
+      prop: "operationName",
+      width: "100",
+    },
+    {
+      label: "闇�姹傛暟閲�",
+      prop: "planQuantity",
+      width: "140",
+    },
+    {
+      label: "瀹屾垚鏁伴噺",
+      prop: "completeQuantity",
+      width: "140",
+    },
+    {
+      label: "瀹屾垚杩涘害",
+      prop: "completionStatus",
+      dataType: "slot",
+      slot: "completionStatus",
+      width: "140",
+    },
+    {
+      label: "璁″垝寮�濮嬫椂闂�",
+      prop: "planStartTime",
+      width: "140",
+    },
+    {
+      label: "璁″垝缁撴潫鏃堕棿",
+      prop: "planEndTime",
+      width: "140",
+    },
+    {
+      label: "瀹為檯寮�濮嬫椂闂�",
+      prop: "actualStartTime",
+      width: "140",
+    },
+    {
+      label: "瀹為檯缁撴潫鏃堕棿",
+      prop: "actualEndTime",
+      width: "140",
+    },
+    {
+      label: "鎿嶄綔",
+      width: "100",
+      align: "center",
+      dataType: "action",
+      fixed: "right",
+      operation: [
+        {
+          name: "璁″垝鏃堕棿",
+          clickFun: row => {
+            handleEdit(row);
+          },
         },
-      },
-    ],
-  },
-]);
+      ],
+    },
+  ]);
 
-const tableData = ref([]);
-const tableLoading = ref(false);
-const editDialogVisible = ref(false);
-const editrow = ref(null);
-const page = reactive({
-  current: 1,
-  size: 100,
-  total: 0,
-});
+  const tableData = ref([]);
+  const tableLoading = ref(false);
+  const editDialogVisible = ref(false);
+  const editrow = ref(null);
+  const page = reactive({
+    current: 1,
+    size: 100,
+    total: 0,
+  });
 
-const data = reactive({
-  searchForm: {
-    workOrderNo: "",
-    productOrderNpsNo: "",
-  },
-});
-const { searchForm } = toRefs(data);
+  const data = reactive({
+    searchForm: {
+      workOrderNo: "",
+      productOrderNpsNo: "",
+    },
+  });
+  const { searchForm } = toRefs(data);
 
-const toProgressPercentage = val => {
-  const n = Number(val);
-  if (!Number.isFinite(n)) return 0;
-  if (n <= 0) return 0;
-  if (n >= 100) return 100;
-  return Math.round(n);
-};
+  const toProgressPercentage = val => {
+    const n = Number(val);
+    if (!Number.isFinite(n)) return 0;
+    if (n <= 0) return 0;
+    if (n >= 100) return 100;
+    return Math.round(n);
+  };
 
-const progressColor = percentage => {
-  const p = toProgressPercentage(percentage);
-  if (p < 30) return "#f56c6c";
-  if (p < 50) return "#e6a23c";
-  if (p < 80) return "#409eff";
-  return "#67c23a";
-};
+  const progressColor = percentage => {
+    const p = toProgressPercentage(percentage);
+    if (p < 30) return "#f56c6c";
+    if (p < 50) return "#e6a23c";
+    if (p < 80) return "#409eff";
+    return "#67c23a";
+  };
 
-const handleQuery = () => {
-  page.current = 1;
-  getList();
-};
+  const handleQuery = () => {
+    page.current = 1;
+    getList();
+  };
 
-const pagination = obj => {
-  page.current = obj.page;
-  page.size = obj.limit;
-  getList();
-};
+  const pagination = obj => {
+    page.current = obj.page;
+    page.size = obj.limit;
+    getList();
+  };
 
-const getList = () => {
-  tableLoading.value = true;
-  const params = { ...searchForm.value, ...page };
-  productWorkOrderPage(params)
-    .then(res => {
-      tableLoading.value = false;
-      tableData.value = res.data.records;
-      page.total = res.data.total;
-    })
-    .catch(() => {
-      tableLoading.value = false;
-    });
-};
-
-const handleEdit = row => {
-  editrow.value = JSON.parse(JSON.stringify(row));
-  editDialogVisible.value = true;
-};
-
-const handleUpdate = () => {
-  updateProductWorkOrder(editrow.value)
-    .then(() => {
-      proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-      editDialogVisible.value = false;
-      getList();
-    })
-    .catch(() => {
-      ElMessageBox.alert("淇敼澶辫触", "鎻愮ず", {
-        confirmButtonText: "纭畾",
+  const getList = () => {
+    tableLoading.value = true;
+    const params = { ...searchForm.value, ...page };
+    productWorkOrderPage(params)
+      .then(res => {
+        tableLoading.value = false;
+        tableData.value = res.data.records;
+        page.total = res.data.total;
+      })
+      .catch(() => {
+        tableLoading.value = false;
       });
-    });
-};
+  };
 
-onMounted(() => {
-  getList();
-});
+  const handleEdit = row => {
+    editrow.value = JSON.parse(JSON.stringify(row));
+    editDialogVisible.value = true;
+  };
+
+  const handleUpdate = () => {
+    updateProductWorkOrder(editrow.value)
+      .then(() => {
+        proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+        editDialogVisible.value = false;
+        getList();
+      })
+      .catch(() => {
+        ElMessageBox.alert("淇敼澶辫触", "鎻愮ず", {
+          confirmButtonText: "纭畾",
+        });
+      });
+  };
+
+  onMounted(() => {
+    getList();
+  });
 </script>
 
 <style scoped lang="scss">
-.search-row {
-  display: flex;
-  align-items: center;
-  gap: 12px;
-}
+  .search-row {
+    display: flex;
+    align-items: center;
+    gap: 12px;
+  }
 
-.search-item {
-  display: flex;
-  align-items: center;
-}
+  .search-item {
+    display: flex;
+    align-items: center;
+  }
 
-.search_title {
-  margin-right: 8px;
-  font-size: 14px;
-  color: #606266;
-}
+  .search_title {
+    margin-right: 8px;
+    font-size: 14px;
+    color: #606266;
+  }
 </style>
diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index 48f8839..819e3fd 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -40,7 +40,6 @@
         </template>
       </PIMTable>
     </div>
-    
     <!-- 娴佽浆鍗″脊绐� -->
     <el-dialog v-model="transferCardVisible"
                title="娴佽浆鍗�"
@@ -116,7 +115,6 @@
                    @click="printTransferCard">鎵撳嵃娴佽浆鍗�</el-button>
       </div>
     </el-dialog>
-    
     <!-- 鎶ュ伐寮圭獥 -->
     <el-dialog v-model="reportDialogVisible"
                title="鎶ュ伐"
@@ -172,13 +170,9 @@
         </span>
       </template>
     </el-dialog>
-
-    <MaterialDialog
-      v-model="materialDialogVisible"
-      :row-data="currentMaterialOrderRow"
-      @refresh="getList"
-    />
-    
+    <MaterialDialog v-model="materialDialogVisible"
+                    :row-data="currentMaterialOrderRow"
+                    @refresh="getList" />
     <FilesDia ref="workOrderFilesRef" />
   </div>
 </template>
@@ -212,7 +206,7 @@
     },
     {
       label: "鐢熶骇璁㈠崟鍙�",
-      prop: "productOrderNpsNo",
+      prop: "npsNo",
       width: "140",
     },
     {
@@ -230,7 +224,7 @@
     },
     {
       label: "宸ュ簭鍚嶇О",
-      prop: "processName",
+      prop: "operationName",
     },
     {
       label: "闇�姹傛暟閲�",
@@ -288,12 +282,12 @@
             openWorkOrderFiles(row);
           },
         },
-        {
-          name: "鐗╂枡",
-          clickFun: row => {
-            openMaterialDialog(row);
-          },
-        },
+        // {
+        //   name: "鐗╂枡",
+        //   clickFun: row => {
+        //     openMaterialDialog(row);
+        //   },
+        // },
         {
           name: "鎶ュ伐",
           clickFun: row => {
@@ -304,7 +298,7 @@
       ],
     },
   ]);
-  
+
   const tableData = ref([]);
   const tableLoading = ref(false);
   const transferCardVisible = ref(false);
@@ -416,7 +410,7 @@
     // 鏈夋晥鐨勯潪璐熸暣鏁帮紙鍖呮嫭0锛�
     reportForm.scrapQty = num;
   };
-  
+
   const currentReportRowData = ref(null);
   const materialDialogVisible = ref(false);
   const currentMaterialOrderRow = ref(null);
@@ -454,13 +448,13 @@
     page.current = 1;
     getList();
   };
-  
+
   const pagination = obj => {
     page.current = obj.page;
     page.size = obj.limit;
     getList();
   };
-  
+
   const getList = () => {
     tableLoading.value = true;
     const params = { ...searchForm.value, ...page };

--
Gitblit v1.9.3