|
@@ -2026,23 +2026,11 @@ $(document).ready(() => {
|
|
|
|
|
|
// 加载计量单元数据 - 暂时统一加载,如有需要,切换成动态加载并缓存
|
|
|
postData(window.location.pathname + '/load', { filter: 'ledger;pos;detail;change;tag;cooperation' }, function (result) {
|
|
|
- result.ledgerData && console.log('ledger: ' + result.ledgerData.length);
|
|
|
- result.posData && console.log('pos: ' + result.posData.length);
|
|
|
- result.detailData && console.log('detail: ' + result.detailData.length);
|
|
|
- result.detailAtt && console.log('detailAtt: ' + result.detailAtt.length);
|
|
|
- result.changeData && console.log('change: ' + result.changeData.length);
|
|
|
- result.tags && console.log('tag: ' + result.tags.length);
|
|
|
- result.cooperation && console.log('cooperation: ' + result.cooperation.length);
|
|
|
// 加载树结构
|
|
|
- console.time('loadLedger');
|
|
|
stageTree.loadDatas(result.ledgerData);
|
|
|
- console.timeEnd('loadLedger');
|
|
|
checkShowLast(result.ledgerData.length);
|
|
|
- console.time('calcLedger');
|
|
|
treeCalc.calculateAll(stageTree);
|
|
|
- console.timeEnd('calcLedger');
|
|
|
// 加载解锁相关
|
|
|
- console.time('loadCooperation');
|
|
|
if (result.cooperation) {
|
|
|
stageTree.loadPwd(result.cooperation, 'bills-p-' + userID + '-' + window.location.pathname.split('/')[2], result.cooperationConfirm);
|
|
|
$('#cooperationCount').html(stageTree.pwd.length || '');
|
|
@@ -2050,31 +2038,20 @@ $(document).ready(() => {
|
|
|
setCooperationSelectHtml();
|
|
|
reloadCooperationHtml();
|
|
|
}
|
|
|
- console.timeEnd('loadCooperation');
|
|
|
- console.time('loadTag');
|
|
|
for (const t of result.tags) {
|
|
|
t.node = stageTree.datas.find(x => {return x.id === t.lid});
|
|
|
}
|
|
|
billsTag.loadDatas(result.tags);
|
|
|
- console.timeEnd('loadTag');
|
|
|
// 加载部位明细
|
|
|
- console.time('loadPos');
|
|
|
stagePos.loadDatas(result.posData);
|
|
|
- console.timeEnd('loadPos');
|
|
|
stagePos.calculateAll();
|
|
|
- console.time('showLedger');
|
|
|
SpreadJsObj.loadSheetData(slSpread.getActiveSheet(), 'tree', stageTree);
|
|
|
SpreadJsObj.loadTopAndSelect(slSpread.getActiveSheet(), ckBillsSpread);
|
|
|
- console.timeEnd('showLedger');
|
|
|
- console.time('showPos');
|
|
|
stagePosSpreadObj.loadCurPosData();
|
|
|
SpreadJsObj.resetTopAndSelect(spSpread.getActiveSheet());
|
|
|
- console.timeEnd('showPos');
|
|
|
// 加载中间计量
|
|
|
- console.time('loadIm');
|
|
|
stageIm.init(stage, imType, tenderInfo.decimal);
|
|
|
stageIm.loadData(result.ledgerData, result.posData, result.detailData, result.changeData, result.detailAtt);
|
|
|
- console.timeEnd('loadIm');
|
|
|
|
|
|
errorList.loadHisErrorData();
|
|
|
checkList.loadHisCheckData();
|