|
@@ -1 +1,138 @@
|
|
|
-<template>123</template>
|
|
|
+<template>
|
|
|
+ <div class="table-box">
|
|
|
+ <LjVxeTable
|
|
|
+ row-key="quoteid"
|
|
|
+ :columns="columns"
|
|
|
+ :request-api="getData"
|
|
|
+ :data-callback="dataCallback"
|
|
|
+ :dwname="dwname"
|
|
|
+ :table-props="tableProps"
|
|
|
+ :table-events="tableEvents"
|
|
|
+ >
|
|
|
+ <!-- 表格 header 按钮 -->
|
|
|
+ <template #tableHeader>
|
|
|
+ <el-button-group>
|
|
|
+ <el-button>{{ $t("common.add") }}</el-button>
|
|
|
+ <el-button>{{ $t("common.delText") }}</el-button>
|
|
|
+ <el-button>{{ $t("common.auditText") }}</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </template>
|
|
|
+ </LjVxeTable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <LjDrawer ref="LjDrawerRef" size="50%" :withHeader="false"> -->
|
|
|
+
|
|
|
+ <!-- </LjDrawer> -->
|
|
|
+ <LjDialog
|
|
|
+ ref="LjDrawerRef"
|
|
|
+ class="is-selector"
|
|
|
+ v-bind="{
|
|
|
+ ...drawerDefineProp
|
|
|
+ }"
|
|
|
+ :style="{ padding: 0 }"
|
|
|
+ >
|
|
|
+ <template #header>
|
|
|
+ <div class="flx-1">
|
|
|
+ <span class="text-h5-b">部门: {{ deptname }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="flx-1 h-full">
|
|
|
+ <LjHeaderMenu :data="mainData" :action="orderStatus ? orderEditAction : orderDefaultAction" />
|
|
|
+ <DeptListDetail class="flx-1" :data="mainData" :status="orderStatus" />
|
|
|
+ </div>
|
|
|
+ </LjDialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts" name="saleprice_deptlist">
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
+import { getDeptList } from "@/api/modules/saleprice";
|
|
|
+import { ColumnProps } from "@/components/LjVxeTable/interface";
|
|
|
+import LjDrawer from "@/components/LjDrawer/index.vue";
|
|
|
+import DeptListDetail 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";
|
|
|
+
|
|
|
+const dwname = "web_deptlist";
|
|
|
+const mainData = ref({});
|
|
|
+const tableProps = {
|
|
|
+ height: "auto",
|
|
|
+ editConfig: { trigger: "click", mode: "cell" }
|
|
|
+ // rowClassName: rowClsNameFunc
|
|
|
+ // exportConfig: {
|
|
|
+ // filename: t("menu.saletaskmx") + formatToDate(new Date(), "YYYY-MM-DD HH:mm:ss")
|
|
|
+ // }
|
|
|
+};
|
|
|
+
|
|
|
+const { t } = useI18n();
|
|
|
+const { columns } = useHooks();
|
|
|
+const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
|
|
|
+
|
|
|
+const orderStatus = ref("");
|
|
|
+const deptname = ref("");
|
|
|
+
|
|
|
+const orderDefaultAction = [
|
|
|
+ buttonDefault({
|
|
|
+ label: t("common.cancelText"),
|
|
|
+ icon: "iconchevron-left"
|
|
|
+ }),
|
|
|
+ buttonNew({
|
|
|
+ label: t("common.saveText"),
|
|
|
+ icon: "iconsave-01"
|
|
|
+ })
|
|
|
+];
|
|
|
+const orderEditAction = [
|
|
|
+ buttonNew({
|
|
|
+ label: t("common.saveText"),
|
|
|
+ icon: "iconsave-01"
|
|
|
+ })
|
|
|
+];
|
|
|
+
|
|
|
+/*
|
|
|
+ * @description 抽屉默认属性
|
|
|
+ */
|
|
|
+const drawerDefineProp = {
|
|
|
+ draggable: true,
|
|
|
+ overflow: true,
|
|
|
+ width: "40%"
|
|
|
+ // modalClass: "lj-file-dialog"
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ // let res = await getDeptList();
|
|
|
+ // console.log("pricelist res :>> ", res);
|
|
|
+});
|
|
|
+
|
|
|
+const getData = (params: any) => {
|
|
|
+ console.log(params);
|
|
|
+ return getDeptList(params);
|
|
|
+};
|
|
|
+
|
|
|
+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 LjDrawerRef = ref();
|
|
|
+const handleDBlClickTable = ({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }: any) => {
|
|
|
+ // 弹窗
|
|
|
+ mainData.value = row;
|
|
|
+ deptname.value = row.deptname;
|
|
|
+ orderStatus.value = "edit";
|
|
|
+ LjDrawerRef.value.show();
|
|
|
+};
|
|
|
+
|
|
|
+// 返回绑定的事件
|
|
|
+const tableEvents = {
|
|
|
+ "cell-dblclick": handleDBlClickTable
|
|
|
+ // "cell-click": handleClickTable
|
|
|
+};
|
|
|
+</script>
|