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() {
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

Loading…
Cancel
Save