Ver código fonte

calculation kick start

TonyKang 8 anos atrás
pai
commit
2c1e740854

+ 3 - 0
modules/calculation/models/calculation_item.js

@@ -0,0 +1,3 @@
+/**
+ * Created by Tony on 2017/6/19.
+ */

+ 3 - 1
operation.js

@@ -120,4 +120,6 @@ app.use(function(err, req, res, next) {
     console.error(err.stack);
     res.status(500).send('500 Error');
 });
-app.listen(6080);
+app.listen(6080, function(){
+    console.log("server started!");
+});

+ 2 - 1
package.json

@@ -17,6 +17,7 @@
   },
   "dependencies": {
     "bluebird": "^3.5.0",
-    "jszip": "^3.1.3"
+    "jszip": "^3.1.3",
+    "pdfkit": "^0.8.2"
   }
 }

+ 18 - 0
public/web/calculation/calc_util.js

@@ -0,0 +1,18 @@
+/**
+ * Created by Tony on 2017/6/19.
+ */
+
+class calculation {
+    constructor(calcTpl) {
+        let me = this;
+        me.calcTpl = calcTpl;
+        me.hasCompiled = false;
+    };
+    compile(){
+        let me = this;
+        me.hasCompiled = false;
+        if (me.calcTpl && me.calcTpl.length > 0) {
+            //
+        }
+    }
+}