|
@@ -137,6 +137,9 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
let roleRel = null;
|
|
|
if (directAcc) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
rptSignatureHelper.pushDomElementByUser(elementsStrArr, userAcc.name, userAcc.role);
|
|
|
// 还有ROLE_REL_LIST
|
|
|
let roleRelObj = {};
|
|
@@ -150,7 +153,7 @@ let rptSignatureHelper = {
|
|
|
roleRelObj.type = '用户';
|
|
|
roleRelObj.sign_output = [NORMAL_SIGN_STR]; // 默认是签字(还有:COMPANY_SIGN_STR:单位章, PRIVATE_SIGN_STR:个人章)
|
|
|
roleRelObj.company_stamp_path = rptSignatureHelper._getCompanySign(directAcc.company);
|
|
|
- roleRelObj.private_stamp_path = (userAcc.stamp_path && userAcc.stamp_path !== '') ? userAcc.stamp_path : '';
|
|
|
+ roleRelObj.private_stamp_path = rptSignatureHelper._get_newPrivate_stamp_path(roleRelObj,userAcc);
|
|
|
roleRelObj.role = (userAcc.role === '')?DFT_ROLE_NAME:userAcc.role;
|
|
|
ROLE_REL_LIST.push(roleRelObj);
|
|
|
roleRel = roleRelObj;
|
|
@@ -168,7 +171,7 @@ let rptSignatureHelper = {
|
|
|
roleRelObj.acc_id = userAcc.id;
|
|
|
roleRelObj.sign_output = [NORMAL_SIGN_STR]; // 默认是签字(还有:COMPANY_SIGN_STR:单位章, PRIVATE_SIGN_STR:个人章)
|
|
|
roleRelObj.company_stamp_path = rptSignatureHelper._getCompanySign(userAcc.company);
|
|
|
- roleRelObj.private_stamp_path = (userAcc.stamp_path && userAcc.stamp_path !== '') ? userAcc.stamp_path : null;
|
|
|
+ roleRelObj.private_stamp_path = rptSignatureHelper._get_newPrivate_stamp_path(roleRelObj,userAcc);
|
|
|
roleRelObj.type = '角色';
|
|
|
roleRelObj.role = (userAcc.role === '')?DFT_ROLE_NAME:userAcc.role;
|
|
|
roleRelObj.role_name = roleAcc.name;
|
|
@@ -253,7 +256,7 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
const userAcc = rptSignatureHelper.getUserAccount(role_rel.acc_id);
|
|
|
if (userAcc) {
|
|
|
- role_rel.private_stamp_path = (userAcc.stamp_path && userAcc.stamp_path !== '') ? userAcc.stamp_path : '';
|
|
|
+ role_rel.private_stamp_path = rptSignatureHelper._get_newPrivate_stamp_path(role_rel,userAcc);
|
|
|
role_rel.company_stamp_path = rptSignatureHelper._getCompanySign(userAcc.company);
|
|
|
}
|
|
|
|
|
@@ -280,7 +283,8 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- checkAndShowCrossTendersESignature: function () {
|
|
|
+ checkAndShowCrossTendersESignature: function (fujianOssPath) {
|
|
|
+ rptSignatureHelper.fujianOssPath=fujianOssPath;
|
|
|
let btnDom = $('#btn_cross_tender')[0];
|
|
|
if (zTreeOprObj.currentNode) {
|
|
|
if (btnDom) btnDom.style.display = '';
|
|
@@ -312,7 +316,7 @@ let rptSignatureHelper = {
|
|
|
const companySignChkStr = (role_rel.sign_output.indexOf(COMPANY_SIGN_STR) >= 0) ? 'checked' : '';
|
|
|
const privateSignChkStr = (role_rel.sign_output.indexOf(PRIVATE_SIGN_STR) >= 0) ? 'checked' : '';
|
|
|
// 1. 签章类型:签字 单位章 个人章....
|
|
|
- elementsStrArr.push('<div class="col-6">');
|
|
|
+ elementsStrArr.push('<div class="col-8">');
|
|
|
elementsStrArr.push(' <div class="form-control form-control-sm d-inline pt-2">');
|
|
|
elementsStrArr.push(' <div class="form-check form-check-inline px-2">');
|
|
|
elementsStrArr.push(` <input class="form-check-input" type="checkbox" id="${idSuffixStr}_sign1" value="option1" ${normalSignChkStr} onchange="rptSignatureHelper._changeSignType(this, '${role_rel.signature_name}', '${NORMAL_SIGN_STR}')" >`);
|
|
@@ -322,6 +326,9 @@ let rptSignatureHelper = {
|
|
|
// let chkType = hasIndividualStamp ? `radio` : 'checkbox';
|
|
|
const chkType = 'checkbox';
|
|
|
let rdoNameStr = `dtp_${role_rel.signature_name}_${rptSignatureHelper.currentSelectedESignParentDivId}`;
|
|
|
+ // 个人章列表
|
|
|
+ const stampPathList=userAcc.stamp_path?userAcc.stamp_path.split('!;!'):[];
|
|
|
+
|
|
|
if (hasIndividualStamp) {
|
|
|
elementsStrArr.push(' <div class="form-check form-check-inline mx-1">');
|
|
|
elementsStrArr.push(' <div class="form-group">');
|
|
@@ -330,8 +337,11 @@ let rptSignatureHelper = {
|
|
|
elementsStrArr.push(` <label class="form-check-label" for="${idSuffixStr}_sign2">单位章</label>`);
|
|
|
elementsStrArr.push(' </div>');
|
|
|
elementsStrArr.push(' <div class="form-check form-check-inline">');
|
|
|
- elementsStrArr.push(` <input class="form-check-input" type="${chkType}" id="${idSuffixStr}_sign3" value="individualStamp" name="${rdoNameStr}" onchange="rptSignatureHelper._changeSignType(this, '${role_rel.signature_name}', '${PRIVATE_SIGN_STR}')" ${privateSignChkStr}>`);
|
|
|
+ elementsStrArr.push(` <input class="form-check-input" type="${chkType}" id="${idSuffixStr}_sign3" value="individualStamp" name="${rdoNameStr}" onchange="rptSignatureHelper._changeSignType(this, '${role_rel.signature_name}', '${PRIVATE_SIGN_STR}','${userAcc.stamp_path}')" ${privateSignChkStr}>`);
|
|
|
elementsStrArr.push(` <label class="form-check-label" for="${idSuffixStr}_sign3">个人章</label>`);
|
|
|
+ if(stampPathList.length>1){
|
|
|
+ elementsStrArr.push(` <a class="pl-2" href="#chose-private-stamp-path" data-toggle="modal" data-target="#chose-private-stamp-path" onclick="rptSignatureHelper.currentSelectedESignAccDom = this.parentNode;rptSignatureHelper.initChosePrivateStampPath('${userAcc.stamp_path}','${role_rel.signature_name}') ">选择个人章</a>`);
|
|
|
+ }
|
|
|
elementsStrArr.push(' </div>');
|
|
|
elementsStrArr.push(' </div>');
|
|
|
elementsStrArr.push(' </div>');
|
|
@@ -344,7 +354,7 @@ let rptSignatureHelper = {
|
|
|
elementsStrArr.push(' </div>');
|
|
|
elementsStrArr.push('</div>');
|
|
|
// 2. 日期
|
|
|
- elementsStrArr.push('<div class="col-6">');
|
|
|
+ elementsStrArr.push('<div class="col-4">');
|
|
|
let dftDate = '';
|
|
|
if (role_rel.sign_date !== '' && role_rel.sign_date.length > 20) {
|
|
|
dftDate = (new Date(role_rel.sign_date)).Format('yyyy-MM-dd');
|
|
@@ -861,13 +871,17 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- _changeSignType: function(dom, signature_name, chkStr) {
|
|
|
+ _changeSignType: function(dom, signature_name, chkStr, userStamp) {
|
|
|
for (const roleRel of ROLE_REL_LIST) {
|
|
|
if (roleRel.signature_name === signature_name) {
|
|
|
if (dom.checked) {
|
|
|
if (roleRel.sign_output.indexOf(chkStr) < 0) {
|
|
|
roleRel.sign_output.push(chkStr);
|
|
|
}
|
|
|
+ if(chkStr==='private_stamp'&&!roleRel.private_stamp_path && userStamp){
|
|
|
+ roleRel.private_stamp_path = userStamp.split('!;!')[0] ;
|
|
|
+ console.log(roleRel.private_stamp_path);
|
|
|
+ }
|
|
|
} else {
|
|
|
let idx = roleRel.sign_output.indexOf(chkStr);
|
|
|
if (idx >= 0) {
|
|
@@ -908,6 +922,53 @@ let rptSignatureHelper = {
|
|
|
targetCell.area.Right = pLeft + STD_STAMP_SIZE_WIDTH;
|
|
|
targetCell.area.Bottom = pTop + STD_STAMP_SIZE_HEIGHT;
|
|
|
},
|
|
|
+ initChosePrivateStampPath:function(stampPathList,signature_name){
|
|
|
+ let currentStamp='';
|
|
|
+ const targetNode= ROLE_REL_LIST.find(item=>item.signature_name===signature_name);
|
|
|
+ if(targetNode) currentStamp=targetNode.private_stamp_path
|
|
|
+ let content=`<div class='row justify-content-md-center'>`;
|
|
|
+ stampPathList.split('!;!').forEach(item=>{
|
|
|
+ content+=`<div class="card col-3 p-2 m-3 d-flex ${currentStamp===item?'card-gk-active':''} stamp-img">
|
|
|
+ <div class="p-0 private-stamp-img">
|
|
|
+ <div class="sel-width check-state ${currentStamp===item?'sel-blue':''} "></div>
|
|
|
+ <img src="${rptSignatureHelper.fujianOssPath}${item}" data-src='${item}' class="img-fluid" alt="...">
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
+ })
|
|
|
+
|
|
|
+ for(let i=0;i<stampPathList.length%3;i++){
|
|
|
+ content+=`<div class="col-3 p-2 m-3"></div>`;
|
|
|
+ }
|
|
|
+
|
|
|
+ content+=` </div><div class='privateStampRoleName' data-name='${signature_name}'></div>`;
|
|
|
+
|
|
|
+ $('#chose-private-stamp-path .modal-body').empty().append(content);
|
|
|
+ $('.stamp-img').on('click',(e)=>{
|
|
|
+ $('.stamp-img').removeClass('card-gk-active');
|
|
|
+ $('.stamp-img').find('.sel-width').removeClass('sel-blue');
|
|
|
+ $(e.currentTarget).addClass('card-gk-active');
|
|
|
+ $(e.currentTarget).find('.sel-width').addClass('sel-blue');
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setPrivateStamp(e){
|
|
|
+ const imgSrc= $('.stamp-img.card-gk-active').find('.img-fluid').data('src');
|
|
|
+ const privateStampRoleName=$('.privateStampRoleName').data('name');
|
|
|
+ const targetNode= ROLE_REL_LIST.find(item=>item.signature_name==privateStampRoleName);
|
|
|
+ targetNode.private_stamp_path=imgSrc;
|
|
|
+ $('#chose-private-stamp-path').modal('hide');
|
|
|
+ },
|
|
|
+ _get_newPrivate_stamp_path(roleRelObj,userAcc){
|
|
|
+ if(!roleRelObj.private_stamp_path){
|
|
|
+ if(!userAcc.stamp_path) return '';
|
|
|
+ if(userAcc.stamp_path.split('!;!').length===1){
|
|
|
+ return userAcc.stamp_path;
|
|
|
+ }else{
|
|
|
+ return userAcc.stamp_path.split('!;!')[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return roleRelObj.private_stamp_path;
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function _getSignDateByAllScenarios(userAccId) {
|
|
@@ -1176,3 +1237,5 @@ function getHttpBlobText(url) {
|
|
|
xhr.send();
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|