Browse Source

JLHWEB: 床垫报价界面更新

JohnnyChan 8 tháng trước cách đây
mục cha
commit
049b999dcf

+ 1 - 0
JLHWEB/.gitignore

@@ -13,6 +13,7 @@ dist-ssr
 stats.html
 *.local
 components.d.ts
+auto-imports.d.ts
 
 # Editor directories and files
 .vscode/*

+ 2 - 2
JLHWEB/package.json

@@ -43,7 +43,7 @@
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor-for-vue": "^5.1.12",
     "axios": "^1.4.0",
-    "dayjs": "^1.11.7",
+    "dayjs": "^1.11.3",
     "driver.js": "^1.3.1",
     "echarts": "^5.4.2",
     "echarts-liquidfill": "^3.1.0",
@@ -93,7 +93,7 @@
     "postcss-html": "^1.5.0",
     "prettier": "^2.8.8",
     "rollup-plugin-visualizer": "^5.9.0",
-    "sass": "^1.62.1",
+    "sass": "1.78.0",
     "standard-version": "^9.5.0",
     "stylelint": "^15.6.2",
     "stylelint-config-html": "^1.1.0",

+ 6 - 5
JLHWEB/src/components/LjDetail/components/BaseForm.vue

@@ -286,7 +286,7 @@
                 <template #item="{ element, index }">
                   <GridItem
                     class="detail__info-group"
-                    :span="element.span ?? searchCol[breakPoint]"
+                    :span="Number(element.span ?? searchCol[breakPoint])"
                     :row="element.row ?? 1"
                     :index="index"
                     :class="{
@@ -469,7 +469,7 @@
                 class="detail__info-group"
                 v-for="(groupItem, groupIdx) in groupFlatColumns"
                 :key="groupIdx"
-                :span="groupItem.span ?? searchCol[breakPoint]"
+                :span="Number(groupItem.span ?? searchCol[breakPoint])"
                 :row="groupItem.row ?? 1"
                 :index="groupIdx"
               >
@@ -514,7 +514,7 @@
                   <template #default>
                     <template v-for="(item, index) in showGroup(groupItem.list)" :key="item.field">
                       <GridItem
-                        v-if="!item?.editHidden"
+                        v-if="!item?.basicinfo?.disabled"
                         v-bind="getResponsive(item)"
                         :index="index"
                         :row="item.basicinfo?.row ?? 1"
@@ -523,7 +523,7 @@
                         <!-- :required="item.basicinfo?.required ?? false" -->
                         <el-skeleton
                           animated
-                          :loading="typeof searchParam[handleProp(item.field!)]  == 'undefined'"
+                          :loading="typeof searchParam[handleProp(item.field!)]  == 'undefined' && loading"
                           class="mr-12"
                         >
                           <template #template
@@ -605,7 +605,7 @@
                           </template>
                           <el-skeleton
                             animated
-                            :loading="typeof searchParam[handleProp(item.field!)]  == 'undefined'"
+                            :loading="typeof searchParam[handleProp(item.field!)]  == 'undefined' && loading"
                             class="mr-12"
                           >
                             <template #template
@@ -699,6 +699,7 @@
                       :placeholder="String(searchCol[breakPoint])"
                       style="width: 100px"
                       :teleported="false"
+                      @change="(val: any) => handleChangeColSpan(val, activeColumn)"
                     >
                       <template #prefix>
                         <span class="text-f-c text-disable">{{ $t("sys.setting.columnNum") }}</span>

+ 4 - 2
JLHWEB/src/components/LjDetail/index.vue

@@ -279,6 +279,7 @@ const {
   columnStreamlineFunc,
   getOriColumns
 } = useDwLayout(
+  "detail",
   t,
   cloneDeep(props.columns),
   props.layoutAttr,
@@ -1620,7 +1621,8 @@ const basicinfoRender = (rProps: any) => {
   let _params =
     orderStatus.value == "new" ? infoParam.value : orderStatus.value == "edit" ? reactive(_mainData.value) : _mainData.value;
   console.log("basicinfoRender _params :>> ", _params);
-  let codeValue = orderStatus.value == "new" ? true : convertStrToObj(_mainData.value, props.header.fieldNames?.code);
+  console.log("basicinfoRender infoColumns.value :>> ", infoColumns.value);
+  // let codeValue = orderStatus.value == "new" ? true : convertStrToObj(_mainData.value, props.header.fieldNames?.code);
   return (
     <>
       <div class="flx basicinfo-container">
@@ -1629,7 +1631,7 @@ const basicinfoRender = (rProps: any) => {
             slots[soltinfo]?.({ data: _mainData.value, props: infoColumns.value, orderStatus: orderStatus.value })
           ) : (
             <BaseForm
-              loading={!codeValue}
+              loading={orderStatus.value != "new" && tableLoading.value}
               ref={LjDetailBaseFormRef}
               columns={infoColumns.value}
               searchParam={_params}

+ 14 - 9
JLHWEB/src/components/LjVxeTable/components/SearchForm.vue

@@ -58,11 +58,11 @@
               <template #item="{ element, index }">
                 <GridItem :key="index" v-bind="getResponsive(element)" :index="index" @click="handleSelFormItem(element)">
                   <el-form-item
-                    :label="sizeExtent.includes(breakPoint) ? '' : `${titleFilter(element)}`"
+                    :label="searchBtnSizeExtent.includes(breakPoint) ? '' : `${titleFilter(element)}`"
                     class="setting-grid-item"
                     :class="{ 'is-active': activeColumn && activeColumn.field == element.field }"
                   >
-                    <SearchFormItem :column="element" :search-param="searchParam" :size-extent="sizeExtent" />
+                    <SearchFormItem :column="element" :search-param="searchParam" :size-extent="searchBtnSizeExtent" />
                   </el-form-item>
                 </GridItem>
               </template>
@@ -70,10 +70,10 @@
             <template v-else>
               <GridItem v-for="(item, index) in columns" :key="item.field" v-bind="getResponsive(item)" :index="index">
                 <el-form-item
-                  :label="sizeExtent.includes(breakPoint) ? '' : `${titleFilter(item)}`"
+                  :label="searchBtnSizeExtent.includes(breakPoint) ? '' : `${titleFilter(item)}`"
                   :class="{'to-search': ![undefined, ''].includes(searchParam[item.search?.key ?? handleProp(item.field!)])}"
                 >
-                  <SearchFormItem :column="item" :search-param="searchParam" :size-extent="sizeExtent" />
+                  <SearchFormItem :column="item" :search-param="searchParam" :size-extent="searchBtnSizeExtent" />
                 </el-form-item>
               </GridItem>
             </template>
@@ -218,8 +218,8 @@
                         <component :is="collapsed ? ArrowDown : ArrowUp"></component>
                       </el-icon>
                     </el-button>
-                    <div class="flx-center flx-1 ml-12">
-                      <template v-if="sizeExtent.includes(breakPoint)">
+                    <div class="flx-end flx-1 ml-12">
+                      <template v-if="searchBtnSizeExtent.includes(breakPoint)">
                         <!-- <el-dropdown
                           split-button
                           type="primary"
@@ -416,6 +416,10 @@ interface SearchFormProps {
    * @description 搜索方案列表
    */
   project?: searchProjectItem[];
