Prechádzať zdrojové kódy

费率融入Project 框架结构,提供费率查询。

Chenshilong 8 rokov pred
rodič
commit
4a1154c55f

+ 6 - 0
web/building_saas/fee_rates/fee_rate.js

@@ -186,3 +186,9 @@ function createSpreadView(canEdit) {
 }
 
 
+var feeRateObj = {
+    getFeeRate: function (){
+
+
+    }
+}

+ 2 - 0
web/building_saas/main/html/main.html

@@ -508,6 +508,7 @@
     <script type="text/javascript" src="/web/building_saas/main/js/models/bills.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/models/ration.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/models/glj.js"></script>
+    <script type="text/javascript" src="/web/building_saas/main/js/models/fee_rate.js"></script>
 
     <script type="text/javascript" src="/public/web/id_tree.js"></script>
     <script type="text/javascript" src="/web/building_saas/main/js/models/cache_tree.js"></script>
@@ -644,6 +645,7 @@
 
                 gljView.showDatas(project.GLJ.datas);
 //                alert('GLJDatas1:' + objTest(project.GLJ.datas[0]));
+//                project.FeeRate.getRate();
             }
             else {
 

+ 36 - 0
web/building_saas/main/js/models/fee_rate.js

@@ -0,0 +1,36 @@
+/**
+ * Created by CSL on 2017-06-20.
+ */
+//var ModuleNames = require('./main_consts.js');
+
+var FeeRate = {
+    createNew: function (project) {
+
+        function FeeRate(proj){
+            this.project = proj;
+            this.datas = null;
+            this.sourceType = ModuleNames.feeRate;
+            proj.registerModule(ModuleNames.feeRate, this);
+        };
+
+        FeeRate.prototype.loadData = function (datas) {
+            this.datas = datas;
+        };
+
+        FeeRate.prototype.getRate = function (fileID, rateID){
+
+            return 1.25;
+        }
+
+        var feeRate = new FeeRate(project);
+        return feeRate;
+    }
+};
+
+// for test
+/*
+var f = -1;
+var fr = FeeRate.createNew(null);
+f = fr.getRate();
+console.log(fr.sourceType);
+console.log(f);*/

+ 1 - 0
web/building_saas/main/js/models/main_consts.js

@@ -5,5 +5,6 @@ const ModuleNames = {
     bills: 'bills',
     ration: 'ration',
     GLJ: 'GLJ',
+    feeRate: 'feeRate',
     projectGLJ: 'projectGLJ'
 };

+ 1 - 0
web/building_saas/main/js/models/project.js

@@ -58,6 +58,7 @@ var PROJECT = {
             this.Bills = Bills.createNew(this);
             this.Ration = Ration.createNew(this);
             this.GLJ = GLJ.createNew(this);
+            this.FeeRate = FeeRate.createNew(this);
 
             this.masterField = {ration: 'billsItemID'};
         };