gaoluyang
4 天以前 00228dfd593c06119c6815dbd1afe7edcd6b5dec
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();
}
// 组件挂载时加载字典数据