+  /**
+   * @description 搜索栏按钮需要缩小尺寸的屏幕尺寸,eg: ["xs", "sm"]
+   */
+  searchBtnSizeExtent?: string[];
 }
 
 const { t } = useI18n();
@@ -427,7 +431,8 @@ const props = withDefaults(defineProps<SearchFormProps>(), {
   searchParam: () => ({}),
   // layoutAttr: () => [],
   layoutAttrDefine: () => ({}),
-  project: () => []
+  project: () => [],
+  searchBtnSizeExtent: () => []
 });
 
 /**
@@ -857,7 +862,7 @@ onClickOutside(searchFormRef, event => {
 /**
  * @description 缩小搜索栏,breakPoint的范围
  */
-const sizeExtent = ["xs", "sm", "md"];
+// const sizeExtent = ["xs", "sm", "md"];
 
 watch(
   () => props.columns,
@@ -967,7 +972,7 @@ watch(
     .el-autocomplete,
     .el-date-editor.el-input,
     .el-date-editor.el-input__wrapper {
-      display: flex;
+      // display: flex;
       width: 100%;
     }
     .el-select .select-trigger {

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

@@ -10,6 +10,7 @@
     :columns="searchColumns"
     :search-param="searchParam"
     :search-col="searchCol"
+    :search-btn-size-extent="searchBtnSizeExtent"
     :project="tableprop_save?.searchProject"
     :form-props="tableprop_save?.search ?? {}"
     :layout-attr-define="searchFormDefault"
@@ -515,7 +516,8 @@ const props = withDefaults(defineProps<LjVxetableProps>(), {
   autoLoadLayout: true,
   collapseButtons: false,
   miniSearchbar: true,
-  footerSumAttrs: () => []
+  footerSumAttrs: () => [],
+  searchBtnSizeExtent: () => ["xs", "sm", "md"]
 });
 
 /**
@@ -1068,6 +1070,7 @@ const {
   columnStreamlineFunc,
   getOriColumns
 } = useDwLayout(
+  "table",
   t,
   cloneDeep(props.columns),
   props.layoutAttr,
@@ -2523,6 +2526,11 @@ defineExpose({
     .tableheader-tabs {
       --el-tabs-header-height: 33px;
     }
+
+    .table-box .table-search,
+    .table-main .table-search {
+      margin-bottom: 0;
+    }
   }
 }
 </style>

+ 8 - 4
JLHWEB/src/components/LjVxeTable/interface/index.ts

@@ -136,6 +136,10 @@ export interface basicinfoProps extends SearchProps {
    * @argument number 占用的行数,默认为1列
    */
   row?: number;
+  /**
+   * @description 是否禁止渲染详情页模式中的单元格
+   */
+  disabled?: boolean;
 }
 
 export type FieldNamesProps = {
@@ -257,10 +261,6 @@ export interface ColumnProps<T = any> extends Partial<Omit<VxeColumnProps<T>, "c
    * @description 只对 tree-config 配置时有效,指定为树节点
    */
   treeNode?: boolean;
-  /**
-   * @description 是否隐藏编辑状态下的单元格
-   */
-  editHidden?: boolean;
 }
 
 /**
@@ -464,6 +464,10 @@ export interface LjVxetableProps extends aboutVxetableApiProps {
    * @description 底部合计字段
    */
   footerSumAttrs?: string[];
+  /**
+   * @description 搜索栏按钮需要缩小尺寸的屏幕尺寸,eg: ["xs", "sm"]
+   */
+  searchBtnSizeExtent?: string[];
 }
 
 export type LjVxeTableInstance = Omit<InstanceType<typeof LjVxeTable>, keyof ComponentPublicInstance | keyof LjVxetableProps>;

+ 9 - 1
JLHWEB/src/enums/dwnameEnum.ts

@@ -13,5 +13,13 @@ export enum DwnameEnum {
   /**
    * @description 部门
    */
-  deptlist = "u_dept"
+  deptlist = "u_dept",
+  /*
+   * @description 床垫报价
+   */
+  mattressQuote = "u_mattress",
+  /**
+   * @description 床垫报价明细
+   */
+  mattressQuoteMx = "u_mattress_mx"
 }

+ 8 - 3
JLHWEB/src/hooks/useDwLayout.tsx

@@ -13,6 +13,7 @@ import { TABLE_TYPE_FILTER } from "@/config/index";
 
 /**
  * @description 表格布局信息
+ * @param {string} type 布局类型
  * @param {Object} t i18n
  * @param {Array} columns 初始化布局数据
  * @param {Array} layoutAttr 布局读取/保存时,赋值的属性名称
@@ -23,6 +24,7 @@ import { TABLE_TYPE_FILTER } from "@/config/index";
  * @param {Function} flatColumnsCallBack 扁平化布局时,返回的数据进行处理的方法
  * */
 export const useDwLayout = (
+  dwtype: "table" | "detail",
   t: any,
   columns: ColumnProps<any>[],
   layoutAttr: string[] = [],
@@ -79,8 +81,8 @@ export const useDwLayout = (
       // tableColumns.value = restoreColumnsFunc(state.flatColumns);
       // console.log("数行化,还原个性设置 tableColumns.value :>> ", tableColumns.value);
     }
-    console.log("state.flatColumns :>> ", state.flatColumns);
     state.flatColumns = flatColumnsFunc(state.tableColumns, dwFieldMap);
+    console.log("state.flatColumns :>> ", state.flatColumns);
   };
 
   /**
@@ -327,8 +329,11 @@ export const useDwLayout = (
             let _field = scope?.column.field ?? "";
             let _item: any = {};
             scope.enum && (_item = scope.enum.find((item: any) => item.value == Number(_data[_field])));
-            // return _item?.label ?? "";
-            return <el-input value={_item?.label} disabled={true} {...item.basicinfo.props} />;
+            if (dwtype == "detail") {
+              return <el-input value={_item?.label} disabled={true} {...item.basicinfo.props} />;
+            } else {
+              return _item?.label ?? "";
+            }
           };
         }
       }

+ 7 - 1
JLHWEB/src/languages/modules/zh-cn/common.json

@@ -16,6 +16,8 @@
   "auditFirst": "初审",
   "auditSecond": "二审",
   "auditText": "审核",
+  "auditFinance": "财务审核",
+  "withdrawAuditFinance": "财务撤审",
   "back": "返回",
   "build": "建立",
   "canBeDelivered": "可送",
@@ -184,5 +186,9 @@
   "overtime": "超时",
   "limittime": "限时",
   "remain": "剩余",
-  "quit": "退出"
+  "quit": "退出",
+  "copyQuote": "复制报价",
+  "businessOrder": "业务下单",
+  "viewHistoricalQuotes": "查看历史报价",
+  "showFormula": "显示计算公式"
 }

+ 1 - 0
JLHWEB/src/languages/modules/zh-cn/menu.json

@@ -148,6 +148,7 @@
   "workmanship": "工艺加点设置",
   "quoteinquiry": "报价查询",
   "mattressQuote": "床垫报价",
+  "mattressQuoteDetail": "床垫报价详情",
   "bednetQuote": "床网报价",
   "user": "用户权限"
 }

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

@@ -1537,5 +1537,11 @@
     "mainproduct": "负责产品",
     "address": "地址",
     "dscrp": "备注"
+  },
+  "u_mattress": {
+    "status": "状态",
+    "flag": "财务审核",
+    "mattressname": "床垫名称",
+    "searchKw": "关键字"
   }
 }

+ 20 - 20
JLHWEB/src/routers/modules/mattressQtuoteRouter.ts

@@ -16,7 +16,7 @@ export const mattressQtuoteRouter: Menu.MenuOptions[] = [
       isAffix: false,
       isKeepAlive: true,
       funid: 101
-    }
+    },
     // children: [
     // {
     //   path: "/technology/material",
@@ -42,30 +42,30 @@ export const mattressQtuoteRouter: Menu.MenuOptions[] = [
     //         icon: "iconpackage",
     //         title: "产品及物料",
     //         isLink: "",
-    //         isHide: false,
+    //         isH: false,
+    //         isAffixide: false,
     //         isFull: false,
-    //         isAffix: false,
     //         isKeepAlive: true,
     //         activeMenu: "/technology/material/mtrldef",
     //         funid: 367
     //       },
-    //       children: [
-    //         {
-    //           path: "/technology/material/mtrldef/detail",
-    //           name: "productAndMtrlCrmDetail",
-    //           component: "/technology/mtrldef/detail",
-    //           meta: {
-    //             icon: "iconpackage",
-    //             title: "产品及物料详情",
-    //             isLink: "",
-    //             isHide: true,
-    //             isFull: false,
-    //             isAffix: false,
-    //             isKeepAlive: true,
-    //             activeMenu: "/technology/material/mtrldef"
-    //           }
-    //         }
-    //       ]
+    children: [
+      {
+        path: "/mattressQuote/detail",
+        name: "mattressQuoteDetail",
+        component: "/quote/mattressQuote/detail",
+        meta: {
+          icon: "iconpackage",
+          title: "床垫报价详情",
+          isLink: "",
+          isHide: true,
+          isFull: false,
+          isAffix: false,
+          isKeepAlive: true,
+          activeMenu: "/mattressQuote"
+        }
+      }
+    ]
     //     }
     //   ]
     // }

+ 1 - 1
JLHWEB/src/styles/element.scss

@@ -97,7 +97,7 @@
   // table-search 表格搜索样式
   .table-search {
     padding: 18px 18px 0;
-    margin-bottom: 10px;
+    // margin-bottom: 10px;
     .el-form {
       .el-form-item__content > * {
         width: 100%;

+ 54 - 51
JLHWEB/src/views/home/index.vue

@@ -1,62 +1,65 @@
 <template>
-  <div class="flx-justify-between mb-4">
-    <div></div>
-    <el-button type="default" text size="small" @click="handleResetLayout">
-      <template #icon>
-        <i class="iconfont iconflip-backward text-disable"></i>
-      </template>
-      <span class="text-disable"> 重置布局 </span>
-    </el-button>
-  </div>
-  <el-container class="home-box w-full h-full ml-6">
-    <el-row class="home-container w-full" :gutter="12">
-      <el-col :span="leftLayoutSpan" class="relative" id="home-layout-left">
-        <div class="flx-col h-full home-layout" v-if="JSON.stringify(dwLayout) != '{}'">
-          <template v-for="(item, idx) in dwLayout.layoutLeft" :key="idx">
-            <keep-alive include="WorkPlan">
+  <div class="h-full flx-col">
+    <div class="flx-justify-between mb-4">
+      <div></div>
+      <el-button type="default" text size="small" @click="handleResetLayout">
+        <template #icon>
+          <i class="iconfont iconflip-backward text-disable"></i>
+        </template>
+        <span class="text-disable"> 重置布局 </span>
+      </el-button>
+    </div>
+    <el-container class="home-box w-full flx-1 ml-6">
+      <el-row class="home-container w-full" :gutter="12">
+        <el-col :span="leftLayoutSpan" class="relative" id="home-layout-left">
+          <div class="flx-col h-full home-layout" v-if="JSON.stringify(dwLayout) != '{}'">
+            <template v-for="(item, idx) in dwLayout.layoutLeft" :key="idx">
+              <keep-alive include="WorkPlan">
+                <component
+                  :ref="(el:any) => setItemRef(el, item.id + 'Ref')"
+                  :is="AsyncComp(item.component)"
+                  v-bind="{ ...item, initParam: initParam[item.id] }"
+                  v-on="comEvent"
+                />
+              </keep-alive>
+            </template>
+          </div>
+          <!-- <el-tooltip effect="dark" :content="homeLayoutCollapse ? $t('common.table.expand') : $t('common.table.putAway')">
+            <el-button
+              class="layout-fold-btn"
+              :class="{ 'is-fold': homeLayoutCollapse }"
+              @click="handleToggleFoldLayout(!homeLayoutCollapse)"
+            >
+              <template #icon>
+                <i class="iconfont iconArrow-Right2"></i>
+              </template>
+            </el-button>
+          </el-tooltip> -->
+        </el-col>
+        <el-col :span="rightLayoutSpan" style="overflow: auto" :style="rightLayoutStyle">
+          <div class="home-layout flx-col h-full" v-if="JSON.stringify(dwLayout) != '{}'">
+            <template v-for="(item, idx) in dwLayout.layoutRight" :key="idx">
               <component
                 :ref="(el:any) => setItemRef(el, item.id + 'Ref')"
                 :is="AsyncComp(item.component)"
                 v-bind="{ ...item, initParam: initParam[item.id] }"
                 v-on="comEvent"
+                class="flx-1"
               />
-            </keep-alive>
-          </template>
-        </div>
-        <!-- <el-tooltip effect="dark" :content="homeLayoutCollapse ? $t('common.table.expand') : $t('common.table.putAway')">
-          <el-button
-            class="layout-fold-btn"
-            :class="{ 'is-fold': homeLayoutCollapse }"
-            @click="handleToggleFoldLayout(!homeLayoutCollapse)"
-          >
-            <template #icon>
-              <i class="iconfont iconArrow-Right2"></i>
             </template>
-          </el-button>
-        </el-tooltip> -->
-      </el-col>
-      <el-col :span="rightLayoutSpan" style="overflow: auto" :style="rightLayoutStyle">
-        <div class="home-layout" v-if="JSON.stringify(dwLayout) != '{}'">
-          <template v-for="(item, idx) in dwLayout.layoutRight" :key="idx">
-            <component
-              :ref="(el:any) => setItemRef(el, item.id + 'Ref')"
-              :is="AsyncComp(item.component)"
-              v-bind="{ ...item, initParam: initParam[item.id] }"
-              v-on="comEvent"
-            />
-          </template>
-        </div>
-      </el-col>
-    </el-row>
-    <LayoutSetting
-      ref="LayoutSettingRef"
-      :defaultLayout="defaultLayout"
-      :layout="dwLayout"
-      @confirm="SaveSettingHomeWidget"
-      @refresh="comEvent.refreshLayout"
-    />
-    <!-- <DragBall ref="DragBallRef" @setting="OpenSettingHomeWidget" /> -->
-  </el-container>
+          </div>
+        </el-col>
+      </el-row>
+      <LayoutSetting
+        ref="LayoutSettingRef"
+        :defaultLayout="defaultLayout"
+        :layout="dwLayout"
+        @confirm="SaveSettingHomeWidget"
+        @refresh="comEvent.refreshLayout"
+      />
+      <!-- <DragBall ref="DragBallRef" @setting="OpenSettingHomeWidget" /> -->
+    </el-container>
+  </div>
 </template>
 
 <script setup lang="ts" name="home">

+ 227 - 0
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -0,0 +1,227 @@
+<template>
+  <LjDetail
+    name="rpMustPayCrmDetail"
+    ref="LjDetailRef"
+    v-bind="detailProps"
+    :data="mainData"
+    :request-api="getData"
+    :data-callback="dataCallback"
+    :init-param="initParams"
+    v-model:order-status="orderStatus"
+    :action="orderStatus ? orderEditAction : orderDefaultAction"
+  >
+    <!-- @to-pin-detail="emit('toPinDetail')" -->
+    <template #rpMustPayMxList>
+      <LjVxeTable
+        ref="rpMustPayMxList"
+        row-key="key"
+        table-cls=""
+        :request-api="getData_mx"
+        :data-callback="dataCallback"
+        :init-param="initParams"
+        :columns="columnsMx"
+        :dwname="DwnameEnum.mattressQuoteMx"
+        :table-props="tableProps_mx"
+        :tool-button="['export', 'refresh', 'setting']"
+        :auto-load-layout="false"
+        pagination
+      >
+      </LjVxeTable>
+    </template>
+  </LjDetail>
+</template>
+
+<script setup lang="ts" name="mattressQuoteDetail">
+import { ref, watch, reactive, inject, nextTick, computed, onMounted } from "vue";
+import { DwnameEnum } from "@/enums/dwnameEnum";
+import LjDetail from "@/components/LjDetail/index.vue";
+import { DetailProp } from "@/components/LjDetail/interface";
+import { useI18n } from "vue-i18n";
+import { useHooks } from "./hooks/index";
+import { useAuthButtons } from "@/hooks/useAuthButtons";
+import LjVxeTable from "@/components/LjVxeTable/index.vue";
+import { cloneDeep } from "lodash-es";
+import { useRoute, useRouter } from "vue-router";
+import { CommonDynamicSelect } from "@/api/modules/common";
+
+interface detailProp {
+  /**
+   * @argument any 页面数据
+   */
+  data?: any;
+  /**
+   * @argument string 请求数据的api ==> 非必传
+   */
+  requestApi?: (params: any) => Promise<any>;
+  /**
+   * @argument any 基础信息,表格展示数据
+   */
+  // columns?: any;
+  /**
+   * @description 是否可编辑
+   */
+  status: "edit" | "new" | string;
+}
+
+const props = withDefaults(defineProps<detailProp>(), {});
+const { t } = useI18n();
+const route = useRoute();
+const { columns, columnsMx } = useHooks(t);
+const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+
+const initParams = ref({ arg_mattressid: 0 });
+const mainData = ref([]);
+const orderStatus = ref("");
+
+const detailProps = reactive<DetailProp>({
+  dwname: DwnameEnum.mattressQuote,
+  columns: columns,
+  // headerstatus: ["status", "ifamt_ok"],
+  basicDefault: {
+    basicGroup: [
+      {
+        label: "单据信息",
+        span: 1
+      },
+      {
+        label: "床垫信息",
+        span: 1
+      },
+      {
+        label: "报价信息",
+        span: 1
+      },
+      {
+        label: ""
+      }
+    ]
+  },
+  header: {
+    fieldNames: {
+      code: "sptcode",
+      codeLabel: t("table.u_spt.sptcode") + ":",
+      name: "name"
+    },
+    // icon: "iconclipboard",
+    tabsProp: {
+      scrollspy: true,
+      sticky: true
+    }
+  },
+  mould: [
+    {
+      id: "rpMustPayMxList",
+      type: "table",
+      label: t("business.takePay.mustPayMx")
+    }
+  ]
+});
+
+const tableProps_mx = {
+  // height: "auto",
+  height: "",
+  minHeight: "300px",
+  editConfig: { trigger: "click", mode: "cell" }
+  // exportConfig: {
+  //   filename: t("menu.saleTaskCrmDetail") + formatToDate(new Date(), "YYYY-MM-DD HH:mm:ss")
+  // }
+};
+
+const getData = (params: any) => {
+  console.log("getData params :>> ", params);
+  let newParams: any = {};
+  params.pageNum && (newParams.pageindex = params.pageNum);
+  params.pageSize && (newParams.pagesize = params.pageSize);
+  delete params.pageNum;
+  delete params.pageSize;
+  newParams.queryParams = params;
+  console.log("params :>> ", params);
+  newParams.dsname = "web_mattress";
+  return CommonDynamicSelect(newParams, DwnameEnum.mattressQuote);
+  // return [];
+};
+
+const getData_mx = (params: any) => {
+  console.log("getData params :>> ", params);
+  let newParams: any = {};
+  params.pageNum && (newParams.pageindex = params.pageNum);
+  params.pageSize && (newParams.pagesize = params.pageSize);
+  delete params.pageNum;
+  delete params.pageSize;
+  newParams.queryParams = params;
+  console.log("params :>> ", params);
+  newParams.dsname = "web_mattress_mx";
+  return CommonDynamicSelect(newParams, DwnameEnum.mattressQuoteMx);
+  // return [];
+};
+
+const dataCallback = (data: any) => {
+  console.log("dataCallback data :>> ", data);
+  return {
+    list: data.datatable,
+    tableinfo: data.tableinfo,
+    total: data.totalcnt,
+    pageNum: data.pageindex,
+    pageSize: data.pagesize
+  };
+};
+
+const orderDefaultAction = [
+  buttonDefault({
+    label: t("common.add")
+  }),
+  buttonDefault({
+    label: t("common.editText")
+  }),
+  buttonDefault({
+    label: t("common.delText")
+  }),
+  [
+    buttonDefault({
+      label: t("common.auditFinance"),
+      clickFunc: () => {}
+    }),
+    buttonDefault({
+      label: t("common.withdrawAuditFinance"),
+      clickFunc: () => {}
+    })
+  ],
+  buttonDefault({
+    label: t("common.copyQuote")
+  }),
+  buttonDefault({
+    label: t("common.showFormula")
+  }),
+  buttonDefault({
+    label: t("common.viewHistoricalQuotes")
+  })
+];
+
+const orderEditAction = [];
+
+onMounted(async () => {
+  console.log("route onMounted:>> ", route);
+  console.log("route onMounted:>> ", route.params);
+  console.log("route onMounted:>> ", route.params.id);
+
+  if (route.query?.id) {
+    // 赋值主表数据
+    // mainData.value = res.datatable.length ? res.datatable[0] : {};
+    console.log("mainData.value :>> ", mainData.value);
+    // 刷新数据
+    initParams.value.arg_mattressid = Number(route.query?.id);
+    console.log("detail onMounted initParams.value :>> ", initParams.value);
+    // } else {
+    //   // 直接读取
+    //   mainData.value = props.data;
+  }
+});
+</script>
+
+<style lang="scss">
+.select-text-right {
+  .el-select__wrapper {
+    text-align: right;
+  }
+}
+</style>

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

