diff --git a/static/css/user/user.css b/static/css/user/user.css index e663f95..999c60e 100644 --- a/static/css/user/user.css +++ b/static/css/user/user.css @@ -58,11 +58,21 @@ cursor: pointer; } +.userTable table tr td .activitiStatus{ + color: #ffffff; + background-color: var(--color)!important; + display: inline-block; + padding: 0px 10px; + border-radius: 5px; + margin-left: 10px; + cursor: pointer; +} + .userTable table tr td{ padding: 18px 0px; } .userTable table tr td:nth-child(odd){ - width: 10%; + width: 12%; text-align: right; } @@ -294,4 +304,4 @@ textarea { color: #ffffff; margin: 0 auto; border-radius: 50px; -} \ No newline at end of file +} diff --git a/static/js/api/user.js b/static/js/api/user.js index 4c45ef4..5fd0a21 100644 --- a/static/js/api/user.js +++ b/static/js/api/user.js @@ -8,6 +8,12 @@ */ var userUpdate = '/transaction/member/edit' //修改用户信息类接口 +/* +@purl /activiti/process/listHistory +@param +*/ +var listHistory = '/activiti/process/listHistory' //审批历史查询 + /* @purl /getInfo @param diff --git a/static/js/common/tools.js b/static/js/common/tools.js index cf7e234..ca74b18 100644 --- a/static/js/common/tools.js +++ b/static/js/common/tools.js @@ -546,6 +546,48 @@ define(['jquery', 'dialog','jsencrypt'], function ($, dialog,JSEncrypt) { return encryptor.decrypt(txt) // 对数据进行解密 }, + format: function (time, format) { + var t = new Date(time); + var tf = function (i) { return (i < 10 ? '0' : '') + i }; + return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) { + switch (a) { + case 'yyyy': + return tf(t.getFullYear()); + break; + case 'MM': + return tf(t.getMonth() + 1); + break; + case 'mm': + return tf(t.getMinutes()); + break; + case 'dd': + return tf(t.getDate()); + break; + case 'HH': + return tf(t.getHours()); + break; + case 'ss': + return tf(t.getSeconds()); + break; + } + }) + }, + + /** + * 计算出相差天数 + * @param secondSub + */ + formatTotalDateSub: function (secondSub) { + var days = Math.floor(secondSub / (24 * 3600)); // 计算出小时数 + var leave1 = secondSub % (24*3600) ; // 计算天数后剩余的毫秒数 + var hours = Math.floor(leave1 / 3600); // 计算相差分钟数 + var leave2 = leave1 % (3600); // 计算小时数后剩余的毫秒数 + var minutes = Math.floor(leave2 / 60); // 计算相差秒数 + var leave3 = leave2 % 60; // 计算分钟数后剩余的毫秒数 + var seconds = Math.round(leave3); + return days + "天" + hours + "时" + minutes + "分" + seconds + '秒'; + } + }); return Tool; }); diff --git a/static/js/project/user/index.js b/static/js/project/user/index.js index 57e50f8..e1b06ea 100644 --- a/static/js/project/user/index.js +++ b/static/js/project/user/index.js @@ -273,7 +273,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", $("#bankType").html(bankTypeData); var bankAddressData = template('bankAddressData', module.data); $("#bankAddress").html(bankAddressData); - + document.getElementById('bankSubmitBtn').style.display = content.activitiStatus == '1'?'none':'block'; if(content.memberType == '1'){ document.getElementById('companyInformationContent').style.display = 'none'; document.getElementById('userInformationContent').style.display = 'block'; @@ -304,6 +304,8 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", tools.doGet(userConsulting, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.consulting); //我的竞价 tools.doGet(userBidding, {memberId:content.id,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.bidding); + + tools.doPost(listHistory, {processInstanceId:content.instanceId}, module.listHistory); //个人资料提交 $('#supplyAction').on('click', module.supplyAction) $('#releaseAction').on('click', module.releaseAction) @@ -315,6 +317,22 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", } } + module.listHistory = function(data){ + if (data.code == 200) { + var content = data.rows; + content.forEach((row) => { + row.startTime = tools.format(row.startTime, "yyyy-MM-dd HH:mm:ss"); + row.endTime = tools.format(row.endTime, "yyyy-MM-dd HH:mm:ss"); + row.durationInMillis = tools.formatTotalDateSub( + row.durationInMillis / 1000 + ); + }); + module.data.listHistory = content; + var listHistoryData = template('listHistoryData', module.data); + $("#listHistoryContent").html(listHistoryData); + } + } + module.showUserImage = function(data){ console.log(data) var accountOpenCert = data.accountOpenCert==null||data.accountOpenCert == ''?null:['/api'+data.accountOpenCert]; @@ -467,7 +485,9 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", submitInfo = function(type){ var upLoadList = []; var data = {}; + console.log(type) if(type == 'user'||type == 'company'){ + console.log(module.data.memberType) if(module.data.memberType == '1'){ $('#cupload-3').find('input').each(function() { if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){ @@ -490,18 +510,21 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", $('#cupload-5').find('input').each(function() { if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){ module.data.upType5 = true; + console.log('5') tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo5); } }) $('#cupload-6').find('input').each(function() { if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){ module.data.upType6 = true; + console.log('6') tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo6); } }) $('#cupload-7').find('input').each(function() { if($(this).val()!=''&&$(this).val().indexOf('/api') == -1){ module.data.upType7 = true; + console.log('7') tools.doPostImg(base64Upload, {file:$(this).val()}, module.upLoadOverInfo7); } }) @@ -735,7 +758,7 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", var companyTimeLimit = $('#companyTimeLimit').val(); var companySetupTime = $('#companySetupTime').val(); var companyCapital = $('#companyCapital').val(); - var companyLicense = $('#companyLicense').val(); + var companyLicense = module.data.companyLicense; var address = $('#address').val(); var accountOpenCert = module.data.khzm; var idCardPic = module.data.frzjz; @@ -1221,4 +1244,4 @@ define(['jquery', "template", "Tools", "user", "paging","cupload","kindeditor", } return module; -}); \ No newline at end of file +}); diff --git a/view/user/user.html b/view/user/user.html index 0ceff35..2753ab1 100644 --- a/view/user/user.html +++ b/view/user/user.html @@ -173,7 +173,13 @@