/** * Created by zhang on 2018/1/31. */ var installation_fee = { createNew: function (project) { // 用户定义private方法 var tools = {}; // 所有通过this访问的属性,都不应在此单元外部进行写入操作 var installation_fee = function (proj) { // this.project = proj; this.datas = []; var sourceType = ModuleNames.installation_fee; this.getSourceType = function () { return sourceType; } proj.registerModule(ModuleNames.installation_fee, this); }; // prototype用于定义public方法 installation_fee.prototype.loadData = function (datas) { this.datas = datas; }; // 提交数据后返回数据处理 installation_fee.prototype.doAfterUpdate = function(err, data){ }; return new installation_fee(project); } };