From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示

---
 north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddTeamGroup.vue |  108 +++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 70 insertions(+), 38 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddTeamGroup.vue b/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddTeamGroup.vue
index ed9604c..655db06 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddTeamGroup.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/productionBasicData/AddTeamGroup.vue
@@ -7,6 +7,7 @@
 import {changeFilterEvent, filterChanged} from "@/hook"
 import userInfo from "@/stores/userInfo"
 import {useI18n} from 'vue-i18n'
+import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
 //璇█鑾峰彇
 const {t} = useI18n()
 const route = useRoute()
@@ -26,6 +27,11 @@
   } else {
     ElMessage.warning(res.msg)
   }
+})
+
+onMounted(() => {
+  //鍚敤琛ㄦ牸鎷栧姩閫変腑
+  addListener(xGrid.value, gridOptions)
 })
 
 //瀛愮粍浠舵帴鏀跺弬鏁�
@@ -59,17 +65,17 @@
     showStatus: true
   },//琛ㄥご鍙傛暟
   columns: [
-    {type: 'seq', fixed: "left", title: '鑷簭', width: 50},
+    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
     {
       field: 'basicName',
-      title: '鐝粍鍚嶇О',
+      title: t('productionBasicData.teamName'),
       width: 600,
       editRender: {name: 'input', attrs: {placeholder: ''}},
 
     },
     {
       field: 'basicCategory',
-      title: '鎵�鍦ㄥ伐搴�',
+      title: t('productionBasicData.processInvolved'),
       editRender: {},
       slots: {default: 'basicCategory_default', edit: 'basicCategory'}
     },
@@ -77,8 +83,9 @@
   //琛ㄥご鎸夐挳
   toolbarConfig: {
     buttons: [
-      {code: 'save', name: '淇濆瓨', status: 'primary', icon: 'vxe-icon-save'},
+      {code: 'removeRow', name: t('basicData.delete'), status: 'primary', icon: 'vxe-icon-delete'},
       {code: 'addRow', name: t('reportingWorks.increase'), status: 'primary', icon: 'vxe-icon-square-plus'},
+      {code: 'save', name: t('basicData.save'), status: 'primary', icon: 'vxe-icon-save'},
     ],
     // import: false,
     // export: true,
@@ -93,7 +100,7 @@
     return [
       columns.map((column, columnIndex) => {
         if (columnIndex === 0) {
-          return '鍚堣:'
+          return t('basicData.total')
         }
         if (footList.includes(column.field)) {
           return sumNum(data, column.field)
@@ -114,6 +121,13 @@
           $grid.insertAt({})
           break
         }
+        case 'removeRow': {
+          let result = toolbarButtonClickEvent()
+          if (result) {
+            $grid.remove(result.row)
+          }
+          break
+        }
         case 'save': {
           const tableData = $grid.getTableData().fullData
           //console.log(tableData)
@@ -122,7 +136,7 @@
           })
           request.post("/basicDataProduce/saveTeamGroup", teamGroupData.value).then((res) => {
             if (res.code == 200) {
-              ElMessage.success("淇濆瓨鎴愬姛")
+              ElMessage.success(t('basicData.msg.saveSuccess'))
               //router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
               router.push({
                 path: '/main/productionBasicData/AddTeamGroup',
@@ -149,42 +163,44 @@
 </script>
 
 <template>
-  <div class="main-div-customer">
-    <vxe-grid
-        ref="xGrid"
-        class="mytable-scrollbar"
-        max-height="100%"
-        height="650px"
-        v-bind="gridOptions"
-        v-on="teamGridEvents"
-        @filter-change="filterChanged"
+  <div  style="width: 100%;height: 100%">
+    <div class="main-table">
+      <vxe-grid
+          ref="xGrid"
+          class="mytable-scrollbar"
+          height="100%"
+          v-bind="gridOptions"
+          v-on="teamGridEvents"
+          @filter-change="filterChanged"
 
-    >
+      >
 
-      <template #num1_filter="{ column, $panel }">
-        <div>
-          <div v-for="(option, index) in column.filters" :key="index">
-            <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/>
+        <template #num1_filter="{ column, $panel }">
+          <div>
+            <div v-for="(option, index) in column.filters" :key="index">
+              <input v-model="option.data" type="type"
+                     @keyup.enter.native="$panel.confirmFilter()"
+                     @input="changeFilterEvent($event, option, $panel)"/>
+            </div>
           </div>
-        </div>
-      </template>
-      <template #basicCategory="{ row }">
-        <vxe-select v-model="row.basicCategory"
-                    clearable
-                    filterable
-                    placeholder="">
-          <vxe-option v-for="item in titleSelectJson.processType"
-                      :key="item.basic_name"
-                      :label="item.basic_name"
-                      :value="item.basic_name"/>
-        </vxe-select>
-      </template>
-      <template #basicCategory_default="{ row }">
-        <span>{{ row.basicCategory }}</span>
-      </template>
+        </template>
+        <template #basicCategory="{ row }">
+          <vxe-select v-model="row.basicCategory"
+                      clearable
+                      filterable
+                      placeholder="">
+            <vxe-option v-for="item in titleSelectJson.processType"
+                        :key="item.basic_name"
+                        :label="item.basic_name"
+                        :value="item.basic_name"/>
+          </vxe-select>
+        </template>
+        <template #basicCategory_default="{ row }">
+          <span>{{ row.basicCategory }}</span>
+        </template>
 
-    </vxe-grid>
-
+      </vxe-grid>
+    </div>
   </div>
 </template>
 
@@ -193,4 +209,20 @@
   width: 99%;
   height: 100%;
 }
+.head{
+  width: 100%;
+  height: 35px;
+}
+
+.main-table{
+  width: 100%;
+  height: calc(100% - 0px);
+}
+.vxe-grid {
+  /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0