gaoluyang
6 天以前 bc07cf1a936795d229a0f51d24cd2032580db542
src/views/inventoryManagement/dispatchLog/index.vue
@@ -21,9 +21,12 @@
               clearable
               @change="handleQuery"
            />
            <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button>
            <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
            >搜索</el-button
            >
         </div>
         <div>
            <!-- <el-button type="primary" @click="openForm('add')">新增</el-button> -->
            <el-button @click="handleOut">导出</el-button>
            <el-button type="danger" plain @click="handleDelete">删除</el-button>
            <el-button type="primary" plain @click="handlePrint">打印</el-button>
@@ -255,9 +258,10 @@
<script setup>
import pagination from "@/components/PIMTable/Pagination.vue";
import { ref, reactive, toRefs, onMounted, getCurrentInstance } from "vue";
import { ref } from "vue";
import { ElMessageBox } from "element-plus";
import useUserStore from "@/store/modules/user";
import { getCurrentDate } from "@/utils/index.js";
import {
   getStockOutPage,
   delStockOut,
@@ -319,13 +323,7 @@
};
const getList = () => {
   tableLoading.value = true;
   const params = {
      ...page,
      supplierName: searchForm.value.supplierName,
      timeStr: searchForm.value.timeStr
   }
   getStockOutPage(params)
   getStockOutPage({ ...searchForm.value, ...page })
      .then((res) => {
         tableLoading.value = false;
         tableData.value = res.data.records;
@@ -338,7 +336,6 @@
         tableLoading.value = false;
      });
};
// 表格选择数据
const handleSelectionChange = (selection) => {
@@ -686,14 +683,6 @@
   const seconds = String(date.getSeconds()).padStart(2, "0");
   return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;
};
// 获取当前日期并格式化为 YYYY-MM-DD
function getCurrentDate() {
   const today = new Date();
   const year = today.getFullYear();
   const month = String(today.getMonth() + 1).padStart(2, "0"); // 月份从0开始
   const day = String(today.getDate()).padStart(2, "0");
   return `${year}-${month}-${day}`;
}
onMounted(() => {
   getList();
});