浏览代码

签约清单提示

MaiXinRong 1 年之前
父节点
当前提交
e7ae5cb5ce
共有 3 个文件被更改,包括 35 次插入3 次删除
  1. 8 3
      app/public/js/ledger.js
  2. 1 0
      app/view/ledger/explode_modal.ejs
  3. 26 0
      app/view/shares/hint_modal.ejs

+ 8 - 3
app/public/js/ledger.js

@@ -2805,9 +2805,14 @@ $(document).ready(function() {
                                     }
                                     }
                                 }
                                 }
                                 if (datas.length > 0) {
                                 if (datas.length > 0) {
-                                    postData(window.location.pathname + '/update', {postType: 'update', postData: datas}, function (result) {
-                                        const refreshNode = ledgerTree.loadPostData(result);
-                                        treeOperationObj.refreshTree(ledgerSpread.getActiveSheet(), refreshNode);
+                                    doAfterHint({
+                                        fun: function() {
+                                            postData(window.location.pathname + '/update', {postType: 'update', postData: datas}, function (result) {
+                                                const refreshNode = ledgerTree.loadPostData(result);
+                                                treeOperationObj.refreshTree(ledgerSpread.getActiveSheet(), refreshNode);
+                                            });
+                                        },
+                                        hint: '此操作会替换台账里所有同编号、名称、单位的清单,请谨慎操作',
                                     });
                                     });
                                 } else {
                                 } else {
                                     toastr.warning('没有可应用的清单。');
                                     toastr.warning('没有可应用的清单。');

+ 1 - 0
app/view/ledger/explode_modal.ejs

@@ -453,3 +453,4 @@
 <% include ../shares/tender_select_modal.ejs %>
 <% include ../shares/tender_select_modal.ejs %>
 <% include ../shares/db2full_code.ejs %>
 <% include ../shares/db2full_code.ejs %>
 <% include ./audit_modal.ejs %>
 <% include ./audit_modal.ejs %>
+<% include ../shares/hint_modal.ejs %>

+ 26 - 0
app/view/shares/hint_modal.ejs

@@ -0,0 +1,26 @@
+<div class="modal fade" id="common-hint" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">确认</h5>
+            </div>
+            <div class="modal-body">
+                <h6 id="common-hint-str">此操作会替换台账里所有同编号、名称、单位的清单,请谨慎操作</h6>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-sm btn-primary" id="common-hint-ok" data-dismiss="modal">确定</button>
+                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    const doAfterHint = function (option) {
+        $('#common-hint-ok').bind('click', option.fun);
+        if (option.hint) $('#common-hint-str').html(option.hint);
+        $('#common-hint').modal('show');
+        $('#common-hint').bind('hidden.bs.modal', function () {
+            $('#common-hint-ok').unbind('click');
+        });
+    }
+</script>