...
|
...
|
@@ -19,19 +19,18 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay |
|
|
var msg = '';
|
|
|
var url = common.domainName + '/api-web/manage/protocol/checkUniqueCode';
|
|
|
//var protocolId = $("#protocolAddForm").find("input[name='protocolId']");
|
|
|
var data = {protocolCode: value, access_token: accessToken};
|
|
|
var data = {protocolCode: value, accessToken: accessToken};
|
|
|
if (id) {
|
|
|
data['notProtocolId'] = id;
|
|
|
}
|
|
|
$.ajax({
|
|
|
admin.req({
|
|
|
url: url,
|
|
|
data: data,
|
|
|
async: false,
|
|
|
success: function (res) {
|
|
|
async: false
|
|
|
}).done(function (res) {
|
|
|
if (res.object != null) {
|
|
|
msg = '当前名称已存在'
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
return msg
|
|
|
}
|
...
|
...
|
@@ -39,7 +38,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'xmSelect', 'lay |
|
|
form.verify(verify);
|
|
|
if (code) {
|
|
|
var url = common.domainName + '/api-web/manage/protocol/getById';
|
|
|
$.get(url, {'protocolCode': code, 'access_token': accessToken}, function (res) {
|
|
|
admin.req({url: url, data: {protocolCode: code}}).done(function (res) {
|
|
|
if (res.object) {
|
|
|
var bean = res.object
|
|
|
var param = res.data;
|
...
|
...
|
|