gaoluyang
4 天以前 00228dfd593c06119c6815dbd1afe7edcd6b5dec
劳保台账修改
已修改2个文件
41 ■■■■■ 文件已修改
src/api/lavorissce/ledger.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/lavorissue/ledger/index.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/lavorissce/ledger.js
@@ -1,11 +1,11 @@
import request from '@/utils/request'
// 分页查询
export function lavorIssueListPage(params) {
export function lavorIssueListPage(query) {
    return request({
        url: '/lavorIssue/listPage',
        method: 'get',
        params
        params: query
    })
}
src/views/lavorissue/ledger/index.vue
@@ -143,13 +143,15 @@
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, reactive, toRefs, nextTick, getCurrentInstance } from 'vue'
import dayjs from "dayjs";
import Modal from "./Modal.vue";
import FilesDia from "./filesDia.vue";
import {lavorIssueListPage} from "@/api/lavorissce/ledger.js";
import {ElMessageBox} from "element-plus";
import Pagination from "@/components/Pagination/index.vue";
import {lavorIssueListPage, deleteLedger, update} from "@/api/lavorissce/ledger.js";
import {ElMessageBox, ElMessage} from "element-plus";
const { proxy } = getCurrentInstance();
import { getCurrentMonth } from "@/utils/util"
const page = ref({
    current: 1,
@@ -163,13 +165,14 @@
const { sys_lavor_issue } = proxy.useDict("sys_lavor_issue")
const data = reactive({
    searchForm: {
        feedbackDate: "",
        disDate: "",
        season: "",
        staffName: "",
    },
});
const { searchForm } = toRefs(data);
const modalRef = ref();
const filesDia = ref();
const { searchForm } = toRefs(data);
const multipleList = ref([]);
const jidu = ref([
    {
@@ -192,16 +195,17 @@
/** 搜索按钮操作 */
const handleQuery = () => {
    page.current = 1;
    page.value.current = 1;
    getList();
};
// 获取字典数据
const getList = async () => {
    tableLoading.value = true;
    lavorIssueListPage().then(res => {
    const params = { ...searchForm.value, ...page.value };
    lavorIssueListPage(params).then(res => {
        tableLoading.value = false;
        tableData.value = res.data.records;
        page.total = res.data.total;
        total.value = res.data.total;
    }).catch(err => {
        tableLoading.value = false;
    })
@@ -224,7 +228,7 @@
                type: "success",
                message: "删除成功",
            });
            getTableData();
            getList();
        }
    });
};
@@ -235,10 +239,10 @@
        type: "warning",
    })
        .then(() => {
            proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "劳保台账.xlsx");
            proxy.download(`/lavorIssue/exportCopy`, {season: searchForm.value.season}, "劳保台账.xlsx");
        })
        .catch(() => {
            proxy.$modal.msg("已取消");
            ElMessage.info("已取消");
        });
};
const adopted = (row) => {
@@ -257,7 +261,7 @@
                type: "success",
                message: "领用成功",
            });
            getTableData();
            getList();
        }
    })
}
@@ -272,9 +276,10 @@
    multipleList.value = selection;
}
const paginationChange = (size) => {
    console.log(size)
const paginationChange = (pagination) => {
    page.value.current = pagination.page;
    page.value.size = pagination.limit;
    getList();
}
// 组件挂载时加载字典数据