Browse Source

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

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

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

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

Loading…
Cancel
Save