Przeglądaj źródła

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong 5 lat temu
rodzic
commit
0cad829f51
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 2 1
      app/public/js/change_set.js
  2. 1 1
      app/view/change/info.ejs

+ 2 - 1
app/public/js/change_set.js

@@ -210,6 +210,7 @@ $(document).ready(() => {
         }
         $('#change_form').ajaxSubmit(function (result) {
             if ( result.err === 0) {
+                $('.reduction-code').attr('data-code', $('input[name="code"]').val());
                 toastr.success(result.msg);
             } else {
                 toastr.error(result.msg);
@@ -497,7 +498,7 @@ $(document).ready(() => {
 
     // 自动编号
     $('.reduction-code').click(function () {
-       const code = $(this).data('code');
+       const code = $(this).attr('data-code');
        $('input[name="code"]').val(code);
     });
 

+ 1 - 1
app/view/change/info.ejs

@@ -172,7 +172,7 @@
                     <div class="col-md-4">
                         <div class="form-group">
                             <label><b class="text-danger">*&nbsp;</b>申请编号</label>
-                            <a href="javascript:void(0);" class="pull-right reduction-code" data-toggle="tooltip" data-placement="bottom" title="" data-code="<%- change.code %>" data-original-title="自动编号"><i class="fa fa-repeat"></i></a>
+                            <a href="javascript:void(0);" class="pull-right reduction-code" data-toggle="tooltip" data-placement="bottom" title="" data-code="<%- change.code %>" data-original-title="重置"><i class="fa fa-repeat"></i></a>
                             <input class="form-control" name="code" value="<%- change.code %>" type="text">
                         </div>
                         <div class="form-group">