Merge branch 'agreement' of https://git.royalpay.com.au/git/royalv2.manage into agreement

master
wangning 7 years ago
commit 3f604e71ac

@ -115,10 +115,11 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
ag: ag
},
size: 'lg',
type:'info',
backdrop:'static',
keyboard:false
}).result.then(function () {
$scope.loadPartnerNotice();
// $scope.loadPartnerNotice();
})
};
@ -127,9 +128,27 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
// $scope.rate_expire = resp.data.rate_expire;
$scope.rate_waring = resp.data.rate_waring;
// $scope.file_url = resp.data.file_url;
if($scope.rate_waring){
$scope.showAG(resp.data);
if (resp.data.is_ordinary){
if($scope.rate_waring){
commonDialog.alert({
title: 'Contract expiration notice',
content: resp.data.contract_info,
size:'lg',
type:'info'
}).then(function () {
if (resp.data.rate_expire){
location.href = 'login.html'
}
})
}
}else {
if($scope.rate_waring){
$scope.showAG(resp.data);
}
}
});
};
$scope.getAgStatus();
@ -307,8 +326,9 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.agreeCheck = false;
$scope.agree = function () {
$http.post('/sys/partners/agree/confirm').then(function () {
}, function (resp) {
$scope.$close();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
};
$scope.notAgree = function () {
@ -548,6 +568,11 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
return roles.indexOf($rootScope.currentUser.role) >= 0;
}
}]);
app.filter("trustUrl", ['$sce', function ($sce) {
return function (recordingUrl) {
return $sce.trustAsResourceUrl(recordingUrl);
};
}]);
app.constant('uiDatetimePickerConfig', {
dateFormat: 'yyyy-MM-dd HH:mm',

@ -1,10 +1,12 @@
<div class="modal-header bg-green">
<h4 style="text-align: center">合同到期续签通知</h4>
<h5 style="text-align: center"><span style="color:lightgrey">({{ag.contract_info}})</span></h5>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<embed ng-src="{{ag.file_url}}" type="application/pdf" width="100%" height="500px">
<embed ng-src="{{ag.file_url|trustUrl}}" type="application/pdf" width="100%" height="500px">
</div>
</div>
</div>
@ -13,7 +15,7 @@
<label class="checkbox" style="float: left">
<input type="checkbox" ng-model="agreeCheck"> 我已阅读完合同内容,并同意相关条款
</label>
<button class="btn btn-success" type="button" ng-if="agreeCheck" ng-click="agree()">我同意 | I Agree</button>
<button class="btn btn-success" ng-disabled="!agreeCheck" type="button" ng-click="agree()">我同意 | I Agree</button>
<button ng-if="ag.rate_expire" class="btn btn-danger" type="button" ng-click="notAgree()">不同意,退出 | Login Out</button>
<button ng-if="!ag.rate_expire && ag.rate_waring" class="btn btn-danger" type="button" ng-click="$dismiss()">取消 | Cancel</button>
</div>

Loading…
Cancel
Save