From cfa4a3fdb3dcd9a811157c4bd8f82ba4025917bc Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期二, 17 十二月 2024 08:42:40 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectList.vue    |   21 --
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue      |    6 
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeProject.vue     |   23 ++
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue |  149 +++++++++++++++---
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue  |  220 ++++++++++++++++++++++++--
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/CheckInventory.vue |   22 ++
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                         |    4 
 7 files changed, 367 insertions(+), 78 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeProject.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeProject.vue
index 120746c..9fbfb5b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeProject.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeProject.vue
@@ -26,15 +26,34 @@
   dataForGlassInventory.value = data;
 };
 
+//鑾峰彇GlassInventory鐨勫��(鏌ヨ搴撳瓨)
+const sendDataGlassInventory = ref()
+const handleInventoyData = (selectedLabel1,selectedLabel2) => {
+  sendDataGlassInventory.value = {
+    selectedLabel1, selectedLabel2
+  };
+};
+
+//鍙抽敭鑿滃崟鎵撳紑淇竟
+const isTrimmingDialogVisible = ref(false);
+const sendTrimming = (value) => {
+    isTrimmingDialogVisible.value = value;
+  };
+
 </script>
 
 <template >
  <div style="width: 100%;height: 100%">
    <div id="main-body">
-     <project-detail @changeDialog="changeDialog"  @forward-data-to-grandparent="handleProjectDetailData"/>
+     <project-detail @changeDialog="changeDialog"
+                     @forward-data-to-grandparent="handleProjectDetailData"
+                     @send-inventory-to-op="handleInventoyData"
+                     :TrimmingDialogVisible="isTrimmingDialogVisible" />
    </div>
    <div id="main-footer">
-     <glass-inventory :receivedData="dataForGlassInventory"/>
+     <glass-inventory :receivedData="dataForGlassInventory"
+                      :InventoryData="sendDataGlassInventory"
+                      @select-trimming="sendTrimming"/>
    </div>
 
 
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/CheckInventory.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/CheckInventory.vue
index a0b0e67..3290da9 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/CheckInventory.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/CheckInventory.vue
@@ -1,5 +1,5 @@
 <script setup>
-import {ref} from "vue";
+import {defineEmits, ref} from "vue";
 
 const value1 = ref('')
 const value2 = ref('')
@@ -40,6 +40,24 @@
     label: 'Low-e',
   },
 ]
+
+const emit = defineEmits(['send-data-inventory',]);
+const props = defineProps({
+  closeDialog: Function
+});
+
+const CheckInventory = () => {
+  const selectedLabel1 = options1.find((option) => option.value === value1.value)?.label || '';
+  const selectedLabel2 = options2.find((option) => option.value === value2.value)?.label || '';
+  // 鍒ゆ柇涓や釜鍊兼槸鍚﹂兘琚�夋嫨浜嗭紝濡傛灉鏈変竴涓负绌哄瓧绗︿覆锛屽垯鎻愮ず骞惰繑鍥烇紝涓嶆墽琛屽悗缁搷浣�
+  if (!selectedLabel1 ||!selectedLabel2) {
+    window.alert('璇烽�夋嫨鐩稿叧閫夐」');
+    return;
+  }
+  props.closeDialog(1);
+  emit('send-data-inventory', selectedLabel1,selectedLabel2);
+};
+
 </script>
 
 <template>
@@ -69,7 +87,7 @@
     </div>
 
     <div style="float: right; margin:-55px 35px 0 0;">
-      <el-button type="primary">鏌ヨ</el-button>
+      <el-button type="primary" @click="CheckInventory">鏌ヨ</el-button>
     </div>
   </div>
 </template>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
index d7bbaba..8aafcf9 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
@@ -2,23 +2,24 @@
 import {nextTick, onMounted, reactive, ref, watch} from "vue";
 import {useI18n} from "vue-i18n";
 import request from "@/utils/request";
