|
@@ -68,6 +68,21 @@ $(document).ready(() => {
|
|
|
SpreadJsObj.loadSheetData(leafXmjSheet, SpreadJsObj.DataType.Data, []);
|
|
|
}
|
|
|
}
|
|
|
+ // 标红显示 签约-台账≠0
|
|
|
+ function checkCompareData() {
|
|
|
+ const sheet = gclSheet;
|
|
|
+ const bCompare = $('#compare-tag')[0].checked;
|
|
|
+ SpreadJsObj.beginMassOperation(gclSheet);
|
|
|
+ for (let iRow = 0, iLength = gclSheet.getRowCount(); iRow < iLength; iRow++) {
|
|
|
+ const node = gclSheet.zh_data[iRow];
|
|
|
+ if (node) {
|
|
|
+ const bDiffer = node.compare_qty ? !checkZero(Math.abs(node.compare_qty)) : !checkZero(Math.abs(node.compare_tp));
|
|
|
+ const color = bCompare && bDiffer ? '#f8d7da' : '';
|
|
|
+ sheet.getRange(iRow, -1, 1, -1).backColor(color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ SpreadJsObj.endMassOperation(gclSheet);
|
|
|
+ }
|
|
|
// 切换清单行,读取所属项目节数据
|
|
|
gclSpread.getActiveSheet().bind(spreadNS.Events.SelectionChanged, function (e, info) {
|
|
|
const iNewRow = info.newSelections[0].row;
|
|
@@ -110,8 +125,10 @@ $(document).ready(() => {
|
|
|
for (const gcl of gclGatherData) {
|
|
|
gcl.compare_qty = ZhCalc.sub(gcl.deal_bills_qty, gcl.quantity);
|
|
|
gcl.compare_tp = ZhCalc.sub(gcl.deal_bills_tp, gcl.total_price);
|
|
|
+ gcl.compare_differ = checkZero(gcl.compare_qty) && checkZero(gcl.compare_tp);
|
|
|
}
|
|
|
SpreadJsObj.loadSheetData(gclSheet, SpreadJsObj.DataType.Data, gclGatherData);
|
|
|
+ checkCompareData();
|
|
|
loadLeafXmjData(0);
|
|
|
|
|
|
const chapterData = gclGatherModel.gatherChapterData(chapter, ['total_price']);
|
|
@@ -121,6 +138,8 @@ $(document).ready(() => {
|
|
|
generateChapterHtml(chapterData);
|
|
|
}, null, true);
|
|
|
|
|
|
+ $('#compare-tag').click(checkCompareData);
|
|
|
+
|
|
|
// 展开收起附件
|
|
|
$('a', '.right-nav').bind('click', function () {
|
|
|
const tab = $(this), tabPanel = $(tab.attr('content'));
|