v1.0.34: 重复校验弹窗简化 - 只提示字段出现重复+重复数据表名与id,去掉跳转按钮
This commit is contained in:
+5
-11
@@ -49,24 +49,18 @@ function handleResp(resp) {
|
||||
location.href = 'index.html';
|
||||
return $.Deferred().reject(resp).promise();
|
||||
}
|
||||
// 重复数据:弹窗提示 + 跳转定位到已有记录
|
||||
// 重复数据:弹窗提示字段 + 重复记录的表名与 id
|
||||
if (resp && resp.code === 1001 && resp.data) {
|
||||
var d = resp.data;
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '数据重复提示',
|
||||
area: ['440px', 'auto'],
|
||||
area: ['420px', 'auto'],
|
||||
content: '<div style="padding:20px 24px;">' +
|
||||
'<div style="font-size:14px;color:#e74c3c;margin-bottom:8px;">' + escHtml(d.label) + '「' + escHtml(d.value) + '」出现重复</div>' +
|
||||
'<div style="font-size:13px;color:#5a6472;margin-bottom:18px;">该值已存在:' + escHtml(d.name || '未知记录') + (d.owner_label ? '(' + escHtml(d.owner_label) + ')' : '') + '</div>' +
|
||||
'<div style="text-align:right;"><button class="btn btn-primary" id="dup-jump-btn">查看记录</button></div>' +
|
||||
'<div style="font-size:14px;color:#e74c3c;margin-bottom:10px;">' + escHtml(d.label) + '「' + escHtml(d.value) + '」出现重复</div>' +
|
||||
'<div style="font-size:13px;color:#5a6472;">重复数据:' + escHtml(d.table) + ' 表,id=' + d.id + '</div>' +
|
||||
'</div>',
|
||||
btn: ['知道了'],
|
||||
success: function (layero) {
|
||||
$(layero).find('#dup-jump-btn').on('click', function () {
|
||||
location.href = d.jump;
|
||||
});
|
||||
}
|
||||
btn: ['知道了']
|
||||
});
|
||||
return $.Deferred().reject(resp).promise();
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ var BASE_URL = '/api/';
|
||||
var PAGE_SIZE = 20;
|
||||
|
||||
/** 系统版本号(logo旁展示):修改代码后运行 tools/bump_version.php 自动递增 */
|
||||
var APP_VERSION = 'v1.0.33';
|
||||
var APP_VERSION = 'v1.0.34';
|
||||
|
||||
/** 页脚版权/备案信息(在 config.js 中修改) */
|
||||
var FOOTER_TEXT = '© 2026 SuperLink 管理系统 版权所有 | 备案号:请替换为真实备案号';
|
||||
|
||||
Reference in New Issue
Block a user