@@ -0,0 +1,156 @@
+import { ref, reactive, computed, toRefs } from "vue";
+import { Table } from "@/hooks/interface";
+import { ColumnProps } from "@/components/LjVxeTable/interface";
+import { ALLOW_EDIT_STATE } from "@/config/index";
+
+interface defaultState {
+  /**
+   * @description 单据当前状态
+   */
+  orderStatus: string;
+}
+/**
+ * @description 表格多选数据操作
+ * @param {String} rowKey 当表格可以多选时,所指定的 id
+ * */
+export const useHooks = (t?: any) => {
+  const state = reactive<defaultState>({
+    orderStatus: ""
+  });
+
+  const fnMoneyrateChange = (val: any) => {
+    console.log("fnMoneyrateChange val :>> ", val);
+  };
+
+  // 表格配置项
+  const columns: ColumnProps<any>[] = [
+    { type: "checkbox", width: 50, fixed: "left" },
+    { title: "#", field: "pid", fixed: "left", width: 80 },
+    {
+      field: "deptid",
+      title: "部门",
+      search: {
+        el: "select",
+        key: "arg_deptid",
+        props: {
+          filterable: true
+        },
+        order: 1
+      },
+      basicinfo: {
+        order: 1,
+        group: "单据信息"
+      }
+    },
+    {
+      field: "mattressname",
+      title: "床垫名称",
+      align: "left",
+      table: "u_mattress",
+      search: {
+        el: "input",
+        key: "arg_search",
+        titleKey: "searchKw",
+        props: {
+          placeholder: "唯一码/编码/名称"
+        },
+        order: 0
+      },
+      basicinfo: {
+        el: "input",
+        editable: ALLOW_EDIT_STATE
+      }
+    },
+    {
+      field: "flag",
+      title: "财务审核",
+      table: "u_mattress",
+      search: {
+        el: "select",
+        key: "status_flag",
+        titleKey: "status",
+        props: {
+          clearable: true,
+          placeholder: "全部"
+        },
+        order: 2,
+        render: scope => {
+          let _keys = Object.keys(scope);
+          // let _data = _keys.includes("row") ? scope.row : _keys.includes("searchParam") ? scope.searchParam : scope;
+          return (
+            <el-select v-model={scope.searchParam.status_flag} placeholder="全部" clearable>
+              <el-option label="待下单" value="1" />
+              <el-option label="已下单" value="2" />
+              <el-option label="待财务审核" value="3" />
+              <el-option label="已财务审核" value="4" />
+            </el-select>
+          );
+        }
+      }
+    },
+    {
+      field: "dept_profitrate",
+      title: "部门让利点数",
+      basicinfo: {
+        order: 2,
+        group: "单据信息"
+      }
+    },
+    {
+      field: "fees_dscrp",
+      title: "额外费用说明",
+      basicinfo: {
+        el: "input",
+        props: { type: "textarea", rows: 2 },
+        row: 2
+      }
+    },
+    {
+      field: "moneyrate",
+      title: "汇率",
+      basicinfo: {
+        el: "select",
+        render: (scope: any) => {
+          let _keys = Object.keys(scope);
+          console.log("if_moneyrate scope :>> ", scope);
+          let optionRender = [];
+          scope.enum.map(item => {
+            optionRender.push(<el-option label={item.label} value={item.value} />);
+          });
+          let slotprefix = {
+            prefix: () => {
+              return <>{scope.searchParam.moneyrate}</>;
+            }
+          };
+
+          return (
+            <el-select
+              v-model={scope.searchParam.if_moneyrate}
+              v-slots={slotprefix}
+              class="select-text-right"
+              onChange={fnMoneyrateChange}
+            >
+              {optionRender}
+            </el-select>
+          );
+        }
+      }
+    },
+    {
+      field: "foreign_cost",
+      table: "u_mattress",
+      title: "外币价",
+      basicinfo: {
+        titleKey: "foreign_cost"
+      }
+    }
+  ];
+
+  const columnsMx: ColumnProps<any>[] = [];
+
+  return {
+    ...toRefs(state),
+    columns,
+    columnsMx
+  };
+};

