gaoluyang
2025-11-28 1ab015896fcf64ba99c5271837169a342109adae
海川开心-查询条件添加默认日期
已修改16个文件
129 ■■■■■ 文件已修改
src/views/inventoryManagement/dispatchLog/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/issueManagement/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentHistory/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementInvoiceLedger/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementReport/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/operationScheduling/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionDispatching/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/indicatorStats/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceLedger/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPaymentHistory/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/dispatchLog/index.vue
@@ -358,7 +358,7 @@
    searchForm: {
        supplierName: "",
        customerName: "",
        timeStr: "",
        timeStr: getCurrentDate(),
    },
    form: {
        supplierId: null,
src/views/inventoryManagement/issueManagement/index.vue
@@ -221,7 +221,7 @@
    inboundTime:'',
    nickName: '',
    userId: '',
    timeStr: '',
    timeStr: getCurrentDate(),
  },
  form: {
    productrecordId: '',
src/views/inventoryManagement/receiptManagement/index.vue
@@ -164,6 +164,7 @@
import { ref, reactive, toRefs, onMounted, getCurrentInstance, nextTick } from 'vue'
import { ElMessageBox } from "element-plus";
import useUserStore from '@/store/modules/user'
import dayjs from 'dayjs'
import {
    getStockInPage,
    getStockInPageByProduction,
@@ -173,6 +174,11 @@
} from "@/api/inventoryManagement/stockIn.js";
import FormDia from './components/formDia.vue'
import FormDiaManual from './components/formDiaManual.vue'
// 获取当前日期
function getCurrentDate() {
  return dayjs().format('YYYY-MM-DD')
}
const userStore = useUserStore()
const { proxy } = getCurrentInstance()
@@ -194,7 +200,7 @@
  searchForm: {
    supplierName: '',
    customerName: '',
    timeStr: '',
    timeStr: getCurrentDate(),
  },
})
const { searchForm } = toRefs(data)
src/views/inventoryManagement/stockManagement/index.vue
@@ -307,7 +307,7 @@
  searchForm: {
    supplierName: '',
    customerName: '',
    timeStr: '',
    timeStr: getCurrentDate(),
  },
  form: {
    supplierId: null,
src/views/procurementManagement/paymentHistory/index.vue
@@ -118,9 +118,10 @@
const { form: searchForm } = useFormData({
  searchText: undefined,
    purchaseContractNumber: undefined,
  paymentDate: [],
  paymentDateStart: undefined,
  paymentDateEnd: undefined,
  // 设置付款日期范围为当天
  paymentDate: [dayjs().startOf('day').format('YYYY-MM-DD'), dayjs().endOf('day').format('YYYY-MM-DD')],
  paymentDateStart: dayjs().startOf('day').format('YYYY-MM-DD'),
  paymentDateEnd: dayjs().endOf('day').format('YYYY-MM-DD'),
});
// 查询列表
@@ -137,7 +138,8 @@
const getList = () => {
  tableLoading.value = true;
  const { paymentDate, ...rest } = searchForm;
  paymentHistoryListPage({ ...rest, ...page }).then((res) => {
  const { total, ...pageParams } = page;
  paymentHistoryListPage({ ...rest, ...pageParams }).then((res) => {
    tableLoading.value = false;
    tableData.value = res.records;
        page.total = res.total;
src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -122,6 +122,7 @@
import EditModal from "./Modal/EditModal.vue";
import useUserStore from "@/store/modules/user.js";
import {delInvoiceLedgerByRegProductId} from "@/api/salesManagement/invoiceLedger.js";
import dayjs from "dayjs";
const userStore = useUserStore();
defineOptions({
@@ -147,7 +148,8 @@
  {
    purchaseContractNumber: undefined, // 采购合同号
    supplierName: undefined, // 供应商
    createdAt: [], // 来票日期
    // 设置来票日期范围为当天
    createdAt: [dayjs().startOf('day').format('YYYY-MM-DD'), dayjs().endOf('day').format('YYYY-MM-DD')], // 来票日期
  },
  [
    {
src/views/procurementManagement/procurementLedger/index.vue
@@ -878,7 +878,13 @@
  },
});
const {  form, rules } = toRefs(data);
const { form: searchForm } = useFormData(data.searchForm);
const { form: searchForm } = useFormData({
  ...data.searchForm,
  // 设置录入日期范围为当天
  entryDate: [dayjs().startOf('day').format('YYYY-MM-DD'), dayjs().endOf('day').format('YYYY-MM-DD')],
  entryDateStart: dayjs().startOf('day').format('YYYY-MM-DD'),
  entryDateEnd: dayjs().endOf('day').format('YYYY-MM-DD')
});
// 产品表单弹框数据
const productFormVisible = ref(false);
src/views/procurementManagement/procurementReport/index.vue
@@ -280,6 +280,7 @@
import { ref, reactive, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import { Document, List, TrendCharts, Shop, Search, Refresh, Download } from '@element-plus/icons-vue'
import dayjs from "dayjs";
// 响应式数据
const loading = ref(false)
@@ -690,14 +691,10 @@
}
onMounted(() => {
  // 设置默认时间范围为最近30天
  const endDate = new Date()
  const startDate = new Date()
  startDate.setDate(startDate.getDate() - 30)
  // 设置默认时间范围为当天
  searchForm.dateRange = [
    startDate.toISOString().split('T')[0],
    endDate.toISOString().split('T')[0]
    dayjs().startOf('day').format('YYYY-MM-DD'),
    dayjs().endOf('day').format('YYYY-MM-DD')
  ]
})
</script>
src/views/productionManagement/operationScheduling/index.vue
@@ -61,9 +61,9 @@
    searchForm: {
        staffName: "",
        status: 1,
        entryDate: null, // 录入日期
        entryDateStart: undefined,
        entryDateEnd: undefined,
        entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // 录入日期,默认当天
        entryDateStart: dayjs().format("YYYY-MM-DD"),
        entryDateEnd: dayjs().format("YYYY-MM-DD"),
    },
});
const { searchForm } = toRefs(data);
src/views/productionManagement/productionDispatching/index.vue
@@ -88,9 +88,10 @@
    searchForm: {
        customerName: "",
        projectName: "",
        entryDate: null, // 录入日期
        entryDateStart: undefined,
        entryDateEnd: undefined,
        status: "",
        entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // 录入日期,默认当天
        entryDateStart: dayjs().format("YYYY-MM-DD"),
        entryDateEnd: dayjs().format("YYYY-MM-DD"),
    },
});
const { searchForm } = toRefs(data);
src/views/productionManagement/productionOrder/index.vue
@@ -133,9 +133,10 @@
    searchForm: {
        customerName: "",
        projectName: "",
        entryDate: null, // 录入日期
        entryDateStart: undefined,
        entryDateEnd: undefined,
        status: "",
        entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // 录入日期,默认当天
        entryDateStart: dayjs().format("YYYY-MM-DD"),
        entryDateEnd: dayjs().format("YYYY-MM-DD"),
    },
});
const { searchForm } = toRefs(data);
src/views/productionManagement/productionReporting/index.vue
@@ -148,10 +148,12 @@
const data = reactive({
    searchForm: {
        staffName: "",
        entryDate: null, // 录入日期
        entryDateStart: undefined,
        entryDateEnd: undefined,
        customerName: "",
        projectName: "",
        status: "",
        entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // 录入日期,默认当天
        entryDateStart: dayjs().format("YYYY-MM-DD"),
        entryDateEnd: dayjs().format("YYYY-MM-DD"),
    },
});
const { searchForm } = toRefs(data);
src/views/salesManagement/indicatorStats/index.vue
@@ -224,6 +224,10 @@
}
onMounted(() => {
  // 设置指标筛选日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD')
  indicatorFilter.dateRange = [today, today]
  nextTick(() => initIndicatorChart())
})
</script>
src/views/salesManagement/invoiceLedger/index.vue
@@ -245,7 +245,11 @@
const getList = () => {
  tableLoading.value = true;
  const { invoiceDate, ...rest } = searchForm;
  registrationProductPage({ ...rest, ...page }).then((res) => {
  // 将范围日期字段传递给后端
  const params = { ...rest, ...page };
  // 移除开票日期的默认值设置,只保留范围日期字段
  delete params.invoiceDate;
  registrationProductPage(params).then((res) => {
    tableLoading.value = false;
    tableData.value = res.data.records;
    total.value = res.data.total;
@@ -274,11 +278,9 @@
    fileList.value = res.data.fileList;
    if (!form.value.invoicePerson) {
      form.value.invoicePerson = userStore.nickName;
      form.value.entryDate = getCurrentDate();
      // 移除录入日期默认值设置,只处理范围日期字段
    }
    if (!form.value.invoiceDate) {
      form.value.invoiceDate = getCurrentDate();
    }
    // 移除开票日期默认值设置,只处理范围日期字段
  });
  dialogFormVisible.value = true;
};
@@ -434,6 +436,12 @@
};
onMounted(() => {
  // 设置开票日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD');
  searchForm.invoiceDate = [today, today];
  // 设置范围日期字段的起始和结束时间
  searchForm.invoiceDateStart = today;
  searchForm.invoiceDateEnd = today;
  getList();
});
</script>
src/views/salesManagement/receiptPaymentHistory/index.vue
@@ -168,7 +168,11 @@
const getList = () => {
  tableLoading.value = true;
  const { receiptPaymentDate, ...rest } = searchForm;
  receiptPaymentHistoryListPage({ ...rest, ...page }).then((res) => {
  // 将范围日期字段传递给后端
  const params = { ...rest, ...page };
  // 移除回款日期的默认值设置,只保留范围日期字段
  delete params.receiptPaymentDate;
  receiptPaymentHistoryListPage(params).then((res) => {
    tableLoading.value = false;
    tableData.value = res.records;
        page.total = res.total;
@@ -212,6 +216,12 @@
};
onMounted(() => {
  // 设置回款日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD');
  searchForm.receiptPaymentDate = [today, today];
  // 设置范围日期字段的起始和结束时间
  searchForm.receiptPaymentDateStart = dayjs(today).format('YYYY-MM-DD 00:00:00');
  searchForm.receiptPaymentDateEnd = dayjs(today).format('YYYY-MM-DD 23:59:59');
  getList();
});
</script>
src/views/salesManagement/salesLedger/index.vue
@@ -644,7 +644,11 @@
const getList = () => {
  tableLoading.value = true;
  const { entryDate, ...rest } = searchForm;
  ledgerListPage({ ...rest, ...page })
  // 将范围日期字段传递给后端
  const params = { ...rest, ...page };
  // 移除录入日期的默认值设置,只保留范围日期字段
  delete params.entryDate;
  ledgerListPage(params)
    .then((res) => {
      tableLoading.value = false;
      tableData.value = res.records;
@@ -785,7 +789,7 @@
  //     form.value.entryPerson = userAll.user.userId // 设置默认业务员为当前用户
  //   }
  // });
  form.value.entryDate = getCurrentDate(); // 设置默认录入日期为当前日期
  // 移除录入日期默认值设置,只处理范围日期字段
  dialogFormVisible.value = true;
};
function changs(val) {
@@ -1541,7 +1545,7 @@
const openDeliveryForm = (row) => {
  currentDeliveryRow.value = row;
  deliveryForm.value = {
    shippingDate: getCurrentDate(),
    shippingDate: "", // 移除默认值设置
    shippingCarNumber: "",
  };
  deliveryFormVisible.value = true;
@@ -1576,7 +1580,13 @@
};
onMounted(() => {
    getList();
  // 设置录入日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD');
  searchForm.entryDate = [today, today];
  // 设置范围日期字段的起始和结束时间
  searchForm.entryDateStart = today;
  searchForm.entryDateEnd = today;
  getList();
});
</script>