lxy-kit/tpl/front/editCtrlTpl.js
2019-03-13 16:03:59 +08:00

36 lines
1.6 KiB
JavaScript

define(["app", "constant", "config", "yCommon","bootbox","common_tools", "dir_datepicker", "dir_paging", "yService", "dir_table_column_config", "tools_factory","dir_select","dir_file_upload"],
function(app, constant, config, yCommon, bootbox, commonTools) {
app.register.controller('#(fileDir)EditCtrl', ["$scope", "rootMap", "$state", "yService", "toolsFactory","$stateParams","$sce",
function($scope, rootMap, $state, yService, toolsFactory,$stateParams,$sce) {
yService.initService("/#(beanL)");
yCommon.initScope($scope, $sce,rootMap,{},yService);
$scope.model = {};
//页面加载
function pageInit() {
$scope.title="#(remark)编辑";
if($stateParams.params){
if($stateParams.params.row){
var row = angular.copy($stateParams.params.row);
#for(x : fieldList)
#if(x.edit == "1" && x.tag == "INPUT_DT")
row["#(x.field)"] = $scope.funs.dt(row["#(x.field)"]);
#end
#end
$scope.model = row;
$scope.title="#(remark)修改";
}
}
}
$scope.getSelection = function($event,id){
$scope.model.platformId = id;
toolsFactory.closeDialog();
};
pageInit();
}
]);
})