From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治

---
 src/views/productManagement/productIdentifier/index.vue |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/views/productManagement/productIdentifier/index.vue b/src/views/productManagement/productIdentifier/index.vue
index d638e7a..94359e4 100644
--- a/src/views/productManagement/productIdentifier/index.vue
+++ b/src/views/productManagement/productIdentifier/index.vue
@@ -239,13 +239,6 @@
         <el-form-item label="鏍囪瘑绫诲瀷">
           <span>{{ currentProduct.identifierType }}</span>
         </el-form-item>
-        <el-form-item label="鍒涘缓鏃堕棿">
-          <el-date-picker v-model="createTimeDate"
-                          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"
@@ -363,7 +356,6 @@
 
 <script setup>
   import { ref, reactive, computed } from "vue";
-  import dayjs from "dayjs";
   import { ElMessage, ElMessageBox } from "element-plus";
   import { Plus, Search, Loading, Download } from "@element-plus/icons-vue";
   import Pagination from "@/components/PIMTable/Pagination.vue";
@@ -450,13 +442,6 @@
   const generateQuantity = ref(1);
   const codeRule = ref("");
   const customPrefix = ref("");
-  const createTime = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
-  const createTimeDate = computed({
-    get: () => (createTime.value ? String(createTime.value).split(" ")[0] : ""),
-    set: (value) => {
-      createTime.value = value ? `${value} ${dayjs().format("HH:mm:ss")}` : "";
-    },
-  });
   const newBatchNo = ref("");
   const reassignReason = ref("");
   const formRef = ref();
@@ -674,9 +659,9 @@
           currentProduct.value.batchNo
         }_${String(i).padStart(3, "0")}`;
       } else if (codeRule.value === "鏃堕棿鎴�+闅忔満鏁�") {
-        identifierCode = "";
+        identifierCode = `TS_${Date.now()}_${Math.floor(Math.random() * 1000)}`;
       } else if (codeRule.value === "鑷畾涔夎鍒�") {
-        identifierCode = "";
+        identifierCode = `${customPrefix.value || "CUSTOM"}_${Date.now()}_${i}`;
       }
 
       newIdentifiers.push({
@@ -687,7 +672,7 @@
         identifierType: currentProduct.value.identifierType,
         identifierCode: identifierCode,
         status: "宸茬敓鎴�",
-        generateTime: createTime.value,
+        generateTime: new Date().toLocaleString(),
         remark: "鎵归噺鐢熸垚",
       });
     }

--
Gitblit v1.9.3