From 7fdc69ac6e262f7e203131c36cc4fbf2012f9e03 Mon Sep 17 00:00:00 2001
From: NNowhZzU <1539353356@qq.com>
Date: 星期五, 29 十二月 2023 11:45:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue     |   33 ++++
 north-glass-erp/northglass-erp/src/views/mm/mainTrader/Trader.vue                    |   10 +
 north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue        |   16 +
 north-glass-erp/.idea/workspace.xml                                                  |   26 +++
 north-glass-erp/northglass-erp/src/views/mm/mainIngredient/Ingredients.vue           |   12 +
 north-glass-erp/.idea/vcs.xml                                                        |    1 
 north-glass-erp/northglass-erp/src/hook/index.js                                     |   12 --
 north-glass-erp/.idea/dataSources.local.xml                                          |    2 
 north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue                   |    1 
 /dev/null                                                                            |   15 --
 north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue     |   24 ++--
 north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue                |  121 +++++++++++++------
 north-glass-erp/northglass-erp/src/views/LoginView.vue                               |   22 +++
 north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue |   16 +
 14 files changed, 205 insertions(+), 106 deletions(-)

diff --git a/north-glass-erp/.idea/dataSources.local.xml b/north-glass-erp/.idea/dataSources.local.xml
index 8f9f738..bf05ca9 100644
--- a/north-glass-erp/.idea/dataSources.local.xml
+++ b/north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
+  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
     <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
       <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
         <extra-name-characters>#@</extra-name-characters>
diff --git a/north-glass-erp/.idea/vcs.xml b/north-glass-erp/.idea/vcs.xml
index 288b36b..6c0b863 100644
--- a/north-glass-erp/.idea/vcs.xml
+++ b/north-glass-erp/.idea/vcs.xml
@@ -2,6 +2,5 @@
 <project version="4">
   <component name="VcsDirectoryMappings">
     <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
   </component>
 </project>
\ No newline at end of file
diff --git a/north-glass-erp/.idea/workspace.xml b/north-glass-erp/.idea/workspace.xml
index 02d8740..893fc31 100644
--- a/north-glass-erp/.idea/workspace.xml
+++ b/north-glass-erp/.idea/workspace.xml
@@ -4,7 +4,9 @@
     <option name="autoReloadType" value="SELECTIVE" />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="402214ec-6c93-4a9d-b589-f17dc90f718e" name="鏇存敼" comment="11.24鎻愪氦" />
+    <list default="true" id="402214ec-6c93-4a9d-b589-f17dc90f718e" name="鏇存敼" comment="11.24鎻愪氦">
+      <change beforePath="$PROJECT_DIR$/northglass-erp/src/views/LoginView.vue" beforeDir="false" afterPath="$PROJECT_DIR$/northglass-erp/src/views/LoginView.vue" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -67,7 +69,7 @@
     &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
     &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
     &quot;spring.configuration.checksum&quot;: &quot;def6d90e829e50c63f98c387daecd138&quot;,
