Browse Source

1. 样式调整
2. 重写单元格变更按钮

MaiXinRong 5 years ago
parent
commit
f03386f5c7

+ 269 - 63
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -389,11 +389,17 @@ const SpreadJsObj = {
             sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.image);
         }
         if (colSetting.cellType === 'imageBtn') {
-            if (!sheet.extendCellType.image) {
+            if (!sheet.extendCellType.imageBtn) {
                 sheet.extendCellType.imageBtn = this.CellType.getImageButtonCellType();
             }
             sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.imageBtn);
         }
+        if (colSetting.cellType === 'activeImageBtn') {
+            if (!sheet.extendCellType.activeImageBtn) {
+                sheet.extendCellType.activeImageBtn = this.CellType.getActiveImageButtonCellType();
+            }
+            sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.activeImageBtn);
+        }
         if (colSetting.cellType === 'tree') {
             if (!sheet.extendCellType.tree) {
                 sheet.extendCellType.tree = this.CellType.getTreeNodeCellType();
@@ -1177,7 +1183,7 @@ const SpreadJsObj = {
             AutoTipCellType.prototype = SpreadJsObj.CellType.getTipCellType();
             const proto = AutoTipCellType.prototype
             proto.showTip = function (hitinfo, text) {
-                return text && text !== '' && this.getTextDisplayWidth(hitinfo, text) > hitinfo.cellRect.width;
+                return text && text !== '' && this.getTextDisplayWidth(hitinfo, text) > hitinfo.cellRect.widthidth;
             };
 
             return new AutoTipCellType();
@@ -1377,10 +1383,6 @@ const SpreadJsObj = {
                     sheetArea: context.sheetArea
                 };
             };
-            /**
-             * 鼠标点击
-             * @param {Object} hitinfo - 见getHitInfo
-             */
             proto.processMouseEnter = function (hitinfo) {
                 const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
                 // Drawing Image
@@ -1393,15 +1395,49 @@ const SpreadJsObj = {
             proto.processMouseLeave = function (hitinfo) {
                 const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
                 // Drawing Image
-                if (col.hoverImg) {
-                    const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
-                    cell.tag(null);
-                    hitinfo.sheet.repaint(hitinfo.cellRect);
-                }
+                const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                cell.tag(null);
+                hitinfo.sheet.repaint(hitinfo.cellRect);
             };
+            // proto.processMouseDown = function (hitinfo) {
+            //     const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+            //     if (col.activeImg) {
+            //         const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+            //         cell.tag(active);
+            //         hitinfo.sheet.repaint(hitinfo.cellRect);
+            //     }
+            // };
+            // proto.processMouseUp = function (hitinfo) {
+            //     const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+            //     const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
+            //     const data = sortData ? sortData[hitinfo.row] : null;
+            //     if (col.showImage && Object.prototype.toString.apply(col.showImage) === "[object Function]") {
+            //         if (!col.showImage(data)) {
+            //             return;
+            //         }
+            //     }
+            //     const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
+            //     if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
+            //         imageClick(data);
+            //         const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+            //         cell.tag(null);
+            //         hitinfo.sheet.repaint(hitinfo.cellRect);
+            //     }
+            // };
+            /*
+             注释部分以进入鼠标进入图片,点击图片为基准更新图片,鼠标快速移动时,可能失效
+              */
             proto.processMouseDown = function (hitinfo) {
                 const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
-                if (col.activeImg) {
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
                     const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
                     cell.tag(active);
                     hitinfo.sheet.repaint(hitinfo.cellRect);
@@ -1409,73 +1445,243 @@ const SpreadJsObj = {
             };
             proto.processMouseUp = function (hitinfo) {
                 const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
-                const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
-                const data = sortData ? sortData[hitinfo.row] : null;
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+                    const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
+                    if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
+                        const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
+                        const data = sortData ? sortData[hitinfo.row] : null;
+                        imageClick(data);
+                        const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                        cell.tag(null);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                }
+            };
+            proto.processMouseMove = function (hitinfo) {
+                const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+                const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+                    if (cell.tag() !== hover) {
+                        cell.tag(hover);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                } else {
+                    if (cell.tag() === hover) {
+                        cell.tag(null);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                }
+            };
+            return new ImageCellType();
+        },
+        getActiveImageButtonCellType: function () {
+            let show = 1, hover = 2, active = 2;
+            const ImageCellType = function (){};
+            ImageCellType.prototype = new spreadNS.CellTypes.Text();
+            const proto = ImageCellType.prototype;
+            proto.getImage = function (sheet, iRow, iCol) {
+                const col = sheet.zh_setting.cols[iCol];
+                let imgSource = null;
+                const cell = sheet.getCell(iRow, iCol), tag = cell.tag();
+                if (tag === show) {
+                    imgSource = col.normalImg;
+                } else if (tag === active) {
+                    imgSource = col.activeImg ? col.activeImg : (col.hoverImg ? col.hoverImg : col.normalImg);
+                } else if (tag === hover) {
+                    imgSource = col.hoverImg ? col.hoverImg : col.normalImg;
+                }
+                if (imgSource && Object.prototype.toString.apply(imgSource) === "[object Function]") {
+                    const sortData = SpreadJsObj.getSortData(sheet);
+                    const data = sortData ? sortData[iRow] : null;
+                    return data ? imgSource(data) : null;
+                } else {
+                    return $(imgSource)[0] ? $(imgSource)[0] : null;
+                }
+
+            };
+            proto.paint = function (canvas, value, x, y, w, h, style, options) {
+                const col = options.sheet.zh_setting.cols[options.col];
+
+                const sortData = SpreadJsObj.getSortData(options.sheet);
+                const data = sortData ? sortData[options.row] : null;
+                let showImage = true;
                 if (col.showImage && Object.prototype.toString.apply(col.showImage) === "[object Function]") {
-                    if (!col.showImage(data)) {
-                        return;
+                    showImage = col.showImage(data);
+                }
+                const img = showImage ? this.getImage(options.sheet, options.row, options.col) : null;
+
+                const indent = col.indent ? col.indent : 10;
+                if (style.hAlign === spreadNS.HorizontalAlign.right) {
+                    if (img) {
+                        if (style.backColor) {
+                            canvas.save();
+                            canvas.fillStyle = style.backColor;
+                            canvas.fillRect(x + w - indent - img.width, y, img.width, h);
+                            canvas.restore();
+                        }
+                        canvas.drawImage(img, x + w - indent - img.width, y + (h - img.height) / 2);
+                        w = w - indent - img.width;
+                    }
+                    // Drawing Text
+                    spreadNS.CellTypes.Text.prototype.paint.apply(this, [canvas, value, x, y, w, h, style, options]);
+                } else {
+                    if (img) {
+                        if (style.backColor) {
+                            canvas.save();
+                            canvas.fillStyle = style.backColor;
+                            canvas.fillRect(x, y, indent + img.width, h);
+                            canvas.restore();
+                        }
+                        canvas.drawImage(img, x + 10, y + (h - img.height) / 2);
+                        if (style.hAlign !== spreadNS.HorizontalAlign.left) {
+                            style.hAlign = spreadNS.HorizontalAlign.left;
+                        }
+                        x = x + indent + img.width;
+                        w = w - indent - img.width;
                     }
+                    // Drawing Text
+                    spreadNS.CellTypes.Text.prototype.paint.apply(this, [canvas, value, x, y, w, h, style, options]);
                 }
-                const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
-                if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
-                    imageClick(data);
+
+            };
+            /**
+             * 获取点击信息
+             * @param {Number} x
+             * @param {Number} y
+             * @param {Object} cellStyle
+             * @param {Object} cellRect
+             * @param {Object} context
+             * @returns {{x: *, y: *, row: *, col: *|boolean|*[]|number|{}|UE.dom.dtd.col, cellStyle: *, cellRect: *, sheet: *|StyleSheet, sheetArea: *}}
+             */
+            proto.getHitInfo = function (x, y, cellStyle, cellRect, context) {
+                return {
+                    x: x,
+                    y: y,
+                    row: context.row,
+                    col: context.col,
+                    cellStyle: cellStyle,
+                    cellRect: cellRect,
+                    sheet: context.sheet,
+                    sheetArea: context.sheetArea
+                };
+            };
+            proto.processMouseEnter = function (hitinfo) {
+                const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+                // Drawing Image
+                if (col.normalImg) {
                     const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
-                    cell.tag(null);
+                    cell.tag(show);
                     hitinfo.sheet.repaint(hitinfo.cellRect);
                 }
             };
-            /*
-             注释部分以进入鼠标进入图片,点击图片为基准更新图片,鼠标快速移动时,可能失效
-              */
+            proto.processMouseLeave = function (hitinfo) {
+                const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                cell.tag(null);
+                hitinfo.sheet.repaint(hitinfo.cellRect);
+            };
             // proto.processMouseDown = function (hitinfo) {
-            //     const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
-            //     const halfX = img.width / 2, halfY = img.height / 2;
-            //     const centerX = hitinfo.cellRect.x + indent + halfX;
-            //     const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
-            //
-            //     if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+            //     const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+            //     if (col.activeImg) {
             //         const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
-            //         cell.tag(down);
+            //         cell.tag(active);
             //         hitinfo.sheet.repaint(hitinfo.cellRect);
             //     }
             // };
             // proto.processMouseUp = function (hitinfo) {
-            //     const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
-            //     const halfX = img.width / 2, halfY = img.height / 2;
-            //     const centerX = hitinfo.cellRect.x + indent + halfX;
-            //     const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
-            //
-            //     // 点击展开节点时,如果已加载子项,则展开,反之这加载子项,展开
-            //     if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
-            //         const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
-            //         if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
-            //             const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
-            //             const data = sortData ? sortData[hitinfo.row] : null;
-            //             imageClick(data);
-            //             const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
-            //             cell.tag(null);
-            //             hitinfo.sheet.repaint(hitinfo.cellRect);
+            //     const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+            //     const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
+            //     const data = sortData ? sortData[hitinfo.row] : null;
+            //     if (col.showImage && Object.prototype.toString.apply(col.showImage) === "[object Function]") {
+            //         if (!col.showImage(data)) {
+            //             return;
             //         }
             //     }
-            // };
-            // proto.processMouseMove = function (hitinfo) {
-            //     const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
-            //     const halfX = img.width / 2, halfY = img.height / 2;
-            //     const centerX = hitinfo.cellRect.x + indent + halfX;
-            //     const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
-            //     const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
-            //     if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
-            //         if (cell.tag() !== hover) {
-            //             cell.tag(hover);
-            //             hitinfo.sheet.repaint(hitinfo.cellRect);
-            //         }
-            //     } else {
-            //         if (cell.tag() === hover) {
-            //             cell.tag(null);
-            //             hitinfo.sheet.repaint(hitinfo.cellRect);
-            //         }
+            //     const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
+            //     if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
+            //         imageClick(data);
+            //         const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+            //         cell.tag(null);
+            //         hitinfo.sheet.repaint(hitinfo.cellRect);
             //     }
             // };
+            /*
+             注释部分以进入鼠标进入图片,点击图片为基准更新图片,鼠标快速移动时,可能失效
+              */
+            proto.processMouseDown = function (hitinfo) {
+                const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+                    const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                    cell.tag(active);
+                    hitinfo.sheet.repaint(hitinfo.cellRect);
+                }
+            };
+            proto.processMouseUp = function (hitinfo) {
+                const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+                    const imageClick = hitinfo.sheet.zh_setting ? hitinfo.sheet.zh_setting.imageClick : null;
+                    if (imageClick && Object.prototype.toString.apply(imageClick) === "[object Function]") {
+                        const sortData = SpreadJsObj.getSortData(hitinfo.sheet);
+                        const data = sortData ? sortData[hitinfo.row] : null;
+                        imageClick(data);
+                        const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                        cell.tag(hover);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                }
+            };
+            proto.processMouseMove = function (hitinfo) {
+                const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+                const img = this.getImage(hitinfo.sheet, hitinfo.row, hitinfo.col);
+                const halfX = img.width / 2, halfY = img.height / 2;
+                const indent = col.indent ? col.indent : 10;
+                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                    ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
+                    : hitinfo.cellRect.x + indent + halfX;
+                const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
+                const cell = hitinfo.sheet.getCell(hitinfo.row, hitinfo.col);
+                if (Math.abs(hitinfo.x - centerX) < halfX && Math.abs(hitinfo.y - centerY) < halfY) {
+                    if (cell.tag() !== hover) {
+                        cell.tag(hover);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                } else {
+                    if (cell.tag() === hover) {
+                        cell.tag(show);
+                        hitinfo.sheet.repaint(hitinfo.cellRect);
+                    }
+                }
+            };
             return new ImageCellType();
         },
         /**
@@ -1649,7 +1855,7 @@ const SpreadJsObj = {
         };
         const getAnalysisPasteHtml = function () {
             return SpreadJsObj.analysisPasteHtml(cHtml);
-        }
+        };
         return {
             setCopyData, getPasteData, clearData,
             setSheetFilterCopyData,

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

@@ -433,8 +433,8 @@ $(document).ready(() => {
     // 数量变更列,添加按钮
     const col = _.find(ledgerSpreadSetting.cols, {field: 'qc_qty'});
     col.readOnly = true;
-    col.cellType = 'imageBtn';
-    col.hoverImg = '#ellipsis-icon';
+    col.cellType = 'activeImageBtn';
+    col.normalImg = '#ellipsis-icon';
     col.indent = 5;
     col.showImage = function (data) {
         if (!data || (data.children && data.children.length > 0) || !(data.b_code && data.b_code !== '')) {
@@ -469,11 +469,11 @@ $(document).ready(() => {
     const spSpread = SpreadJsObj.createNewSpread($('#stage-pos')[0]);
     const spCol = _.find(posSpreadSetting.cols, {field: 'qc_qty'});
     spCol.readOnly = true;
-    spCol.cellType = 'imageBtn';
-    spCol.hoverImg = '#ellipsis-icon';
+    spCol.cellType = 'activeImageBtn';
+    spCol.normalImg = '#ellipsis-icon';
     spCol.indent = 5;
     spCol.showImage = function (data) {
-        return data;
+        return data !== undefined && data !== null;
     };
     posSpreadSetting.imageClick = function (data) {
         const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());

+ 2 - 2
app/view/ledger/explode.ejs

@@ -32,7 +32,7 @@
                     <a href="javascript:void(0)" id="paste" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="粘贴"><i class="fa fa-clipboard" aria-hidden="true"></i></a>
                 </div>
                 <div class="d-inline-block">
-                    <div class="input-group input-group-sm ml-2 mt-1">
+                    <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>
@@ -78,7 +78,7 @@
                             </li>
                             <li class="nav-item">
                                 <div class="d-inline-block">
-                                    <div class="input-group input-group-sm ml-2 mt-1">
+                                    <div class="input-group input-group-sm ml-2">
                                         <div class="input-group-prepend">
                                             <span class="input-group-text" id="basic-addon1">表达式</span>
                                         </div>

+ 2 - 2
app/view/revise/info.ejs

@@ -34,7 +34,7 @@
                     <a href="javascript: void(0);" id="paste" class="btn btn-sm" data-toggle="tooltip disabled" data-placement="bottom" title="" data-original-title="粘贴"><i class="fa fa-clipboard" aria-hidden="true"></i></a>
                 </div>
                 <div class="d-inline-block">
-                    <div class="input-group input-group-sm ml-2 mt-1">
+                    <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>
@@ -86,7 +86,7 @@
                             </li>
                             <li class="nav-item">
                                 <div class="d-inline-block">
-                                    <div class="input-group input-group-sm ml-2 mt-1">
+                                    <div class="input-group input-group-sm ml-2">
                                         <div class="input-group-prepend">
                                             <span class="input-group-text" id="basic-addon1">表达式</span>
                                         </div>

+ 1 - 1
app/view/stage/deal.ejs

@@ -12,7 +12,7 @@
                     <a href="#" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-unlock" aria-hidden="true"></i> 解锁</a>
                 </div>
                 <div class="d-inline-block">
-                    <div class="input-group input-group-sm ml-2 mt-1">
+                    <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>

+ 2 - 2
app/view/stage/index.ejs

@@ -25,7 +25,7 @@
                     <button href="#row-view" class="btn btn-sm btn-light" data-toggle="modal" data-target="#row-view"><i class="fa fa-table"></i> 列显示</button>
                 </div>
                 <div class="d-inline-block">
-                    <div class="input-group input-group-sm mt-2">
+                    <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>
@@ -86,7 +86,7 @@
 
                             <li class="nav-item">
                                 <div class="d-inline-block">
-                                    <div class="input-group input-group-sm ml-2 mt-1">
+                                    <div class="input-group input-group-sm ml-2">
                                         <div class="input-group-prepend">
                                             <span class="input-group-text" id="basic-addon1">表达式</span>
                                         </div>

+ 1 - 1
app/view/stage/pay.ejs

@@ -11,7 +11,7 @@
                     <a href="javascript: void(0);" id="up-move" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                 </div>
                 <div class="d-inline-block">
-                    <div class="input-group input-group-sm ml-2 mt-1">
+                    <div class="input-group input-group-sm ml-2">
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>

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

@@ -22,8 +22,8 @@
     <div class="content-wrap">
         <div class="c-body">
             <!--金额概况-->
-            <div class="row mb-5">
-                <div class="col-auto">
+            <div class="row mx-1 mb-3">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.total_price) %></h5>
@@ -31,7 +31,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-auto">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.gather_tp) %></h5>
@@ -39,7 +39,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-auto">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.end_qc_tp) %><small class="text-danger"  data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占合同比例"><%- tender.qc_ratio %>%</small></h5>
@@ -47,7 +47,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-auto">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.end_gather_tp) %></h5>
@@ -55,7 +55,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-auto">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.pre_gather_tp) %></h5>
@@ -63,7 +63,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-auto">
+                <div class="col-auto p-0">
                     <div class="card text-center">
                         <div class="card-body">
                             <h5 class="card-title"><%- ctx.helper.formatMoney(tender.yf_tp) %></h5>
@@ -73,7 +73,7 @@
                 </div>
             </div>
             <!--进度条-->
-            <div class="mb-5">
+            <div class="mb-3">
                 <div class="progress">
                     <% if (tender.pre_ratio > 0) { %>
                     <div class="progress-bar bg-success" style="width: <%- tender.pre_ratio %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期累计完成:¥<%- ctx.helper.formatMoney(tender.end_gather_tp) %>"><%- tender.pre_ratio %>%</div>