Browse Source

历史修订,修订详情

MaiXinRong 3 years ago
parent
commit
09e301638e
2 changed files with 4 additions and 25 deletions
  1. 0 23
      app/public/js/stage.js
  2. 4 2
      app/view/revise/history.ejs

+ 0 - 23
app/public/js/stage.js

@@ -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();

+ 4 - 2
app/view/revise/history.ejs

@@ -64,9 +64,11 @@
                         <div class="sjs-sh-2" style="overflow:auto">
                             <div class="form-group mt-2">
                                 <label >创建时间</label>
-                                <select class="form-control form-control-sm" id="reviseHistory">
+                                <select class="form-control form-control-sm" id="reviseHistory" value="<%- revise.id %>">
                                     <% for (const hr of historyRevise) { %>
-                                    <option value="<%- hr.id %>"><%- hr.corder + '#' + (hr.in_time ? ctx.moment(hr.in_time).format('YYYY-MM-DD') : '') + (hr.valid ? '' : '(作废)')%></option>
+                                    <option value="<%- hr.id %>" <% if (hr.id === revise.id) {%>selected="true"<% } %>>
+                                        <%- hr.corder + '#' + (hr.in_time ? ctx.moment(hr.in_time).format('YYYY-MM-DD') : '') + (hr.valid ? '' : '(作废)')%>
+                                    </option>
                                     <% } %>
                                 </select>
                             </div>