-    &quot;ts.external.directory.path&quot;: &quot;D:\\杞欢\\IntelliJ IDEA 2023.2\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external&quot;,
+    &quot;ts.external.directory.path&quot;: &quot;D:\\file\\IntelliJ IDEA 2023.2.1\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external&quot;,
     &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   },
   &quot;keyToStringList&quot;: {
@@ -104,7 +106,7 @@
       <command value="length" />
     </option>
   </component>
-  <component name="RunManager" selected="Spring Boot.ErpApplication">
+  <component name="RunManager" selected="npm.dev">
     <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
       <option name="arquillianRunConfiguration">
         <value>
@@ -213,6 +215,7 @@
       <workItem from="1702858329054" duration="9016000" />
       <workItem from="1703031064839" duration="55055000" />
       <workItem from="1703463546867" duration="16447000" />
+      <workItem from="1703811064202" duration="8050000" />
     </task>
     <task id="LOCAL-00001" summary="绗竴娆℃帹閫�">
       <option name="closed" value="true" />
@@ -373,6 +376,23 @@
     <MESSAGE value="11.24鎻愪氦" />
     <option name="LAST_COMMIT_MESSAGE" value="11.24鎻愪氦" />
   </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager>
+      <breakpoints>
+        <line-breakpoint enabled="true" type="javascript">
+          <url>file://$PROJECT_DIR$/northglass-erp/src/views/sd/product/SelectProduct.vue</url>
+          <line>36</line>
+          <option name="timeStamp" value="4" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="javascript">
+          <url>file://$PROJECT_DIR$/northglass-erp/src/views/LoginView.vue</url>
+          <line>32</line>
+          <properties lambdaOrdinal="-1" />
+          <option name="timeStamp" value="5" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+  </component>
   <component name="XSLT-Support.FileAssociations.UIState">
     <expand />
     <select />
diff --git a/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue b/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
index c626c51..6cb5437 100644
--- a/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
+++ b/north-glass-erp/northglass-erp/src/components/basic/BasicTable.vue
@@ -48,7 +48,6 @@
 <script lang="ts" setup>
 import {ref, reactive, defineEmits, onMounted, nextTick, toRef, watch} from 'vue'
 import {VxeGridProps, VXETable} from 'vxe-table'
-import scrollEvnt from '@/hook/index'
 import request from "@/utils/request"
 import deepClone from "@/utils/deepClone";
 import {ElMessage} from "element-plus";
diff --git a/north-glass-erp/northglass-erp/src/hook/index.js b/north-glass-erp/northglass-erp/src/hook/index.js
index bc74eef..e69de29 100644
--- a/north-glass-erp/northglass-erp/src/hook/index.js
+++ b/north-glass-erp/northglass-erp/src/hook/index.js
@@ -1,12 +0,0 @@
-import useProductStore from "@/stores/sd/product/prduct"
-let productStore = useProductStore()
-export default  function  scrollEvnt(row){
-    // 鍐呭楂樺害
-    var scrollHeight = row.$event.target.scrollHeight
-    var clientHeight = row.$event.target.clientHeight
-    var scrollTop = row.$event.target.scrollTop
-    //婊氬姩鍒板簳閮�
-    if ((Math.round(scrollTop + clientHeight) >= scrollHeight ) ) {
-        productStore.flag=true
-    }
-}
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/stores/sd/product/prduct.js b/north-glass-erp/northglass-erp/src/stores/sd/product/prduct.js
deleted file mode 100644
index 4b117d6..0000000
--- a/north-glass-erp/northglass-erp/src/stores/sd/product/prduct.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import {defineStore} from 'pinia'
-import {ref} from "vue";
-
-export  default defineStore("product",{
-    state: () =>{
-        let pageNum=$ref(1)
-        let pageSize=$ref(100)
-        let flag=$ref(false)
-        return {
-            pageNum,
-            pageSize,
-            flag
-        }
-    }
-})
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/LoginView.vue b/north-glass-erp/northglass-erp/src/views/LoginView.vue
index 6c1e834..154d12b 100644
--- a/north-glass-erp/northglass-erp/src/views/LoginView.vue
+++ b/north-glass-erp/northglass-erp/src/views/LoginView.vue
@@ -1,5 +1,5 @@
 <script lang="ts" setup>
-import {reactive, ref} from "vue"
+import {onMounted, onUnmounted, reactive, ref} from "vue"
 import {useRouter,useRoute } from 'vue-router'
 import type {FormInstance, FormRules} from 'element-plus'
 import { ElMessage } from "element-plus";
@@ -9,7 +9,7 @@
 import { sendSock, createWebSocket, closeSock,global_callback1 } from "@/utils/webSocket"
 
 const store=userInfo()
-const ruleFormRef  = ref<FormInstance>()
+let ruleFormRef  = ref<FormInstance>()
 const router = useRouter()
 const route = useRoute()
 
@@ -80,10 +80,23 @@
 let loginLoadings= ref(false)
 let registerLoadings= ref(false)
 
+const keyDown = (e) => {
+  // 鍥炶溅鍒欐墽琛岀櫥褰曟柟娉� enter閿殑ASCII鏄�13
+  if (e.keyCode == 13 || e.keyCode == 100) {
+    submitForm(ruleFormRef.value)
+  }
+}
+onMounted(()=>{
+  window.addEventListener('keydown', keyDown)
+})
+onUnmounted(() => {
+  window.removeEventListener('keydown', keyDown)
+})
+
 </script>
 
 <template>
-  <div class="mainDiv">
+  <div class="mainDiv" >
     <div id="main-login">
       <div id="img-div">
         <img id="img-pic" src="@/assets/img.png" alt="">
@@ -91,6 +104,7 @@
       <div id="div-login">
         <h2>鍖楃幓鑷姩鍖朎RP绠$悊绯荤粺</h2>
         <el-form
+            @submit.native.prevent
             ref="ruleFormRef"
             :model="userForm"
             status-icon
@@ -124,7 +138,9 @@
             <el-button
                 :loading="loginLoadings"
                 type="primary"
+                native-type="submit"
                 @click="submitForm(ruleFormRef)"
+                @keyup.enter.native="keyDown(e)"
             >鐧诲綍
             </el-button>
 
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
index 265fd86..2b8e08e 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
@@ -167,19 +167,19 @@
 <!--     <el-divider ></el-divider> &lt;!&ndash; 娣诲姞鍒嗛殧绾� &ndash;&gt;-->
 
 
-     <el-row gutter="5">
-<!--       <el-col :span="4.5">-->
-<!--         <el-input v-model="name" placeholder="璇疯緭鍏ヤ繚璐ㄦ湡" style="width: 150px; height: 30px;" />-->
-<!--       </el-col>-->
-<!--       <el-col :span="4.5">-->
-<!--         <el-input v-model="name" placeholder="璇疯緭鍏ユ渶楂橀璀�" style="width: 150px; height: 30px;" />-->
-<!--       </el-col>-->
-<!--       <el-col :span="4.5">-->
-<!--         <el-input v-model="name" placeholder="璇疯緭鍏ユ媶鍖呴璀�" style="width: 150px; height: 30px;" />-->
-<!--       </el-col>-->
+<!--     <el-row gutter="5">-->
+<!--&lt;!&ndash;       <el-col :span="4.5">&ndash;&gt;-->
+<!--&lt;!&ndash;         <el-input v-model="name" placeholder="璇疯緭鍏ヤ繚璐ㄦ湡" style="width: 150px; height: 30px;" />&ndash;&gt;-->
+<!--&lt;!&ndash;       </el-col>&ndash;&gt;-->
+<!--&lt;!&ndash;       <el-col :span="4.5">&ndash;&gt;-->
+<!--&lt;!&ndash;         <el-input v-model="name" placeholder="璇疯緭鍏ユ渶楂橀璀�" style="width: 150px; height: 30px;" />&ndash;&gt;-->
+<!--&lt;!&ndash;       </el-col>&ndash;&gt;-->
+<!--&lt;!&ndash;       <el-col :span="4.5">&ndash;&gt;-->
+<!--&lt;!&ndash;         <el-input v-model="name" placeholder="璇疯緭鍏ユ媶鍖呴璀�" style="width: 150px; height: 30px;" />&ndash;&gt;-->
+<!--&lt;!&ndash;       </el-col>&ndash;&gt;-->
 
-     </el-row>
-     <el-divider ></el-divider> <!-- 娣诲姞鍒嗛殧绾� -->
+<!--     </el-row>-->
+<!--     <el-divider ></el-divider> &lt;!&ndash; 娣诲姞鍒嗛殧绾� &ndash;&gt;-->
      <el-row  gutter="10" justify="center" >
        <el-col span="4">
          <el-button id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/Ingredients.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/Ingredients.vue
index e8fbf67..b9dbc8d 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/Ingredients.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredient/Ingredients.vue
@@ -12,15 +12,18 @@
 
 
 const router = useRouter()
-
+let indexFlag=$ref(1)
+function changeRouter(index){
+  indexFlag=index
+}
 </script>
 
 <template>
   <div id="main">
     <div id="div-title">
       <el-breadcrumb :separator-icon="ArrowRight">
-        <el-breadcrumb-item :to="{ path: '/main/ingredients/SelectIngredients' }">鐗╂枡璧勬枡</el-breadcrumb-item>
-        <el-breadcrumb-item :to="{ path: '/main/ingredients/CreateIngredients' }">鐗╂枡鏂板</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/ingredients/SelectIngredients' }">鐗╂枡璧勬枡</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/ingredients/CreateIngredients' }">鐗╂枡鏂板</el-breadcrumb-item>
         <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
       </el-breadcrumb>
 
