diff --git a/src/views/par/personScoreManage/ParPersonScoreManage.vue b/src/views/par/personScoreManage/ParPersonScoreManage.vue index 312131ee7344550e8e26be77a692952715bf66ed..5d13598346f95d9475a2046927e62c9d06ee336f 100644 --- a/src/views/par/personScoreManage/ParPersonScoreManage.vue +++ b/src/views/par/personScoreManage/ParPersonScoreManage.vue @@ -303,34 +303,50 @@ export default { }) }, sbScore (record) { - const param = {} - param.id = record.id - param.kpzt = '2' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '上报成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '提示', + content: `确认要上报该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.kpzt = '2' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '上报成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + _this.$notification['info']({ + message: '取消上报操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) } diff --git a/src/views/par/scoreManage/ParScoreManage.vue b/src/views/par/scoreManage/ParScoreManage.vue index c04091c21361648e94a4fdef117846e64df21d5b..1d3215c6857de9128f3764e86d4c5fc9f520bf3f 100644 --- a/src/views/par/scoreManage/ParScoreManage.vue +++ b/src/views/par/scoreManage/ParScoreManage.vue @@ -298,34 +298,50 @@ export default { }) }, sbScore (record) { - const param = {} - param.id = record.id - param.kpzt = '2' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '上报成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '提示', + content: `确认要上报该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.kpzt = '2' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '上报成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + _this.$notification['info']({ + message: '取消上报操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) }