From 06eb604f71605c47f015b88b1620b72b6f69df8c Mon Sep 17 00:00:00 2001 From: helongyang <647556386@qq.com> Date: 星期一, 22 九月 2025 05:20:41 +0800 Subject: [PATCH] 功能增加,代码优化 --- 代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js" index 24e1d94..43dce0e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfoDetail.js" @@ -45,12 +45,20 @@ this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; }, modelOpenAfter(row) { - //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 - //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; - //(2)缁欏脊鍑烘璁剧疆榛樿鍊� - //(3)this.editFormFields.瀛楁='xxx'; - //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� - //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + // 鐐瑰嚮缂栬緫鎸夐挳寮瑰嚭妗嗗悗鎵ц + if (this.currentAction === 'Edit') { // 鍒ゆ柇褰撳墠鏄紪杈戞搷浣� + // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛锛堝亣璁句粠鍏ㄥ眬鍙橀噺鑾峰彇锛屽叿浣撴牴鎹綘鐨勯」鐩疄鐜帮級 + const currentUser = this.$store.state.userInfo?.username || 'system'; + + // 鑾峰彇褰撳墠鏃堕棿骞舵牸寮忓寲涓哄悗绔渶瑕佺殑鏍煎紡 + const now = new Date(); + const formattedDate = now.toISOString().slice(0, 19).replace('T', ' '); + + // 璁剧疆淇敼浜哄瓧娈� + this.editFormFields.modifier = currentUser; + // 璁剧疆淇敼鏃堕棿瀛楁 + this.editFormFields.modifyDate = formattedDate; + } } } }; -- Gitblit v1.9.3