+ 151 - 1
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -1 +1,151 @@
-<template>123</template>
+<template>
+  <div class="table-box">
+    <LjVxeTable
+      ref="vxeTableRef"
+      row-key="mattressid"
+      :columns="columns"
+      :init-param="initParams"
+      :request-api="getData"
+      :data-callback="dataCallback"
+      :dwname="DwnameEnum.mattressQuote"
+      :table-props="tableProps"
+      :table-events="tableEvents"
+      :auto-load-layout="false"
+      :search-btn-size-extent="[]"
+      pagination
+    >
+      <!-- 表格 header 按钮 -->
+      <template #tableHeader>
+        <el-button-group>
+          <el-button>{{ $t("common.add") }}</el-button>
+          <el-button>{{ $t("common.delText") }}</el-button>
+          <el-button>{{ $t("common.auditFinance") }}</el-button>
+          <el-button>{{ $t("common.copyQuote") }}</el-button>
+          <el-button>{{ $t("common.businessOrder") }}</el-button>
+          <el-button>{{ $t("common.viewHistoricalQuotes") }}</el-button>
+        </el-button-group>
+      </template>
+    </LjVxeTable>
+  </div>
+</template>
+
+<script setup lang="ts" name="mattressQuote">
+import { ref, onMounted, inject } from "vue";
+import { useRouter } from "vue-router";
+import { getPriceList } from "@/api/modules/saleprice";
+import { CommonDynamicSelect } from "@/api/modules/common";
+import { ColumnProps } from "@/components/LjVxeTable/interface";
+import LjDrawer from "@/components/LjDrawer/index.vue";
+// import PriceListDetail from "./detail.vue";
+import { useHooks } from "./hooks/index";
+import LjDialog from "@/components/LjDialog/index.vue";
+import LjHeaderMenu from "@/components/LjHeaderMenu/index.vue";
+import { useI18n } from "vue-i18n";
+import { useAuthButtons } from "@/hooks/useAuthButtons";
+import { DwnameEnum } from "@/enums/dwnameEnum";
+import { formatToDateTime, formatToDate } from "@/utils/dateUtil";
+import { cloneDeep } from "lodash-es";
+import { useGlobalStore } from "@/stores/modules/global";
+
+const { t } = useI18n();
+const router = useRouter();
+const globalStore = useGlobalStore();
+const { columns } = useHooks();
+const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+
+const initParams = ref({});
+
+const getData = (params: any) => {
+  console.log("getData mattress params :>> ", params);
+  let newParams: any = {};
+  params.pageNum && (newParams.pageindex = params.pageNum);
+  params.pageSize && (newParams.pagesize = params.pageSize);
+  params.orderstr && (newParams.orderstr = params.orderstr);
+  delete params.pageNum;
+  delete params.pageSize;
+  delete params.orderstr;
+  let _params = cloneDeep(params);
+  switch (_params.status_flag) {
+    case "1": // 待下单
+      _params.arg_xd_flag = 0;
+      break;
+    case "2": // 已下单
+      _params.arg_xd_flag = 1;
+      break;
+    case "3": // 待财务审核
+      _params.arg_cp_flag = 1;
+      _params.arg_flag = 0;
+      break;
+    case "4": // 已财务审核
+      _params.arg_flag = 1;
+      break;
+    default:
+      break;
+  }
+  newParams.queryParams = _params;
+  newParams.dsname = "web_mattress";
+
+  return CommonDynamicSelect(newParams, DwnameEnum.mattressQuote);
+  // return [];
+};
+
+const dataCallback = (data: any) => {
+  console.log("data :>> ", data);
+  return {
+    list: data.datatable,
+    tableinfo: data.tableinfo,
+    total: data.totalcnt,
+    pageNum: data.pageindex,
+    pageSize: data.pagesize
+  };
+};
+
+const handleDBlClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }: any) => {
+  if (globalStore.detailBlank) {
+    // 打开新的窗口
+    const routeUrl = router.resolve({
+      path: `/mattressQuote/detail`,
+      query: {
+        id: row.mattressid,
+        code: row.cuscode
+      }
+    });
+    window.open(routeUrl.href, "_blank");
+  } else {
+    // if (currentLayout.value.right.hidden && globalStore.mxFloat?.includes("custCrmDetail")) {
+    //   // 弹窗
+    //   mainData.value = row;
+    //   LjDrawerRef.value.show();
+    // } else {
+    // 打开新的标签页
+    router.push(`/mattressQuote/detail?id=${row.mattressid}&code=${row.mattresscode}`);
+    // }
+  }
+};
+
+const rowClsNameFunc = (data: any) => {
+  const { row, rowIndex, $rowIndex } = data;
+  //   if (row.task_status == 2) {
+  //     return "vxecol-disable";
+  //   }
+  return "";
+};
+const tableProps = {
+  height: "auto",
+  editConfig: { trigger: "click", mode: "cell" },
+  rowClassName: rowClsNameFunc,
+  exportConfig: {
+    filename: t("menu.rpMsttake") + formatToDate(new Date(), "YYYY-MM-DD HH:mm:ss")
+  }
+};
+
+// 返回绑定的事件
+const tableEvents = {
+  // "checkbox-change": handleCheckboxChange,
+  // "checkbox-all": handleCheckboxChange,
+  // "checkbox-range-change": handleCheckboxChange,
+  // "current-change": handleCurrentChanged
+  "cell-dblclick": handleDBlClickTable
+  // "cell-click": handleClickTable
+};
+</script>

