1 回答
TA贡献1799条经验 获得超8个赞
看了ngDialog api,加多一个preCloseCallback属性即可
$scope.openConfirmDialog = function (callback, closeCallback ,msg) {
$scope.dialog = {
msg: msg
};
ngDialog.openConfirm({
template: 'app/app_common/views/ngdialog.confirm.html',
plain: false,
showClose: true,
closeByDocument: true,
closeByEscape: true,
scope: $scope,
width: '20%',
controller: 'ngDialogCtrl',
preCloseCallback:closeCallback,
}).then(callback);
}
//修改导ERP类型
$scope.oldImpErpType = $scope.nextparam.emscaapportionh.imp_erp_type;
$scope.impErpTypeChange = function(){
var impErpTypeChangeFun = function () {
$scope.$emit("changeImpErpType");
};
var closeFun = function(){
$scope.nextparam.emscaapportionh.imp_erp_type = $scope.oldImpErpType;
}
$scope.openConfirmDialog(impErpTypeChangeFun, closeFun,'更改导ERP类型将会清空预提明细,是否继续?');
}
添加回答
举报