|
@@ -65,6 +65,33 @@ let rptSignatureHelper = {
|
|
|
accDiv.append(prj_accounts.join(''));
|
|
|
accSelect.append(prj_sel_option_accounts.join(''));
|
|
|
},
|
|
|
+ buildSelectableAccountUsed: function () {
|
|
|
+ //PRJ_ACCOUNT_LIST
|
|
|
+ //1. 清理所有选择项
|
|
|
+ // $("#project_account_select_div").empty();
|
|
|
+ let accDiv = $('#account_used_select_div');
|
|
|
+ accDiv.empty();
|
|
|
+
|
|
|
+ //2. 一个个加可选用户项
|
|
|
+ const prj_accounts = [];
|
|
|
+ for (let uidx = 0; uidx < USED_LIST.length; uidx++) {
|
|
|
+ const accIdx = PRJ_ACCOUNT_LIST.findIndex(function(item) {
|
|
|
+ return item.id === USED_LIST[uidx].uid;
|
|
|
+ });
|
|
|
+ if (accIdx === -1 || accIdx === undefined) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ const prjAccount = PRJ_ACCOUNT_LIST[accIdx];
|
|
|
+ let roleKey = prjAccount.role;
|
|
|
+ if (roleKey === '') {
|
|
|
+ roleKey = DFT_ROLE_NAME;
|
|
|
+ }
|
|
|
+ //push item
|
|
|
+ prj_accounts.push('<li class="add-sign-list-item"><a href="javascript:void(0)" onclick="rptSignatureHelper.createEsignatureByAccIdx(' + accIdx + ')" class="btn-link pull-right" title="添加" data-dismiss="modal"><i class="fa fa-plus"></i></a>' +
|
|
|
+ prjAccount.name + '-<small class="text-muted">' + roleKey + '</small></li>');
|
|
|
+ }
|
|
|
+ accDiv.append(prj_accounts.join(''));
|
|
|
+ },
|
|
|
createEsignatureByAccIdx: function (accIdx) {
|
|
|
rptSignatureHelper.createPreSelectedSignature(PRJ_ACCOUNT_LIST[accIdx], null);
|
|
|
},
|
|
@@ -131,6 +158,23 @@ let rptSignatureHelper = {
|
|
|
//.appendChild(pNode);
|
|
|
//*/
|
|
|
// 2.2 date-picker
|
|
|
+
|
|
|
+ // 更新最近使用名单
|
|
|
+ const params = {};
|
|
|
+ params.uid = userAcc.id;
|
|
|
+ params.prj_id = PROJECT_ID;
|
|
|
+ params.tender_id = TENDER_ID;
|
|
|
+ CommonAjax.postXsrfEx("/tender/report_api/updateSignatureUsed", params, 10000, true, getCookie('csrfToken'),
|
|
|
+ function(result){
|
|
|
+ console.log(result);
|
|
|
+ USED_LIST = result.data;
|
|
|
+ rptSignatureHelper.buildSelectableAccountUsed();
|
|
|
+ }, function(err){
|
|
|
+ // hintBox.unWaitBox();
|
|
|
+ }, function(ex){
|
|
|
+ // hintBox.unWaitBox();
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
cleanOldSignature: function (signature_name) {
|