Quellcode durchsuchen

JLHWEB: 1、床垫清单、报价,新增搜索字段
2、报价清单新增显示弹簧排列数
3、床垫报价列表,显示报价时,新增自由切换

JohnnyChan vor 3 Monaten
Ursprung
Commit
18f5134280

+ 2 - 0
JLHWEB/src/components/LjVxeTable/components/TableColumn.vue

@@ -24,6 +24,7 @@ const defaultSort = inject("defaultSort", ref<any>([]));
 
 // 渲染表格数据
 const renderCellData = (item: ColumnProps, scope: RenderScope<any>) => {
+  // console.log("renderCellData :>> ", enumMap.value.get(item.field), item.field, item.isFilterEnum);
   return enumMap.value.get(item.field) && item.isFilterEnum
     ? filterEnum(handleRowAccordingToProp(scope.row, item.field!), enumMap.value.get(item.field)!, item.fieldNames)
     : formatValue(handleRowAccordingToProp(scope.row, item.field!, item?.format));
@@ -67,6 +68,7 @@ const RenderTableColumn: any = (item: ColumnProps) => {
       if (slots[handleProp(item.field!)]) return slots[handleProp(item.field!)]!(scope);
       if (item.tag) return <el-tag type={getTagType(item, scope)}>{renderCellData(item, scope)}</el-tag>;
       if (item?.type == "html") return <div v-html={renderCellData(item, scope)}></div>;
+      // console.log("RenderTableColumn enumData :>> ", enumData, enumMap.value, item.field, renderCellData(item, scope));
       return renderCellData(item, scope);
     },
     header: (scope: HeaderRenderScope<any>) => {

+ 14 - 5
JLHWEB/src/components/LjVxeTable/index.vue

@@ -517,7 +517,8 @@ const props = withDefaults(defineProps<LjVxetableProps>(), {
   border: true,
   // toolButton: true,
   rowKey: "id",
-  searchCol: () => ({ xs: 3, sm: 4, md: 5, lg: 6, xl: 8 }),
+  // searchCol: () => ({ xs: 3, sm: 4, md: 5, lg: 6, xl: 8 }),
+  searchCol: () => ({ xs: 4, sm: 5, md: 6, lg: 8, xl: 8 }),
   // settingCol: () => ({ xs: 24, sm: 12, md: 8, lg: 6, xl: 4 }),
   layoutAttr: () => TABLE_LAYOUT_ATTR,
   layoutAttrDefine: () => TABLE_LAYOUT_ATTR_DEFINE,
@@ -568,7 +569,14 @@ const _defineProps = ref({
   },
   columnConfig: { isCurrent: true, isHover: true, resizable: true },
   exportConfig: {},
-  sortConfig: { trigger: "cell", multiple: true, chronological: true, defaultSort: {}, showIcon: false },
+  sortConfig: {
+    trigger: "cell",
+    multiple: true,
+    chronological: true,
+    defaultSort: {},
+    showIcon: false,
+    orders: ["desc", "asc", null]
+  },
   checkboxConfig: { checkField: "checked", range: true },
   scrollY: {
     gt: 200,
@@ -578,7 +586,7 @@ const _defineProps = ref({
     scrollToTopOnChange: true
   },
   mouseConfig: { selected: true },
-  keyboardConfig: { isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true },
+  keyboardConfig: { isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true, editMode: "coverage" },
   menuConfig: {
     header: {
       options: [
@@ -1379,6 +1387,7 @@ const setEnumMap = async (col: ColumnProps) => {
     return enumMap.value.set(col.field!, _enum);
   }
   const { data } = await col.enum();
+  console.log("enumMap data col.field,:>> ", col.field, data);
   enumMap.value.set(col.field!, data);
 };
 const setBaseEnumMap = async (col: ColumnProps) => {
@@ -2243,7 +2252,7 @@ const clearSortEvent = (field?: string) => {
 
   let fullData = [];
   if ($table) {
-    fullData = $table.getTableData().fullData;
+    fullData = $table.getTableData().visibleData;
   }
 
   settingConfirm(tableColumns.value, {}, false).then(() => {
@@ -2288,7 +2297,7 @@ const handleSortChange = (data: any) => {
   const $table = tableRef.value;
   let fullData = [];
   if ($table) {
-    fullData = $table.getTableData().fullData;
+    fullData = $table.getTableData()?.visibleData;
   }
 
   settingConfirm(tableColumns.value, {}, false).then(() => {

+ 3 - 2
JLHWEB/src/hooks/useTable.ts

@@ -2,6 +2,7 @@ import { Table } from "./interface";
 import { reactive, computed, toRefs, nextTick } from "vue";
 import { useUserStore } from "@/stores/modules/user";
 import { useGlobalStore } from "@/stores/modules/global";
+import { cloneDeep } from "lodash-es";
 interface PageChange {
   currentPage: number;
   pageSize: number;
@@ -133,11 +134,11 @@ export const useTable = (
     }
     Object.assign(state.totalParam, nowSearchParam, isPageable ? pageParam.value : {});
     console.log("updatedTotalParam state.searchParam :>> ", state.searchParam);
-    console.log("updatedTotalParam state.totalParam :>> ", state.totalParam);
+    console.log("updatedTotalParam state.totalParam :>> ", JSON.stringify(state.totalParam));
 
     if (dwname) {
       const userStore = useUserStore();
-      userStore.setSearchQueryHabit(dwname, state.totalParam);
+      userStore.setSearchQueryHabit(dwname, cloneDeep(state.totalParam));
     }
   };
 

+ 5 - 0
JLHWEB/src/languages/modules/zh-cn/table.json

@@ -1562,5 +1562,10 @@
     "bednetcode": "床网编码",
     "bednetname": "床网名称",
     "typename": "类型"
+  },
+  "u_mattress_interface": {
+    "arg_datetype": "查询时间",
+    "arg_firstdate": "开始时间",
+    "arg_enddate": "结束时间"
   }
 }

+ 2 - 2
JLHWEB/src/utils/index.ts

@@ -725,7 +725,7 @@ export function convertStrToObj(obj: any, str?: string): any {
 export const getDiffToDate = (data: any) => {
   const today = dayjs(dayjs().format("YYYY-MM-DD"));
   for (const key in data) {
-    if (key.indexOf("date") > -1) {
+    if (key.indexOf("date") > -1 && key.indexOf("datetype") == -1) {
       if (isNumber(data[key])) {
         // number => string
         data[key] = today.add(data[key], "day").format("YYYY-MM-DD HH:mm:ss");
@@ -753,7 +753,7 @@ export const getDiffToDate = (data: any) => {
 export const setDateToDiff = (data: any) => {
   const today = dayjs(dayjs().format("YYYY-MM-DD"));
   for (const key in data) {
-    if (key.indexOf("date") > -1) {
+    if (key.indexOf("date") > -1 && key.indexOf("datetype") == -1) {
       if (isString(data[key]) || isDate(data[key])) {
         // string => number
         let newDate = dayjs(dayjs(data[key]).format("YYYY-MM-DD"));

+ 13 - 1
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -701,6 +701,18 @@ const orderDefaultAction = [
     label: t("common.saveText"),
     loading: () => loadingStatus.value.save,
     limited: () => !orderStatus.value,
+    disabledTextCallBack: (data: any) => {
+      if (data.js2_flag == 1) {
+        return "已清单补充审核,无法修改";
+      }
+      if (data.js1_flag == 1) {
+        return "已产品补充审核,无法操作";
+      }
+      if (data.yw_flag == 1) {
+        return "已完成业务补充审核,无法操作";
+      }
+      return "";
+    },
     clickFunc: async item => {
       try {
         await LjDetailRef.value.toValidateForm();
@@ -1090,7 +1102,7 @@ const orderDefaultAction = [
       return "";
     },
     clickFunc: item => {
-      fModelChoseMattress("副规格", { arg_parentid: LjDetailRef.value?._mainData.mattressid }, 0, t("common.okText")).then(
+      fModelChoseMattress("副规格", { arg_parentid: LjDetailRef.value?._mainData.mattressid }, 0, t("common.okText"), false).then(
         (res: any) => {
           console.log("res :>> ", res);
           CoverMattressInterfaceList(

+ 41 - 34
JLHWEB/src/views/erpapi/mattressInterface/hooks/index.tsx

@@ -589,21 +589,21 @@ export const useHooks = (t?: any) => {
     },
     {
       field: "yw_auditingdate",
-      title: "业务审核时间"
-      // table: "u_mattress_interface",
-      // enum: [
-      //   { label: "业务审核时间", value: 0 },
-      //   { label: "产品补充审核时间", value: 1 },
-      //   { label: "清单补充审核时间", value: 2 }
-      // ],
-      // search: {
-      //   el: "select",
-      //   key: "arg_datetype",
-      //   props: {
-      //     filterable: true,
-      //     defaultFirstOption: true
-      //   }
-      // }
+      title: "业务审核时间",
+      table: "u_mattress_interface",
+      enum: [
+        { label: "业务审核时间", value: 0 },
+        { label: "产品补充审核时间", value: 1 },
+        { label: "清单补充审核时间", value: 2 }
+      ],
+      search: {
+        el: "select",
+        key: "arg_datetype",
+        props: {
+          filterable: true,
+          defaultFirstOption: true
+        }
+      }
     },
     {
       field: "js1_auditingrep",
@@ -611,15 +611,15 @@ export const useHooks = (t?: any) => {
     },
     {
       field: "js1_auditingdate",
-      title: "产品补充审核时间"
-      // table: "u_mattress_interface",
-      // search: {
-      //   el: "date-picker",
-      //   key: "arg_firstdate",
-      //   props: {
-      //     type: "date"
-      //   }
-      // }
+      title: "产品补充审核时间",
+      table: "u_mattress_interface",
+      search: {
+        el: "date-picker",
+        key: "arg_firstdate",
+        props: {
+          type: "date"
+        }
+      }
     },
     {
       field: "js2_auditingrep",
@@ -627,15 +627,15 @@ export const useHooks = (t?: any) => {
     },
     {
       field: "js2_auditingdate",
-      title: "清单补充审核时间"
-      // table: "u_mattress_interface",
-      // search: {
-      //   el: "date-picker",
-      //   key: "arg_enddate",
-      //   props: {
-      //     type: "date"
-      //   }
-      // }
+      title: "清单补充审核时间",
+      table: "u_mattress_interface",
+      search: {
+        el: "date-picker",
+        key: "arg_enddate",
+        props: {
+          type: "date"
+        }
+      }
     },
     {
       field: "creatmtrl_auditingrep",
@@ -2122,7 +2122,13 @@ export const useHooks = (t?: any) => {
    * @param status 当前订单状态
    * @returns Promise
    */
-  const fModelChoseMattress = (label?: string, params?: any, multipleLimit: number = 1, submitText: string = "") => {
+  const fModelChoseMattress = (
+    label?: string,
+    params?: any,
+    multipleLimit: number = 1,
+    submitText: string = "",
+    ifLoadQueryHabit: boolean = true
+  ) => {
     return new Promise((resolve, reject) => {
       let _params = {
         arg_deptid: state.mainData[0].deptid,
@@ -2130,6 +2136,7 @@ export const useHooks = (t?: any) => {
       };
       state.MattressDialogProps = {
         multipleLimit: multipleLimit,
+        ifLoadQueryHabit: ifLoadQueryHabit,
         onSubmit: (res: any) => {
           state.loadingStatus.main2sec = true;
           // submit

+ 21 - 2
JLHWEB/src/views/quote/mattressQuote/components/QuoteListNew.vue

@@ -1,5 +1,13 @@
 <template>
-  <LjDrawer ref="LjDrawerRef" size="80%" :class="prefixCls">
+  <LjDrawer
+    ref="LjDrawerRef"
+    size="60%"
+    :class="prefixCls"
+    :modal="false"
+    :close-on-click-modal="false"
+    modal-class="dialog_class"
+    :closed="emits('closed')"
+  >
     <template #header>
       <div class="flx-1">
         {{ $t("business.detail.quoteList") }}
@@ -204,7 +212,7 @@ const pricePower = computed(() => {
   return userInfo.usermode == 0;
 });
 
-const emits = defineEmits(["export"]);
+const emits = defineEmits(["export", "closed"]);
 
 const LjDrawerRef = ref();
 const elTableRef = ref();
@@ -630,3 +638,14 @@ defineExpose({
   show
 });
 </script>
+
+<style lang="scss">
+.longjoe-ljdrawer-quotelist,
+.dialog_class {
+  pointer-events: none;
+}
+
+.el-drawer {
+  pointer-events: auto;
+}
+</style>

+ 12 - 12
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -1757,7 +1757,7 @@ const save = async () => {
 
     // 主副规格
     let subspecs = [];
-    let $table_subspecs = subSpecsRef.value.element;
+    let $table_subspecs = subSpecsRef.value?.element;
     if ($table_subspecs) {
       $table_subspecs.clearEdit();
       subspecs = $table_subspecs.getTableData().visibleData;
@@ -1797,7 +1797,7 @@ const save = async () => {
 
     // 特殊工艺
     let extraProcesses = [];
-    let $table_processes = specialProcessesMxRef.value.element;
+    let $table_processes = specialProcessesMxRef.value?.element;
     if ($table_processes) {
       $table_processes.clearEdit();
       console.log("$table_processes.getTableData() :>> ", $table_processes.getTableData());
@@ -1809,7 +1809,7 @@ const save = async () => {
 
     // 材料额外费用
     let extraCosts = [];
-    let $table_costs = additionalCostsMxRef.value.element;
+    let $table_costs = additionalCostsMxRef.value?.element;
     if ($table_costs) {
       $table_costs.clearEdit();
       extraCosts = $table_costs.getTableData().visibleData;
@@ -2395,7 +2395,7 @@ const handleSelFabricMxNewMtrlGroup = async (target: string, item: any) => {
   console.log("handleSelFabricMxNewMtrlGroup target :>> ", target, item, fabricMxTab10.value);
   if (target == "tabpage_10") {
     // 裥大恻
-    const $table = fabricMxTab10Ref.value.element;
+    const $table = fabricMxTab10Ref.value?.element;
     const { visibleData } = $table.getTableData();
     let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
     if (hasSame > -1) {
@@ -2426,7 +2426,7 @@ const handleSelFabricMxNewMtrlGroup = async (target: string, item: any) => {
     autoLoadExtraData(fabricMxTab10Ref.value, specialProcessesMxRef.value);
   } else if (target == "tabpage_11") {
     // 裥小恻
-    const $table = fabricMxTab11Ref.value.element;
+    const $table = fabricMxTab11Ref.value?.element;
     const { visibleData } = $table.getTableData();
     let hasSame = visibleData.findIndex(t => t.sortcode == item.label);
     if (hasSame > -1) {
@@ -2456,9 +2456,9 @@ const handleDelFabricMxNewMtrlGroup = (target: string) => {
   let sameMx = [];
   let $table = null;
   if (target == "tabpage_10") {
-    $table = fabricMxTab10Ref.value.element;
+    $table = fabricMxTab10Ref.value?.element;
   } else if (target == "tabpage_11") {
-    $table = fabricMxTab11Ref.value.element;
+    $table = fabricMxTab11Ref.value?.element;
   }
 
   if ($table) {
@@ -2757,7 +2757,7 @@ const toAddMx_cushions = async (type: number) => {
 
     console.log("wf_rtr_cwdc  formulakind :>> ", row, row.formulakind);
     if (row.formulakind == 999) {
-      const $table_bednet = bednetMxRef.value.element;
+      const $table_bednet = bednetMxRef.value?.element;
       if ($table_bednet) {
         const { visibleData: visibleData_bednet } = $table_bednet.getTableData();
         let curIndex = visibleData_bednet.length - 1;
@@ -2814,7 +2814,7 @@ const handleAddBednetMx = () => {
 };
 
 const handleEditBednetMx = () => {
-  const $table = bednetMxRef.value.element;
+  const $table = bednetMxRef.value?.element;
 
   if ($table) {
     const { $table, curRecords } = getCurrentRecords(bednetMxRef.value);
@@ -2840,7 +2840,7 @@ const handleEditBednetMx = () => {
 };
 
 const autoBednetSave = async (res: any, oldBednetid: number) => {
-  const $table = bednetMxRef.value.element;
+  const $table = bednetMxRef.value?.element;
 
   let _res = res.bednet;
   _res.bednet_height = res.bednet.mattress_height;
@@ -2901,12 +2901,12 @@ const SetCurrentTabs = (data: any) => {
  * @description 新增主副规格
  */
 const toAddMx_subSpecs = async () => {
-  const $table = subSpecsRef.value.element;
+  const $table = subSpecsRef.value?.element;
   if ($table) {
     // updateSubspecsTable();
 
     console.log("$table.getTable :>> ", $table.getTableData());
-    const $tableCushions = cushionsMxRef.value.element;
+    const $tableCushions = cushionsMxRef.value?.element;
     let cushionsAttr = {};
     if ($tableCushions) {
       let idx = 0;

+ 2 - 1
JLHWEB/src/views/quote/mattressQuote/hooks/cpQuote.ts

@@ -1167,8 +1167,8 @@ export const useHooksCpQuote = (t?: any) => {
               if (_formulaBendnet) {
                 let _formulaItemArr = _formulaBendnet.value.match(reg);
                 if (_formulaItemArr.length) {
-                  console.log("formulaMattressMx _formulaItemArr :>> ", _formulaItemArr);
                   let cushionsItem = mxdata.find((itm: any) => itm.field == "cushions");
+                  console.log("formulaMattressMx _formulaItemArr cushionsItem:>> ", _formulaItemArr, cushionsItem);
                   if (cushionsItem) {
                     if (cushionsItem.data.bednet.length > 0) {
                       cushionsItem.data.bednet
@@ -1599,6 +1599,7 @@ export const useHooksCpQuote = (t?: any) => {
                 console.log("smattressArr smattressArr _idx :>> ", _idx, index, state.bednet_qingdan, state.tableData);
                 if (_idx > -1) {
                   state.tableData[_idx].label = "小计";
+                  state.tableData[_idx].dscrp = `弹簧排列:宽${itm.spring_qty_width}  长${itm.spring_qty_length}`;
                   state.bednet_qingdan[index] && state.tableData.splice(_idx, 0, ...state.bednet_qingdan[index]);
                 }
               }

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

@@ -2760,20 +2760,15 @@ export const useHooks = (t?: any) => {
         order: 2
       },
       basicinfo: {
-        // el: "select",
-        // editable: (scope: any) => {
-        //   console.log(
-        //     "deptiddeptid scope.searchParam.deptid :>> ",
-        //     scope.searchParam.deptid,
-        //     Number(scope.searchParam.deptid) == 0
-        //   );
-        //   return Boolean(Number(scope.searchParam.deptid) == 0);
-        // },
-        // rules: [{ required: true, message: "请先选择部门", trigger: "change" }],
-        // props: {
-        //   filterable: true,
-        //   clearable: false
-        // },
+        el: "select",
+        editable: (scope: any) => {
+          return Boolean(Number(scope.searchParam.deptid) == 0);
+        },
+        rules: [{ required: true, message: "请先选择部门", trigger: "change" }],
+        props: {
+          filterable: true,
+          clearable: false
+        },
         order: 1,
         group: "单据信息"
       }
@@ -3453,6 +3448,17 @@ export const useHooks = (t?: any) => {
           return formatAmount3({ val: scope.row?.dannum_cost4 ?? 0 });
         }
       }
+    },
+    {
+      field: "createby",
+      search: {
+        el: "input",
+        key: "arg_createby",
+        props: {
+          placeholder: "搜索登记人"
+        }
+        // order: 1
+      }
     }
   ];
 

+ 42 - 30
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -58,7 +58,7 @@
     </template>
   </el-dialog>
 
-  <LjDrawerQuoteList ref="QuoteListDrawerRef" :iforigin="isShowOriginFormulaMattress" />
+  <LjDrawerQuoteList ref="QuoteListDrawerRef" :iforigin="isShowOriginFormulaMattress" @closed="ifShowDrawer = false" />
 </template>
 
 <script setup lang="ts" name="mattressQuote">
@@ -123,6 +123,7 @@ const loadingBtn = ref(false);
 const deptEnum = ref([]);
 const userListData = ref([]);
 const QuoteListDrawerRef = ref(null);
+const ifShowDrawer = ref(false);
 
 const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
 const loadingStatus = reactive({
@@ -197,6 +198,43 @@ const handleDBlClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $c
   }
 };
 
+const handleClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }: any) => {
+  if (ifShowDrawer.value) {
+    funcShowQuoteList(row);
+  }
+};
+
+const funcShowQuoteList = (curRecord: any) => {
+  loadingStatus.showQd = !loadingStatus.showQd;
+  GetComputeMattressById({
+    mattressid: curRecord.mattressid,
+    check_original: Number(isShowOriginFormulaMattress.value)
+  })
+    .then(res => {
+      const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
+      let _data = {
+        data: res.mattress,
+        mxdata: isQuoteListMxData,
+        enumMap: vxeTableRef.value.enumMap,
+        fabricMx: fabricMxTabList.value,
+        formulakindenum: formulaKindEnum.value,
+        dannum_type: res.mattress.dannum_type,
+        formula: res.formulas, //
+        replace: res.replace, //
+        formula_ori: res.formulas_origin, //
+        formula_bednet: res.formulas_bednet, //
+        differ: res.differ //
+      };
+      QuoteListDrawerRef.value.show(_data);
+      ifShowDrawer.value = true;
+
+      loadingStatus.showQd = !loadingStatus.showQd;
+    })
+    .catch(err => {
+      loadingStatus.showQd = !loadingStatus.showQd;
+    });
+};
+
 const rowClsNameFunc = (data: any) => {
   const { row, rowIndex, $rowIndex } = data;
   if (Number(row.flag) == 0) {
@@ -233,8 +271,8 @@ const tableEvents = {
   // "checkbox-all": handleCheckboxChange,
   // "checkbox-range-change": handleCheckboxChange,
   // "current-change": handleCurrentChanged
-  "cell-dblclick": handleDBlClickTable
-  // "cell-click": handleClickTable
+  "cell-dblclick": handleDBlClickTable,
+  "cell-click": handleClickTable
 };
 
 onMounted(() => {
@@ -534,33 +572,7 @@ const action: detailAction[] = [
         //   return;
       }
 
-      loadingStatus.showQd = !loadingStatus.showQd;
-      GetComputeMattressById({
-        mattressid: curRecord.mattressid,
-        check_original: Number(isShowOriginFormulaMattress.value)
-      })
-        .then(res => {
-          const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
-          let _data = {
-            data: res.mattress,
-            mxdata: isQuoteListMxData,
-            enumMap: vxeTableRef.value.enumMap,
-            fabricMx: fabricMxTabList.value,
-            formulakindenum: formulaKindEnum.value,
-            dannum_type: res.mattress.dannum_type,
-            formula: res.formulas, //
-            replace: res.replace, //
-            formula_ori: res.formulas_origin, //
-            formula_bednet: res.formulas_bednet, //
-            differ: res.differ //
-          };
-          QuoteListDrawerRef.value.show(_data);
-
-          loadingStatus.showQd = !loadingStatus.showQd;
-        })
-        .catch(err => {
-          loadingStatus.showQd = !loadingStatus.showQd;
-        });
+      funcShowQuoteList(curRecord);
     }
   }),
   buttonDefault({

+ 4 - 2
JLHWEB/src/views/system/selector/mattress/index.vue

@@ -25,6 +25,7 @@
         :tool-button="['refresh', 'setting', 'search']"
         :auto-load-layout="false"
         collapse-buttons
+        :if-load-query-habit="ifLoadQueryHabit"
         :page-change-call-back="autoUpdateTableCheckbox"
       >
       </LjVxeTable>
@@ -53,8 +54,9 @@ import { throttle } from "lodash-es";
 import { Search } from "@element-plus/icons-vue";
 // import variables from "@/styles/js.module.scss";
 
-const props = withDefaults(defineProps<{ multipleLimit?: number }>(), {
-  multipleLimit: 1
+const props = withDefaults(defineProps<{ multipleLimit?: number; ifLoadQueryHabit?: boolean }>(), {
+  multipleLimit: 1,
+  ifLoadQueryHabit: true
 });
 
 const { t } = useI18n();