From 740a61ac30e319dc3354859f3168c611bd89a955 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 27 十二月 2024 07:44:01 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue |  238 +++++++++++++++++++++++++++--------------------------------
 1 files changed, 108 insertions(+), 130 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
index 365b9c2..cee6878 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -43,7 +43,7 @@
   },
 
   columns: [
-    {type:'seq',fixed:"left",slots: { content:'content' },width: 50},
+    {type: 'seq', fixed: "left", slots: {content: 'content'}, width: 50},
     {field: 'order_number', title: '璁㈠簭', width: 70},
     {field: 'child_width', width: 100, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num2_filter'}},
     {
@@ -191,6 +191,7 @@
         [
           {code: 'setAmount', name: '璁剧疆缁熶竴纾ㄩ噺',},
           {code: 'displayProcessCard', name: '鏄剧ず娴佺▼鍗�',},
+          {code: 'hideProcessCard', name: '闅愯棌娴佺▼鍗�',},
           {code: 'setShape', name: '璁剧疆鍥惧舰',},
           {code: 'Export', name: '鏁版嵁瀵煎嚭', prefixIcon: 'vxe-icon-download', visible: true, disabled: false},
           {code: 'safeDXF', name: '鍥惧舰鍙﹀瓨涓篋XF',},
@@ -200,22 +201,14 @@
       ]
     },
   },
-  toolbarConfig: {
-    buttons: [],
-    slots: {
-      buttons: "toolbar"
-    },
-
-  },
-
 })
 const processCardColumns = reactive([
-  { field: 'process_id', title: '娴佺▼鍗�', width: 200, align: 'center' },
-  { field: 'project', title: '椤圭洰鍚�', width: 150, align: 'center' },
-  { field: 'order_number', title: '璁㈠簭', width: 100, align: 'center' },
-  { field: 'sizes', title: '灏哄', width: 200, align: 'center' },
-  { field: 'layer', title: '灞�', width: 100, align: 'center' },
-  { field: 'quantity', title: '鏁伴噺', width: 100, align: 'center' }
+  {field: 'process_id', title: '娴佺▼鍗�', width: 200, align: 'center'},
+  {field: 'project', title: '椤圭洰鍚�', width: 150, align: 'center'},
+  {field: 'order_number', title: '璁㈠簭', width: 100, align: 'center'},
+  {field: 'sizes', title: '灏哄', width: 200, align: 'center'},
+  {field: 'layer', title: '灞�', width: 100, align: 'center'},
+  {field: 'quantity', title: '鏁伴噺', width: 100, align: 'center'}
 ]);
 
 // 鍙抽敭鑿滃崟
@@ -236,9 +229,9 @@
     requiresRow: false,
     displayProcess: () => {
       getProcessCard();
-      processCardDialogVisible.value = true;
     }
   },
+
   {
     code: 'setShape',
     successMsg: '鎿嶄綔鎴愬姛锛�',
@@ -295,11 +288,10 @@
           if (config.code === 'setAmount') {
             config.openAmount();
             ElMessage.success(config.successMsg);
-          } else if ( config.code === 'displayProcessCard' ) {
+          } else if (config.code === 'displayProcessCard') {
             config.displayProcess();
             ElMessage.success(config.successMsg);
-          }
-          else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) {
+          }  else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) {
             config.showMessage();
           }
         }).catch(() => {
@@ -369,8 +361,6 @@
   }
 });
 
-// 娴佺▼鍗$獥鍙�
-const processCardDialogVisible = ref(false);
 // 鐢ㄤ簬瀛樺偍娴佺▼鍗℃暟鎹�
 const processCardData = ref(null);
 //娴佺▼鍗�
@@ -383,6 +373,7 @@
     }
   });
 };
