From 682124f3e573a24523dd643f23d16bb7d3c7e08d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 29 九月 2026 18:22:17 +0800
Subject: [PATCH] fix(inventory): 移除不合格库存相关字段并修复日期时间处理
---
src/views/safeProduction/dangerInvestigation/index.vue | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index 92436b1..4538bca 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -486,7 +486,7 @@
hiddenDesc: "", // 闅愭偅鎻忚堪
createUser: "", // 涓婃姤浜�
createUserName: "",
- createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), // 涓婃姤鏃堕棿
+ createTime: dayjs().format("YYYY-MM-DD"), // 涓婃姤鏃堕棿
rectifyUserId: "", // 鏁存敼璐d换浜�
rectifyUserName: "",
rectifyTime: "", // 鏁存敼瀹屾垚鏈熼檺
@@ -703,7 +703,7 @@
hiddenDesc: "", // 闅愭偅鎻忚堪
createUser: Number(currentUserId.value), // 涓婃姤浜�
createUserName: currentUserName.value,
- createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), // 涓婃姤鏃堕棿
+ createTime: dayjs().format("YYYY-MM-DD"), // 涓婃姤鏃堕棿
rectifyUserId: "", // 鏁存敼璐d换浜�
rectifyUserName: "",
rectifyTime: "", // 鏁存敼瀹屾垚鏈熼檺
@@ -803,6 +803,13 @@
}
};
+ // 鍚庣 createTime/updateTime 涓� LocalDateTime 涓旀爣娉� @JsonFormat("yyyy-MM-dd")锛�
+ // 璇ユ牸寮忚В鏋愪笉浜嗕换浣曟椂闂村瓧绗︿覆锛堢函鏃ユ湡鍚屾牱鎶ラ敊锛夛紝鍙兘涓嶅洖浼狅紝鐢卞悗绔嚜鍔ㄥ~鍏�/淇濈暀鍘熷��
+ const withoutAuditTime = obj => {
+ const { createTime, updateTime, ...rest } = obj;
+ return rest;
+ };
+
// 鎻愪氦琛ㄥ崟
const submitForm = () => {
console.log("operationType.value", operationType.value);
@@ -810,7 +817,7 @@
if (operationType.value == "add") {
proxy.$refs["formRef"].validate(valid => {
if (valid) {
- safeHiddenAdd(form.value).then(res => {
+ safeHiddenAdd(withoutAuditTime(form.value)).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
getList();
@@ -820,7 +827,7 @@
} else if (operationType.value == "edit") {
proxy.$refs["formRef"].validate(valid => {
if (valid) {
- safeHiddenUpdate(form.value).then(res => {
+ safeHiddenUpdate(withoutAuditTime(form.value)).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
getList();
@@ -831,7 +838,9 @@
console.log("form2.value", form2.value);
proxy.$refs["formRef2"].validate(valid => {
if (valid) {
- safeHiddenUpdate({ ...form2.value, ...form.value }).then(res => {
+ safeHiddenUpdate(
+ withoutAuditTime({ ...form2.value, ...form.value })
+ ).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
getList();
@@ -841,11 +850,13 @@
} else if (operationType.value == "edit3") {
proxy.$refs["formRef3"].validate(valid => {
if (valid) {
- safeHiddenUpdate({
- ...form3.value,
- ...form2.value,
- ...form.value,
- }).then(res => {
+ safeHiddenUpdate(
+ withoutAuditTime({
+ ...form3.value,
+ ...form2.value,
+ ...form.value,
+ })
+ ).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
getList();
--
Gitblit v1.9.3