Browse Source

导出再导入单位问题

zhongzewei 6 years ago
parent
commit
a5eef6dc6b

+ 1 - 1
modules/main/controllers/bills_controller.js

@@ -332,7 +332,7 @@ function parseToCompleteBills(excelBills, fixedBills, stdData){
     function matchStdBill(excelBill, stdData){
         let isMatch = false;
         let regExp = /^\d{12}$/g;
-        if(regExp.test(excelBill.code)){
+        if(excelBill.code.length >8){
             let nineCode = excelBill.code.substr(0, 9);
             for(let stdBill of stdData.stdBills){
                 //set programID

+ 2 - 2
web/building_saas/main/js/views/importBills.js

@@ -387,8 +387,8 @@ const importBills = (function(){
                     jobContentText: '',
                     jobContent: [],
                     programID: null,
-                    unit: rData[colMapping.unit] && rData[colMapping.unit]['value'] ? rData[colMapping.unit]['value'] : '',
-                    quantity: rData[colMapping.quantity] && rData[colMapping.quantity]['value'] ? rData[colMapping.quantity]['value'] : '',
+                    unit: rData[colMapping.unit] && rData[colMapping.unit]['value'] ? _deESC(rData[colMapping.unit]['value']) : '',
+                    quantity: rData[colMapping.quantity] && rData[colMapping.quantity]['value'] ? _deESC(rData[colMapping.quantity]['value']) : '',
                     //安全文明
                     flags: flag === fixedFlag.CONSTRUCTION_ORGANIZATION && (rData[colMapping.name] && (rData[colMapping.name]['value'] === '安全文明施工专项费用' || rData[colMapping.name]['value'] === '安全文明施工费')) ?
                         [{fieldName: 'fixed', flag: fixedFlag.SAFETY_CONSTRUCTION}] : [],

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

@@ -254,7 +254,7 @@ $("#use-to-all").click(function() {
 
 function saveAddRule(){
     let setting = getAddRuleSetting();
-    let toUpdate = false;
+    let toUpdate = false;//
     if(!projectObj.project.property.addRule){
         toUpdate = true;
     }