|
@@ -23,7 +23,7 @@ $(function () {
|
|
for (const tc of tenderCertList) {
|
|
for (const tc of tenderCertList) {
|
|
let certHtml = '';
|
|
let certHtml = '';
|
|
for (const c of tc.account_info.certs) {
|
|
for (const c of tc.account_info.certs) {
|
|
- certHtml += `<option value="${c.id}" ${c.id === tc.cert_id ? 'selected': ''}>${showCol4ObjArray(certRegConst, c.registration, 'value', 'name')}</option>`;
|
|
|
|
|
|
+ certHtml += `<option value="${c.id}" ${c.id === tc.cert_id ? 'selected': ''}>${showCol4ObjArray(certSourceConst, c.name, 'value', 'name')}</option>`;
|
|
}
|
|
}
|
|
html += `<tr class="text-center" data-insert="0" data-id="${tc.id}" data-certid="${tc.cert_id}" data-remove="0">
|
|
html += `<tr class="text-center" data-insert="0" data-id="${tc.id}" data-certid="${tc.cert_id}" data-remove="0">
|
|
<td>${tc.account_info.name}</td>
|
|
<td>${tc.account_info.name}</td>
|
|
@@ -103,13 +103,11 @@ $(function () {
|
|
$('dl').on('click', 'dd', function () {
|
|
$('dl').on('click', 'dd', function () {
|
|
const auditorId = parseInt($(this).data('id'))
|
|
const auditorId = parseInt($(this).data('id'))
|
|
if (auditorId) {
|
|
if (auditorId) {
|
|
- console.log(auditorId);
|
|
|
|
const userInfo = _.find(accountList, { id: auditorId });
|
|
const userInfo = _.find(accountList, { id: auditorId });
|
|
const certList = _.filter(allCertList, { uid: parseInt(auditorId) });
|
|
const certList = _.filter(allCertList, { uid: parseInt(auditorId) });
|
|
- console.log(certList);
|
|
|
|
let certHtml = '';
|
|
let certHtml = '';
|
|
for (const c of certList) {
|
|
for (const c of certList) {
|
|
- certHtml += `<option value="${c.id}">${showCol4ObjArray(certRegConst, c.registration, 'value', 'name')}</option>`;
|
|
|
|
|
|
+ certHtml += `<option value="${c.id}">${showCol4ObjArray(certSourceConst, c.name, 'value', 'name')}</option>`;
|
|
}
|
|
}
|
|
const html = `<tr class="text-center" data-insert="1" data-remove="0" data-uid="${userInfo.id}" data-certid="${certList.length > 0 ? certList[0].id : 0}">
|
|
const html = `<tr class="text-center" data-insert="1" data-remove="0" data-uid="${userInfo.id}" data-certid="${certList.length > 0 ? certList[0].id : 0}">
|
|
<td>${userInfo.name}</td>
|
|
<td>${userInfo.name}</td>
|
|
@@ -190,7 +188,7 @@ $(function () {
|
|
{title: '所在部门', colSpan: '1', rowSpan: '2', field: 'department', hAlign: 0, width: 100, formatter: '@'},
|
|
{title: '所在部门', colSpan: '1', rowSpan: '2', field: 'department', hAlign: 0, width: 100, formatter: '@'},
|
|
{title: '职务', colSpan: '1', rowSpan: '2', field: 'role', hAlign: 0, width: 80, formatter: '@', readOnly: true, getValue: 'getValue.role'},
|
|
{title: '职务', colSpan: '1', rowSpan: '2', field: 'role', hAlign: 0, width: 80, formatter: '@', readOnly: true, getValue: 'getValue.role'},
|
|
{title: '在岗时间', colSpan: '1', rowSpan: '2', field: 'job_time', hAlign: 0, width: 150, formatter: '@'},
|
|
{title: '在岗时间', colSpan: '1', rowSpan: '2', field: 'job_time', hAlign: 0, width: 150, formatter: '@'},
|
|
- {title: '持证情况|证件名称', colSpan: '4|1', rowSpan: '1|1', field: 'cert_reg', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.cert_reg'},
|
|
|
|
|
|
+ {title: '持证情况|证件名称', colSpan: '4|1', rowSpan: '1|1', field: 'cert_name', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.cert_name'},
|
|
{title: '|证书编号', colSpan: '|1', rowSpan: '|1', field: 'cert_code', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.cert_code'},
|
|
{title: '|证书编号', colSpan: '|1', rowSpan: '|1', field: 'cert_code', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.cert_code'},
|
|
{title: '|注册单位', colSpan: '|1', rowSpan: '|1', field: 'reg_unit', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.reg_unit'},
|
|
{title: '|注册单位', colSpan: '|1', rowSpan: '|1', field: 'reg_unit', hAlign: 0, width: 150, readOnly: true, getValue: 'getValue.reg_unit'},
|
|
{title: '|证书附件', colSpan: '|1', rowSpan: '|1', field: 'file_path', hAlign: 1, width: 55, readOnly: true, cellType: 'imageBtn',
|
|
{title: '|证书附件', colSpan: '|1', rowSpan: '|1', field: 'file_path', hAlign: 1, width: 55, readOnly: true, cellType: 'imageBtn',
|
|
@@ -223,8 +221,8 @@ $(function () {
|
|
role: function (data) {
|
|
role: function (data) {
|
|
return data.account_info ? data.account_info.role : '';
|
|
return data.account_info ? data.account_info.role : '';
|
|
},
|
|
},
|
|
- cert_reg: function (data) {
|
|
|
|
- return data.cert_info ? showCol4ObjArray(certRegConst, data.cert_info.registration, 'value', 'name') : '';
|
|
|
|
|
|
+ cert_name: function (data) {
|
|
|
|
+ return data.cert_info ? showCol4ObjArray(certSourceConst, data.cert_info.name, 'value', 'name') : '';
|
|
},
|
|
},
|
|
cert_code: function (data) {
|
|
cert_code: function (data) {
|
|
return data.cert_info ? data.cert_info.code : '';
|
|
return data.cert_info ? data.cert_info.code : '';
|
|
@@ -369,6 +367,7 @@ $(function () {
|
|
certSpread.bind(spreadNS.Events.EditEnded, certSpreadObj.editEnded);
|
|
certSpread.bind(spreadNS.Events.EditEnded, certSpreadObj.editEnded);
|
|
|
|
|
|
function showCol4ObjArray(arr, col, key, showKey) {
|
|
function showCol4ObjArray(arr, col, key, showKey) {
|
|
|
|
+ if (!col) return '';
|
|
const obj = _.find(arr, { [key]: col });
|
|
const obj = _.find(arr, { [key]: col });
|
|
return obj ? obj[showKey] : '';
|
|
return obj ? obj[showKey] : '';
|
|
}
|
|
}
|