@@ -57,4 +60,7 @@
 #select{
   margin-left:0.5rem;
 }
+:deep(.indexTag .el-breadcrumb__inner){
+  color: #5CADFE !important;
+}
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
index 4904079..7226bf6 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/IngredientsStock.vue
@@ -12,17 +12,20 @@
 
 
 const router = useRouter()
-
+let indexFlag=$ref(1)
+function changeRouter(index){
+  indexFlag=index
+}
 </script>
 
 <template>
   <div id="main">
     <div id="div-title">
       <el-breadcrumb :separator-icon="ArrowRight">
-        <el-breadcrumb-item :to="{ path: '/main/ingredientsStock/SelectIngredientsStock' }">鐗╂枡搴撳瓨</el-breadcrumb-item>
-        <el-breadcrumb-item :to="{ path: '/main/ingredientsStock/MaterialOutbound' }">鐗╂枡鍑哄簱</el-breadcrumb-item>
-        <el-breadcrumb-item :to="{ path: '/main/ingredientsStock/OriginalMonthlySettlement' }">鍘熺墖鏈堢粨</el-breadcrumb-item>
-        <el-breadcrumb-item :to="{ path: '/main/ingredientsStock/AccessoriesMonthlySettlement' }">杈呮枡鏈堢粨</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/ingredientsStock/SelectIngredientsStock' }">鐗╂枡搴撳瓨</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/ingredientsStock/MaterialOutbound' }">鐗╂枡鍑哄簱</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/ingredientsStock/OriginalMonthlySettlement' }">鍘熺墖鏈堢粨</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/ingredientsStock/AccessoriesMonthlySettlement' }">杈呮枡鏈堢粨</el-breadcrumb-item>
         <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
       </el-breadcrumb>
 
