|
|
@ -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;
|
|
|
|
});
|
|
|
|
});
|
|
|
|