fix 签名样式

master
luoyang 5 years ago
parent 0d09e5f1dc
commit 67318a4be1

@ -166,7 +166,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
client.putAll(clientConfigService.find(client_id)); client.putAll(clientConfigService.find(client_id));
client = clientInfoWithNoSecretInfo(client); client = clientInfoWithNoSecretInfo(client);
client.put("client_less_file", false); client.put("client_less_file", false);
if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) && client.getIntValue("source")!=4) { if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") ==1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id")); List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id"));
if (clientFiles != null && clientFiles.size() > 0) { if (clientFiles != null && clientFiles.size() > 0) {
clientFiles = clientFiles.stream().filter(fileJson -> ((fileJson.getIntValue("status") == 1 || fileJson.getIntValue("status") == 2))).collect(Collectors.toList()); clientFiles = clientFiles.stream().filter(fileJson -> ((fileJson.getIntValue("status") == 1 || fileJson.getIntValue("status") == 2))).collect(Collectors.toList());
@ -644,7 +644,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("client_less_file", false); result.put("client_less_file", false);
result.put("put_fail_pdf", "https://file.royalpay.com.au/open/2019/08/27/1566872114763_cdUNdrVcQUoPEzTpdbJ4gkGhO3BstJ.pdf"); result.put("put_fail_pdf", "https://file.royalpay.com.au/open/2019/08/27/1566872114763_cdUNdrVcQUoPEzTpdbJ4gkGhO3BstJ.pdf");
if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) && client.getIntValue("source")!=4) { if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") == 1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id")); List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id"));
boolean clientFilesIsLess = false; boolean clientFilesIsLess = false;
for (int i = 0; i < FILE_KEYS.length; i++) { for (int i = 0; i < FILE_KEYS.length; i++) {
@ -709,7 +709,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
if (clientFilesIsLess) { if (clientFilesIsLess) {
JSONObject authFileCompliance = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id")); JSONObject authFileCompliance = clientComplianceCompanyMapper.findFileByClientId(client.getIntValue("client_id"));
if (authFileCompliance != null && StringUtils.isNotBlank(authFileCompliance.getString("description"))) { if (authFileCompliance != null && StringUtils.isNotBlank(authFileCompliance.getString("description"))) {
result.put("client_refuse_reason", "Refuse to reason/打回原因:" + authFileCompliance.getString("description")); result.put("client_refuse_reason", "Refuse reason/打回原因:" + authFileCompliance.getString("description"));
} }
} }
} }

