liding
4 天以前 78f67775cd8d880dacd5e8d5be6e17cc9fcbf77c
src/views/productManagement/productIdentifier/index.vue
@@ -239,6 +239,13 @@
        <el-form-item label="标识类型">
          <span>{{ currentProduct.identifierType }}</span>
        </el-form-item>
        <el-form-item label="创建时间">
          <el-date-picker v-model="createTime"
                          type="date"
                          placeholder="选择日期"
                          value-format="YYYY-MM-DD"
                          style="width: 100%"></el-date-picker>
        </el-form-item>
        <el-form-item label="生成数量"
                      prop="generateQuantity">
          <el-input-number v-model="generateQuantity"
@@ -442,6 +449,7 @@
  const generateQuantity = ref(1);
  const codeRule = ref("");
  const customPrefix = ref("");
  const createTime = ref(new Date().toISOString().split('T')[0]);
  const newBatchNo = ref("");
  const reassignReason = ref("");
  const formRef = ref();
@@ -659,9 +667,9 @@
          currentProduct.value.batchNo
        }_${String(i).padStart(3, "0")}`;
      } else if (codeRule.value === "时间戳+随机数") {
        identifierCode = `TS_${Date.now()}_${Math.floor(Math.random() * 1000)}`;
        identifierCode = "";
      } else if (codeRule.value === "自定义规则") {
        identifierCode = `${customPrefix.value || "CUSTOM"}_${Date.now()}_${i}`;
        identifierCode = "";
      }
      newIdentifiers.push({
@@ -672,7 +680,7 @@
        identifierType: currentProduct.value.identifierType,
        identifierCode: identifierCode,
        status: "已生成",
        generateTime: new Date().toLocaleString(),
        generateTime: createTime.value,
        remark: "批量生成",
      });
    }