From 720e0926fa1c94b952c26e111206c5d6e1ed5ba2 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 21 四月 2026 15:59:49 +0800
Subject: [PATCH] Merge branch 'master' of http://47.97.1.152:5880/r/zy-wcs-master

---
 src/main/webapp/static/js/basMap/basMap.js |   92 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 86 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/static/js/basMap/basMap.js b/src/main/webapp/static/js/basMap/basMap.js
index 105fe22..d5e1c79 100644
--- a/src/main/webapp/static/js/basMap/basMap.js
+++ b/src/main/webapp/static/js/basMap/basMap.js
@@ -499,7 +499,7 @@
     }
 
     function isSearchableField(field) {
-        return !!field && field.kind !== 'image' && !field.textarea;
+        return !!field && field.kind !== 'image' && !field.textarea && ['data', 'lastData', 'originData'].indexOf(field.field) === -1;
     }
 
     function isSortableField(field) {
@@ -556,7 +556,9 @@
     }
 
     function createDefaultVisibleColumnKeys() {
-        return fieldMeta.map(function (field) {
+        return fieldMeta.filter(function (field) {
+            return ['data', 'lastData', 'originData'].indexOf(field.field) === -1;
+        }).map(function (field) {
             return field.field;
         });
     }
@@ -842,6 +844,18 @@
                         mode: 'create',
                         submitting: false
                     },
+                    payloadDialog: {
+                        visible: false,
+                        loading: false,
+                        row: null,
+                        data: {
+                            id: null,
+                            lev: '',
+                            data: '',
+                            lastData: '',
+                            originData: ''
+                        }
+                    },
                     layoutTimer: null,
                     tableResizeHandler: null,
                     dialogForm: createFormDefaults(),
@@ -1092,16 +1106,82 @@
                     this.dialog.visible = true;
                     this.$nextTick(this.resetDialogState);
                 },
+                createEmptyPayloadData: function () {
+                    return {
+                        id: null,
+                        lev: '',
+                        data: '',
+                        lastData: '',
+                        originData: ''
+                    };
+                },
+                openPayloadDialog: function (row) {
+                    var self = this;
+                    if (!row || isEmptyValue(row[self.primaryKeyField])) {
+                        self.$message.warning('褰撳墠璁板綍涓嶅瓨鍦�');
+                        return;
+                    }
+                    self.payloadDialog.visible = true;
+                    self.payloadDialog.loading = true;
+                    self.payloadDialog.row = row;
+                    self.payloadDialog.data = self.createEmptyPayloadData();
+                    $.ajax({
+                        url: baseUrl + '/' + simpleEntityName + '/payload/' + encodeURIComponent(row[self.primaryKeyField]) + '/auth',
+                        method: 'GET',
+                        headers: self.authHeaders(),
+                        success: function (res) {
+                            self.payloadDialog.loading = false;
+                            if (self.handleForbidden(res)) {
+                                return;
+                            }
+                            if (!res || res.code !== 200) {
+                                self.$message.error((res && res.msg) ? res.msg : '鍔犺浇鍦板浘鏁版嵁澶辫触');
+                                return;
+                            }
+                            self.payloadDialog.data = $.extend({}, self.createEmptyPayloadData(), res.data || {});
+                        },
+                        error: function () {
+                            self.payloadDialog.loading = false;
+                            self.$message.error('鍔犺浇鍦板浘鏁版嵁澶辫触');
+                        }
+                    });
+                },
                 openEditDialog: function (row) {
                     var self = this;
+                    if (!row || isEmptyValue(row[self.primaryKeyField])) {
+                        self.$message.warning('褰撳墠璁板綍涓嶅瓨鍦�');
+                        return;
+                    }
                     self.dialog.mode = 'edit';
                     self.dialog.visible = true;
                     self.$nextTick(function () {
                         self.resetDialogState();
-                        fillFormFromRow(row, self.dialogForm, self.dialogDisplay);
-                        if (self.$refs.dialogForm) {
-                            self.$refs.dialogForm.clearValidate();
-                        }
+                        self.dialog.submitting = true;
+                        $.ajax({
+                            url: baseUrl + '/' + simpleEntityName + '/' + encodeURIComponent(row[self.primaryKeyField]) + '/auth',
+                            method: 'GET',
+                            headers: self.authHeaders(),
+                            success: function (res) {
+                                self.dialog.submitting = false;
+                                if (self.handleForbidden(res)) {
+                                    return;
+                                }
+                                if (!res || res.code !== 200) {
+                                    self.$message.error((res && res.msg) ? res.msg : '鍔犺浇璇︽儏澶辫触');
+                                    self.dialog.visible = false;
+                                    return;
+                                }
+                                fillFormFromRow(res.data || {}, self.dialogForm, self.dialogDisplay);
+                                if (self.$refs.dialogForm) {
+                                    self.$refs.dialogForm.clearValidate();
+                                }
+                            },
+                            error: function () {
+                                self.dialog.submitting = false;
+                                self.dialog.visible = false;
+                                self.$message.error('鍔犺浇璇︽儏澶辫触');
+                            }
+                        });
                     });
                 },
                 buildDialogPayload: function () {

--
Gitblit v1.9.1