-import {ElMessage} from "element-plus";
+import {ElMessage, ElMessageBox} from "element-plus";
 import {useRoute} from "vue-router";
-const { t } = useI18n()
+
+const {t} = useI18n()
 
 const xGrid = ref()
 const gridOptions = reactive({
-  height:'100%',
+  height: '100%',
   loading: false,
-  border:  "full",//琛ㄦ牸鍔犺竟妗�
+  border: "full",//琛ㄦ牸鍔犺竟妗�
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
-  stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  stripe: true,//鏂戦┈绾�
+  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: true},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'GlassInventory',
-  scrollX:{enabled: true},
-  scrollY:{ enabled: true ,gt:0},//寮�鍚櫄鎷熸粴鍔�
-  showOverflow:true,
+  scrollX: {enabled: true},
+  scrollY: {enabled: true, gt: 0},//寮�鍚櫄鎷熸粴鍔�
+  showOverflow: true,
   columnConfig: {
     resizable: true,
     useKey: true
@@ -35,12 +36,12 @@
     showStatus: true
   },
 
-  columns:[
-    {type:'seq',fixed:"left", title:' ', width: 50},
+  columns: [
+    {type: 'seq', fixed: "left", title: ' ', width: 50},
     {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
     {field: 'id', title: '鐗╂枡缂栫爜',},
-    {field:'width',title: t('order.width'),},
-    {field: 'height',title: t('order.height')},
+    {field: 'width', title: t('order.width'),},
+    {field: 'height', title: t('order.height')},
     {field: 'thickness', title: t('order.totalThickness'),},
     {field: 'model', title: t('warehouseBasicData.type'),},
     {field: 'leftTrim', title: '宸︿慨杈�',},
@@ -52,14 +53,90 @@
     {field: 'name', title: '鍚嶇О',},
     {field: 'producer', title: '渚涘簲鍟�',}
   ],//琛ㄥご鍙傛暟
-  data:null,//琛ㄦ牸鏁版嵁
+  data: null,//琛ㄦ牸鏁版嵁
+  //鍙抽敭鑿滃崟
+  menuConfig: {
+    body: {
+      options: [
+        [
+          {code: 'choose', name: '閫夋嫨',},
+          {code: 'selectTrimming', name: '璁剧疆缁熶竴淇竟',},
+          {code: 'Exports', name: '鏁版嵁瀵煎嚭', prefixIcon: 'vxe-icon-download', visible: true, disabled: false},
+        ],
+        []
+      ]
+    },
+  },
   toolbarConfig: {
     buttons: [],
-    slots:{
+    slots: {
       buttons: "toolbar_buttons"
     },
   },
 })
+
+const emit = defineEmits(['select-trimming']);
+// 鍙抽敭鑿滃崟
+const operationConfigs = [
+  {
+    code: 'choose',
+    successMsg: '宸查�変腑锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц闅愯棌娴佺▼鍗℃搷浣溿��');
+    }
+  },
+  {
+    code: 'selectTrimming', // 璁剧疆缁熶竴淇竟
+    successMsg: '宸叉墦寮�锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    openTrimming: async () => {
+      emit('select-trimming', true)
+    }
+  },
+  {
+    code: 'Exports', // 瀵煎嚭鏂囦欢鎿嶄綔鐨勯厤缃�
+    successMsg: '鏂囦欢瀵煎嚭鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+  },
+]
+
+// 鍙抽敭鑿滃崟鐐瑰嚮閫昏緫
+const gridEvents = {
+  menuClick({menu}) {
+    const $grid = xGrid.value;
+    if ($grid) {
+      const config = operationConfigs.find(c => c.code === menu.code);
+      if (config) {
+        if (config.code === 'Exports') {
+          config.gridRef.value.exportData();
+          ElMessage.success(config.successMsg);
+          return;
+        }
+        // 娣诲姞纭鎻愮ず寮圭獥锛岃闂敤鎴锋槸鍚﹁繘琛屽綋鍓嶆搷浣�
+        ElMessageBox.confirm('鏄惁杩涜褰撳墠鎿嶄綔锛�', '纭鎿嶄綔', {
+          confirmButtonText: '纭畾',
+          cancelButtonText: '鍙栨秷',
+          type: 'warning'
+        }).then(() => {
+          if (config.code === 'selectTrimming') {
+            config.openTrimming();
+            ElMessage.success(config.successMsg);
+          }
+        }).catch(() => {
+          // 鐢ㄦ埛鐐瑰嚮鍙栨秷鍚庢墽琛岀殑閫昏緫
+          ElMessage.info('宸插彇娑堟搷浣�');
+        });
+      } else {
+        console.error(`鏈壘鍒版搷浣滈�夐」 ${menu.code} 瀵瑰簲鐨勯厤缃紝璇锋鏌ラ厤缃」`);
+      }
+    }
+  },
+};
+
 
 const route = useRoute();
 
