ENDRPrint_12CRelease/.svn/pristine/d0/d0da560fe508bd4a63ce3c70eda43eb36e2c1347.svn-base

46 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-08-14 10:58:03 +07:00
// create the controller and inject Angular's $scope
scotchApp.controller('mainWFController',
// create a message to display in our view
function($scope,$window ,$location ,$templateCache,mainPostFactory,commonService) {
//alert("mainController");
init();
function init() {
$scope.policyNo = '';
$scope.documentType = '';
}
$scope.doCallProcess = function() {
// alert("");
// alert($scope.policyNo);
try{
var actLoadData = $.ajax(doGetPath('/callProcessWFMT.json'),
{
ajax: true,
dataType: 'json',
type: "POST",
data:{
policyNoParam : $scope.policyNo,
documentTypeParam : $scope.documentType
}
}).error(
function (data) {
alert("Session Time Out!!!");
//$location.path("/");
$scope.$apply();
});
actLoadData.success(
function (data) {
$window.open(data[1]);
// $scope.$apply();
}
);
}catch(e){
$scope.$apply();
}
};
});