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();
            }
        ]);
    })