| | |
| | | commitFile, |
| | | registrationProductPage, |
| | | delInvoiceLedgerByRegProductId, |
| | | } from "../../../api/salesManagement/invoiceLedger.js"; |
| | | import { getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger.js"; |
| | | } from "@/api/salesManagement/invoiceLedger.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import dayjs from "dayjs"; |
| | | import FileList from "./fileList.vue"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | |
| | | invoiceLedgerProductInfo({ id: row.id }).then((res) => { |
| | | form.value = { ...res.data }; |
| | | fileList.value = res.data.fileList; |
| | | // 保存ticketRegistrationId到表单数据中 |
| | | if (row.ticketRegistrationId) { |
| | | form.value.ticketRegistrationId = row.ticketRegistrationId; |
| | | } |
| | | if (!form.value.invoicePerson) { |
| | | form.value.invoicePerson = userStore.nickName; |
| | | // 移除录入日期默认值设置,只处理范围日期字段 |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 获取当前日期并格式化为 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}`; |
| | | } |
| | | const changeDateRange = (date) => { |
| | | if (date) { |
| | | searchForm.invoiceDateStart = date[0]; |