@ -1027,8 +1027,10 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}]); }]);
app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state','$uibModal', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state,$uibModal, Upload) { app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', '$uibModal', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state, $uibModal, Upload) {
$scope.signInfo = {}; $scope.signInfo = {};
$scope.confirmBtn = false;
$scope.signItBtn = true;
$scope.aggregateFile = function () { $scope.aggregateFile = function () {
$http.get('/client/partner_info/aggregateFile/client_info').then(function (resp) { $http.get('/client/partner_info/aggregateFile/client_info').then(function (resp) {
@ -1047,66 +1049,77 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
$scope.goBottom = function () { $scope.goBottom = function () {
window.scrollTo(0, document.documentElement.scrollHeight - document.documentElement.clientHeight); window.scrollTo(0, document.documentElement.scrollHeight - document.documentElement.clientHeight);
$uibModal.open({
backdrop: false,
templateUrl: '/static/payment/partner/templates/agreement_signature_dialog.html',
controller: 'agreementSignDialogCtrl',
size: 'md'
}).result.then(function (result) {
$scope.confirmBtn = true;
$scope.signItBtn = false;
$scope.signInfo.fullName = result.fullName;
$scope.signInfo.src = result.src;
})
}; };
$scope.submitContract = function () { $scope.submitContract = function () {
$uibModal.open({ $uibModal.open({
backdrop:false, backdrop: false,
templateUrl: '/static/payment/partner/templates/confirmForSubmit.html', templateUrl: '/static/payment/partner/templates/confirmForSubmit.html',
controller:'submitContractCtrl', controller: 'submitContractCtrl',
size: 'md', size: 'md'
}).result.then(function (result) { }).result.then(function (result) {
if(result)
{
$scope.uploadSign(); $scope.uploadSign();
}
}) })
}; };
$scope.uploadSign = function () { $scope.uploadSign = function () {
var sign = $('#img1').attr('src'); if ($scope.signInfo.fullName == null || $scope.signInfo.fullName == "") {
$scope.signInfo.fullName = document.getElementById("full_name").value; commonDialog.alert({title: 'Commit Fail', content: 'Please confirm full name entered', type: 'error'});
return;
if ($scope.signInfo.fullName != null && $scope.signInfo.fullName != "" && sign != null && sign != "") { }
document.getElementById("waiting").src="static/css/img/loading_contract.gif" if ($scope.signInfo.src == null || $scope.signInfo.src == "") {
commonDialog.alert({title: 'Commit Fail', content: 'Please confirm signature', type: 'error'});
return;
}
document.getElementById("waiting").src = "static/css/img/loading_contract.gif";
$scope.gray(); $scope.gray();
var signFile = dataURLtoFile(sign, $scope.signInfo.fullName); var signFile = dataURLtoFile($scope.signInfo.src, $scope.signInfo.fullName);
$scope.logoProgress = {value: 0}; $scope.logoProgress = {value: 0};
Upload.upload({ Upload.upload({
url: '/client/partner_info/clientCompliance/' + $scope.aggregateFileInfo.client_moniker +'/commit_aggregate_file', url: '/client/partner_info/clientCompliance/' + $scope.aggregateFileInfo.client_moniker + '/commit_aggregate_file',
data: {file: signFile} data: {file: signFile}
}).then(function (resp) { }).then(function (resp) {
document.getElementById("waiting").src = ''; document.getElementById("waiting").src = '';
document.getElementById('loading').style.display="none"; document.getElementById('loading').style.display = "none";
document.getElementById('tip').style.display="none"; document.getElementById('tip').style.display = "none";
delete $scope.logoProgress; delete $scope.logoProgress;
$state.go('basic.compliance_to_perfect',{reload: true}); $state.go('basic.compliance_to_perfect', {reload: true});
window.open(resp.data.file_value,'_blank'); window.open(resp.data.file_value, '_blank');
}, function (resp) { }, function (resp) {
delete $scope.logoProgress; delete $scope.logoProgress;
document.getElementById("waiting").src = ''; document.getElementById("waiting").src = '';
document.getElementById('loading').style.display="none"; document.getElementById('loading').style.display = "none";
document.getElementById('tip').style.display="none"; document.getElementById('tip').style.display = "none";
commonDialog.alert({title: 'Commit Aggregate File Fail', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Commit Aggregate File Fail', content: resp.data.message, type: 'error'})
}, function (evt) { }, function (evt) {
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total); $scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
}) });
} else {
commonDialog.alert({title: 'Commit Fail', content: 'Please confirm signature and full name entered', type: 'error'});
}
}; };
$scope.gray=function(){ $scope.gray = function () {
$("#loading").css({ $("#loading").css({
"position":"absolute",    //绝对位置 "position": "absolute",    //绝对位置
"display":"block",    //让对象成为块级元素 "display": "block",    //让对象成为块级元素
"background-color":"gray",  //背景灰色 "background-color": "gray",  //背景灰色
"z-index":"9999",  //最上层显示 "z-index": "9999",  //最上层显示
"opacity":"0.5"  //背景透明度 "opacity": "0.5"  //背景透明度
}); });
document.getElementById('tip').style.display=""; document.getElementById('tip').style.display = "";
} }
function dataURLtoFile(dataurl, filename) {//将base64转换为文件 function dataURLtoFile(dataurl, filename) {//将base64转换为文件
@ -1783,14 +1796,23 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}]); }]);
app.controller('submitContractCtrl', ['$scope', '$http', function ($scope, $http) { app.controller('submitContractCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.choice= false; $scope.choice = false;
$scope.chooseYes = function () { $scope.chooseYes = function () {
$scope.choice= true; $scope.choice = true;
$scope.$close($scope.choice); $scope.$close($scope.choice);
}; };
}]); }]);
app.controller('agreementSignDialogCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.submitSign = function (fullName) {
var sign = $("#signature").jSignature('getData', 'image');
var signInfo = {};
signInfo.src = 'data:' + sign[0] + ',' + sign[1];
signInfo.fullName = fullName;
$scope.$close(signInfo);
};
}]);
return app; return app;
}); });

