Преглед изворни кода

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

TonyKang пре 3 година
родитељ
комит
bbb66b17f8
4 измењених фајлова са 11 додато и 4 уклоњено
  1. 2 1
      app/service/change_apply.js
  2. 3 1
      app/service/change_project.js
  3. 2 2
      app/view/tender/detail.ejs
  4. 4 0
      sql/update.sql

+ 2 - 1
app/service/change_apply.js

@@ -150,7 +150,8 @@ module.exports = app => {
             }
             if (sortBy && orderBy) {
                 if (sortBy === 'code') {
-                    sql += ' ORDER BY CHAR_LENGTH(a.code) ' + orderBy + ',convert(a.code using gbk) ' + orderBy;
+                    // sql += ' ORDER BY CHAR_LENGTH(a.code) ' + orderBy + ',convert(a.code using gbk) ' + orderBy;
+                    sql += ' ORDER BY convert(a.code using gbk) ' + orderBy;
                 } else {
                     sql += ' ORDER BY a.in_time ' + orderBy;
                 }

+ 3 - 1
app/service/change_project.js

@@ -155,7 +155,8 @@ module.exports = app => {
             }
             if (sortBy && orderBy) {
                 if (sortBy === 'code') {
-                    sql += ' ORDER BY CHAR_LENGTH(a.code) ' + orderBy + ',convert(a.code using gbk) ' + orderBy;
+                    // sql += ' ORDER BY CHAR_LENGTH(a.code) ' + orderBy + ',convert(a.code using gbk) ' + orderBy;
+                    sql += ' ORDER BY convert(a.code using gbk) ' + orderBy;
                 } else {
                     sql += ' ORDER BY a.in_time ' + orderBy;
                 }
@@ -168,6 +169,7 @@ module.exports = app => {
                 const limitString = offset >= 0 ? offset + ',' + limit : limit;
                 sql += ' LIMIT ' + limitString;
             }
+            console.log(sql, sqlParam);
             const list = await this.db.query(sql, sqlParam);
             return list;
         }

+ 2 - 2
app/view/tender/detail.ejs

@@ -628,7 +628,7 @@
         calculable : true,
         legend: {
             itemWidth:15,
-            data:['本期合同计量','本期数量变更计量','截至上期累计完成','本期完成计量','完成度']
+            data:['本期合同计量','本期数量变更计量','截止上期完成','本期完成计量','完成度']
         },
         dataZoom: [
             {show: true, start: 0, end: 100,height:10,bottom:30}
@@ -724,7 +724,7 @@
                 ]
             },
             {
-                name:'截至上期累计完成',
+                name:'截止上期完成',
                 type:'bar',
                 tooltip : {
                     trigger: 'item',

+ 4 - 0
sql/update.sql

@@ -319,3 +319,7 @@ CREATE TABLE `zh_change_project_audit`  (
 
 UPDATE `zh_ledger_revise` SET bills_file = replace(bills_file, '/revise', 'revise') WHERE not ISNULL(bills_file);
 UPDATE `zh_ledger_revise` SET pos_file = replace(pos_file, '/revise', 'revise') WHERE not ISNULL(pos_file);
+
+ALTER TABLE `zh_material_checklist` CHANGE `unit_price` `unit_price` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '单价';
+ALTER TABLE `zh_material_checklist` CHANGE `quantity` `quantity` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '数量(工程量)';
+ALTER TABLE `zh_material_checklist` CHANGE `total_price` `total_price` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '金额';