|
|
@@ -264,8 +264,7 @@ $(document).ready(() => {
|
|
|
else if (href === '#htgl') currentNavType = 'contract';
|
|
|
else if (href === '#sgrz') currentNavType = 'construction';
|
|
|
else if (href === '#quality') currentNavType = 'quality';
|
|
|
- else if (href === '#safe') currentNavType = 'inspection';
|
|
|
- console.log('currentNavType', currentNavType);
|
|
|
+ else if (href === '#safe') currentNavType = 'safe';
|
|
|
if(currentNavType) {
|
|
|
setTimeout(() => updateSelectedMarks(), 0);
|
|
|
}
|
|
|
@@ -424,7 +423,6 @@ $(document).ready(() => {
|
|
|
}
|
|
|
const id = parseInt($('#remove_user_id').val());
|
|
|
const showId = parseInt($('#show_id').val());
|
|
|
- console.log(type);
|
|
|
if (type === 'contract') {
|
|
|
postData('/sp/' + spid + '/contract/tender/' + cur_tenderid + '/audit/save', { type: 'del-audit', id }, function (data) {
|
|
|
$('#'+ type + '-users').find('tr[data-uid="'+ id +'"]').remove();
|
|
|
@@ -587,7 +585,6 @@ $(document).ready(() => {
|
|
|
return item.id === id;
|
|
|
});
|
|
|
const type = $('#add_user_dropdownMenuButton').attr('data-type');
|
|
|
- console.log('type', type);
|
|
|
if (type === 'tourist') {
|
|
|
const saIdList = [];
|
|
|
for (let i = 0; i < $('#tourist-users tr').length; i++) {
|
|
|
@@ -739,7 +736,6 @@ $(document).ready(() => {
|
|
|
toastr.error('该用户已存在列表中,无需重复添加');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
const prop = {
|
|
|
id: id,
|
|
|
type: 'add-audit',
|
|
|
@@ -1097,7 +1093,7 @@ function updateSelectedMarks(forcedType = null) {
|
|
|
case 'htgl': currentType = 'contract'; break;
|
|
|
case 'sgrz': currentType = 'construction'; break;
|
|
|
case 'quality': currentType = 'quality'; break;
|
|
|
- case 'safe': currentType = 'inspection'; break;
|
|
|
+ case 'safe': currentType = 'safe'; break;
|
|
|
default: currentType = null;
|
|
|
}
|
|
|
}
|
|
|
@@ -1110,6 +1106,7 @@ function updateSelectedMarks(forcedType = null) {
|
|
|
case 'construction': currentUserListSelector = '#construction-users'; break;
|
|
|
case 'quality': currentUserListSelector = '#quality-users'; break;
|
|
|
case 'inspection': currentUserListSelector = '#inspection-users'; break;
|
|
|
+ case 'safe': currentUserListSelector = '#safe-users'; break;
|
|
|
}
|
|
|
selectedIdsArray = selectedUserIdsByType[currentType];
|
|
|
} else {
|
|
|
@@ -1197,7 +1194,8 @@ let selectedUserIdsByType = {
|
|
|
contract: [],
|
|
|
construction: [],
|
|
|
quality: [],
|
|
|
- inspection: []
|
|
|
+ inspection: [],
|
|
|
+ safe: []
|
|
|
};
|
|
|
function setTouristHtml(tourists) {
|
|
|
let html = '';
|
|
|
@@ -1347,13 +1345,13 @@ function setTenderPermissionsHtml(auditList, key, keys) {
|
|
|
const html = [];
|
|
|
for (const m of auditList) {
|
|
|
html.push(getUserPermissionsHtml(m, key, keys));
|
|
|
- if (Array.isArray(auditList)) {
|
|
|
- auditList.forEach(function(sa) {
|
|
|
- if (sa.uid !== undefined && sa.uid !== null) {
|
|
|
- selectedUserIdsByType[key].push(parseInt(sa.uid, 10));
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (Array.isArray(auditList)) {
|
|
|
+ auditList.forEach(function(sa) {
|
|
|
+ if (sa.uid !== undefined && sa.uid !== null) {
|
|
|
+ selectedUserIdsByType[key].push(parseInt(sa.uid, 10));
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
$('#' + key + '-users').html(html.join(''));
|
|
|
updateSelectedMarks();
|