@ -0,0 +1,43 @@
<script src="static/lib/jSignature/jquery.js"></script>
<script src="static/lib/jSignature/jSignature.js"></script>
<style>
.dialog{
font-size: 17px;
}
</style>
<!--<div class="modal-header bg-green">-->
<!-- <h4 style="text-align: center">Sign</h4>-->
<!--</div>-->
<div class="modal-body">
<div class="row dialog">
<div class="container-fluid">
<div class="" style="overflow-x: auto;">
<span style="color:#f39c12">Please sign here</span>
<div id="signatureparent" class="sign">
<div id="signature" style="border:1px solid black;background-color: white; lineWidth:5; color: black "></div>
<div style="float:right">
</div>
</div>Please enter your full name here:
<input id="full_name" ng-model="fullName" style="height: 100%;width: 100%;font-size: 200%;"/>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" ng-click="submitSign(fullName);$dismiss()" type="button">Submit</button>
<button class="btn btn-warning" onclick="reset()" >Clear</button>
<button class="btn btn-danger" ng-click="$dismiss()" type="button">Cancel</button>
</div>
<script>
$(function() {
$("#signature").jSignature();
})
function reset() {
$("#signature").jSignature('reset');
}
</script>

@ -1,19 +1,19 @@
<style> <style>
*{ .dialog{
font-size: 17px; font-size: 17px;
} }
</style> </style>
<div class="modal-header bg-green"> <div class="modal-header bg-green">
<h4 style="text-align: center">Do you confirm the submission of the contract?</h4> <h4>Confirm</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row dialog">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<div class="col-xs-12"> <div class="col-xs-12">
<p class="form-control-static"> <p class="form-control-static">
The contract will take effect immediately after it is signed. Please confirm whether or not to sign the contract. Do you confirm the submission of the agreement?
</p> </p>
</div> </div>
</div> </div>