@@ -59,4 +62,7 @@
 #select{
   margin-left:0.5rem;
 }
+:deep(.indexTag .el-breadcrumb__inner){
+  color: #5CADFE !important;
+}
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
index 269bac9..b41aab4 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -3,7 +3,7 @@
 
 <script setup>
 
-import {reactive} from "vue";
+import {reactive, ref} from "vue";
 import {useRouter} from  'vue-router'
 let router=useRouter()
 const getTableRow = (row,type) =>{
@@ -84,7 +84,7 @@
   ],//琛ㄥご鎸夐挳
   toolbarConfig: {
     buttons: [
-        {'name': '纭璋冩灦',status: 'primary'},
+        {'name': '纭璋冩嫧',status: 'primary','code':'edit'},
         {'name': '璋冩嫧璁板綍'}
     ],
     import: false,
@@ -167,7 +167,32 @@
 
 })
 
-
+const  xGrid = ref();
+const gridEvents = {
+  toolbarButtonClick({ code }) {
+    const $grid = xGrid.value
+    if($grid){
+      switch (code){
+        case 'edit':{
+          alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+          // router.push({path: '/main/productStock/OrderAllocation'});
+          // return;
+          break
+        }
+        case 'out':{
+          router.push({path: '/main/productStock/FinishedGoodsIssue'});
+          return;
+          break;
+        }
+        case 'rework':{
+          router.push({path: '/main/productStock/FinishedProductRework'});
+          return;
+          break;
+        }
+      }
+    }
+  }
+}
 
 </script>
 
@@ -179,7 +204,7 @@
         class="mytable-scrollbar"
         ref="xGrid"
         v-bind="gridOptions"
-
+        v-on="gridEvents"
     >
       <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
       <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue
index 7515eee..9616419 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue
@@ -9,17 +9,20 @@
 
 
 const router = useRouter()
-
+let indexFlag=$ref(1)
+function changeRouter(index){
+  indexFlag=index
+}
 </script>
 
 <template>
   <div id="main">
    <div id="div-title">
      <el-breadcrumb :separator-icon="ArrowRight">
-       <el-breadcrumb-item :to="{ path: '/main/productStock/ProductStockList' }">搴撳瓨鏌ヨ</el-breadcrumb-item>
-       <el-breadcrumb-item :to="{ path: '/main/productStock/CreateProductStock' }">鎴愬搧鍏ュ簱</el-breadcrumb-item>
-       <el-breadcrumb-item :to="{ path: '/main/productStock/FinishedProductOut' }">鎴愬搧鍑哄簱</el-breadcrumb-item>
-       <el-breadcrumb-item :to="{ path: '/main/productStock/FinishedProductReturn' }">璁㈠崟鎴愬搧閫�璐�</el-breadcrumb-item>
+       <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/productStock/ProductStockList' }">搴撳瓨鏌ヨ</el-breadcrumb-item>
+       <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/productStock/CreateProductStock' }">鎴愬搧鍏ュ簱</el-breadcrumb-item>
+       <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/productStock/FinishedProductOut' }">鎴愬搧鍑哄簱</el-breadcrumb-item>
+       <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/productStock/FinishedProductReturn' }">璁㈠崟鎴愬搧閫�璐�</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
 <!--       <el-breadcrumb-item :to="{ path: '/main/productStock/OrderAllocation' }">璁㈠崟璋冩嫧</el-breadcrumb-item>-->
 <!--       <el-breadcrumb-item :to="{ path: '/main/productStock/FinishedGoodsIssue' }">鎴愬搧棰嗗嚭</el-breadcrumb-item>-->
