Jelajahi Sumber

标段属性,清单精度、合同参数,改为Spreadjs

MaiXinRong 6 tahun lalu
induk
melakukan
8217f51375
3 mengubah file dengan 256 tambahan dan 190 penghapusan
  1. 250 34
      app/public/js/tender.js
  2. 5 156
      app/view/tender/detail.ejs
  3. 1 0
      config/web.js

+ 250 - 34
app/public/js/tender.js

@@ -124,8 +124,6 @@ function roundPrice(obj) {
 function calculateC2() {
     const constract = _.toNumber($('#contract-price').val());
     const zanLie = _.toNumber($('#zan-lie-price').val());
-    //const iDecimal = getDealTpDecimal();
-    //$('#c-zl').val(ZhCalc.round(constract - zanLie, iDecimal));
     $('#c-zl').val(ZhCalc.minus(constract, zanLie));
 }
 // 根据小数位数,计算全部的合同参数
@@ -172,6 +170,244 @@ function checkNumberValid(obj) {
 }
 
 $(document).ready(function() {
+    // 清单精度
+    const precisionObj = (function () {
+        const spread = SpreadJsObj.createNewSpread($('#precision-spread')[0]);
+        spread.options.showVerticalScrollbar = false;
+        spread.options.showHorizontalScrollbar = false;
+        const sheet = spread.getActiveSheet();
+        SpreadJsObj.protectedSheet(sheet);
+        sheet.options.rowHeaderVisible = false;
+        sheet.options.colHeaderVisible = false;
+        SpreadJsObj.massOperationSheet(sheet, function () {
+            sheet.defaults.rowHeight = 28;
+            sheet.setColumnCount(3);
+            sheet.setRowCount(14);
+            sheet.setColumnWidth(0, 1);
+            sheet.setColumnWidth(1, 100);
+            sheet.setColumnWidth(2, 60);
+            sheet.setRowHeight(0, 1);
+            sheet.getRange(1, 1, 14, 1).vAlign(1).backColor('#e4e7ea').locked(true);
+            sheet.getRange(1, 2, 14, 1).vAlign(1).hAlign(2).locked(true);
+            sheet.setText(1, 1, 't');
+            sheet.setText(2, 1, 'km');
+            sheet.setText(3, 1, 'm');
+            sheet.setText(4, 1, 'm2');
+            sheet.setText(5, 1, 'm3');
+            sheet.setText(6, 1, 'kg');
+            sheet.setText(7, 1, '个');
+            sheet.setText(8, 1, '台');
+            sheet.setText(9, 1, '套');
+            sheet.setText(10, 1, '棵');
+            sheet.setText(11, 1, '组');
+            sheet.setText(12, 1, '系统');
+            sheet.setText(13, 1, '其他未列单位');
+            const lineBorder = new spreadNS.LineBorder('#6a696e', spreadNS.LineStyle.thin);
+            sheet.getRange(0, 0, 14, 3).setBorder(lineBorder, {all: true});
+            sheet.getRange(0, 0, 14, 3).formatter('@');
+            sheet.setSelection(1, 2, 1, 1);
+        });
+
+        spread.bind(spreadNS.Events.EditEnded, function (e, info) {
+            const value = _.toNumber(info.editingText);
+            if (_.isInteger(value)) {
+                toast('请输入0-6的整数', 'warning');
+                sheet.setText(info.row, info.col, '0');
+            } else if (value > 6) {
+                toast('请输入0-6的整数', 'warning');
+                sheet.setText(info.row, info.col, '6');
+            } else if (value < 0) {
+                toast('请输入0-6的整数', 'warning');
+                sheet.setText(info.row, info.col, '0');
+            }
+        });
+        SpreadJsObj.addDeleteBind(spread, function (sheet) {
+            const sel = sheet.getSelections()[0];
+            let calc = false;
+            if (sel) {
+                for (let iRow = sel.row, iRowLength = sel.row + sel.rowCount; iRow < iRowLength; iRow++) {
+                    if (iRow === 3) continue;
+                    for (let iCol = sel.col, iColLength = sel.col + sel.colCount; iCol < iColLength; iCol++) {
+                        if (iCol !== 2) continue;
+                        sheet.setText(iRow, iCol, '0');
+                        if (iRow === 1 || iRow === 2) calc = true;
+                    }
+                }
+            }
+            if (calc) calcHtjMinusZlj();
+        });
+        spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
+            let bHint = false;
+            for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
+                const curRow = info.cellRange.row + iRow;
+                for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
+                    const curCol = info.cellRange.col + iCol;
+                    const value = _.toNumber(info.sheet.getText(curRow, curCol));
+                    if (_.isNaN(value) || !_.isInteger(value)) {
+                        bHint = true;
+                        info.sheet.setText(curRow, curCol, '0');
+                    } else if (value > 6) {
+                        bHint = true;
+                        info.sheet.setText(curRow, curCol, '6');
+                    } else if (value < 0) {
+                        bHint = true;
+                        info.sheet.setText(curRow, curCol, '0');
+                    }
+
+                }
+            }
+            if (bHint) {
+                toast('请输入0-6的整数', 'warning');
+            }
+        });
+
+        function loadPrecisonProperty() {
+            $('#hint-3').hide();
+            sheet.setValue(1, 2, property.precision.t.value);
+            sheet.setValue(2, 2, property.precision.km.value);
+            sheet.setValue(3, 2, property.precision.m.value);
+            sheet.setValue(4, 2, property.precision.m2.value);
+            sheet.setValue(5, 2, property.precision.m3.value);
+            sheet.setValue(6, 2, property.precision.kg.value);
+            sheet.setValue(7, 2, property.precision.ge.value);
+            sheet.setValue(8, 2, property.precision.tai.value);
+            sheet.setValue(9, 2, property.precision.tao.value);
+            sheet.setValue(10, 2, property.precision.ke.value);
+            sheet.setValue(11, 2, property.precision.zu.value);
+            sheet.setValue(12, 2, property.precision.xitong.value);
+            sheet.setValue(13, 2, property.precision.other.value);
+        }
+        function setReadOnly(readOnly) {
+            sheet.getRange(1, 2, 14, 1).locked(readOnly);
+        }
+        function getNewPrecisionData() {
+            const precision = JSON.parse(JSON.stringify(property.precision));
+            precision.t.value = _.toNumber(sheet.getText(1, 2));
+            precision.km.value = _.toNumber(sheet.getText(2, 2));
+            precision.m.value = _.toNumber(sheet.getText(3, 2));
+            precision.m2.value = _.toNumber(sheet.getText(4, 2));
+            precision.m3.value = _.toNumber(sheet.getText(5, 2));
+            precision.kg.value = _.toNumber(sheet.getText(6, 2));
+            precision.ge.value = _.toNumber(sheet.getText(7, 2));
+            precision.tai.value = _.toNumber(sheet.getText(8, 2));
+            precision.tao.value = _.toNumber(sheet.getText(9, 2));
+            precision.ke.value = _.toNumber(sheet.getText(10, 2));
+            precision.zu.value = _.toNumber(sheet.getText(11, 2));
+            precision.xitong.value = _.toNumber(sheet.getText(12, 2));
+            precision.other.value = _.toNumber(sheet.getText(13, 2));
+        }
+
+        return {loadPrecisonProperty, setReadOnly, getNewPrecisionData, };
+    })();
+    // 合同参数
+    const dealObj = (function () {
+        const spread = SpreadJsObj.createNewSpread($('#param-spread')[0]);
+        spread.options.showVerticalScrollbar = false;
+        spread.options.showHorizontalScrollbar = false;
+        const sheet = spread.getActiveSheet();
+        SpreadJsObj.protectedSheet(sheet);
+        SpreadJsObj.massOperationSheet(sheet, function () {
+            sheet.options.rowHeaderVisible = false;
+            sheet.options.colHeaderVisible = false;
+            sheet.defaults.rowHeight = 35;
+            sheet.setColumnCount(3);
+            sheet.setRowCount(6);
+            sheet.setColumnWidth(0, 1);
+            sheet.setColumnWidth(1, 200);
+            sheet.setColumnWidth(2, 200);
+            sheet.setRowHeight(0, 1);
+            sheet.getRange(1, 1, 5, 1).vAlign(1).backColor('#e4e7ea').locked(true);
+            sheet.getRange(1, 2, 5, 1).vAlign(1).hAlign(2).locked(true);
+            sheet.setText(1, 1, '签约合同价');
+            sheet.setText(2, 1, '暂列金额');
+            sheet.setText(3, 1, '签约合同价(不含暂列金)');
+            sheet.setText(4, 1, '签约开工预付款');
+            sheet.setText(5, 1, '签约材料预付款');
+            const lineBorder = new spreadNS.LineBorder('#6a696e', spreadNS.LineStyle.thin);
+            sheet.getRange(0, 0, 6, 3).setBorder(lineBorder, {all: true});
+            sheet.getRange(0, 0, 6, 3).formatter('@');
+            sheet.setSelection(1, 2, 1, 1);
+        });
+
+        function calcHtjMinusZlj() {
+            const htj = _.toNumber(sheet.getText(1, 2));
+            const zlj = _.toNumber(sheet.getText(2, 2));
+            sheet.setValue(3, 2, accSub(zlj, htj));
+        }
+
+        spread.bind(spreadNS.Events.EditEnded, function (e, info) {
+            const value = _.toNumber(info.editingText);
+            if (_.isNaN(value)) {
+                toast('请输入不超过万亿的数字', 'warning');
+                info.sheet.setText(info.row, info.col, '0');
+            } else if (value > Math.pow(10, 13)) {
+                toast('请输入不超过万亿的数字', 'warning');
+                info.sheet.setText(info.row, info.col, '0');
+            }
+            if (info.row === 1 || info.row === 2) {
+                calcHtjMinusZlj();
+            }
+        });
+        SpreadJsObj.addDeleteBind(spread, function (sheet) {
+            const sel = sheet.getSelections()[0];
+            let calc = false;
+            if (sel) {
+                for (let iRow = sel.row, iRowLength = sel.row + sel.rowCount; iRow < iRowLength; iRow++) {
+                    if (iRow === 3) continue;
+                    for (let iCol = sel.col, iColLength = sel.col + sel.colCount; iCol < iColLength; iCol++) {
+                        if (iCol !== 2) continue;
+                        sheet.setText(iRow, iCol, '0');
+                        if (iRow === 1 || iRow === 2) calc = true;
+                    }
+                }
+            }
+            if (calc) calcHtjMinusZlj();
+        });
+        spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
+            let bHint = false;
+            for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
+                const curRow = info.cellRange.row + iRow;
+                for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
+                    const curCol = info.cellRange.col + iCol;
+                    const value = _.toNumber(info.sheet.getText(curRow, curCol));
+                    if (_.isNaN(value) || value > Math.pow(10, 13)) {
+                        bHint = true;
+                        info.sheet.setText(curRow, curCol, '0');
+                    }
+                }
+            }
+            if (bHint) {
+                toast('请输入不超过万亿的数字', 'warning');
+            }
+            calcHtjMinusZlj();
+        });
+
+        function loadDealProperty() {
+            $('#hint-4').hide();
+            sheet.setValue(1, 2, property.deal_param.contractPrice);
+            sheet.setValue(2, 2, property.deal_param.zanLiePrice);
+            sheet.setValue(3, 2, accSub(property.deal_param.zanLiePrice, property.deal_param.contractPrice));
+            sheet.setValue(4, 2, property.deal_param.startAdvance);
+            sheet.setValue(5, 2, property.deal_param.materialAdvance);
+
+        }
+        function setReadOnly (readOnly) {
+            sheet.getCell(1, 2).locked(readOnly);
+            sheet.getCell(2, 2).locked(readOnly);
+            sheet.getCell(4, 2).locked(readOnly);
+            sheet.getCell(5, 2).locked(readOnly);
+        }
+        function getNewDealData () {
+            const result = {};
+            result.contractPrice = _.toNumber(sheet.getText(1, 2));
+            result.zanLiePrice = _.toNumber(sheet.getText(2, 2));
+            result.startAdvance = _.toNumber(sheet.getText(4, 2));
+            result.materialAdvance = _.toNumber(sheet.getText(5, 2));
+            return result;
+        }
+
+        return { loadDealProperty, setReadOnly, getNewDealData, };
+    })();
     // 章节设置
     const chapterObj = (function () {
         const spreadSetting = {
@@ -253,8 +489,8 @@ $(document).ready(function() {
         // 加载属性
         loadCommonProperty();
         loadCalculateProperty();
-        loadPrecisionProperty();
-        loadDealProperty();
+        precisionObj.loadPrecisonProperty();
+        dealObj.loadDealProperty();
         loadDisplayProperty();
         chapterObj.loadChapterProperty();
         // 设置只读
@@ -375,36 +611,23 @@ $(document).ready(function() {
      */
     // 编辑
     $('#edit-3').click(() => {
-        setReadOnly('#v-pills-3', false);
+        precisionObj.setReadOnly(false);
         $('#post-3').parent().show();
         $('#edit-3').parent().hide();
     });
     // 取消
     $('#cancel-3').click(() => {
-        setReadOnly('#v-pills-3', true);
-        loadPrecisionProperty();
+        precisionObj.setReadOnly(true);
+        precisionObj.loadPrecisonProperty();
         $('#post-3').parent().hide();
         $('#edit-3').parent().show();
     });
     // 提交
     $('#post-3').click(() => {
-        const prop = { precision: JSON.parse(JSON.stringify(property.precision)) };
-        prop.precision.t.value = _.toNumber($('#unit-t').val());
-        prop.precision.km.value = _.toNumber($('#unit-km').val());
-        prop.precision.m.value = _.toNumber($('#unit-m').val());
-        prop.precision.m2.value = _.toNumber($('#unit-m2').val());
-        prop.precision.m3.value = _.toNumber($('#unit-m3').val());
-        prop.precision.kg.value = _.toNumber($('#unit-kg').val());
-        prop.precision.ge.value = _.toNumber($('#unit-ge').val());
-        prop.precision.tai.value = _.toNumber($('#unit-tai').val());
-        prop.precision.tao.value = _.toNumber($('#unit-tao').val());
-        prop.precision.ke.value = _.toNumber($('#unit-ke').val());
-        prop.precision.zu.value = _.toNumber($('#unit-zu').val());
-        prop.precision.xitong.value = _.toNumber($('#unit-xitong').val());
-        prop.precision.other.value = _.toNumber($('#unit-other').val());
+        const prop = { precision: precisionObj.getNewPrecisionData() };
         const tenderId = window.location.pathname.split('/')[2];
         postData('/tender/' + tenderId + '/save', prop, function (data) {
-            setReadOnly('#v-pills-3', true);
+            precisionObj.setReadOnly(true);
             property.precision = data.precision;
             $('#post-3').parent().hide();
             $('#edit-3').parent().show();
@@ -416,30 +639,23 @@ $(document).ready(function() {
      */
     // 编辑
     $('#edit-4').click(() => {
-        setReadOnly('#v-pills-4', false);
+        dealObj.setReadOnly(false);
         $('#post-4').parent().show();
         $('#edit-4').parent().hide();
     });
     // 取消
     $('#cancel-4').click(() => {
-        setReadOnly('#v-pills-4', true);
-        loadDealProperty();
+        dealObj.setReadOnly(true);
+        dealObj.loadDealProperty();
         $('#post-4').parent().hide();
         $('#edit-4').parent().show();
     });
     // 提交
     $('#post-4').click(() => {
-        const prop = {
-            deal_param: {
-                contractPrice: _.toNumber($('#contract-price').val()),
-                zanLiePrice: _.toNumber($('#zan-lie-price').val()),
-                startAdvance: _.toNumber($('#start-advance').val()),
-                materialAdvance: _.toNumber($('#material-advance').val()),
-            }
-        };
+        const prop = { deal_param: dealObj.getNewDealData() };
         const tenderId = window.location.pathname.split('/')[2];
         postData('/tender/' + tenderId + '/save', prop, function (data) {
-            setReadOnly('#v-pills-4', true);
+            dealObj.setReadOnly(true);
             property.deal_param = data.deal_param;
             $('#post-4').parent().hide();
             $('#edit-4').parent().show();

+ 5 - 156
app/view/tender/detail.ejs

@@ -442,6 +442,7 @@
                                 <div class="tab-pane fade" id="v-pills-3" role="tabpanel" >
                                     <!--操作-->
                                     <div class="d-flex justify-content-end mt-3">
+                                        <div class="alert alert-danger m-0 p-1 px-2" id="hint-3" style="display: none"><i class="fa fa-smile-o mr-2"></i>A simple danger alert—check it out!</div>
                                         <div>
                                             <button type="button" class="btn btn-sm btn-outline-primary" id="edit-3"> 编辑</button>
                                         </div>
@@ -452,117 +453,14 @@
                                     </div>
                                     <legend class="mt-3">清单精度</legend>
                                     <!--默认显示-->
-                                    <div class="form-group">
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">t</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-t" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">km</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-km" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">m</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-m" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">m2</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-m2" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">m3</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-m3" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">kg</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-kg" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">个</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-ge" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">台</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-tai" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">套</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-tao" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">棵</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-ke" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">组</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-zu" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-2 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">系统</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-xitong" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-3 mb-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">其他未列单位</span>
-                                                </div>
-                                                <input class="form-control" type="number" min="0" max="6" value="3" maxlength="1" id="unit-other" oninput="limitDecimal(this)">
-                                            </div>
-                                        </div>
+                                    <div class="form-group" id="precision-spread" style="height: 365px; width: 600px;">
                                     </div>
                                 </div>
                                 <div class="tab-pane fade" id="v-pills-4" role="tabpanel" >
                                     <!--操作-->
                                     <!--操作-->
                                     <div class="d-flex justify-content-end mt-3">
+                                        <div class="alert alert-danger m-0 p-1 px-2" id="hint-4" style="display: none"><i class="fa fa-smile-o mr-2"></i>A simple danger alert—check it out!</div>
                                         <div>
                                             <button type="button" class="btn btn-sm btn-outline-primary" id="edit-4"> 编辑</button>
                                         </div>
@@ -573,56 +471,7 @@
                                     </div>
                                     <legend class="mt-3">合同参数</legend>
                                     <!--默认显示-->
-                                    <div class="form-group">
-                                        <label>全局设置</label>
-                                        <div class="col-5">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">签约合同价</span>
-                                                </div>
-                                                <input type="number" class="form-control" value="" id="contract-price" maxlength="14" min="0"
-                                                       onKeyPress="if ((event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) || value.indexOf('.') >= 12) event.returnValue=false;"
-                                                       oninput="limitMaxLength(this)" onchange="roundPrice($('#contract-price'));calculateC2()">
-                                            </div>
-                                        </div>
-                                        <div class="col-5 mt-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">暂列金额</span>
-                                                </div>
-                                                <input type="number" class="form-control" value="" id="zan-lie-price" maxlength="14"min="0"
-                                                       onKeyPress="if ((event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) || value.indexOf('.') >= 12) event.returnValue=false;"
-                                                       onchange="roundPrice($('#zan-lie-price'));calculateC2()" oninput="limitMaxLength(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-6 mt-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">签约合同价(不含暂列金)</span>
-                                                </div>
-                                                <input type="number" class="form-control" value="" id="c-zl" disabled="">
-                                            </div>
-                                        </div>
-                                        <div class="col-5 my-3">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">签约开工预付款</span>
-                                                </div>
-                                                <input type="number" class="form-control" value="" id="start-advance" maxlength="14" min="0"
-                                                       onKeyPress="if ((event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) || value.indexOf('.') >= 12) event.returnValue=false;"
-                                                       onchange="roundPrice($('#start-advance'));" oninput="limitMaxLength(this)">
-                                            </div>
-                                        </div>
-                                        <div class="col-5">
-                                            <div class="input-group input-group-sm">
-                                                <div class="input-group-prepend">
-                                                    <span class="input-group-text">签约材料预付款</span>
-                                                </div>
-                                                <input type="number" class="form-control" value="" id="material-advance" maxlength="14" min="0"
-                                                       onKeyPress="if ((event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) || value.indexOf('.') >= 12) event.returnValue=false;"
-                                                       onchange="roundPrice($('#material-advance'));" oninput="limitMaxLength(this)">
-                                            </div>
-                                        </div>
+                                    <div class="form-group" id="param-spread" style="height: 230px; width: 600px;">
                                     </div>
                                 </div>
                                 <div class="tab-pane fade" id="v-pills-5" role="tabpanel" >
@@ -669,7 +518,7 @@
                                     </div>
                                     <legend class="mt-3">章节设置</legend>
                                     <!--默认显示-->
-                                    <div class="form-group" id="chapter-spread" style="height: 380px; width: 600px;">
+                                    <div class="form-group" id="chapter-spread" style="height: 330px; width: 600px;">
                                     </div>
                                 </div>
                             </div>

+ 1 - 0
config/web.js

@@ -86,6 +86,7 @@ const JsFiles = {
                 ],
                 mergeFiles: [
                     "/public/js/spreadjs_rela/spreadjs_zh.js",
+                    "/public/js/change_calculation.js",
                     "/public/js/tender.js",
                 ],
                 mergeFile: 'tender',