浏览代码

多单价中定额库编辑器计算全部

zhongzewei 7 年之前
父节点
当前提交
7e58280c4c

+ 3 - 0
modules/ration_repository/controllers/ration_repository_controller.js

@@ -266,6 +266,9 @@ class RationRepositoryController extends baseController {
             let stdGLJList = {};
             let stdGLJListByID = {};
             for (const tmp of stdGLJData) {
+                if (tmp.priceProperty && tmp.priceProperty.price1) {
+                    tmp.basePrice = tmp.priceProperty.price1;
+                }
                 stdGLJList[tmp.code.toString()] = tmp.ID;
                 stdGLJListByID[tmp.ID] = tmp;
             }

+ 4 - 0
web/maintain/billsGuidance_lib/js/billsGuidance.js

@@ -879,6 +879,8 @@ const billsGuidance = (function () {
             }
         });
     }
+    //编辑后自动去除换行符回车符
+    const deESC = /[\r, \n]/g;
     //项目指引编辑
     //@param {Object}sheet {Array}cells
     function edit(sheet, cells){
@@ -888,6 +890,8 @@ const billsGuidance = (function () {
         for(let cell of cells){
             let text = sheet.getValue(cell.row, cell.col);
             text = text ? text : '';
+            text = text.replace(deESC, '');
+            sheet.setValue(cell.row, cell.col, text);
             let node = bills.tree.selected.guidance.tree.items[cell.row];
             if(node.data.name != text){
                 syncDatas.push({node: node, text: text});