소스 검색

JLHWEB:1、修复床垫报价主副规格保存失效问题;2、表格组件强化显示可输入、禁止输入的单元格底色

JohnnyChan 1 주 전
부모
커밋
7c59194c13

+ 8 - 1
JLHWEB/src/components/LjVxeTable/components/TableColumn.vue

@@ -10,7 +10,10 @@ import { useI18n } from "vue-i18n";
 import { isFunction } from "@/utils/is";
 // import { Sort, SortUp, SortDown } from "@element-plus/icons-vue";
 
-defineProps<{ column: ColumnProps }>();
+const props = withDefaults(defineProps<{ column: ColumnProps; editable?: boolean }>(), {
+  column: () => ({} as ColumnProps),
+  editable: false
+});
 
 const slots = useSlots();
 
@@ -56,6 +59,10 @@ const RenderTableColumn: any = (item: ColumnProps) => {
 
   let _vxeCloumnSolt: any = {
     default: (scope: RenderScope<any>) => {
+      if (item?.editColRender && props.editable) {
+        if (item.editColRender) return item.editColRender({ ...scope, enum: enumData, field: item.field });
+        if (item.render) return item.render({ ...scope, enum: enumData, field: item.field });
+      }
       if (item.render) return item.render({ ...scope, enum: enumData, field: item.field });
       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>;

+ 7 - 4
JLHWEB/src/components/LjVxeTable/index.vue

@@ -251,7 +251,11 @@
               <slot :name="item.type" v-bind="scope"></slot>
             </template>
           </vxe-column>
-          <TableColumn v-if="(!item.type || item.type == 'html') && item.field && item.visible" :column="item">
+          <TableColumn
+            v-if="(!item.type || item.type == 'html') && item.field && item.visible"
+            :column="item"
+            :editable="tableOptions?.editConfig?.enabled"
+          >
             <template v-for="slotKey in Object.keys($slots)" #[slotKey]="scope">
               <slot :name="slotKey" v-bind="scope"></slot>
             </template>
@@ -466,6 +470,8 @@ import { useTour } from "@/hooks/useTour";
 // import { onKeyStroke } from "@vueuse/core";
 import dayjs from "dayjs";
 import { onClickOutside } from "@vueuse/core";
+import { CommonDynamicSelect } from "@/api/modules/common";
+import { isBoolean, isFunction, isNumber } from "@/utils/is";
 
 const { t } = useI18n();
 const globalStore = useGlobalStore();
@@ -1067,9 +1073,6 @@ const TourSteps = [
 
 // 新手指导
 const { checkIfNeedGuide } = useTour(t, TourEnum.table, TourSteps);
-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 = {};

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

@@ -457,6 +457,6 @@
     "deleteAllMx": "删除全部明细",
     "subSpecs": "主副规格",
     "specialProcesses": "特殊工艺",
-    "additionalCosts": "其他额外费用"
+    "additionalCosts": "材料额外费用"
   }
 }

+ 4 - 2
JLHWEB/src/styles/element.scss

@@ -371,12 +371,14 @@
 .col--filter {
   &:not(.is--filter-active) {
     .vxe-cell--filter {
-      display: none;
+      // display: none;
+      opacity: 0;
     }
   }
   &:hover {
     .vxe-cell--filter {
-      display: block;
+      opacity: 1;
+      display: inline-block;
     }
   }
 }

+ 2 - 0
JLHWEB/src/styles/var/vxe-variable.scss

@@ -160,4 +160,6 @@
   --vxe-pulldown-panel-background-color: var(--lj-color-gray-1);
 
   --vxe-primary-lighten-color: var(--lj-color-primary-400);
+
+  --vxe-ui-table-row-line-height: 12px;
 }

+ 3 - 3
JLHWEB/src/views/baseinfo/extra/index.vue

@@ -6,7 +6,7 @@
           <div class="flx-col h-full card">
             <van-tabs v-model:active="initParams.arg_typeid" @click-tab="gMattressExtraTypeList">
               <van-tab title="特殊工艺" :name="1"></van-tab>
-              <van-tab title="其他额外费用" :name="2"></van-tab>
+              <van-tab title="材料额外费用" :name="2"></van-tab>
 
               <template #nav-right v-if="CheckPower(130)">
                 <div class="flx-center">
@@ -180,10 +180,10 @@ const typeItem = ref<any>({
 
 const popoverTitle = computed(() => {
   if (ifdel.value) {
-    return "删除" + (initParams.value.arg_typeid === 1 ? "特殊工艺类型" : "其他额外费用类型");
+    return "删除" + (initParams.value.arg_typeid === 1 ? "特殊工艺类型" : "材料额外费用类型");
   }
   return (
-    (typeItem.value.extraid === 0 ? "新增" : "修改") + (initParams.value.arg_typeid === 1 ? "特殊工艺类型" : "其他额外费用类型")
+    (typeItem.value.extraid === 0 ? "新增" : "修改") + (initParams.value.arg_typeid === 1 ? "特殊工艺类型" : "材料额外费用类型")
   );
 });
 

+ 2 - 2
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -34,7 +34,7 @@
     </template>
     <template #mattressQD>
       <el-row class="h-full" :gutter="10">
-        <el-col :span="6">
+        <el-col :span="6" class="h-full">
           <LjVxeTable
             ref="YwTableRef"
             row-key="key"
@@ -50,7 +50,7 @@
           >
           </LjVxeTable>
         </el-col>
-        <el-col :span="18">
+        <el-col :span="18" class="h-full">
           <LjVxeTable
             ref="QdTableRef"
             row-key="key"

+ 19 - 18
JLHWEB/src/views/erpapi/mattressInterface/hooks/index.tsx

@@ -651,24 +651,24 @@ export const useHooks = (t?: any) => {
           value: 2,
           label: "带出"
         }
-      ],
-      editRender: {
-        name: "$select",
-        options: [
-          {
-            value: 0,
-            label: "选择"
-          },
-          {
-            value: 1,
-            label: "录入"
-          },
-          {
-            value: 2,
-            label: "带出"
-          }
-        ]
-      }
+      ]
+      // editRender: {
+      //   name: "$select",
+      //   options: [
+      //     {
+      //       value: 0,
+      //       label: "选择"
+      //     },
+      //     {
+      //       value: 1,
+      //       label: "录入"
+      //     },
+      //     {
+      //       value: 2,
+      //       label: "带出"
+      //     }
+      //   ]
+      // }
     },
     {
       field: "bj_namemx",
@@ -678,6 +678,7 @@ export const useHooks = (t?: any) => {
       editColRender: (scope: any) => {
         const { $table, column, row, status } = scope;
 
+        console.log("bj_namemx scope :>> ", scope);
         let params = {
           pzid: row.erp_pzid
         };

+ 4 - 0
JLHWEB/src/views/quote/bednetQuote/components/FormulaItem.vue

@@ -104,7 +104,11 @@ const RenderVariable = (data: any, rprops: any) => {
 
   let _value = "";
   if (sumVal) {
+    // _value = isFilterPrice(sumVal.value);
     _value = isFilterPrice(sumVal.value);
+    if (Number(_value) == 0) {
+      _value = sumVal.value;
+    }
     // } else {
     //   if (rprops.data?.children) {
     //     let _trgItem = rprops.data.children.find(c => {

+ 2 - 2
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -129,7 +129,7 @@ interface DetailProps {
   /**
    * @description 床网大单类型
    */
-  dannum_type?: number;
+  dannumType?: number;
   /**
    * @description 是否只读
    */
@@ -652,7 +652,7 @@ onMounted(async () => {
     initParamsMx.value.arg_deptid = props?.deptid;
     initParamsMx.value.arg_bednetid = props.bednetid;
     defaultColumnsValue.value.deptid = props?.deptid;
-    dannum_type.value = props?.dannum_type;
+    dannum_type.value = props?.dannumType;
 
     defaultColumnsValue.value.mattress_width = props?.mattressWidth;
     defaultColumnsValue.value.mattress_length = props?.mattressLength;

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

@@ -1686,7 +1686,7 @@ const save = async () => {
       try {
         // 忽略长宽高没填的明细行
         subspecs = subspecs.filter(
-          itm => Number(itm.mattress_width) <= 0 && Number(itm.mattress_length) <= 0 && Number(itm.mattress_height) <= 0
+          itm => Number(itm.mattress_width) > 0 || Number(itm.mattress_length) > 0 || Number(itm.mattress_height) > 0
         );
 
         subspecs.map(itm => {
@@ -1712,7 +1712,7 @@ const save = async () => {
 
     console.log("save++++extraProcesses :>> ", extraProcesses);
 
-    // 其他额外费用
+    // 材料额外费用
     let extraCosts = [];
     let $table_costs = additionalCostsMxRef.value.element;
     if ($table_costs) {

+ 1 - 1
JLHWEB/src/views/system/selector/mtrldefErp/select.vue

@@ -117,7 +117,7 @@ import { isFilterPrice } from "@/utils/index";
 
 interface ProTableProps {
   value: any;
-  valueKey: string;
+  valueKey?: string;
   // mtrltype?: any;
   // pricelistid?: any;
   // pricelistidfn?: any;