Bladeren bron

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 3 jaren geleden
bovenliggende
commit
c47ca8b997
3 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 4 4
      app/public/js/material_checklist.js
  2. 1 1
      app/view/report/index_archive.ejs
  3. 1 1
      app/view/stage/audit_modal.ejs

+ 4 - 4
app/public/js/material_checklist.js

@@ -381,7 +381,7 @@ $(document).ready(() => {
         const sheet = ledgerSpread.getActiveSheet();
         const select = SpreadJsObj.getSelectObject(sheet);
         const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price });
-        const gcl = gclGatherData[gclIndex].leafXmjs;
+        const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
         const index = materialChecklistData.indexOf(select);
         const datas = [];
         for (const xmj of gcl) {
@@ -416,7 +416,7 @@ $(document).ready(() => {
                 const select = SpreadJsObj.getSelectObject(sheet);
                 const index = materialChecklistData.indexOf(select);
                 const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price });
-                const gcl = gclGatherData[gclIndex].leafXmjs;
+                const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                 const datas = [];
                 for (const xmj of gcl) {
                     const data = {
@@ -498,7 +498,7 @@ $(document).ready(() => {
                     const ledgerSheet = ledgerSpread.getActiveSheet();
                     const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet);
                     const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price });
-                    const gcl = gclGatherData[gclIndex].leafXmjs;
+                    const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                     const datas = [];
                     for (const xmj of gcl) {
                         const data = {
@@ -595,7 +595,7 @@ $(document).ready(() => {
                 const ledgerSheet = ledgerSpread.getActiveSheet();
                 const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet);
                 const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price });
-                const gcl = gclGatherData[gclIndex].leafXmjs;
+                const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                 const datas = [];
                 for (const xmj of gcl) {
                     const data2 = {

+ 1 - 1
app/view/report/index_archive.ejs

@@ -76,7 +76,7 @@
                                     历史归档
                                 </div>
                             </div>
-                            <% if(isAdmin) { %>
+                            <% if(ctx.session.sessionUser.is_admin) { %>
                                 <div class="panel">
                                     <div class="panel-body" id="delete_div">
                                         <div class="btn-group mr-1" role="group">

+ 1 - 1
app/view/stage/audit_modal.ejs

@@ -802,7 +802,7 @@
 <% } %>
 <% } %>
 
-<% if(isAdmin) { %>
+<% if(ctx.session.sessionUser.is_admin) { %>
   <!--删除归档报表 因归档页面要引用这个界面,layout没法再多render一个ejs,只能在这加了-->
   <div class="modal fade" id="del-archive" data-backdrop="static">
     <div class="modal-dialog" role="document">