+
 
 // 浠庡瓙缁勪欢SetAmount鑾峰彇纾ㄩ噺鍊硷紝骞舵洿鏂拌〃鏍兼暟鎹�
 const Amount = (amountData) => {
@@ -434,136 +425,123 @@
 </script>
 
 <template>
-  <div style="width: 100%;height: 100%">
-    <vxe-grid
-        @filter-change="filterChanged"
-        height="100%"
-        class="mytable-scrollbar"
-        ref="xGrid"
-        v-bind="gridOptions"
-        v-on="gridEvents"
-    >
+  <div style="width: 100%;height: 100%;display: flex;flex-direction: column;">
+    <!-- 澶撮儴 -->
+    <div id="header">
+      <!--宸ョ▼鏂囦欢鑿滃崟-->
+      <el-dropdown @command="handleCommand">
+        <el-button type="primary" :icon="Folder" style="margin-top: 8px">
+          宸ョ▼鏂囦欢
+        </el-button>
+        <template #dropdown>
+          <el-dropdown-menu>
+            <el-dropdown-item :command="1" :icon="Plus">鍒涘缓宸ョ▼</el-dropdown-item>
+            <el-dropdown-item :command="2" :icon="Setting">宸ョ▼绠$悊</el-dropdown-item>
+            <el-dropdown-item :command="3" :icon="Operation">妯℃嫙璁$畻</el-dropdown-item>
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
 
-      <template #num2_filter="{ column, $panel }">
-        <div>
-          <div v-for="(option, index) in column.filters" :key="index">
-            <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"
-                        @change="changeFilterEvent($event, option, $panel)">
-              <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
-              <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option>
-            </vxe-select>
+      <div id="title">
+        <span>宸ョ▼缂栧彿锛�</span>
+        <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input>&nbsp;
+        <span>宸ョ▼鍚嶇О锛�</span>
+        <el-input disabled placeholder="" style="width: 150px; margin-right: 340px" v-model="projectName"></el-input>
+        <el-button id="checkinventory" type="primary" @click="openDialog(1)">鏌ヨ搴撳瓨</el-button>
+        <el-dialog v-model="dialogVisible[1]" title="鏌ヨ搴撳瓨" destroy-on-close style="width: 35%;height:35%;">
+          <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/>
+        </el-dialog>
+        <el-button id="button" type="primary" @click="openDialog(2)">璁剧疆纾ㄩ噺</el-button>
+        <el-dialog v-model="dialogVisible[2]" title="璁剧疆纾ㄩ噺锛坢m锛�" destroy-on-close
+                   style="width: 35%;height:80%;margin-top: 3vh;">
+          <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
+        </el-dialog>
+        <el-button id="button" type="primary" @click="openDialog(3)">璁剧疆淇竟</el-button>
+        <el-dialog v-model="dialogVisible[3]" title="璁剧疆淇竟锛坢m锛�" destroy-on-close
+                   style="width: 35%;height:80%;margin-top: 3vh;">
+          <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/>
+        </el-dialog>
+        <el-button id="button" type="primary">淇濆瓨</el-button>
+        <el-button id="button" type="primary" @click="openDialog(4)">浼樺寲</el-button>
+        <el-dialog v-model="dialogVisible[4]" title="浼樺寲璁$畻" destroy-on-close
+                   style="width: 75%;height:90%;margin-top: 3vh;">
+          <optimize-compute/>
+        </el-dialog>
+      </div>
+    </div>
+
+    <!-- 琛ㄦ牸瀹瑰櫒 -->
+    <div class="table-container" style="flex: 1;display: flex;">
+      <vxe-grid
+          class="left-table"
+          @filter-change="filterChanged"
+          height="100%"
+          ref="xGrid"
+          v-bind="gridOptions"
+          v-on="gridEvents"
+          v-bind:style="{ width: leftTableWidth + '%' }"
+      >
+        <template #num2_filter="{ column, $panel }">
+          <div>
+            <div v-for="(option, index) in column.filters" :key="index">
+              <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"
+                          @change="changeFilterEvent($event, option, $panel)">
+                <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
+                <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option>
+              </vxe-select>
+            </div>
           </div>
-        </div>
-      </template>
-
-      <template #num1_filter="{ column, $panel }">
-        <div>
-          <div v-for="(option, index) in column.filters" :key="index">
-            <input
-                type="type"
-                v-model="option.data"
-                @keyup.enter.native="$panel.confirmFilter()"
-                @input="changeFilterEvent($event, option, $panel)"/>
+        </template>
+        <template #num1_filter="{ column, $panel }">
+          <div>
+            <div v-for="(option, index) in column.filters" :key="index">
+              <input
+                  type="type"
+                  v-model="option.data"
+                  @keyup.enter.native="$panel.confirmFilter()"
+                  @input="changeFilterEvent($event, option, $panel)"/>
+            </div>
           </div>
-        </div>
-      </template>
+        </template>
+      </vxe-grid>
 
-      <template #toolbar>
-        <div id="header">
-          <div id="title">
-            <span>宸ョ▼缂栧彿锛�</span>
-            <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input>&nbsp;
-            <span>宸ョ▼鍚嶇О锛�</span>
-            <el-input disabled placeholder="" style="width: 150px; margin-right: 350px"
-                      v-model="projectName"></el-input>
-            <el-button id="checkinventory" type="primary" @click="openDialog(1)">鏌ヨ搴撳瓨</el-button>
-            <el-dialog
-                v-model="dialogVisible[1]"
-                title="鏌ヨ搴撳瓨"
-                destroy-on-close
-                style="width: 35%;height:35%;">
-              <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/>
-            </el-dialog>
-
-            <el-button id="button" type="primary" @click="openDialog(2)">璁剧疆纾ㄩ噺</el-button>
-            <el-dialog
-                v-model="dialogVisible[2]"
-                title="璁剧疆纾ㄩ噺锛坢m锛�"
-                destroy-on-close
-                style="width: 35%;height:80%;margin-top: 3vh;">
-              <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
-            </el-dialog>
-
-            <el-button id="button" type="primary" @click="openDialog(3)">璁剧疆淇竟</el-button>
-            <el-dialog
-                v-model="dialogVisible[3]"
-                title="璁剧疆淇竟锛坢m锛�"
-                destroy-on-close
-                style="width: 35%;height:80%;margin-top: 3vh;">
-              <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/>
-            </el-dialog>
-
-            <el-button id="button" type="primary">淇濆瓨</el-button>
-
-            <el-button id="button" type="primary" @click="openDialog(4)">浼樺寲</el-button>
-            <el-dialog
-                v-model="dialogVisible[4]"
-                title="浼樺寲璁$畻"
-                destroy-on-close
-                style="width: 75%;height:90%;margin-top: 3vh;"
-            >
-              <optimize-compute/>
-            </el-dialog>
-          </div>
-          <!--宸ョ▼鏂囦欢鑿滃崟-->
-          <el-dropdown @command="handleCommand">
-            <el-button type="primary" :icon="Folder" style="margin-top: 8px">
-              宸ョ▼鏂囦欢
-            </el-button>
-            <template #dropdown>
-              <el-dropdown-menu>
-                <el-dropdown-item :command="1" :icon="Plus">鍒涘缓宸ョ▼</el-dropdown-item>
-                <el-dropdown-item :command="2" :icon="Setting">宸ョ▼绠$悊</el-dropdown-item>
-                <el-dropdown-item :command="3" :icon="Operation">妯℃嫙璁$畻</el-dropdown-item>
-                <!--              <el-dropdown-item command="4">鏂囦欢瀵煎嚭</el-dropdown-item>
-                              <el-dropdown-item command="5">鏂囦欢瀵煎叆</el-dropdown-item>-->
-              </el-dropdown-menu>
-            </template>
-          </el-dropdown>
-        </div>
-      </template>
-    </vxe-grid>
-
-    <!-- 娴佺▼鍗¤〃鏍� -->
-    <el-dialog
-        v-model="processCardDialogVisible"
-        title="娴佺▼鍗℃暟鎹�"
-        width="65%"
-        heigth="600px"
-        style="height: 500px;"
-    >
+      <!-- 娴佺▼鍗¤〃鏍� -->
       <vxe-grid
           height="100%"
-          class="mytable - scrollbar"
+          class="right-table"
           :data="processCardData"
           :columns="processCardColumns"
       >
       </vxe-grid>
-    </el-dialog>
 
+    </div>
   </div>
 </template>
 
 <style scoped>
+.table-container {
+  width: 100%;
+  height: 100%;
+}
+
+.left-table {
+  float: left;
+  width: 50%;
+}
+
+.right-table {
+  width: 660px;
+}
 
 #header {
   height: 50px;
+  display: flex;
+
 }
 
 #title {
-  position: absolute;
-  right: 10px;
-  margin-top: 8px;
+  margin: 8px 5px;
+  width: 1240px;
 }
 
 #button {

--
Gitblit v1.8.0