浏览代码

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/ConstructionCost

TonyKang 5 年之前
父节点
当前提交
3d082da6d9

+ 2 - 0
config/gulpConfig.js

@@ -32,6 +32,7 @@ module.exports = {
     ],
     login_jspaths:[
         'public/web/url_util.js',
+        'public/web/syntax-detection.js',
         'web/users/js/gt.js',
         'web/users/js/login.js'
     ],
@@ -40,6 +41,7 @@ module.exports = {
         'lib/jquery-contextmenu/jquery.contextMenu.css'
     ],
     pm_jspaths:[
+        'public/web/syntax-detection.js',
         'public/web/uuid.js',
         'public/web/date_util.js',
         'public/web/upload_cdn.js',

+ 1 - 0
modules/all_models/fee_rates.js

@@ -33,6 +33,7 @@ let ratesSchema = new Schema({
     ParentID: Number,
     name: String,
     rate: Number,
+    originalRate: Number,
     memo: String,
     subFeeRate:subFeeRatesSchema
 },{versionKey:false,_id: false});

+ 21 - 1
modules/common/base/base_model.js

@@ -6,6 +6,8 @@
  * @version
  */
 import MongooseHelper from "../helper/mongoose_helper";
+let mongoose = require('mongoose');
+let counterModel =  mongoose.model('counter');
 
 class BaseModel {
 
@@ -113,7 +115,25 @@ class BaseModel {
 
         return result;
     }
-
+    
+    async setIDfromCounter(name,list,map,keyfield){
+      let update = {$inc: {sequence_value: list.length}};
+      let condition = {_id: name};
+      let options = {new: true};
+    
+      // 先查找更新
+      let counter = await counterModel.findOneAndUpdate(condition, update, options);
+      let firstID = counter.sequence_value - (list.length - 1);
+      for(let a of list){
+          console.log(firstID)
+          a.id = firstID;
+          firstID+=1
+          if(map && keyfield){
+            let key = a[keyfield];
+            map[key]?map[key].push(a):map[key]=[a]
+          }
+      }
+    }
     /**
      * 更新数据
      *

+ 1 - 0
modules/fee_rates/facade/fee_rates_facade.js

@@ -295,6 +295,7 @@ async function newFeeRateFile(userId, updateData){
                 let newFeeRate = {};
                 newFeeRate.ID =uuidV1();
                 newFeeRate.rates=template.rates;
+                (newFeeRate.rates || []).forEach(item => item.originalRate = item.rate);
                 await feeRateModel.create(newFeeRate);
                 doc.libID = libID;
                 doc.libName = template.libName;

+ 4 - 0
modules/glj/facade/glj_facade.js

@@ -10,6 +10,7 @@ const mongoose = require('mongoose');
 const ProjectModel = require('../../pm/models/project_model').project;
 import UnitPriceFileModel from "../models/unit_price_file_model";
 import UnitPriceModel from "../models/unit_price_model";
+import MixRatioModel from "../models/mix_ratio_model";
 let evaluateListModel = mongoose.model("evaluate_list");
 let bidEvaluationMode = mongoose.model("bid_evaluation_list");
 let contractorListModel = mongoose.model("contractor_list");
@@ -65,6 +66,9 @@ async function changeUnitFile(projectData,unitFile,type,userID) {
                     copyList.push(n);
                 }
                 copyList.length>0 ? await unitPriceModel.add(copyList):'';
+                  //也要复制一份组成物信息和材料计算信息
+                  let mixRatioModel = new MixRatioModel();
+                  await mixRatioModel.copyNotExist(changeUnitPriceId, targetUnitPriceFile.id,{},true);//复制组成物
             }
         }
 

+ 1 - 1
modules/glj/models/glj_list_model.js

@@ -586,7 +586,7 @@ class GLJListModel extends BaseModel {
             }
             let basePrice = tmp.basePrice;
             //多单价、多组成物消耗量的情况 fromTable
-            if(ext && ext.priceField &&( tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
+            if(ext && ext.priceField &&(tmp.priceProperty && tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
                 basePrice = tmp.priceProperty[ext.priceField];
             }
             basePrice = scMathUtil.roundTo(basePrice,-6);

+ 9 - 11
modules/glj/models/mix_ratio_model.js

@@ -50,14 +50,15 @@ class MixRatioModel extends BaseModel {
     async add(data) {
         let counterModel = new CounterModel();
         if (data instanceof Array) {
-            for(let tmp in data) {
+          await this.setIDfromCounter(collectionName,data);
+            /* for(let tmp in data) {
                 data[tmp].id = await counterModel.getId(collectionName);
-            }
+            } */
         } else {
             data.id = await counterModel.getId(collectionName);
         }
 
-        return this.db.model.create(data);
+        return await this.db.model.create(data);
     }
 
     /**
@@ -79,23 +80,20 @@ class MixRatioModel extends BaseModel {
     }
 
     //复制组成物到切换后的组成物映射表
-    async copyNotExist(currentUnitPriceId, changeUnitPriceId,gljMap){
+    async copyNotExist(currentUnitPriceId, changeUnitPriceId,gljMap,newFile = false){
         let currentMap = {},targetMap = {}, insertData = [];
         //取原单价文件所有的的组成物
-        let currentList = await  this.db.find({'unit_price_file_id':currentUnitPriceId});
-        // 过滤mongoose格式
-        currentList = JSON.stringify(currentList);
-        currentList = JSON.parse(currentList);
+        let currentList = await  this.model.find({'unit_price_file_id':currentUnitPriceId}).lean();;
         this.getConnectionMap(currentMap,currentList);
 
         //切换后的单价文件所有的的组成物
-        let targetList = await this.db.find({'unit_price_file_id':changeUnitPriceId});
+        let targetList = await this.model.find({'unit_price_file_id':changeUnitPriceId}).lean();
         this.getConnectionMap(targetMap,targetList);
         for(let ckey in currentMap){
             if(targetMap[ckey]){//如果切换后的单价文件已经存在,则不用复
                 continue;
             }
-            if(gljMap[ckey]){//在本项目中有用到
+            if(gljMap[ckey] || newFile == true){//在本项目中有用到
                 for(let ratio of  currentMap[ckey]){
                     delete ratio._id;  // 删除原有id信息
                     delete ratio.id;
@@ -104,7 +102,7 @@ class MixRatioModel extends BaseModel {
                 }
             }
         }
-        return insertData.length > 0 ? this.add(insertData) : true;
+        return insertData.length > 0 ? await this.add(insertData) : true;
     }
     getConnectionMap(map,list){
         for(let l of list){

+ 5 - 6
modules/glj/models/unit_price_model.js

@@ -158,9 +158,10 @@ class UnitPriceModel extends BaseModel {
         let counterModel = new CounterModel();
         if (data instanceof Array) {
             // 如果是批量新增
-            for(let tmp in data) {
+            await this.setIDfromCounter(collectionName,data);
+            /* for(let tmp in data) {
                 data[tmp].id = await counterModel.getId(collectionName);
-            }
+            } */
         } else {
             data.id = await counterModel.getId(collectionName);
         }
