diff --git a/src/api/model/bi.js b/src/api/model/bi.js index 3802307d..6d812d78 100644 --- a/src/api/model/bi.js +++ b/src/api/model/bi.js @@ -96,4 +96,10 @@ export default { }, }, }, + servertime: { + name: "获取服务器时间", + req: async function () { + return await http.get(`${config.API_URL}/develop/server_time/`); + }, + } }; diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index aa827499..754610a7 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -933,13 +933,15 @@ export default { mlogSubmit() { let that = this; that.isSaveing = true; - let obj = {}; if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){ - obj.work_end_time = that.mlogItem.work_end_time = that.$TOOL.dateFormat1(new Date()); - obj.handle_date = that.mlogItem.handle_date = that.$TOOL.dateFormat2(new Date()); - that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => { - that.submitMlog(); - }); + that.$API.bi.servertime.req().then((res) => { + let obj = {}; + obj.work_end_time = res.server_time; + obj.handle_date = this.$TOOL.dateFormat2(new Date()); + that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => { + that.submitMlog(); + }); + }) }else{ that.submitMlog(); }