Browse Source

千分位相关

MaiXinRong 5 năm trước cách đây
mục cha
commit
fa587a34c9

+ 4 - 4
app/public/js/measure_compare.js

@@ -15,12 +15,12 @@ const billsSpreadSetting = {
         {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 230, formatter: '@'},
         {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
         {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
-        {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, formatter: '@'},
-        {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, formatter: '@'},
+        {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number', },
+        {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number', },
     ],
     extraCols: [
-        {title: '%s|数量', colSpan: '2|1', rowSpan: '1|1', field: 'gather_qty%s', hAlign: 2, width: 60, formatter: '@'},
-        {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'gather_tp%s', hAlign: 2, width: 60, formatter: '@'},
+        {title: '%s|数量', colSpan: '2|1', rowSpan: '1|1', field: 'gather_qty%s', hAlign: 2, width: 60, type: 'Number', },
+        {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'gather_tp%s', hAlign: 2, width: 60, type: 'Number', },
     ],
     emptyRows: 3,
     headRows: 2,

+ 1 - 0
app/public/js/se_bonus.js

@@ -120,6 +120,7 @@ $(document).ready(() => {
     const bonusSpread = SpreadJsObj.createNewSpread($('#bonus-spread')[0]);
     const bonusSheet = bonusSpread.getActiveSheet();
     spreadSetting.readOnly = readOnly;
+    if (thousandth) sjsSettingObj.setTpThousandthFormat(spreadSetting);
     SpreadJsObj.initSheet(bonusSheet, spreadSetting);
 
     $.subMenu({

+ 1 - 0
app/public/js/se_jgcl.js

@@ -55,6 +55,7 @@ $(document).ready(() => {
     };
     const jgclSpread = SpreadJsObj.createNewSpread($('#jgcl-spread')[0]);
     const jgclSheet = jgclSpread.getActiveSheet();
+    if (thousandth) sjsSettingObj.setTpThousandthFormat(spreadSetting);
     SpreadJsObj.initSheet(jgclSheet, spreadSetting);
     $.subMenu({
         menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',

+ 1 - 0
app/public/js/se_other.js

@@ -96,6 +96,7 @@ $(document).ready(() => {
 
     const otherSpread = SpreadJsObj.createNewSpread($('#other-spread')[0]);
     const otherSheet = otherSpread.getActiveSheet();
+    if (thousandth) sjsSettingObj.setTpThousandthFormat(spreadSetting);
     SpreadJsObj.initSheet(otherSheet, otherSpreadSetting);
 
     $.subMenu({

+ 5 - 5
app/public/js/stage_pay.js

@@ -109,13 +109,13 @@ $(document).ready(() => {
         cols: [
             {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: 'readOnly.name'},
             {title: '扣款', colSpan: '1', rowSpan: '1', field: 'minus', hAlign: 1, width: 50, cellType: 'checkbox', readOnly: 'readOnly.minus'},
-            {title: '本期金额(表达式)', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 120, readOnly: 'readOnly.tp', /*cellType: 'tip', getTip: function (data) {return data ? data.expr : '';}*/},
-            {title: '截止上期金额',  colSpan: '1', rowSpan: '1', field: 'pre_tp', hAlign: 2, width: 100, readOnly: true},
-            {title: '截止本期金额',  colSpan: '1', rowSpan: '1', field: 'end_tp', hAlign: 2, width: 100, readOnly: true},
-            {title: '起扣金额',  colSpan: '1', rowSpan: '1', field: 'sprice', hAlign: 2, width: 100, readOnly: 'readOnly.sprice', /*cellType: 'tip', getTip: function (data) {return data ? data.sexpr : '';}*/},
+            {title: '本期金额(表达式)', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 120, readOnly: 'readOnly.tp', type: 'Number', /*cellType: 'tip', getTip: function (data) {return data ? data.expr : '';}*/},
+            {title: '截止上期金额',  colSpan: '1', rowSpan: '1', field: 'pre_tp', hAlign: 2, width: 100, readOnly: true, type: 'Number',},
+            {title: '截止本期金额',  colSpan: '1', rowSpan: '1', field: 'end_tp', hAlign: 2, width: 100, readOnly: true, type: 'Number',},
+            {title: '起扣金额',  colSpan: '1', rowSpan: '1', field: 'sprice', hAlign: 2, width: 100, readOnly: 'readOnly.sprice', type: 'Number', /*cellType: 'tip', getTip: function (data) {return data ? data.sexpr : '';}*/},
             {
                 title: '付(扣)款限额',  colSpan: '1', rowSpan: '1', field: 'rprice', hAlign: 2, width: 100,
-                readOnly: 'readOnly.rprice', cellType: 'tip',
+                readOnly: 'readOnly.rprice', cellType: 'tip', type: 'Number',
                 getTip: function (data) {
                     if (data && (data.rexpr || data.rprice) && data.dl_type) {
                         if (data.dl_type === 1) {

+ 1 - 0
app/view/stage_extra/bonus.ejs

@@ -35,4 +35,5 @@
     const stageUserId = <%- ctx.stage.user_id %>;
     const readOnly = <%- ctx.stage.readOnly %>;
     const whiteList = JSON.parse('<%- JSON.stringify(ctx.app.config.multipart.whitelist) %>');
+    const thousandth = <%- ctx.tender.info.display.thousandth %>;
 </script>

+ 1 - 0
app/view/stage_extra/jgcl.ejs

@@ -37,4 +37,5 @@
     const stageId = <%- ctx.stage.id %>;
     const stageUserId = <%- ctx.stage.user_id %>;
     const readOnly = <%- ctx.stage.readOnly %>;
+    const thousandth = <%- ctx.tender.info.display.thousandth %>;
 </script>

+ 1 - 0
app/view/stage_extra/other.ejs

@@ -32,4 +32,5 @@
     const stageId = <%- ctx.stage.id %>;
     const stageUserId = <%- ctx.stage.user_id %>;
     const readOnly = <%- ctx.stage.readOnly %>;
+    const thousandth = <%- ctx.tender.info.display.thousandth %>;
 </script>

+ 4 - 4
app/view/tender/detail.ejs

@@ -214,7 +214,7 @@
                         return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
                     }
                     <% } else { %>
-                    formatter: '{value} 元'
+                    tooltip : {trigger: 'item',formatter: "{b}  <br/>{a}:{c}元"},
                     <% } %>
                 },
                 stack: '合同',
@@ -234,7 +234,7 @@
                         return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
                     }
                     <% } else { %>
-                    formatter: '{value} 元'
+                    tooltip : {trigger: 'item',formatter: "{b}  <br/>{a}:{c}元"},
                     <% } %>
                 },
                 stack: '变更',
@@ -254,7 +254,7 @@
                         return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
                     }
                     <% } else { %>
-                    formatter: '{value} 元'
+                    tooltip : {trigger: 'item',formatter: "{b}  <br/>{a}:{c}元"},
                     <% } %>
                 },
                 stack: '完成',
@@ -274,7 +274,7 @@
                         return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
                     }
                     <% } else { %>
-                    formatter: '{value} 元'
+                    tooltip : {trigger: 'item',formatter: "{b}  <br/>{a}:{c}元"},
                     <% } %>
                 },
                 stack: '完成',