@@ -60,4 +63,7 @@
 #select{
   margin-left:0.5rem;
 }
+:deep(.indexTag .el-breadcrumb__inner){
+  color: #5CADFE !important;
+}
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/mainTrader/Trader.vue b/north-glass-erp/northglass-erp/src/views/mm/mainTrader/Trader.vue
index e72659b..5799432 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/mainTrader/Trader.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/mainTrader/Trader.vue
@@ -12,14 +12,17 @@
 
 
 const router = useRouter()
-
+let indexFlag=$ref(1)
+function changeRouter(index){
+  indexFlag=index
+}
 </script>
 
 <template>
   <div id="main">
     <div id="div-title">
       <el-breadcrumb :separator-icon="ArrowRight">
-        <el-breadcrumb-item :to="{ path: '/main/trader/SelectTrader' }">渚涘簲鍟嗗垪琛�</el-breadcrumb-item>
+        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/trader/SelectTrader' }">渚涘簲鍟嗗垪琛�</el-breadcrumb-item>
         <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">鎶ヨ〃</el-breadcrumb-item>
 <!--        <el-breadcrumb-item :to="{ path: '/main/trader/CreateTrader' }">鍒涘缓</el-breadcrumb-item>-->
       </el-breadcrumb>
@@ -57,4 +60,7 @@
 #select{
   margin-left:0.5rem;
 }
+:deep(.indexTag .el-breadcrumb__inner){
+  color: #5CADFE !important;
+}
 </style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
index 47be59c..1ce781f 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -3,15 +3,12 @@
 import deepClone from "@/utils/deepClone"
 import {ElDatePicker, ElMessage} from "element-plus"
 import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
-import useProductStore from "@/stores/sd/product/prduct"
 import {onMounted, reactive, ref, watch} from "vue"
 import {Search} from "@element-plus/icons-vue"
 import GlassType from "@/components/sd/product/GlassType.vue"
 import {useRouter} from  'vue-router'
 import BasicTable from '@/components/basic/BasicTable.vue'
-import scrollEvnt from "@/hook";
 let productGlassTypeStore = useProductGlassTypeStore()
-let productStore = useProductStore()
 let router=useRouter()
 //鐩戝惉鐜荤拑绫诲瀷鏀瑰彉
 watch(productGlassTypeStore,(newVal,oldVal) => {
@@ -20,54 +17,100 @@
   })
 })
 
+let scrollTop =ref(null)
+let scrollHeight =ref(null)
+let clientHeight =ref(null)
+const  scrollEvnt = (row) => {
+  // 鍐呭楂樺害
+  scrollTop.value = row.$event.target.scrollTop
+  scrollHeight.value = row.$event.target.scrollHeight
+  clientHeight.value = row.$event.target.clientHeight
+}
+
+
+let produceList = ref([])
 let pageNum=$ref(1)
