spring
3 天以前 28d2e9987f406e27a846fbf488d3e34de2e550be
src/views/productionManagement/productionCosting/index.vue
@@ -49,7 +49,7 @@
                  :column="tableColumn"
                  :tableData="tableData"
                  :page="page1"
                  :tableLoading="tableLoading"
                  :tableLoading="tableLoading1"
                  style="margin-right: 20px;"
                  @pagination="pagination1"
               ></PIMTable>
@@ -68,7 +68,7 @@
const tableColumn = ref([
   {
      label: "生产日期",
      prop: "scheduleDate",
      prop: "schedulingDate",
    minWidth: 100,
   },
   {
@@ -172,13 +172,10 @@
      schedulingUserName: "",
      salesContractNo: "",
    dateType: "day",
    dateRange: undefined,
      entryDate: [
         dayjs().format("YYYY-MM-DD"),
         dayjs().add(1, "day").format("YYYY-MM-DD"),
      ], // 录入日期
      entryDateStart: dayjs().format("YYYY-MM-DD"),
      entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
    dateRange: dayjs().format("YYYY-MM-DD"),
      entryDate: dayjs().format("YYYY-MM-DD"),
      entryDateStart: undefined,
      entryDateEnd: undefined,
   },
});
const { searchForm } = toRefs(data);
@@ -217,11 +214,14 @@
   const params = { ...searchForm.value, ...page };
  salesLedgerProductionAccountingList(params).then((res) => {
      tableLoading.value = false;
      const records = res.data.records || [];
    leftTableData.value = records;
      page.total = res.data.total || 0;
   });
   }).finally(() => {
    tableLoading.value = false;
  })
};
@@ -229,10 +229,11 @@
  tableLoading1.value = true;
  const params = { ...page1, ...searchForm.value };
  salesLedgerProductionAccountingListProductionDetails(params).then((res) => {
    tableLoading1.value = false;
    tableData.value = res.data.records || [];;
    page1.total = res.data.total || 0;
  });
  }).finally(() => {
    tableLoading1.value = false;
  })
};
// 构建左侧汇总台账(按生产人汇总产量、工资等)
@@ -259,12 +260,17 @@
};
// 左侧日/月切换
const handleDateTypeChange = () => {
const handleDateTypeChange = (value) => {
   // 这里只作为筛选条件的一部分,直接重新查询列表
  searchForm.value.dateRange = undefined;
  searchForm.value.entryDate = undefined;
  searchForm.value.entryDateStart = undefined;
  searchForm.value.entryDateEnd = undefined;
  if (value === "day") {
    searchForm.value.entryDate = dayjs().format("YYYY-MM-DD");
    searchForm.value.dateRange = searchForm.value.entryDate
  } else {
    searchForm.value.entryDateStart = dayjs().startOf("month").format("YYYY-MM-DD");
    searchForm.value.entryDateEnd = dayjs().endOf("month").format("YYYY-MM-DD");
    searchForm.value.dateRange = [searchForm.value.entryDateStart, searchForm.value.entryDateEnd]
  }
  reloadData()
};