+ 15 - 5
JLHWEB/src/views/saleprice/dept/hooks/index.tsx

@@ -116,27 +116,37 @@ export const useHooks = (t?: any) => {
     {
       field: "createtime",
       title: "建立时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "modemp",
       title: "修改人",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "moddate",
       title: "修改时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "auditemp",
       title: "审核人",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "audidate",
       title: "审核时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "manage_amt",

+ 18 - 6
JLHWEB/src/views/saleprice/pricelist/hooks/index.tsx

@@ -44,33 +44,45 @@ export const useHooks = (t?: any) => {
     {
       field: "createtime",
       title: "建立时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "flag",
       title: "审核",
       datatype: "checkbox",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "modemp",
       title: "修改人",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "moddate",
       title: "修改时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "auditemp",
       title: "审核人",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     },
     {
       field: "audidate",
       title: "审核时间",
-      editHidden: true
+      basicinfo: {
+        disabled: true
+      }
     }
   ];
 

+ 6 - 2
JLHWEB/src/views/system/login/LoginPage.vue

@@ -28,7 +28,7 @@
               <span class="relative">
                 {{ userinfo.username }}
               </span>
-              <span class="text-disable text-f-c sle flx-1"> 当前账套: {{ userStore.currentAccount }} </span>
+              <!-- <span class="text-disable text-f-c sle flx-1"> 当前账套: {{ userStore.currentAccount }} </span> -->
             </div>
           </div>
           <el-form
@@ -92,7 +92,7 @@
 </template>
 
 <script lang="ts" setup name="LoginPage">
-import { ref, reactive, computed, nextTick } from "vue";
+import { ref, reactive, computed, nextTick, onMounted } from "vue";
 import { useUserStore } from "@/stores/modules/user";
 import { useLockStore } from "@/stores/modules/lock";
 import { useNow } from "./useNow";
@@ -194,6 +194,10 @@ const autoLoginSuccess = () => {
     isLogin: false
   });
 };
+
+onMounted(() => {
+  passwordRef.value.focus();
+});
 </script>
 <style lang="scss" scoped>
 @import "./LoginPage.scss";

+ 1 - 1
JLHWEB/tsconfig.json

@@ -7,7 +7,7 @@
     "types": ["vite/client", "element-plus/global"],
 
     /* Strict Type-Checking Options */
-    "strict": true /* Enable all strict type-checking options. */,
+    "strict": false /* Enable all strict type-checking options. */,
     // "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
     // "strictNullChecks": true,              /* Enable strict null checks. */
     // "strictFunctionTypes": true,           /* Enable strict checking of function types. */