|
|
@ -174,23 +174,48 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveEdit() { |
|
|
|
const _this = this |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveEdit(this.formobj, this.formobj.sid).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
_this.$message({showClose: true, type: 'success', message: resp.msg}) |
|
|
|
_this.handleReturn('true') |
|
|
|
if (this.formobj.offlineDate !== '' && this.formobj.offlineDate !== null) { |
|
|
|
const tip = '录入下线日期保存后将不能再次修改' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveEdit(this.formobj, this.formobj.sid).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveEdit(this.formobj, this.formobj.sid).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleLook(sid) { |
|
|
|
this.viewState = 2 |
|
|
|