Browse Source

台账修订,审批完成时间format

MaiXinRong 5 years ago
parent
commit
71ae28d963
2 changed files with 2 additions and 1 deletions
  1. 1 0
      app/controller/revise_controller.js
  2. 1 1
      app/public/js/revise_history.js

+ 1 - 0
app/controller/revise_controller.js

@@ -371,6 +371,7 @@ module.exports = app => {
                 const data = JSON.parse(ctx.request.body.data);
                 if (!data || !data.rid || data.rid === '') throw '查询的台账修订有误';
                 const reviseInfo = await ctx.service.ledgerRevise.getRevise(ctx.tender.id, data.rid);
+                reviseInfo.end_time_str = reviseInfo.end_time ? reviseInfo.end_time.toLocaleString() : '';
                 ctx.body = { err: 0, msg: '', data: reviseInfo };
             } catch(err) {
                 this.log(err);

+ 1 - 1
app/public/js/revise_history.js

@@ -282,7 +282,7 @@ $(document).ready(() => {
         postData(window.location.pathname + '/info', { rid: this.value }, function (result) {
             $('#user-name').val(result.user_name);
             $('#content')[0].textContent = result.content;
-            $('#end-time').val(result.end_time.toLocaleString());
+            $('#end-time').val(result.end_time_str);
         });
     });
 });