@ -1,6 +1,5 @@
<!-- required JS files --> <!-- required JS files -->
<script src="/static/lib/jSignature/jquery.js"></script>
<script src="/static/lib/jSignature/jSignature.js"></script>
<!-- optional plugins <!-- optional plugins
<script src="/static/lib/jSignature/jSignature.SignHere.js"></script>--> <script src="/static/lib/jSignature/jSignature.SignHere.js"></script>-->
@ -155,11 +154,6 @@
</p>--> </p>-->
</div> </div>
<div style="z-index: 9999; position: absolute ! important; right: 0%; bottom: 150px;">
<button class="btn btn-success" type="button" ng-click="submitContract()">Confirm signature</button>
</div>
<div id="back" style="z-index: 9999; position: fixed ! important; left: 0%;top: 40%;"> <div id="back" style="z-index: 9999; position: fixed ! important; left: 0%;top: 40%;">
<button class="btn-warning return-class" ui-sref="basic.compliance_to_perfect"><i class="fa fa-reply"></i> Return</button> <button class="btn-warning return-class" ui-sref="basic.compliance_to_perfect"><i class="fa fa-reply"></i> Return</button>
</div> </div>
@ -1160,9 +1154,7 @@
<p><strong><strong>Signature of Director/Secretary:</strong></strong></p> <p><strong><strong>Signature of Director/Secretary:</strong></strong></p>
</td> </td>
<td width="38%"> <td width="38%">
<p><img id="img2" ng-src="https://file.royalpay.com.au/open/2019/08/23/1566540856776_hjRNzXzTMDmQb3y6GT2pEJtVsh08Tc.png" oncontextmenu="return false;" onselectstart="return false;"></p> <p><img id="img2" ng-src="https://file.royalpay.com.au/open/2019/08/23/1566540856776_hjRNzXzTMDmQb3y6GT2pEJtVsh08Tc.png" oncontextmenu="return false;" onselectstart="return false;"></p>
</td> </td>
<td width="39%"> <td width="39%">
<p></p> <p></p>
@ -1217,10 +1209,14 @@
</tr> </tr>
<tr> <tr>
<td width="24%"> <td width="24%">
<p><strong><strong>Signature of Director/Secretary:</strong></strong></p> <p><strong><strong>Signature of Director/Secretary:</strong></strong>
</p>
<button class="btn btn-success" type="button" ng-click="goBottom()">
Sign It
</button>
</td> </td>
<td width="38%"> <td width="38%" ng-click="goBottom()" style="cursor: pointer;">
<img id="img1" ng-src="" oncontextmenu="return false;" onselectstart="return false;"/> <img ng-if="confirmBtn" id="img1" ng-src="{{signInfo.src}}" oncontextmenu="return false;" onselectstart="return false;"/>
</td> </td>
<td width="38%"> <td width="38%">
<p></p> <p></p>
@ -1229,10 +1225,10 @@
<tr> <tr>
<td> <td>
<p><strong><strong>Print Full Name:</strong></strong></p> <p><strong><strong>Print Full Name:</strong></strong></p>
<span style="color:#f39c12">Please enter your full name here</span> <span style="color:#f39c12"></span>
</td> </td>
<td> <td>
<strong><strong><input id="full_name" ng-bind="signInfo.fullName" style="border: none;overflow: hidden;height: 100%;width: 100%;font-size: 200%;"/></strong></strong> <strong><strong><span ng-bind="signInfo.fullName"></span></strong></strong>
</td> </td>
<td> <td>
<p></p> <p></p>
@ -1261,46 +1257,19 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> <div style="text-align: center;">
<button ng-if="!confirmBtn" class="btn btn-success" style="width: 80%;height: 50px;margin-top: 30px;font-size: 20px;margin-bottom: 80px" type="button" ng-click="submitContract()" disabled>Submit Agreement</button>
<button ng-if="confirmBtn"class="btn btn-success" style="width: 80%;height: 50px;margin-top: 30px;font-size: 20px;margin-bottom: 80px" type="button" ng-click="submitContract()">Submit Agreement</button>
</div>
</div>
</div>
<div class="row">
<div class="container-fluid">
<div class="card-boxs widget-box-two widget-two-custom" style="overflow-x: auto;">
<span style="color:#f39c12">Please sign here</span>
<div id="signatureparent" class="sign">
<div id="signature" style="border:1px solid black;background-color: white; lineWidth:5; color: black "></div>
<div style="float:right">
<button class="btn btn-warning" onclick="ok()">confirm</button>&nbsp;
<button class="btn btn-warning" onclick="reset()" >reset</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
<script>
$(function() {
$("#signature").jSignature();
})
function reset() {
$("#signature").jSignature('reset');
document.getElementById("img1").src='';
}
function ok() {
var sign = $("#signature").jSignature('getData','image');
document.getElementById("img1").src= 'data:'+sign[0]+','+sign[1];
}
</script>

@ -9,10 +9,10 @@
ng-class="{'has-error':partnerForm.client_moniker.$invalid && partnerForm.client_moniker.$dirty}"> ng-class="{'has-error':partnerForm.client_moniker.$invalid && partnerForm.client_moniker.$dirty}">
<label class="control-label col-sm-6" for="short-id-input">Refuse Reason</label> <label class="control-label col-sm-6" for="short-id-input">Refuse Reason</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input class="form-control text-uppercase" ng-model="partner.description" <textarea class="form-control text-uppercase" ng-model="partner.description"
type="text" type="text"
name="description" name="description"
id="short-id-input"> id="short-id-input"></textarea>
</div> </div>
</div> </div>
</form> </form>

Loading…
Cancel
Save