|
@@ -16,10 +16,12 @@
|
|
|
<LjVxeTable
|
|
|
ref="VxeTableHeadBoardMxRef"
|
|
|
row-key="key"
|
|
|
- table-cls=""
|
|
|
+ table-cls="h-full"
|
|
|
:data="headBoardMx"
|
|
|
:columns="columnsMx"
|
|
|
:dwname="DwnameEnum.softbedQuoteMx"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="[]"
|
|
|
:auto-load-layout="false"
|
|
|
:request-auto="false"
|
|
|
>
|
|
@@ -35,10 +37,12 @@
|
|
|
<LjVxeTable
|
|
|
ref="VxeTableNightStandMxRef"
|
|
|
row-key="key"
|
|
|
- table-cls=""
|
|
|
+ table-cls="h-full"
|
|
|
:data="nightStandMx"
|
|
|
:columns="columnsMx"
|
|
|
:dwname="DwnameEnum.softbedQuoteMx"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="[]"
|
|
|
:auto-load-layout="false"
|
|
|
:request-auto="false"
|
|
|
>
|
|
@@ -54,10 +58,12 @@
|
|
|
<LjVxeTable
|
|
|
ref="VxeTableBedFrameMxRef"
|
|
|
row-key="key"
|
|
|
- table-cls=""
|
|
|
+ table-cls="h-full"
|
|
|
:data="bedFrameMx"
|
|
|
:columns="columnsMx"
|
|
|
:dwname="DwnameEnum.softbedQuoteMx"
|
|
|
+ :table-props="tableProps_mx"
|
|
|
+ :tool-button="[]"
|
|
|
:auto-load-layout="false"
|
|
|
:request-auto="false"
|
|
|
>
|
|
@@ -178,6 +184,67 @@ const tableProps = ref({
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+/**
|
|
|
+ * @description 明细表格组件基础配置
|
|
|
+ */
|
|
|
+const tableProps_mx = ref({
|
|
|
+ height: "auto",
|
|
|
+ align: "left",
|
|
|
+ // height: "",
|
|
|
+ minHeight: "100px",
|
|
|
+ editConfig: { trigger: "click", mode: "row", enabled: false, autoClear: false },
|
|
|
+ // editRules: {
|
|
|
+ // mattress_width: [
|
|
|
+ // {
|
|
|
+ // validator: ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => {
|
|
|
+ // const { _mainData } = LjDetailRef.value;
|
|
|
+ // let _value = Number(cellValue);
|
|
|
+ // if (_value < 0) {
|
|
|
+ // return new Error("不能小于0");
|
|
|
+ // }
|
|
|
+ // if (!isNaN(_value) && _value > Number(_mainData.mattress_width)) {
|
|
|
+ // return new Error("不能大于床垫尺寸");
|
|
|
+ // }
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // mattress_length: [
|
|
|
+ // {
|
|
|
+ // validator: ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => {
|
|
|
+ // const { _mainData } = LjDetailRef.value;
|
|
|
+ // let _value = Number(cellValue);
|
|
|
+ // if (_value < 0) {
|
|
|
+ // return new Error("不能小于0");
|
|
|
+ // }
|
|
|
+ // if (!isNaN(_value) && _value > Number(_mainData.mattress_length)) {
|
|
|
+ // return new Error("不能大于床垫尺寸");
|
|
|
+ // }
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ keyboardConfig: {
|
|
|
+ isEdit: true,
|
|
|
+ isArrow: true,
|
|
|
+ isEnter: true,
|
|
|
+ isTab: true,
|
|
|
+ isDel: true,
|
|
|
+ isBack: true,
|
|
|
+ isEsc: true,
|
|
|
+ editMethod({ $table, row, column }) {
|
|
|
+ // 先清空原先的值
|
|
|
+ row[column.field] = "";
|
|
|
+ // 再激活编辑状态并输入新值
|
|
|
+ $table.setEditCell(row, column);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mouseConfig: {
|
|
|
+ selected: true
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
const detailProps = reactive<DetailProp>({
|
|
|
dwname: DwnameEnum.softbedQuote,
|
|
|
columns: columns,
|
|
@@ -303,7 +370,7 @@ const orderDefaultAction = [
|
|
|
const list = [{ softbed_id: softBed.value.softbed_id }];
|
|
|
onDelete(list, () => {
|
|
|
tabRemove(route.fullPath);
|
|
|
- router.replace("/mattressQuote");
|
|
|
+ router.replace("/softbedQuote");
|
|
|
});
|
|
|
}
|
|
|
}),
|