zhangweicheng 6 年之前
父节点
当前提交
124cb9fc2f

+ 2 - 1
modules/all_models/bills_template_items.js

@@ -34,7 +34,8 @@ let BillsTemplateSchema = {
     //计算基数
     calcBase: String,
     //费率ID
-    feeRateID:Number
+    feeRateID:Number,
+    quantity: String,
 };
 
 mongoose.model(collectionName, new Schema(BillsTemplateSchema, {versionKey: false, collection: collectionName}));

+ 1 - 1
modules/pm/models/templates/bills_template_model.js

@@ -39,7 +39,7 @@ class BillsTemplateModel extends BaseModel {
      */
     async getTemplateDataForNewProj (libID) {
         // 筛选字段
-        let field = {_id: 0, ID: 1, ParentID: 1, NextSiblingID: 1, code: 1, name: 1, unit: 1, flags: 1,type:1, calcBase: 1,feeRateID:1};
+        let field = {_id: 0, ID: 1, ParentID: 1, NextSiblingID: 1, code: 1, name: 1, unit: 1, flags: 1,type:1, calcBase: 1,feeRateID:1,quantity:1};
         let data = await this.findDataByCondition({libID: libID}, field, false);
 
         return data === null ? [] : data;

+ 29 - 0
public/web/common_ajax.js

@@ -133,6 +133,35 @@ $.ajaxSetup({
     }
 });
 
+
+
+async function ajaxPost(url, data) {
+    return new Promise(function (resolve, reject) {
+        $.ajax({
+            type:"POST",
+            url: url,
+            data: {'data': JSON.stringify(data)},
+            dataType: 'json',
+            cache: false,
+            timeout: 50000,
+            success: function(result){
+                if (result.error === 0) {
+                    resolve(result.data);
+                } else {
+                    alert('error: ' + result.message);
+                    reject(result.message);
+                }
+            },
+            error: function(jqXHR, textStatus, errorThrown){
+                ajaxErrorInfo(jqXHR, textStatus, errorThrown);
+                reject("请求错误");
+            }
+        });
+
+    });
+}
+
+
 /**
  * 在页面中任何嵌套层次的窗口中获取顶层窗口
  * @return 当前页面的顶层窗口对象

+ 1 - 1
public/web/tree_sheet/tree_sheet_helper.js

@@ -407,7 +407,7 @@ var TREE_SHEET_HELPER = {
             let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
             let dataField = setting.cols[hitinfo.col].data.field;
 
-            if(hitinfo.sheet.getCell(hitinfo.row,hitinfo.col).wordWrap()==true){
+            if(tag==''&&hitinfo.sheet.getCell(hitinfo.row,hitinfo.col).wordWrap()==true){//显示其它列的标记为空并且设置了自动换行
                 return;
             }
             if(dataField === 'itemCharacterText' || dataField === 'jobContentText' || dataField === 'adjustState'){

+ 14 - 1
web/building_saas/main/js/views/glj_col.js

@@ -91,4 +91,17 @@ let gljCol = {
         projectGljObject.mixRatioSetting = me.mixRatio_Setting;
     }
 
-};
+};
+/*
+$(function () {
+    $('#fullpath').click(function () {
+        checkfeeRate();
+
+    });
+
+})
+
+async function checkfeeRate() {
+    let result = await ajaxPost('/feeRates/checkFeeRateName', data = {name: '编辑工程量表达式', rootProjectID: 3163});
+    console.log(result);
+}*/