@@ -67,7 +144,7 @@
 const model = ref(route.params.model);
 
 
-const selectMaterialStore = () =>{
+const selectMaterialStore = () => {
   request.post(`/glassOptimize/materialStore/${thickness.value}/${model.value}`).then((res) => {
     if (Number(res.code) === 200) {
       const rawData = res.data.data;
@@ -110,26 +187,42 @@
   if (newData) {
     Trimming(newData);
   }
-}, { immediate: true });
+}, {immediate: true});
+
+watch(() => props.InventoryData, (newInventoryData) => {
+  if (newInventoryData) {
+    thickness.value = newInventoryData.selectedLabel1;
+    model.value = newInventoryData.selectedLabel2;
+    // 鐢变簬 thickness 鍜� model 鐨勫�兼敼鍙樹簡锛屾洿鏂拌〃鏍硷紝璋冪敤 selectMaterialStore 閲嶆柊鑾峰彇鏁版嵁
+    selectMaterialStore();
+  }
+});
 
 const props = defineProps({
-  receivedData : {
+  receivedData: {
     type: Object,
     required: false,
     properties: {
-      quicksetLeft: { type: Number },
-      quicksetBottom: { type: Number },
-      quicksetRight: { type: Number },
-      quicksetTop: { type: Number }
-    }}
+      quicksetLeft: {type: Number},
+      quicksetBottom: {type: Number},
+      quicksetRight: {type: Number},
+      quicksetTop: {type: Number}
+    }
+  },
+  InventoryData: {
+    type: Object,
+    required: false,
+    properties: {
+      selectedLabel1: {type: String},
+      selectedLabel2: {type: String},
+    }
+  }
 });
 
 //鎺ュ彈SetTrimming鐨勫�� 锛堜慨杈癸級
 const Trimming = (receivedData) => {
   nextTick(() => {
     const data = gridOptions.data;
-    console.log('鎺ユ敹鍒扮殑receivedData:', receivedData);
-    console.log('琛ㄦ牸鍘熷鏁版嵁:', data);
     if (data) {
       try {
         const updatedData = [];
@@ -137,7 +230,7 @@
           const item = data[i];
           const updatedItem = {
             ...item,
-            // 姝ゅ淇敼涓轰粠 receivedData 涓幏鍙栧搴旂殑鍊兼潵鏇存柊琛ㄦ牸鏁版嵁椤�
+            // 浠� receivedData 涓幏鍙栧搴旂殑鍊兼潵鏇存柊琛ㄦ牸鏁版嵁椤�
             leftTrim: Number(receivedData.quicksetLeft),
             downTrim: Number(receivedData.quicksetBottom),
             rigthTrim: Number(receivedData.quicksetRight),
@@ -168,13 +261,15 @@
         class="mytable-scrollbar"
         ref="xGrid"
         v-bind="gridOptions"
+        v-on="gridEvents"
     >
 
 
       <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-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>
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 5ccbddd..dadaed3 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
@@ -1,5 +1,5 @@
 <script setup>
-import {nextTick, onMounted, reactive, ref} from "vue";
+import {nextTick, onMounted, reactive, ref, watch} from "vue";
 import {useI18n} from "vue-i18n";
 import {Folder, Plus, Setting, Operation,} from "@element-plus/icons-vue";
 import OptimizeCompute from "@/views/pp/glassOptimize/page/OptimizeCompute.vue";
@@ -7,8 +7,8 @@
 import SetTrimming from "@/views/pp/glassOptimize/page/SetTrimming.vue";
 import CheckInventory from "@/views/pp/glassOptimize/page/CheckInventory.vue";
 import request from "@/utils/request";
-import {ElMessage} from "element-plus";
-import { useRoute } from 'vue-router';
+import {ElMessage, ElMessageBox} from "element-plus";
+import {useRoute} from 'vue-router';
 
 
 const {t} = useI18n()
@@ -45,12 +45,53 @@
   columns: [
     {field: 'order_number', title: '璁㈠簭', width: 70},
     {field: 'child_width', width: 100, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num2_filter'}},
-    {field: 'child_height', width: 100, title: t('order.height'),filters: [{data: ''}],slots: {filter: 'num2_filter'}},
-    {field: 'quantity', width: 150, title: t('order.quantity'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
-    {field: 'longGrind1', width: 150, title: '闀跨(1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
-    {field: 'longGrind2', width: 150, title: '闀跨(2', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
-    {field: 'shortGrind1', width: 150, title: '鐭(1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
-    {field: 'shortGrind2', width: 150, title: '鐭(2', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {
+      field: 'child_height',
+      width: 100,
+      title: t('order.height'),
+      filters: [{data: ''}],
+      slots: {filter: 'num2_filter'}
+    },
+    {
+      field: 'quantity',
+      width: 150,
+      title: t('order.quantity'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
+    {
+      field: 'longGrind1',
+      width: 150,
+      title: '闀跨(1',
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
+    {
+      field: 'longGrind2',
+      width: 150,
+      title: '闀跨(2',
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
+    {
+      field: 'shortGrind1',
+      width: 150,
+      title: '鐭(1',
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
+    {
+      field: 'shortGrind2',
+      width: 150,
+      title: '鐭(2',
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
     {
       field: 'shape',
       width: 150,
@@ -59,7 +100,14 @@
       slots: {filter: 'num1_filter'},
       sortable: true
     },
-    {field: 'process_cards', width: 150, title: '娴佺▼鍗″彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {
+      field: 'process_cards',
+      width: 150,
+      title: '娴佺▼鍗″彿',
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
     {
       field: 'product_name',
       width: 150,
@@ -135,14 +183,130 @@
     },
   ],//琛ㄥご鍙傛暟
   data: null,//琛ㄦ牸鏁版嵁
+  //鍙抽敭鑿滃崟
+  menuConfig: {
+    body: {
+      options: [
+        [
+          {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',},
+          {code: 'exportOPTIMA', name: '瀵煎嚭鏁版嵁鍒癘PTIMA',},
+        ],
+        []
+      ]
+    },
+  },
   toolbarConfig: {
     buttons: [],
     slots: {
       buttons: "toolbar"
     },
+
   },
 
 })
+// 鍙抽敭鑿滃崟
+const operationConfigs = [
+  {
+    code: 'setAmount', // 璁剧疆缁熶竴纾ㄩ噺
+    successMsg: '宸叉墦寮�锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    openAmount: async () => {
+      dialogVisible.value[2] = true;
+    }
+  },
+  {
+    code: 'displayProcessCard',
+    successMsg: '鎿嶄綔鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц鏄剧ず娴佺▼鍗℃搷浣溿��');
+    }
+  },
+  {
+    code: 'hideProcessCard',
+    successMsg: '鎿嶄綔鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц闅愯棌娴佺▼鍗℃搷浣溿��');
+    }
+  },
+  {
+    code: 'setShape',
+    successMsg: '鎿嶄綔鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц璁剧疆鍥惧舰鎿嶄綔銆�');
+    }
+  },
+  {
+    code: 'Export', // 瀵煎嚭鏂囦欢鎿嶄綔鐨勯厤缃�
+    successMsg: '鏂囦欢瀵煎嚭鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+  },
+  {
+    code: 'safeDXF',
+    successMsg: '鎿嶄綔鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц鍥惧舰鍙﹀瓨涓篋XF鎿嶄綔銆�');
+    }
+  },
+  {
+    code: 'exportOPTIMA',
+    successMsg: '鎿嶄綔鎴愬姛锛�',
+    gridRef: xGrid,
+    requiresRow: false,
+    showMessage: () => {
+      ElMessage.info('姝ゅ姛鑳芥殏鏈畬鍠勶紝鏆傛椂鏃犳硶鎵ц瀵煎嚭鏁版嵁鍒癘PTIMA鎿嶄綔銆�');
+    }
+  },
+]
+
+// 鍙抽敭鑿滃崟鐐瑰嚮閫昏緫
+const gridEvents = {
+  menuClick({menu}) {
+    const $grid = xGrid.value;
+    if ($grid) {
+      const config = operationConfigs.find(c => c.code === menu.code);
+      if (config) {
+        if (config.code === 'Export') {
+          config.gridRef.value.exportData();
+          ElMessage.success(config.successMsg);
+          return;
+        }
+        // 娣诲姞纭鎻愮ず寮圭獥锛岃闂敤鎴锋槸鍚﹁繘琛屽綋鍓嶆搷浣�
+        ElMessageBox.confirm('鏄惁杩涜褰撳墠鎿嶄綔锛�', '纭鎿嶄綔', {
+          confirmButtonText: '纭畾',
+          cancelButtonText: '鍙栨秷',
+          type: 'warning'
+        }).then(() => {
+          if (config.code === 'setAmount') {
+            config.openAmount();
+            ElMessage.success(config.successMsg);
+          }else if (['displayProcessCard', 'hideProcessCard', 'setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) {
+            config.showMessage();
+          }
+        }).catch(() => {
+          // 鐢ㄦ埛鐐瑰嚮鍙栨秷鍚庢墽琛岀殑閫昏緫
+          ElMessage.info('宸插彇娑堟搷浣�');
+        });
+      } else {
+        console.error(`鏈壘鍒版搷浣滈�夐」 ${menu.code} 瀵瑰簲鐨勯厤缃紝璇锋鏌ラ厤缃」`);
+      }
+    }
+  },
+};
 
 const handleCommand = async (command) => {
   await emit('changeDialog', command)
@@ -153,10 +317,20 @@
 const openDialog = (index) => {
   dialogVisible.value[index] = true;
 };
-
+//鍏抽棴寮圭獥
 const closeDialog = (index) => {
   dialogVisible.value[index] = false;
 };
+
+//鍙抽敭鑿滃崟缁熶竴淇竟
+const props = defineProps({
+  TrimmingDialogVisible: Boolean
+});
+watch(() => props.TrimmingDialogVisible, (newValue) => {
+  if (newValue === true) {
+    dialogVisible.value[3] = newValue;
+  }
+});
 
 const route = useRoute();
 //宸ョ▼鍙�
@@ -194,8 +368,6 @@
 const Amount = (amountData) => {
   nextTick(() => {
     const data = gridOptions.data;
-    console.log('鎺ユ敹鍒扮殑amountData:', amountData);
-    console.log('琛ㄦ牸鍘熷鏁版嵁:', data);
     if (data) {
       try {
         const updatedData = [];
@@ -223,15 +395,21 @@
   });
 };
 
-//涓浆绔欐帴鍙桽etTrimming鐨勫��
+//涓浆绔欐帴鍙桽etTrimming鐨勫�硷紙璁剧疆淇竟锛�
 const emit = defineEmits([
   'changeDialog',
-  'forward-data-to-grandparent'
+  'forward-data-to-grandparent',
+  'send-inventory-to-op'
 ]);
 
 const handleTrimmingData = (data) => {
   emit('forward-data-to-grandparent', data);
 };
+
+//涓浆绔欐帴鍙桟heckInventory鐨勫�硷紙鏌ヨ搴撳瓨锛�
+const handleInventory = (selectedLabel1, selectedLabel2) => {
+  emit('send-inventory-to-op', selectedLabel1, selectedLabel2);
+}
 
 </script>
 
@@ -274,16 +452,17 @@
         <div id="header">
           <div id="title">
             <span>宸ョ▼缂栧彿锛�</span>
-            <el-input disabled  placeholder="" style="width: 150px" v-model="projectNo"></el-input>&nbsp;
+            <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-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 />
+              <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/>
             </el-dialog>
 
             <el-button id="button" type="primary" @click="openDialog(2)">璁剧疆纾ㄩ噺</el-button>
@@ -292,7 +471,7 @@
                 title="璁剧疆纾ㄩ噺"
                 destroy-on-close
                 style="width: 35%;height:80%;margin-top: 3vh;">
-               <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
+              <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
             </el-dialog>
 
             <el-button id="button" type="primary" @click="openDialog(3)">璁剧疆淇竟</el-button>
@@ -315,7 +494,6 @@
             >
               <optimize-compute/>
             </el-dialog>
-
           </div>
           <!--宸ョ▼鏂囦欢鑿滃崟-->
           <el-dropdown @command="handleCommand">
@@ -351,7 +529,7 @@
   margin-top: 8px;
 }
 
-#button{
+#button {
   margin-left: 10px;
 }
 
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectList.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectList.vue
index e336223..34c03f4 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectList.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectList.vue
@@ -35,27 +35,6 @@
     mode: 'row',
     showStatus: true
   },
-  /*formConfig: {
-    data: {
-      width: '',
-      height: '',
-      quantity: ''
-    },
-    items: [
-      { field: 'width', title: t('order.width')+':', itemRender: { name: 'VxeInput' } },
-      { field: 'height', title: t('order.height')+':', itemRender: { name: 'VxeInput' } },
-      { field: 'quantity', title: t('order.quantity')+':', itemRender: { name: 'VxeInput' } },
-      {
-        itemRender: {
-          name: 'VxeButtonGroup',
-          options: [
-            { type: 'submit', content: t('craft.sure'), status: 'primary' },
-            { type: 'reset', content: t('product.msg.reset') }
-          ]
-        }
-      }
-    ]
-  },*/
   columns:[
     {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
     {field: 'id',width: 150, title: 'ID',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue
index 2a43f74..360a965 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue
@@ -102,7 +102,7 @@
 
 .square-container {
   width: 300px;
-  height: 300px;
+  height: 250px;
   display: flex;
   position: relative;
   justify-content: center;
@@ -125,7 +125,7 @@
 }
 
 .top {
-  top: 45px;
+  top: 20px;
   left: 50%;
   transform: translateX(-50%);
 }
@@ -137,7 +137,7 @@
 }
 
 .bottom {
-  bottom: 45px;
+  bottom: 20px;
   left: 50%;
   transform: translateX(-50%);
 }
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index ba8b092..3b5844b 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -701,7 +701,7 @@
 
     <select id="getDetailList">
         select fc.order_number,
-               concat(round(ogd.child_width), "*", round(ogd.child_height))   as child_width,
+               concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1)))   as child_width,
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
@@ -1285,7 +1285,7 @@
 
     <select id="getDetailListLike">
         select fc.order_number,
-               concat(round(ogd.child_width), "*", round(ogd.child_height))   as child_width,
+               concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1)))   as child_width,
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,

--
Gitblit v1.8.0