fix:若无结束日期日志提交前,先保存结束时间

This commit is contained in:
shijing 2025-09-09 13:26:07 +08:00
parent eef14ca7eb
commit 0c7fe5bfed
1 changed files with 7 additions and 2 deletions

View File

@ -932,14 +932,19 @@ export default {
// //
mlogSubmit() { mlogSubmit() {
let that = this; let that = this;
that.isSaveing = true;
let obj = {};
if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){ if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){
that.mlogItem.work_end_time = that.$TOOL.dateFormat1(new Date()); obj.work_end_time = that.mlogItem.work_end_time = that.$TOOL.dateFormat1(new Date());
that.mlogItem.handle_date = that.$TOOL.dateFormat2(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.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
that.isSaveing = false; that.isSaveing = false;
that.visible = false; that.visible = false;
that.$message.success("操作成功"); that.$message.success("操作成功");
}).catch(() => {
that.isSaveing = false;
}); });
}, },
table_muser_add(){ table_muser_add(){