@@ -392,13 +393,11 @@ class UnitPriceModel extends BaseModel {
     async copyNotExist(currentUnitPriceId, changeUnitPriceId,projectId) {
         let result = false;
         // 首先查找原单价文件id下的数据
-        let currentUnitList = await this.findDataByCondition({unit_price_file_id: currentUnitPriceId}, null, false);
+        let currentUnitList = await this.model.find({unit_price_file_id: currentUnitPriceId}).lean();
         if (currentUnitList === null) {
             return result;
         }
-        // 过滤mongoose格式
-        currentUnitList = JSON.stringify(currentUnitList);
-        currentUnitList = JSON.parse(currentUnitList);
+      
 
         let gljList = await gljListModel.find({'project_id':projectId});
         let gljMap = {};//用来记录glj的映射表,本项目有使用的工料机才需要copy过去

+ 3 - 2
modules/main/facade/ration_facade.js

@@ -860,8 +860,9 @@ function getProjectGLJNewData(tmp,projectId,ext){
       market_price: tmp.basePrice,
       from:tmp.from?tmp.from:"std"
   };
-  if(gljData.from == 'std' && ext && ext.priceField &&( tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
-    basePrice = scMathUtil.roundTo(tmp.priceProperty[ext.priceField],-6);
+  // 现在定额库可以引用其他费用定额的,比如广东可能套用部颁的定额,因此就算广东费用定额是多单价的,也可能会引用单个单价的人材机
+  if(gljData.from == 'std' && ext && ext.priceField &&( tmp.priceProperty && tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
+    const basePrice = scMathUtil.roundTo(tmp.priceProperty[ext.priceField],-6);
     gljData.base_price = basePrice;
     gljData.market_price = basePrice;
   }

+ 10 - 0
modules/pm/controllers/pm_controller.js

@@ -610,6 +610,16 @@ module.exports = {
     getInitialShareData: async function (req, res) {
         try {
             const { count, projectID } = JSON.parse(req.body.data);
+            // 分享文件夹、建设项目,仅提供给专业版用户
+            const proShareProjType = [projType.folder, projType.project];
+            const project = await projectModel.findOne({ ID: projectID }, 'projType');
+            if (project && proShareProjType.indexOf(project.projType) >= 0) {
+                const isFree = userModelObj.isFreeFromSession(req.session.compilationVersion);
+                if (isFree) {
+                    callback(req, res, 0, 'success', { isFree });
+                    return;
+                }
+            }
             const userID = req.session.sessionUser.id;
             // 最近分享
             const recentUsers = await pm_facade.getRecentShareList(userID, count);

+ 1 - 0
modules/pm/facade/pm_facade.js

@@ -2424,6 +2424,7 @@ async function importProjects(data,req,updateData) {
             if (tenderOverrun) {
                 result.error = 1;
                 result.msg = `您创建的项目个数超限,请联系我们的客服人员,或者导出建设项目保存到本地备份,删除云上数据。`;
+                return result;
             }
             let [constructionProjectID,projectIDMap,labourCoeFileIDMap,calcProgramFileIDMap] = await handleMainProjectDatas(mainData,updateData,req.session.sessionUser.id);
             result.constructionProjectID = constructionProjectID;

+ 1 - 1
modules/unit_price_file/facade/unit_price_facade.js

@@ -46,7 +46,7 @@ function getProjectGLJNewData(tmp,projectId,ext){
       market_price: tmp.basePrice,
       from:tmp.from?tmp.from:"std"
   };
-  if(gljData.from == 'std' && ext && ext.priceField &&( tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
+  if(gljData.from == 'std' && ext && ext.priceField &&(tmp.priceProperty && tmp.priceProperty[ext.priceField]!= undefined && tmp.priceProperty[ext.priceField]!=null)){
     basePrice = scMathUtil.roundTo(tmp.priceProperty[ext.priceField],-6);
     gljData.base_price = basePrice;
     gljData.market_price = basePrice;

+ 11 - 0
modules/users/controllers/user_controller.js

@@ -384,6 +384,17 @@ class UserController extends BaseController {
         }
     }
 
+    async isFree(req, res) {
+        try {
+            const sessionVersion = req.session.compilationVersion;
+            const userModel = new UserModel();
+            const isFree = userModel.isFreeFromSession(sessionVersion);
+            res.json({ error: 0, msg: 'success', data: { isFree } });
+        } catch (err) {
+            res.json({ error: 1, msg: String(err), data: null });
+        }
+    }
+
     // /**
     //  * 是否时免费版用户
     //  */

+ 12 - 0
modules/users/models/user_model.js

@@ -366,6 +366,18 @@ class UserModel extends BaseModel {
         return free
     }
 
+    /**
+     * 从session中判断用户是否是免费版
+     * @param {String} sessionVersion
+     * @return {Boolean} 
+     */
+    isFreeFromSession(sessionVersion) {
+        if (!sessionVersion) {
+            return true;
+        }
+        return sessionVersion.indexOf('免费') >= 0;
+    }
+
     /*
     * 添加联系人,互相添加
     */

+ 1 - 0
modules/users/routes/user_route.js

@@ -22,6 +22,7 @@ module.exports = function (app) {
     router.post('/info', userController.init, userController.saveData);
     router.post('/getUserByMobile', userController.init, userController.getUserByMobile);
     router.post('/getUsers', userController.init, userController.getUsers);
+    router.post('/isFree', userController.init, userController.isFree);
 
     router.post('/getVersionInfo', userController.init, userController.getVersionInfo);
     router.post('/change/isSmsLogin', userController.init, userController.changeIsSmsLogin);

+ 11 - 0
public/scHintBox.html

@@ -176,6 +176,17 @@
         },
         unWaitBox: function () {
             $('#waitBox_form').modal('hide');
+        },
+        versionBox: function (caption) {
+            const title = '提示';
+            const btnType = hintBox.btnType.yesNo;
+            const doYes = () => {
+                $("#hintBox_form").modal('hide');
+                CommonHeader.getCategoryList();
+            };
+            const doNo = () => $("#hintBox_form").modal('hide');
+            const btnTextArr = ['联系客服', '关闭'];
+            this.infoBox(title, caption, btnType, doYes, doNo, btnTextArr);
         }
     };
 

+ 186 - 0
public/web/syntax-detection.js

@@ -0,0 +1,186 @@
+/** 
+ * 浏览器兼容性,特性检查
+ * 参考列表: http://kangax.github.io/compat-table/es6/
+ * 同内核的不同的浏览器需要处理,比如qq浏览器登陆成功后,ie浏览器登陆页面会自动跳转到项目管理页面。因此项目管理页面也需要检测
+*/
+function checkSyntax() {
+    'use strict';
+    try {
+        // 一些在词法、语法分析阶段就会报错的代码,必须要用window.Function或者eval包裹,否则直接报错且无法被捕获
+        // 不使用eval的原因:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/eval
+        if (typeof window.Function === 'undefined') {
+            return false;
+        }
+
+        // 声明
+        Function('let a = 1;')();
+        Function('const b = 1;')();
+        Function('class A {}')();
+
+        // 模板字符串
+        Function('var a = 1; var str = `${a}`;')();
+
+        // 对象简单表示
+        Function("var foo = 'foo'; var simple = { foo, t() {} };")();
+
+        // 对象属性表示
+        Function("var attr = 'a'; var obj = {[attr]: 1}")();
+
+        // 对象super
+        Function('var proto = { p: 1 }; var obj = { superF() { return super.p } }; Object.setPrototypeOf(obj, proto)')();
+
+        // 对象getter setter
+        Function('var tObj = { get a() {}, set a(v) {} }')();
+
+        // 扩展运算符
+        Function('var obj = { foo: 1 }; var obj1 = { ...obj }; var arr = [1]; var arr1 = [...arr];')();
+
+        // 解构
+        Function('var obj = { foo: 1 }; var { foo } = obj; var arr = [1]; var [one] = arr;')();
+
+        // 可选链 ?. es2020
+        //Function('var obj = { a: { b: 1 } }; obj?.a?.b')();
+
+        // of迭代
+        Function('for (var i of [1]) {}')();
+
+        // 默认参数
+        Function('function defaultParams(a = 1) {}')();
+
+        // rest参数
+        Function('function restParams(...args) {}')();
+
+        // arrow function
+        Function('var arrowF = () => {};')();
+
+        // generator function
+        Function('function* gen() {}')();
+
+        // async function es2017
+        Function('async function tAsync() {}')();
+
+        // Symbol Promise Set Map Proxy Reflect
+        if (typeof Symbol === 'undefined' ||
+            typeof Promise === 'undefined' ||
+            typeof Set === 'undefined' ||
+            typeof Map === 'undefined' ||
+            typeof Proxy === 'undefined' ||
+            typeof Reflect === 'undefined') {
+            return false;
+        }
+        // buffer相关
+        if (typeof ArrayBuffer === 'undefined' ||
+            typeof Uint8Array === 'undefined' ||
+            typeof DataView === 'undefined') {
+            return false;
+        }
+
+        // 部分字符串方法
+        var stringPrototypeFuncs = [
+            'includes',
+            'codePointAt',
+            'normalize',
+            'repeat',
+            //'matchAll', es2020
+            'padStart',
+            'padEnd',
+            //'trimStart', es2019
+            //'trimEnd'
+        ];
+        var stringStaticFuncs = [
+            'fromCodePoint',
+            'raw'
+        ];
+        for (var i = 0; i < stringPrototypeFuncs.length; i++) {
+            var f = stringPrototypeFuncs[i];
+            if (!String.prototype[f]) {
+                throw new SyntaxError('String.prototype ' + f);
+            }
+        }
+        for (var i = 0; i < stringStaticFuncs.length; i++) {
+            var f = stringStaticFuncs[i];
+            if (!String[f]) {
+                throw new SyntaxError('String ' + f);
+            }
+        }
+
+        // 部分数组方法
+        var arrayPrototypeFuncs = [
+            'find',
+            'findIndex',
+            'fill',
+            'keys',
+            'values',
+            'entries',
+            //'flat', // es2019
+            //'flatMap',
+            'includes'
+        ];
+        var arrayStaticFuncs = [
+            'from',
+            'of'
+        ];
+        for (var i = 0; i < arrayPrototypeFuncs.length; i++) {
+            var f = arrayPrototypeFuncs[i];
+            if (!Array.prototype[f]) {
+                throw new SyntaxError('Array.prototyp ' + f);
+            }
+        }
+        for (var i = 0; i < arrayStaticFuncs.length; i++) {
+            var f = arrayStaticFuncs[i];
+            if (!Array[f]) {
+                throw new SyntaxError('Array ' + f);
+            }
+        }
+
+        // 对象部分方法
+        var objectStaticFuncs = [
+            'is',
+            'assign',
+            'getOwnPropertyDescriptors',
+            'setPrototypeOf',
+            'values',
+            'entries',
+            //'fromEntries' // es2020
+        ];
+        for (var i = 0; i < objectStaticFuncs.length; i++) {
+            var f = objectStaticFuncs[i];
+            if (!Object[f]) {
+                throw new SyntaxError('Object ' + f);
+            }
+        }
+
+    } catch (err) {
+        console.log(err);
+        return false;
+    }
+    return true;
+}
+
+function showBrowserTip() {
+    var html = '<div class="modal fade" id="browser" data-backdrop="static">' +
+        '<div class="modal-dialog modal-lg" role="document">' +
+        '<div class="modal-content">' +
+            '<div class="modal-body">' +
+                '<h5>浏览器版本过低,可能会有安全风险;</h5>' +
+                '<h5>请更新 「浏览器」 或者 使用 「纵横Z+造价工作平台」 登录。</h5>' +
+                '<div class="row my-4">' +
+                    '<div class="col-6">' +
+                        '<div class="text-center"><a href="https://www.microsoft.com/zh-cn/edge" class="btn btn-primary" target="_blank">下载 Microsoft Edge</a></div>' +
+                    '</div>' +
+                    '<div class="col-6">' +
+                        '<div class="text-center"><a href="https://smartcost.com.cn/downloadzplus" class="btn btn-primary" target="_blank">下载 纵横Z+造价工作平台</a></div>' +
+                    '</div></div></div></div></div></div>';
+    $('body').append(html);
+    $('#browser').modal('show');
+}
+
+$(document).ready(function () {
+    // 浏览器兼容性
+    var isCompat = checkSyntax();
+    if (!isCompat) {
+        $('#inputEmail').blur();
+        showBrowserTip();
+        return false;
+    }
+});

+ 3 - 0
web/building_saas/css/custom.css

@@ -481,4 +481,7 @@ input.text-right{
 padding-top:6px;
 margin-left: 50px;
 margin-right: 100px !important;
+}
+.table-sc th{
+  font-weight: normal;
 }

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

@@ -149,6 +149,8 @@ var FeeRate = {
             CommonAjax.post('/feeRates/updateRates', data, function (result) {
                 _.forEach(items,function (t) {
                     feeRateObject.mainFeeRateSheet.setValue(t.rateIndex, 1, t.rate.rate);
+                    const foreColor = commonUtil.isDef(t.rate.originalRate) && t.rate.originalRate !== +t.rate.rate ? 'red' : 'black';
+                    feeRateObject.mainFeeRateSheet.getCell(t.rateIndex, 1).foreColor(foreColor);
                  });
                  me.onFeeRateFileChange();
                 $.bootstrapLoading.end();

+ 5 - 1
web/building_saas/main/js/views/fee_rate_view.js

@@ -178,6 +178,8 @@ var feeRateObject={
                     sheet.getCell(row, 0).cellType(treeType);
                     visibleMap[data[row].ID] = treeType.collapsed;
                     feeRateObject.setRowVisible(data,row,visibleMap,sheet);
+                } else if (col === 1 && commonUtil.isDef(data[row].originalRate) && data[row].originalRate !== +val) {
+                    sheet.getCell(row, col).foreColor('red');
                 }
             }
         }
@@ -630,7 +632,7 @@ var feeRateObject={
             }
             temData[fieldID] = value ;
             updateDatas.push({rateID:recode.ID,doc:temData});
-            refreshA.push({col:c.col,row:c.row,fieldID:fieldID,value:value,rateID:recode.ID});
+            refreshA.push({col:c.col,row:c.row,fieldID:fieldID,value:value,originalRate:recode.originalRate,rateID:recode.ID});
         }
         if(updateDatas.length > 0){
             $.bootstrapLoading.start();
@@ -639,6 +641,8 @@ var feeRateObject={
                 for(let r of refreshA){
                     me.mainFeeRateSheet.setValue(r.row, r.col, r.value);
                     if(r.fieldID == 'rate'){
+                        const foreColor = commonUtil.isDef(r.originalRate) && r.originalRate !== +r.value ? 'red' : 'black';
+                        me.mainFeeRateSheet.getCell(r.row, r.col).foreColor(foreColor);
                         feerateInfo.push({rateID:r.rateID,value:r.value});
                     }
                 }

+ 1 - 1
web/building_saas/main/js/views/quantity_edit_view.js

@@ -192,7 +192,7 @@ let quantityEditObj = {
     },
     updateQuantityEXP:function (value,quantityEXP,node) {
         let quantity_detail = projectObj.project.quantity_detail;
-        quantity_detail.cleanQuantityDetail(node,true);
+        if(node.data.hasOwnProperty('isFromDetail')&&node.data.isFromDetail==1) quantity_detail.cleanQuantityDetail(node,true);
         if(node.sourceType === ModuleNames.bills){
             quantity_detail.updateBillQuantity(value,node,quantityEXP,quantityEXP);
         }else {

+ 4 - 3
web/building_saas/main/js/views/std_ration_lib.js

@@ -201,13 +201,12 @@ var rationLibObj = {
          */
         //@param {String}sectionName(章节名称) {Array}datas(定额数据)
         function simplifyName(sectionName, datas){
-            debugger;
             if (!sectionName || !datas || datas.length === 0) {
                 return;
             }
             //提取需要匹配的章节名称
             // 去掉后缀
-            const suffixReg = /[((]编码[::]\w+[))]/;
+            const suffixReg = /[((]编码[::][\w、]+[))]/;
             const tempName = sectionName.split(suffixReg)[0];
             // 获取第一个空格后的内容
             const sReg = /\s(.+)/;
@@ -227,7 +226,9 @@ var rationLibObj = {
                     continue;
                 }
                 let matchName = nameArr[0];
-                if (matchName === target) {
+                const matchNameWithoutSpace = matchName.replace(/\s/g, '');
+                const targetWithoutSpace = target.replace(/\s/g, '');
+                if (matchNameWithoutSpace === targetWithoutSpace) {
                     nameArr.shift();
                     data.name = nameArr.join(' ');
                 }

+ 13 - 4
web/building_saas/pm/html/project-management.html

@@ -141,16 +141,24 @@
 
 
                         <legend>单价文件</legend>
-                        <table class="table table-bordered table-hover table-sm" id="summary-project-unit-price-table">
-                            <thead><th style="width: 25px;"></th><th style="width: 330px;">名称</th><th style="width:40px;">使用</th></thead>
+                        <table class="table table-bordered table-hover table-sm table-sc" id="summary-project-unit-price-table">
+                            <thead>
+                                <th style="width: 25px;" class="text-center"></th>
+                                <th style="width: 330px;" class="text-center">名称</th>
+                                <th style="width: 55px;" class="text-center">使用</th>
+                            </thead>
                             <tbody>
                             </tbody>
                         </table>
 
 
                         <legend>费率文件</legend>
-                        <table class="table table-bordered table-hover table-sm" id="summary-project-fee-table">
-                            <thead><th style="width: 25px;"></th><th style="width: 330px;">名称</th><th style="width:40px;">使用</th></thead>
+                        <table class="table table-bordered table-hover table-sm table-sc" id="summary-project-fee-table">
+                            <thead>
+                                <th style="width: 25px;" class="text-center"></th>
+                                <th style="width: 330px;" class="text-center">名称</th>
+                                <th style="width: 55px;" class="text-center">使用</th>
+                            </thead>
                             <tbody>
                             </tbody>
                         </table>
@@ -922,6 +930,7 @@
     console.log(billValuation);
 </script>
 <!-- inject:js -->
+<script type="text/javascript" src="/public/web/syntax-detection.js"></script>
 <script src="/web/building_saas/js/global.js"></script>
 <script src="/public/web/uuid.js"></script>
 <script src="/public/web/date_util.js"></script>

+ 1 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -4538,7 +4538,7 @@ function set_file_table(target, poj_tenders, fileList, type){
             + '<span class="form-text text-danger" style="display: none">本建设项目已存在该文件名,请重新输入!' +
             '</span></td>';
         let fileTypeStr = type === fileType.unitPriceFile ? '单价文件' : '费率文件';
-        let fileHtml = '<tr><td>' + fileCounter + '</td><td id="file_' + fileId + '"><div>' + fileList[i].name + hoverHtml + renHtml + usedHtml + '</tr>';
+        let fileHtml = '<tr><td class="text-center">' + fileCounter + '</td><td id="file_' + fileId + '"><div>' + fileList[i].name + hoverHtml + renHtml + usedHtml + '</tr>';
         fileCounter++;
         let targetBody = type === fileType.unitPriceFile ? target + '-unit-price-table tbody' : target + '-fee-table tbody';
         $(targetBody).append(fileHtml);

+ 12 - 8
web/common/components/share/index.js

@@ -319,17 +319,21 @@ const SHARE_TO = (() => {
             $('#share-phone').val('');
             initSearchResultView();
             $('#share-hint').text('');
-            const { sharedUsers, recentUsers, contacts } = await getInitalData(projectID);
-            curSharedUsers = sharedUsers;
-            initSharedView(sharedUsers);
-            initRecentView(recentUsers);
-            initContactsView(contacts);
-            $.bootstrapLoading.end();
-            setTimeout(() => $('#sharePhone').focus(), 200);
-            $('#share').modal('show');
+            const { isFree, sharedUsers, recentUsers, contacts } = await getInitalData(projectID);
+            if (isFree) {
+                hintBox.versionBox('此功能仅在专业版中提供,免费公用版可选择单个分段进行分享。');
+            } else {
+                curSharedUsers = sharedUsers;
+                initSharedView(sharedUsers);
+                initRecentView(recentUsers);
+                initContactsView(contacts);
+                setTimeout(() => $('#share-phone').focus(), 200);
+                $('#share').modal('show');
+            }
         } catch (err) {
             console.log(err);
             alert(err);
+        } finally {
             $.bootstrapLoading.end();
         }
     }

+ 1 - 1
web/common/html/header.html

@@ -192,7 +192,7 @@
 </div>
 <!--激活产品 & 售后服务 & 联系客服-->
 <!--办事处客服列表-->
-<div class="modal fade z-index-3000" id="activ" data-backdrop="static" style="display: none;" aria-hidden="true">
+<div class="modal fade z-index-3000" id="activ" data-backdrop="static" style="display: none; overflow: auto;" aria-hidden="true">
     <div class="modal-dialog modal-lg" role="document">
         <div class="modal-content">
             <div class="modal-header">

+ 1 - 0
web/users/html/login.html

@@ -180,6 +180,7 @@
     <script src="/public/web/url_util.js"></script>
     <script src="/lib/popper/popper.min.js"></script>
     <script src="/lib/bootstrap/bootstrap.min.js"></script>
+    <script type="text/javascript" src="/public/web/syntax-detection.js"></script>
     <script src="/web/building_saas/js/global.js"></script>
     <script type="text/javascript" src="/web/users/js/gt.js"></script>
     <script type="text/javascript" src="/web/users/js/login.js"></script>