ptgrid.js 我在ptgrid.js文件中编写了deleteQuote()函数。另一个保存写在screen.js中 问题:我无法在screen.js
上获得更新操作function deleteQuote(data, rootscope, scope){
var parentScope =
(angular.element('#Quote_Search').size() != 0)
? angular.element('#Quote_Search').scope().$parent
: angular.element('#Quote_Search_Advanced').scope().$parent;
var screenScope =
(angular.element('#Quote_Search').size() != 0)
? angular.element('#Quote_Search').scope()
: angular.element('#Quote_Search_Advanced').scope();
parentScope.actionName = "Delete";
if (confirm("Are you sure you want to delete this quote?")){
data.REQUESTCODE = 'QUTPROCSDELRq';
data.BC_KEY_LOCATION_COMPANY = data.BCLOCATION;
data.BC_KEY_MASTER_COMPANY = data.BCMASTER0CO;
data.BC_KEY_POLICY_NUMBER = data.BCPOLICY0NUM;
data.BC_KEY_MODULE = data.BCMODULE;
data.BC_KEY_SYMBOL = data.BCSYMBOL;
data.BC_AGENT_NUMBER = data.BCAGENCY;
data.PROC_REQ_TYPE = "DL";
if(screenScope.data.SYMBOL != undefined && screenScope.data.SYMBOL != ""){
data.SYMBOL = parentScope.SYMBOL = screenScope.data.SYMBOL;
}
if(screenScope.data.POLICY0NUM != undefined && screenScope.data.POLICY0NUM != ""){
data.POLICY0NUM = parentScope.POLICY0NUM = screenScope.data.POLICY0NUM;
}
if(screenScope.data.MODULE != undefined && screenScope.data.MODULE != ""){
data.MODULE = parentScope.MODULE = screenScope.data.MODULE;
}
if(screenScope.data.LASTNAME != undefined && screenScope.data.LASTNAME != ""){
data.LASTNAME = parentScope.LASTNAME = screenScope.data.LASTNAME;
}
if(screenScope.data.FIRSTNAME != undefined && screenScope.data.FIRSTNAME != ""){
data.FIRSTNAME = parentScope.FIRSTNAME = screenScope.data.FIRSTNAME;
}
if(screenScope.data.SSN != undefined && screenScope.data.SSN != ""){
data.SSN = parentScope.SSN = screenScope.data.SSN;
}
if(screenScope.data.CUST0NO != undefined && screenScope.data.CUST0NO != ""){
data.CUST0NO = parentScope.CUST0NO = screenScope.data.CUST0NO;
}
parentScope.data=data;
parentScope.save(parentScope.data);
}
}
Screen.js
$scope.save = function (method) {
if($scope.currentScreenId){
var data=angular.element("#"+$scope.currentScreenId).scope().data;
angular.extend($scope.data,data);
}
ScopeData.set($scope.data);
//$rootScope.data.method = method;
if($scope.actionName != "Search"){
return save($browser, $location, $rootScope, $scope, Data, MetaData, ViewState, SupportData, $routeParams, ScopeData);
}
};