/**
 * 生成编号
 * @param prefix 编号前缀
 * @returns
 */
export function generatedCode(prefix: string) {
  const currentDate = new Date();
  const yearPart = (currentDate.getFullYear() % 100)
    .toString()
    .padStart(2, "0"); // 获取后两位年份
  const datePart = `${yearPart}${(currentDate.getMonth() + 1)
    .toString()
    .padStart(2, "0")}${currentDate.getDate().toString().padStart(2, "0")}`;
  const randomPart = Math.floor(10000 + Math.random() * 90000); // 生成5位纯数字随机字符串
  return `${prefix}${datePart}${randomPart}`;
}

