|
@@ -601,9 +601,31 @@
|
|
|
<h5 class="modal-title">合同参数</h5>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <div class="form-group">
|
|
|
- <!--默认显示-->
|
|
|
- <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
|
|
|
+ <ul class="nav nav-tabs nav-justified mb-2">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link active" data-toggle="tab" href="#htcs" role="tab" aria-selected="true">合同参数</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" data-toggle="tab" href="#bzqd" role="tab" aria-selected="false">100章清单</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="tab-content">
|
|
|
+ <div class="tab-pane active" id="htcs">
|
|
|
+ <div class="modal-height-300" style="overflow-y: auto">
|
|
|
+ <div class="form-group">
|
|
|
+ <!--默认显示-->
|
|
|
+ <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-pane" id="bzqd">
|
|
|
+ <div class="modal-height-300" style="overflow-y: auto">
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="form-group" id="cap100-spread" style="height: 230px; width: 465px;">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -623,9 +645,31 @@
|
|
|
<h5 class="modal-title">合同参数</h5>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <div class="form-group">
|
|
|
- <!--默认显示-->
|
|
|
- <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
|
|
|
+ <ul class="nav nav-tabs nav-justified mb-2">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link active" data-toggle="tab" href="#htcs" role="tab" aria-selected="true">合同参数</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" data-toggle="tab" href="#bzqd" role="tab" aria-selected="false">100章清单</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="tab-content">
|
|
|
+ <div class="tab-pane active" id="htcs">
|
|
|
+ <div class="modal-height-300" style="overflow-y: auto">
|
|
|
+ <div class="form-group">
|
|
|
+ <!--默认显示-->
|
|
|
+ <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-pane" id="bzqd">
|
|
|
+ <div class="modal-height-300" style="overflow-y: auto">
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="form-group" id="cap100-spread" style="height: 230px; width: 465px;">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1220,11 +1264,11 @@
|
|
|
SpreadJsObj.massOperationSheet(sheet, function () {
|
|
|
sheet.defaults.rowHeight = 21;
|
|
|
sheet.setColumnCount(2);
|
|
|
- sheet.setRowCount(6);
|
|
|
+ sheet.setRowCount(5);
|
|
|
sheet.setColumnWidth(0, 200);
|
|
|
sheet.setColumnWidth(1, 200);
|
|
|
- sheet.getRange(0, 0, 6, 1).vAlign(1).backColor('#e4e7ea').locked(true);
|
|
|
- sheet.getRange(0, 1, 6, 1).vAlign(1).hAlign(2).locked(false);
|
|
|
+ sheet.getRange(0, 0, 5, 1).vAlign(1).backColor('#e4e7ea').locked(true);
|
|
|
+ sheet.getRange(0, 1, 5, 1).vAlign(1).hAlign(2).locked(false);
|
|
|
sheet.setText(0, 0, '签约合同价');
|
|
|
sheet.setText(1, 0, '暂列金额');
|
|
|
sheet.setText(2, 0, '签约合同价(不含暂列金)');
|
|
@@ -1233,11 +1277,39 @@
|
|
|
sheet.setText(5, 0, '安全生产费');
|
|
|
sheet.getCell(2, 1).locked(true);
|
|
|
const lineBorder = new spreadNS.LineBorder('#dee2e6', spreadNS.LineStyle.thin);
|
|
|
- sheet.getRange(0, 0, 6, 2).setBorder(lineBorder, {all: true});
|
|
|
- sheet.getRange(0, 0, 6, 2).formatter('@');
|
|
|
+ sheet.getRange(0, 0, 5, 2).setBorder(lineBorder, {all: true});
|
|
|
+ sheet.getRange(0, 0, 5, 2).formatter('@');
|
|
|
sheet.setSelection(0, 1, 1, 1);
|
|
|
});
|
|
|
|
|
|
+ const cap100spread = SpreadJsObj.createNewSpread($('#cap100-spread')[0]);
|
|
|
+ cap100spread.options.showVerticalScrollbar = false;
|
|
|
+ cap100spread.options.showHorizontalScrollbar = false;
|
|
|
+ const cap100sheet = cap100spread.getActiveSheet();
|
|
|
+ SpreadJsObj.protectedSheet(cap100sheet);
|
|
|
+ cap100sheet.setText(0, 0, '参数名', spreadNS.SheetArea.colHeader);
|
|
|
+ cap100sheet.setText(0, 1, '参数值', spreadNS.SheetArea.colHeader);
|
|
|
+ cap100sheet.setRowHeight(0, 32, spreadNS.SheetArea.colHeader);
|
|
|
+ cap100sheet.setDefaultStyle(vStyle, spreadNS.SheetArea.viewport);
|
|
|
+ cap100sheet.setDefaultStyle(xStyle, spreadNS.SheetArea.colHeader);
|
|
|
+ cap100sheet.setDefaultStyle(yStyle, spreadNS.SheetArea.rowHeader);
|
|
|
+
|
|
|
+ SpreadJsObj.massOperationSheet(cap100sheet, function () {
|
|
|
+ cap100sheet.defaults.rowHeight = 21;
|
|
|
+ cap100sheet.setColumnCount(2);
|
|
|
+ cap100sheet.setRowCount(2);
|
|
|
+ cap100sheet.setColumnWidth(0, 200);
|
|
|
+ cap100sheet.setColumnWidth(1, 200);
|
|
|
+ cap100sheet.getRange(0, 0, 2, 1).vAlign(1).backColor('#e4e7ea').locked(true);
|
|
|
+ cap100sheet.getRange(0, 1, 2, 1).vAlign(1).hAlign(2).locked(false);
|
|
|
+ cap100sheet.setText(0, 0, '安全生产费');
|
|
|
+ cap100sheet.setText(1, 0, '扬尘污染费');
|
|
|
+ const cap100lineBorder = new spreadNS.LineBorder('#dee2e6', spreadNS.LineStyle.thin);
|
|
|
+ cap100sheet.getRange(0, 0, 2, 2).setBorder(cap100lineBorder, {all: true});
|
|
|
+ cap100sheet.getRange(0, 0, 2, 2).formatter('@');
|
|
|
+ cap100sheet.setSelection(0, 1, 1, 1);
|
|
|
+ });
|
|
|
+
|
|
|
function calcHtjMinusZlj() {
|
|
|
const htj = _.toNumber(sheet.getText(0, 1));
|
|
|
const zlj = _.toNumber(sheet.getText(1, 1));
|
|
@@ -1290,6 +1362,51 @@
|
|
|
}
|
|
|
calcHtjMinusZlj();
|
|
|
});
|
|
|
+ cap100spread.bind(spreadNS.Events.EditEnded, function (e, info) {
|
|
|
+ const value = _.toNumber(info.editingText);
|
|
|
+ if (_.isNaN(value)) {
|
|
|
+ toastr.warning('请输入不超过万亿的数字');
|
|
|
+ info.sheet.setText(info.row, info.col, '0');
|
|
|
+ } else if (value > Math.pow(10, 13)) {
|
|
|
+ toastr.warning('请输入不超过万亿的数字');
|
|
|
+ info.sheet.setText(info.row, info.col, '0');
|
|
|
+ }
|
|
|
+ // if (info.row === 0 || info.row === 1) {
|
|
|
+ // calcHtjMinusZlj();
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ SpreadJsObj.addDeleteBind(cap100spread, 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 === 2) continue;
|
|
|
+ for (let iCol = sel.col, iColLength = sel.col + sel.colCount; iCol < iColLength; iCol++) {
|
|
|
+ if (iCol !== 1) continue;
|
|
|
+ sheet.setText(iRow, iCol, '0');
|
|
|
+ // if (iRow === 0 || iRow === 1) calc = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // if (calc) calcHtjMinusZlj();
|
|
|
+ });
|
|
|
+ cap100spread.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) {
|
|
|
+ toastr.warning('请输入不超过万亿的数字');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
function loadDealProperty() {
|
|
|
sheet.setValue(0, 1, property.deal_param.contractPrice);
|
|
@@ -1297,7 +1414,9 @@
|
|
|
sheet.setValue(2, 1, ZhCalc.sub(property.deal_param.contractPrice, property.deal_param.zanLiePrice));
|
|
|
sheet.setValue(3, 1, property.deal_param.startAdvance);
|
|
|
sheet.setValue(4, 1, property.deal_param.materialAdvance);
|
|
|
- sheet.setValue(5, 1, property.deal_param.safeAdvance);
|
|
|
+ // sheet.setValue(5, 1, property.deal_param.safeAdvance);
|
|
|
+ cap100sheet.setValue(0, 1, property.deal_param.safeAdvance);
|
|
|
+ cap100sheet.setValue(1, 1, property.deal_param.dustAdvance);
|
|
|
|
|
|
}
|
|
|
function setReadOnly (readOnly) {
|
|
@@ -1305,7 +1424,9 @@
|
|
|
sheet.getCell(1, 1).locked(readOnly);
|
|
|
sheet.getCell(3, 1).locked(readOnly);
|
|
|
sheet.getCell(4, 1).locked(readOnly);
|
|
|
- sheet.getCell(5, 1).locked(readOnly);
|
|
|
+ // sheet.getCell(5, 1).locked(readOnly);
|
|
|
+ cap100sheet.getCell(0, 1).locked(readOnly);
|
|
|
+ cap100sheet.getCell(1, 1).locked(readOnly);
|
|
|
}
|
|
|
function getNewDealData () {
|
|
|
const result = {};
|
|
@@ -1313,7 +1434,9 @@
|
|
|
result.zanLiePrice = _.toNumber(sheet.getText(1, 1));
|
|
|
result.startAdvance = _.toNumber(sheet.getText(3, 1));
|
|
|
result.materialAdvance = _.toNumber(sheet.getText(4, 1));
|
|
|
- result.safeAdvance = _.toNumber(sheet.getText(5, 1));
|
|
|
+ // result.safeAdvance = _.toNumber(sheet.getText(5, 1));
|
|
|
+ result.safeAdvance = _.toNumber(cap100sheet.getText(0, 1));
|
|
|
+ result.dustAdvance = _.toNumber(cap100sheet.getText(1, 1));
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -1648,7 +1771,7 @@
|
|
|
});
|
|
|
}
|
|
|
$(function () {
|
|
|
- // 形象进度
|
|
|
+ // 投资进度
|
|
|
let timer2 = null;
|
|
|
let oldSearchVal2 = null;
|
|
|
$('body').on('input propertychange', '#tourist_dropdownMenu .gr-search', function (e) {
|
|
@@ -1772,15 +1895,15 @@
|
|
|
</script>
|
|
|
<% } %>
|
|
|
<% if (ctx.session.sessionProject.page_show !== null && parseInt(ctx.session.sessionProject.page_show.xxjd) === 1 && ctx.session.sessionUser.is_admin) { %>
|
|
|
-<!--标段设置-形象进度-->
|
|
|
+<!--标段设置-投资进度-->
|
|
|
<div class="modal fade" id="xxjd-set" data-backdrop="static">
|
|
|
<div class="modal-dialog" role="document">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
- <h5 class="modal-title">形象进度</h5>
|
|
|
+ <h5 class="modal-title">投资进度</h5>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <div class="alert alert-warning">设置可使用「形象进度」用户</div>
|
|
|
+ <div class="alert alert-warning">设置可使用「投资进度」用户</div>
|
|
|
<div class="dropdown">
|
|
|
<button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="xxjd_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
添加用户
|
|
@@ -1841,7 +1964,7 @@
|
|
|
<script>
|
|
|
$(function () {
|
|
|
const scPermission = JSON.parse(unescape('<%- escape(JSON.stringify(scPermission)) %>'));
|
|
|
- // 形象进度
|
|
|
+ // 投资进度
|
|
|
let timer = null;
|
|
|
let oldSearchVal = null;
|
|
|
$('body').on('input propertychange', '#xxjd_dropdownMenu .gr-search', function(e) {
|