-watch(productStore,(newVal,oldVal) => {
-  if(newVal.flag===true){
-    pageNum=pageNum+1
+let pageState = null
+//鐩戝惉浜у搧婊氬姩鏉$姸鎬侊紝婊氬姩鍒板簳閮ㄥ悜鍚庣璇锋眰鏁版嵁
+watch(scrollTop,(newVal,oldVal) => {
+  //鍒ゆ柇褰撳墠鐘舵�佹煡璇㈢姸鎬�
+  if(pageState!==null){
+    return;
+  }
+  //鍒ゆ柇婊氬姩鏉′笂涓嬫粴鍔ㄤ笉鏄乏鍙虫粴鍔紝褰撳乏鍙虫粴鍔ㄧ洿鎺ヨ繑鍥�
+  if((newVal === oldVal && newVal===0) || oldVal===null){
+    return;
+  }
+  //鍒ゆ柇鏄惁婊氬埌搴曢儴
+  if ((Math.round(scrollTop.value + clientHeight.value)+5 >= scrollHeight.value ) ) {
+    if(newVal>oldVal){
+      //鍒ゆ柇褰撳墠瀹瑰櫒闀垮害鏄惁涓�500锛屽苟涓斿綋鍓嶉〉灏忎簬瀹瑰櫒鎬绘暟閲�
+      if(produceList.length===500 && pageNum<(produceList.length/100)){
+        pageNum=pageNum+5
+      }else{
+        pageNum=pageNum+1
+      }
+      pageState=true
+    }
+  }else if(newVal===0 && oldVal>0 && pageNum>1  ){  //鍒ゆ柇鏄惁婊氬埌椤堕儴骞朵笖澶т簬瀹瑰櫒鏁伴噺
+    //鍒ゆ柇鍚戜笂婊氬姩褰撳墠椤垫暟鏄惁澶т簬瀹瑰櫒鏁板��
+    if(pageNum>5){
+      pageNum=pageNum-5
+    }else if((produceList.length/100)>=5) {
+      pageNum=pageNum-1
+    }else{
+      return
+    }
+    pageState =false
+  }
+  if(pageState!==null){
+    gridOptions.loading=true
+    request.get(`/product/${pageNum}/100`).then((res) => {
+      try{
+        if(res.code==200){
+          if(pageState){
+            produceList = produceList.concat(res.data)
+            if(produceList.length>500){
+              produceList=produceList.slice(100,600)
+            }
+          }else{
+            produceList = res.data.concat(produceList)
+            if(produceList.length>500){
+              produceList=produceList.slice(0,500)
+            }
+          }
+          xGrid.value.reloadData(produceList)
+          pageState=null
+        }else{
+          ElMessage.warning(res.msg)
+        }
+      }finally {
+        gridOptions.loading=false
+      }
+    })
+  }
+
+
     //鍚庣鑾峰彇鏈夊灏戦〉锛岃秴杩囧灏戦〉涓嶅啀璇锋眰
     /*if(pageNum>5){
       console.log(newVal.pageNum)
       return
     }*/
-    request.get(`/product/${pageNum}/100`).then((res) => {
-      gridOptions.loading=true
-      try{
-        if(res.code==200){
-          gridOptions.data=  gridOptions.data.concat(res.data)
-          newVal.flag=false
-          setTimeout(()=>{
-            gridOptions.loading=false
-          },1000)
-        }else{
-          ElMessage.warning(res.msg)
-        }
-      }finally {
-
-      }
-    })
-  }
 
 })
-
-let flag = $ref(false)
 request.get("/product/1/100").then((res) => {
   if(res.code==200){
-    gridOptions.data= deepClone(res.data)
-    flag = true
+    produceList = produceList.value.concat(deepClone(res.data))
+
+    xGrid.value.reloadData(produceList)
+    gridOptions.loading=false
   }else{
     ElMessage.warning(res.msg)
     router.push("/login")
   }
 })
 
-//瀛愮粍浠舵帴鏀跺弬鏁�
-let tableProp = $ref({
-  datas:null,
-  footList:[],
-  //绛涢�夋潯浠跺垪
-  filter:{
-  },
-})
+
 
 
 
@@ -91,18 +134,19 @@
 
 const xGrid = ref()
 const gridOptions = reactive({
-  loading: false,
+  loading: true,
   border:  "full",//琛ㄦ牸鍔犺竟妗�
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
   stripe:true,//鏂戦┈绾�
-  rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+  rowConfig: {isCurrent: true, isHover: true,height: 60, useKey: true},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
   id: 'demo_1',
   showFooter: true,//鏄剧ず鑴�
   printConfig: {},
   importConfig: {},
   exportConfig: {},
-  scrollY:{ enabled: true ,gt:100},//寮�鍚櫄鎷熸粴鍔�
+  scrollX:{enabled: true},
+  scrollY:{ enabled: true ,gt:0},//寮�鍚櫄鎷熸粴鍔�
   showOverflow:true,
   columnConfig: {
     resizable: true,
@@ -139,7 +183,6 @@
     zoom: true,
     custom: true
   },
-  data:  null,//table body瀹為檯鏁版嵁
   footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
     return[
       columns.map((column, columnIndex) => {

--
Gitblit v1.8.0