| | |
| | | <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" |
| | |
| | | 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(); |
| | |
| | | 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({ |
| | |
| | | identifierType: currentProduct.value.identifierType, |
| | | identifierCode: identifierCode, |
| | | status: "已生成", |
| | | generateTime: new Date().toLocaleString(), |
| | | generateTime: createTime.value, |
| | | remark: "批量生成", |
| | | }); |
| | | } |