From 4dfdc774c2e742764848177e44e75b7de518f285 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期一, 15 九月 2025 19:46:19 +0800
Subject: [PATCH] 设备台账导入

---
 src/views/mes/MesProductionOrderList.vue |   75 ++++++++++++++++++++++++++++---------
 1 files changed, 56 insertions(+), 19 deletions(-)

diff --git a/src/views/mes/MesProductionOrderList.vue b/src/views/mes/MesProductionOrderList.vue
index 27c23e8..a7ae2c7 100644
--- a/src/views/mes/MesProductionOrderList.vue
+++ b/src/views/mes/MesProductionOrderList.vue
@@ -20,21 +20,27 @@
               <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鍙�" v-model="queryParam.materialNumber"></j-input>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="鐗╂枡鍚嶇О">
-              <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="璁㈠崟鐘舵��">
-              <j-dict-select-tag dictCode="production_order_status" placeholder="璇烽�夋嫨璁㈠崟鐘舵��"
-                                 v-model="queryParam.orderStatus"></j-dict-select-tag>
-            </a-form-item>
-          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="鐗╂枡鍚嶇О">
+                <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="璁㈠崟鐘舵��">
+                <j-dict-select-tag dictCode="production_order_status" placeholder="璇烽�夋嫨璁㈠崟鐘舵��"
+                                   v-model="queryParam.orderStatus"></j-dict-select-tag>
+              </a-form-item>
+            </a-col>
+          </template>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+               <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+              </a>
             </span>
           </a-col>
         </a-row>
@@ -64,6 +70,10 @@
         class="j-table-force-nowrap"
         @change="handleTableChange">
         <span slot="action" slot-scope="text, record">
+          <a-popconfirm title="纭畾鍚屾鏈�鏂版暟鎹悧?" @confirm="() => handleSync(record.id)">
+          <a>鍒犻櫎</a>
+        </a-popconfirm>
+          <a-divider type="vertical" />
           <a @click="handleEdit(record)">缂栬緫</a>
           <a-divider type="vertical" />
           <a @click="handleDetail(record)">璇︽儏</a>
@@ -81,6 +91,7 @@
 import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import MesProductionOrderModal from './modules/MesProductionOrderModal'
+import { getAction } from '@api/manage'
 
 export default {
   name: 'MesProductionOrderList',
@@ -102,25 +113,25 @@
           customRender: function(t, r, index) {
             return parseInt(index) + 1
           },
-          fixed: 'left',
+          fixed: 'left'
         },
         {
           title: '鐢熶骇璁㈠崟鍙�',
           align: 'center',
           dataIndex: 'orderCode',
-          fixed: 'left',
+          fixed: 'left'
         },
         {
           title: '璁㈠崟绫诲瀷',
           align: 'center',
           dataIndex: 'orderCategory_dictText',
-          fixed: 'left',
+          fixed: 'left'
         },
         {
           title: '鐗╂枡缂栧彿',
           align: 'center',
           dataIndex: 'materialNumber',
-          fixed: 'left',
+          fixed: 'left'
         },
         {
           title: '鐗╂枡鍚嶇О',
@@ -141,6 +152,16 @@
           title: '璁㈠崟鏁伴噺',
           align: 'center',
           dataIndex: 'orderQuantity'
+        },
+        {
+          title: '鍚堟牸鏁伴噺',
+          align: 'center',
+          dataIndex: 'qualifiedQuantity'
+        },
+        {
+          title: '鎶ュ簾鏁伴噺',
+          align: 'center',
+          dataIndex: 'scrapQuantity'
         },
         {
           title: '鍩烘湰璁¢噺鍗曚綅',
@@ -238,15 +259,31 @@
       ],
       url: {
         list: '/mes/productionOrder/list',
-      },
-      dictOptions: {},
+        syncSapProductionOrder: '/mes/productionOrder/syncSapProductionOrder'
+      }
     }
   },
   created() {
   },
-  computed: {
-  },
+  computed: {},
   methods: {
+    handleSync(id) {
+      let that = this
+      getAction(that.url.syncSapProductionOrder, { id: id }).then((res) => {
+        if (res.success) {
+          that.$notification.success({
+            message: '娑堟伅',
+            description: res.message
+          })
+          that.loadData()
+        } else {
+          that.$notification.warning({
+            message: '娑堟伅',
+            description: res.message
+          })
+        }
+      })
+    }
   }
 }
 </script>

--
Gitblit v1.9.3