spring
8 天以前 3f3d35d6d6445f9cc90a8cf7bb496bee7f465542
src/views/inventoryManagement/dispatchLog/index.vue
@@ -11,6 +11,16 @@
               clearable
               prefix-icon="Search"
            />
            <span class="search_title ml10">出库日期:</span>
            <el-date-picker
               v-model="searchForm.timeStr"
               type="date"
               placeholder="请选择日期"
               value-format="YYYY-MM-DD"
               format="YYYY-MM-DD"
               clearable
               @change="handleQuery"
            />
            <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
            >搜索</el-button
            >
@@ -251,6 +261,7 @@
import { ref } from "vue";
import { ElMessageBox } from "element-plus";
import useUserStore from "@/store/modules/user";
import { getCurrentDate } from "@/utils/index.js";
import {
   getStockOutPage,
   delStockOut,
@@ -275,6 +286,7 @@
const data = reactive({
   searchForm: {
      supplierName: "",
      timeStr: "",
   },
   form: {
      supplierId: null,
@@ -671,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();
});