Browse Source

采购订单管理录入下线日期后点击保存增加二次确认的提示

zhanglei
yunuo970428 3 years ago
parent
commit
5b0703107f
  1. 31
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigouAdd.vue

31
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangcaigou/cheliangcaigouAdd.vue

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

Loading…
Cancel
Save