Forráskód Böngészése

JLHWEB:1、修复床垫报价、包装方式、木托方式的下拉异常问题
2、详情页组件的基础模块,填写信息可按回车切换至下一项

JohnnyChan 2 hónapja
szülő
commit
0139bbec97

+ 13 - 0
JLHWEB/src/components/LjDetail/components/BaseForm.vue

@@ -7,6 +7,7 @@
       :label-width="publicAttr.labelWidth"
       :rules="rules"
       @submit.prevent
+      @keyup.enter="handleKeyDown"
     >
       <div class="flx-col relative">
         <div class="setting-aside absolute" style="right: 0; z-index: 10" v-if="ifLayoutEditable && !settingStatus">
@@ -2338,6 +2339,18 @@ const getVisibleLength = (data: any) => {
   return data.list.filter((item: any) => item.basicinfo.visible).length;
 };
 
+const handleKeyDown = (event: KeyboardEvent) => {
+  if (event.key === "Enter") {
+    let inputs = formRef.value?.$el.querySelectorAll("input, textarea");
+    inputs = Array.from(inputs).filter((input: any) => !input.disabled);
+
+    const currentIndex = inputs.indexOf(event.target);
+    if (currentIndex < inputs.length - 1) {
+      inputs[currentIndex + 1].focus();
+    }
+  }
+};
+
 defineExpose({
   element: formRef,
   refresh

+ 1 - 0
JLHWEB/src/components/LjVxeTable/index.vue

@@ -1051,6 +1051,7 @@ import { CommonDynamicSelect } from "@/api/modules/common";
 import { isNumber } from "xe-utils";
 import { isBoolean, isFunction } from "@/utils/is";
 const defaultRequest = (params: any) => {
+  if (!props.requestAuto) return undefined;
   let newParams: any = {};
   params.pageNum && (newParams.pageindex = params.pageNum);
   params.pageSize && (newParams.pagesize = params.pageSize);

+ 3 - 0
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -19,6 +19,7 @@
         :data="mattressYWList"
         :columns="columns_yw"
         :dwname="DwnameEnum.mattressInterfaceYw"
+        :request-auto="false"
         :table-props="tableProps_mx"
         :tool-button="[]"
         :auto-load-layout="false"
@@ -36,6 +37,7 @@
             :data="mattressYWList"
             :columns="columns_yw_qd"
             :dwname="DwnameEnum.mattressInterfaceYw"
+            :request-auto="false"
             :table-props="tableProps_mx"
             :tool-button="[]"
             :auto-load-layout="false"
@@ -51,6 +53,7 @@
             :data="mattressQDList"
             :columns="columns_qd"
             :dwname="DwnameEnum.mattressInterfaceQd"
+            :request-auto="false"
             :table-props="tableProps_mx"
             :tool-button="[]"
             :auto-load-layout="false"

+ 6 - 6
JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx

@@ -305,29 +305,29 @@ export const useHooks = (t?: any) => {
     packtypeOptions: [
       {
         label: "压包",
-        value: "0"
+        value: 0
       },
       {
         label: "卷包",
-        value: "1"
+        value: 1
       },
       {
         label: "国内",
-        value: "2"
+        value: 2
       }
     ],
     woodpallettypeOptions: [
       {
         label: "普通木托",
-        value: "0"
+        value: 0
       },
       {
         label: "夹板木托",
-        value: "1"
+        value: 1
       },
       {
         label: "铁管木托",
-        value: "2"
+        value: 2
       }
     ],
     areaOptions: [

+ 1 - 0
JLHWEB/src/views/quote/semifinprodQuote/detail2.vue

@@ -25,6 +25,7 @@
         :tool-button="[]"
         :auto-load-layout="false"
         collapseButtons
+        :request-auto="false"
       >
       </LjVxeTable>
     </template>