| | |
| | | // 签订日期默认为当天 |
| | | form.value.executionDate = getCurrentDate(); |
| | | // 创建时间默认为当天 |
| | | form.value.createTime = getCurrentDate(); |
| | | form.value.createTime = dayjs().format("YYYY-MM-DD HH:mm:ss"); |
| | | // 默认自动生成销售合同号 |
| | | form.value.autoGenerateContractNo = true; |
| | | } else { |
| | |
| | | // 格式化日期 |
| | | const formatDate = (dateString) => { |
| | | if (!dateString) return getCurrentDate(); |
| | | const date = new Date(dateString); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | return `${year}/${month}/${day}`; |
| | | return dayjs(dateString).format("YYYY/MM/DD HH:mm:ss"); |
| | | }; |
| | | // 格式化日期时间 |
| | | const formatDateTime = (date) => { |