Browse Source

高级检索后点击修改完毕后会重新搜索

liuchanglan 4 years ago
parent
commit
5e2b71f73d

+ 5 - 3
src/main/resources/static/page/archive/edit.html

@@ -60,7 +60,7 @@
                         <div class="layui-input-inline">
                         <div class="layui-input-inline">
 <!--                            <input type="hidden" id="mlId" class="layui-input">-->
 <!--                            <input type="hidden" id="mlId" class="layui-input">-->
 <!--                            <input type="hidden" id="mlCode" class="layui-input">-->
 <!--                            <input type="hidden" id="mlCode" class="layui-input">-->
-                            <input type="text" id="ml" name="ml" lay-filter="ml" class="layui-input">
+                            <input type="text" id="ml" name="ml" lay-verify="required" lay-reqtext="档案门类不能为空" lay-filter="ml" class="layui-input">
 <!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
 <!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
 <!--                                <option value="">请选择档案门类</option>-->
 <!--                                <option value="">请选择档案门类</option>-->
 <!--                            </select>-->
 <!--                            </select>-->
@@ -409,7 +409,9 @@
 
 
         // 保存方法
         // 保存方法
         let save = function (data, method) {
         let save = function (data, method) {
-            data.ml = sl
+            if (sl){
+                data.ml = sl
+            }
             http.post(id == '' ? 'archive/archive/insert' : 'archive/archive/update', data, true, function (res) {
             http.post(id == '' ? 'archive/archive/insert' : 'archive/archive/update', data, true, function (res) {
                 if (res.code == 200) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {
                     let index = layer.alert('保存成功!', {
@@ -632,9 +634,9 @@
             }else {
             }else {
                 $("#file_tab_list").hide();
                 $("#file_tab_list").hide();
             }
             }
-
             if (!bgqxappend) {
             if (!bgqxappend) {
                 let ml = $("#ml").val()
                 let ml = $("#ml").val()
+                debugger
                 // 加载保管期限
                 // 加载保管期限
                 http.get('system/dict/selectDictByCode', {code: ml === 'WS' ? 'BAOGUANQIXIANYI' : 'BAOGUANQIXIANER'}, false, function (res) {
                 http.get('system/dict/selectDictByCode', {code: ml === 'WS' ? 'BAOGUANQIXIANYI' : 'BAOGUANQIXIANER'}, false, function (res) {
                     let html = '';
                     let html = '';

+ 8 - 3
src/main/resources/static/page/archive/list.html

@@ -87,7 +87,9 @@
     let params;
     let params;
 
 
     function GetValue(data) {
     function GetValue(data) {
-        params = data
+        if (data){
+            params = data
+        }
     }
     }
 
 
     layui.use(['table', 'http', 'laydate', 'form', 'tree', 'upload', 'url'], function () {
     layui.use(['table', 'http', 'laydate', 'form', 'tree', 'upload', 'url'], function () {
@@ -244,7 +246,10 @@
 
 
         //数据加载方法
         //数据加载方法
         let renderTable = function () {
         let renderTable = function () {
-            searchParam.params = params
+            debugger
+            if (params && params != {}){
+                searchParam.params = params
+            }
             // 加载表格数据
             // 加载表格数据
             table.render({
             table.render({
                 elem: '#user-table',
                 elem: '#user-table',
@@ -274,7 +279,7 @@
                     }
                     }
                 },
                 },
                 done: function (res, curr1, count) {
                 done: function (res, curr1, count) {
-                    params = {}
+                    params = undefined
                     // console.log(res,curr,count)
                     // console.log(res,curr,count)
                     curr = curr1
                     curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})