From e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 02 十二月 2024 11:26:36 +0800
Subject: [PATCH] 补片流程卡调整

---
 north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue |   43 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
index d25a51d..e9d678d 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
@@ -121,6 +121,7 @@
       {field: 'area',width:120,  title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
       {field: 'money',width:120,  title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
       {field: 'createTime',width:120,   title: t('basicData.reportData'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+      {field: 'updateTime',width:120,   title: t('productStock.approvedDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
       {field: 'packType',width:120,  title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
       {field: 'orderType',width:120,  title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
       {field: 'salesman',width:120,  title: t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
@@ -135,7 +136,10 @@
       {field: 'processingNote',width:120,  title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
 
     ],
-
+    mouseConfig:{selected: true},//榧犳爣閫変腑
+    keyboardConfig:{
+      isArrow: true
+    },
     //琛ㄥご鎸夐挳
     toolbarConfig: {
       buttons: [
@@ -284,11 +288,11 @@
               ElMessage.warning(t('order.orderNotApproved'))
               return
             }
-            if(rowClickIndex.value.warehousing>0){
+            if(rowClickIndex.value.warehousing==2){
               ElMessage.warning(t('order.orderHasBeenReceived'))
               return
             }
-            request.post(`/FinishedGoodsInventory/oneClickStorage/${rowClickIndex.value.orderId}/${userStore.user.userName}`).then((res) => {
+            request.post(`/finishedGoodsInventory/oneClickStorage/${rowClickIndex.value.orderId}/${userStore.user.userName}`).then((res) => {
               if(res.code==200 && res.data===true){
                 ElMessage.success(t('productStock.receivedSuccessfully'))
                 router.push({path:'/main/order/selectOrder',query:{random:Math.random()}})
@@ -331,6 +335,7 @@
   }
 
   function filterChanged(column){
+    //console.log(column)
     gridOptions.loading=true
     //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
     let value = column.datas[0]!=undefined?column.datas[0]:''
@@ -346,7 +351,6 @@
     }
     request.post(`/order/getOrderList/${pageNum.value}/${total.pageSize}/${orderType.value}/${orderInfo.selectDate}`,filterData.value).then((res) => {
       if(res.code==200){
-        console.log(res.data.data)
         total.dataTotal = res.data.total.total*1
         total.pageTotal=parseInt(res.data.total)
         pageNum.value=1
@@ -464,6 +468,26 @@
 
 }
 
+const handleKeyDown = (evnt) =>{
+
+  if(evnt.$event.keyCode === 38 ){
+    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1;
+    if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) {
+      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
+      rowClickIndex.value = xGrid.value.getCurrentRecord()
+    }
+
+  }
+  if(evnt.$event.keyCode === 40 ){
+    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) + 1;
+    if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
+      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
+      rowClickIndex.value = xGrid.value.getCurrentRecord()
+    }
+
+  }
+}
+
 </script>
 
 <template>
@@ -493,6 +517,7 @@
           ref="xGrid"
           v-bind="gridOptions"
           v-on="gridEvents"
+          @keydown="handleKeyDown"
 
       >
         <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -537,14 +562,20 @@
         <template #num1_filter="{ column, $panel }">
           <div>
             <div v-for="(option, index) in column.filters" :key="index">
-              <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
+              <input
+                  v-model="option.data"
+                  @keyup.enter.native="$panel.confirmFilter()"
+                  @input="changeFilterEvent($event, option, $panel)"/>
             </div>
           </div>
         </template>
         <template #num2_filter="{ column, $panel }">
           <div>
             <div v-for="(option, index) in column.filters" :key="index">
-              <vxe-select v-model="option.data"  @change="changeFilterEvent($event, option, $panel)" :placeholder="$t('processCard.pleaseSelect')">
+              <vxe-select
+                  v-model="option.data"
+                  @change="changeFilterEvent($event, option, $panel)"
+                  :placeholder="$t('processCard.pleaseSelect')">
                 <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
                 <vxe-option value="1" :label="$t('basicData.partiallySelected')"></vxe-option>
                 <vxe-option value="2" :label="$t('basicData.selected')"></vxe-option>

--
Gitblit v1.8.0