laiguoran пре 2 година
родитељ
комит
f1cc29d316
2 измењених фајлова са 30 додато и 8 уклоњено
  1. 29 7
      app/public/js/change_information_set.js
  2. 1 1
      app/view/revise/sub_mini_menu.ejs

+ 29 - 7
app/public/js/change_information_set.js

@@ -1621,8 +1621,11 @@ function tableDataRemake(changeListData) {
                     listinfo = changeListData[clinfo.lid - 1];
                     if (listinfo === undefined) {
                         toastr.warning('台账清单列表已不存在'+ clinfo.code +',已更新变更清单列表');
-                        // changeList.splice(index, 1);
-                        removeList.push(clinfo);
+                        if (changeStatus !== auditConst.status.revise) {
+                            removeList.push(clinfo);
+                        } else {
+                            updateList.push(makeWhiteList(clinfo));
+                        }
                         continue;
                     }
                     $('#table-list-select tr[data-index="'+ clinfo.lid +'"]').addClass('table-success');
@@ -1646,8 +1649,11 @@ function tableDataRemake(changeListData) {
                                 (leafInfo.bwmx !== undefined ? leafInfo.bwmx : (listinfo.leafXmjs.length > 1 && listinfo.name ? listinfo.name : (leafInfo.jldy !== undefined ? leafInfo.jldy : ''))) + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
                         } else {
                             toastr.warning('台账清单列表已不存在'+ clinfo.code +',已更新变更清单列表');
-                            // changeList.splice(index, 1);
-                            removeList.push(clinfo);
+                            if (changeStatus !== auditConst.status.revise) {
+                                removeList.push(clinfo);
+                            } else {
+                                updateList.push(makeWhiteList(clinfo));
+                            }
                             continue;
                         }
                     } else {
@@ -1683,9 +1689,13 @@ function tableDataRemake(changeListData) {
                                 (leafInfo.bwmx !== undefined ? leafInfo.bwmx : (listinfo.leafXmjs.length > 1 && listinfo.name ? listinfo.name : (leafInfo.jldy !== undefined ? leafInfo.jldy : ''))) + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
                         } else {
                             // console.log(clinfo, listinfo.leafXmjs);
-                            toastr.warning('台账清单列表已不存在'+ clinfo.code +',已更新变更清单列表');
                             // changeList.splice(index, 1);
-                            removeList.push(clinfo);
+                            toastr.warning('台账清单列表已不存在'+ clinfo.code +',已更新变更清单列表');
+                            if (changeStatus !== auditConst.status.revise) {
+                                removeList.push(clinfo);
+                            } else {
+                                updateList.push(makeWhiteList(clinfo));
+                            }
                             continue;
                         }
                     } else {
@@ -1733,7 +1743,7 @@ function tableDataRemake(changeListData) {
             }
         }
         if(updateList.length > 0) {
-            // console.log(updateList);
+            console.log(updateList);
             postData(window.location.pathname + '/save', { type:'update_list', updateData: updateList }, function (result) {
             }, function () {
             });
@@ -1747,6 +1757,18 @@ function tableDataRemake(changeListData) {
     }
 }
 
+function makeWhiteList(clinfo) {
+    clinfo.lid = 0;
+    clinfo.xmj_code = null;
+    clinfo.xmj_jldy = null;
+    clinfo.xmj_dwgc = null;
+    clinfo.xmj_fbgc = null;
+    clinfo.xmj_fxgc = null;
+    clinfo.gcl_id = '';
+    clinfo.mx_id = null;
+    return clinfo;
+}
+
 // 清单搜索隐藏清单table部分值
 function makeListTable(changeListData, showListData = changeListData) {
     // 先加载台账数据

+ 1 - 1
app/view/revise/sub_mini_menu.ejs

@@ -6,7 +6,7 @@
     </div>
     <div class="side-menu" id="mini-menu-list" style="display: none">
         <% include ./sub_menu_list.ejs %>
-        <div class="side-fold"><a href="javascript: void(0);" data-toggle="tooltip" data-placement="top" data-original-title="展开侧栏" id="to-menu"><i class="fa fa-upload fa-rotate-90"></i></a></div>
+        <!--<div class="side-fold"><a href="javascript: void(0);" data-toggle="tooltip" data-placement="top" data-original-title="展开侧栏" id="to-menu"><i class="fa fa-upload fa-rotate-90"></i></a></div>-->
     </div>
 </div>
 <script>