فهرست منبع

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

vian 5 سال پیش
والد
کامیت
cbf975c8a1

+ 1 - 1
modules/pm/models/project_property_template.js

@@ -6,7 +6,7 @@
 const defaultDecimal = {
     bills: {unitPrice: 2, totalPrice: 0},
     ration: {quantity: 3, unitPrice: 2, totalPrice: 0},
-    glj: {quantity: 3, unitPriceHasMix: 2, unitPrice: 3},
+    glj: {quantity: 3, unitPriceHasMix: 2, unitPrice: 2},
     feeRate: 3,
     quantity_detail: 4,
     material:5,//三材系数

+ 5 - 5
modules/reports/rpt_component/helper/jpc_helper_field.js

@@ -71,11 +71,11 @@ let JpcFieldHelper = {
     },
     decorateValue: function (cell, controls) {
         if (controls) {
-            let val = cell[JV.PROP_VALUE];
-            let showZero = controls[cell[JV.PROP_CONTROL]][JV.PROP_SHOW_ZERO];
-            if (showZero && showZero === 'F' ) {
-                if (0.0 === 1.0 * (0 + val)) {
-                    cell[JV.PROP_VALUE] = "";
+            const showZero = controls[cell[JV.PROP_CONTROL]][JV.PROP_SHOW_ZERO];
+            if (showZero && showZero === 'F') {
+                const val = parseFloat(cell[JV.PROP_VALUE]);
+                if (val === 0) {
+                    cell[JV.PROP_VALUE] = '';
                 }
             }
         }

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

@@ -8,7 +8,7 @@ let defaultDecimal = {
     _def: {//editable: 开放给用户编辑的
         bills: {editable: true, data: {unitPrice: 2, totalPrice: 2}},
         ration: {editable: true, data: {quantity: 4, unitPrice: 2, totalPrice: 2}},
-        glj: {editable: true, data: {quantity: 4, unitPriceHasMix: 2, unitPrice: 3}},
+        glj: {editable: true, data: {quantity: 4, unitPriceHasMix: 2, unitPrice: 2}},
         material: {editable: false, data: 5},
         feeRate: {editable: true, data: 3},
         quantity_detail: {editable: false, data: 4},

+ 1 - 1
web/building_saas/report/js/rpt_jspdf.js

@@ -127,7 +127,7 @@ let JpcJsPDFHelper = {
         }
 
         function private_drawCellText(doc, ctx, cell, fonts, controls) {
-            if (cell[JV.PROP_VALUE]) {
+            if (cell[JV.PROP_VALUE] !== undefined && cell[JV.PROP_VALUE] !== null) {
                 let values = ("" + cell[JV.PROP_VALUE]).split('|');
                 // let font = fonts[cell[JV.PROP_FONT]];
                 let font = null;

+ 1 - 1
web/building_saas/report/js/rpt_print.js

@@ -189,7 +189,7 @@ function buildText(destRst, cell, font, control, offsetX, offsetY, adjustY, canv
         text_anchor = "start"
     ;
     let value = cell[JV.PROP_VALUE];
-    if (!(value)) {
+    if (value === undefined || value === null) {
         value = "";
     }
     let values = null;

+ 67 - 7
web/building_saas/standard_interface/export/anhui_chizhou.js

@@ -63,6 +63,66 @@ INTERFACE_EXPORT = (() => {
                 dt = 4;
             return dt;
         }
+
+        const valueMapArr = [
+          ['新建', '1'],
+          ['改扩建', '2'],
+          ['高速公路', '1'],
+          ['一级公路', '2'],
+          ['二级公路', '3'],
+          ['三级公路', '4'],
+          ['四级公路', '5'],
+          ['独立桥梁', '6'],
+          ['独立隧道', '7'],
+          ['一般计税', '1'],
+          ['简易计税', '2'],
+          ['清单', '1'],
+          ['招标控制价', '2'],
+          ['投标报价', '3'],
+          ['支票', '1'],
+          ['电汇', '2'],
+          ['银行汇票', '3'],
+          ['现金', '4'],
+          ['银行保函', '5'],
+          ['其他保函', '6'],
+          ['其他', '7']
+        ];
+
+        function valueMap(AValue){
+          let rst = AValue;
+          for (let i in valueMapArr) {
+            if (valueMapArr[i][0] == AValue){
+              rst = valueMapArr[i][1];
+              break;
+            }
+          }
+          return rst;
+        }
+
+      function getRCJLB(AType){   // 1=人工;2=材料;3=机械组成物;4=设备;5=混凝土/砂浆/配合比;6=机械台班
+          let rst = 2;
+          AType+="";
+          debugger;
+          if (AType == '1'){
+            rst = '1';
+          }
+          else if (['201', '205', '206', '207', '4'].includes(AType)){
+            rst = '2';
+          }
+          else if (['202', '203', '204'].includes(AType)){
+            rst = '5';
+          }
+          else if (['301'].includes(AType)){
+            rst = '6';
+          }
+          else if (['302', '303'].includes(AType)){
+            rst = '3';
+          }
+          else if (AType == '5'){
+            rst = '4';
+          };
+          return rst;
+      }
 // ------------------------------------------------------------------------------------------------------------
 
         function CreateNode(nodeName, attrArr = []) {
@@ -78,12 +138,13 @@ INTERFACE_EXPORT = (() => {
                 { name: '终点桩号', value: getValueByKey(info, 'endChainages') },
                 { name: '建设地址', value: getValueByKey(info, 'constructionAddress') },
                 { name: '项目概况', value: getValueByKey(info, 'projOverview') },
-                { name: '建设性质', value: getValueByKey(info, 'natureConstruction') },
-                { name: '专业划分', value: getValueByKey(info, 'roadGrade') },
+                { name: '建设性质', value: valueMap(getValueByKey(info, 'natureConstruction')) },
+                { name: '专业划分', value: valueMap(getValueByKey(info, 'roadGrade')) },
                 { name: '道路里程', value: getValueByKey(info, 'roadDistance') },
                 { name: '设计单位', value: getValueByKey(info, 'designUnit') },
-                { name: '计税方式', value: getValueByKey(info, 'taxMode') },
-                { name: '文件类型', value: getValueByKey(info, 'projType') },
+                { name: '计税方式', value: valueMap(getValueByKey(info, 'taxMode')) },
+                // { name: '文件类型', value: valueMap(getValueByKey(info, 'projType')) },
+                {name: '文件类型', value: isBidInvitation ? 1 : (isControl ? 2 : 3)},    // 1=工程量清单;2=招标控制价;3=投标报价;
                 { name: '标准版本号', value: '1.0' },
                 { name: 'GUID', value: projectData._id }
             ];
@@ -158,7 +219,7 @@ INTERFACE_EXPORT = (() => {
                 { name: '工期', value: getValueByKey(info, 'timeLimit') },
                 { name: '投标担保金额', value: getValueByKey(info, 'tenderGuaranteeAmount') },
                 { name: '质量承诺', value: getValueByKey(info, 'qualityCommitment') },
-                { name: '投标担保方式', value: getValueByKey(info, 'tenderGuaranteeMethod') },
+                { name: '投标担保方式', value: valueMap(getValueByKey(info, 'tenderGuaranteeMethod')) },
 
                 { name: '造价软件品牌', value: '纵横公路云造价' },
                 { name: '造价软件版本', value: "Ver" + VERSION },
@@ -318,7 +379,6 @@ INTERFACE_EXPORT = (() => {
             }
 
             for (let i = 0; i < vJRG.children.length; i++) {
-                debugger;
                 vKind = vJRG.children[i];
                 let attrs = [
                     { name: '序号', value: vKind.row() },
@@ -415,7 +475,7 @@ INTERFACE_EXPORT = (() => {
                     { name: '单位', value: pGLJ.unit },
                     { name: '数量', value: pGLJ.quantity },
                     { name: '单价', value: pGLJ.unit_price.market_price },
-                    { name: '人材机类别', value: pGLJ.type },
+                    { name: '人材机类别', value: getRCJLB(pGLJ.type) },
                     { name: '是否主要材料', value: pGLJ.is_main_material },   // , type: TYPE.BOOL
                     { name: '是否甲供', value: pGLJ.supply },
                     { name: '是否暂估', value: pGLJ.is_evaluate },

+ 1 - 1
web/over_write/js/nongcun_2020.js

@@ -122,7 +122,7 @@ if (typeof module !== 'undefined') {
     const defaultDecimal = {
         bills: { unitPrice: 2, totalPrice: 2 },
         ration: { quantity: 3, unitPrice: 2, totalPrice: 2 },
-        glj: { quantity: 3, unitPriceHasMix: 2, unitPrice: 3 },
+        glj: { quantity: 3, unitPriceHasMix: 2, unitPrice: 2 },
         feeRate: 3,
         quantity_detail: 4,
         material:5,