From 178c5d8b1e0323e26bd165e053adb7c1378ba209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E8=8A=B1?= Date: Mon, 29 Jun 2020 12:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=8E=A8=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pick/exception.js | 9 +++++++++ src/views/pick/exception.vue | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/api/pick/exception.js b/src/api/pick/exception.js index cee989e..166970e 100644 --- a/src/api/pick/exception.js +++ b/src/api/pick/exception.js @@ -52,3 +52,12 @@ export function saveException(data) { data: data }) } + +// 重新推送异常 +export function pushException(data) { + return fetch({ + url: '/OpManagement/pushException', + method: 'post', + data: data + }) +} diff --git a/src/views/pick/exception.vue b/src/views/pick/exception.vue index 82e9fa5..eb3d607 100644 --- a/src/views/pick/exception.vue +++ b/src/views/pick/exception.vue @@ -10,6 +10,9 @@ 异常处理 + 重推异常 + 新增 @@ -326,6 +329,42 @@ } }) }, + // 检查是否选择单条 + checkSelect(data) { + const l = data.length + if (l === 0) { + this.$message({ + message: '未选择', + type: 'warning', + duration: 2000 + }) + return false + } + return true + }, + // 重新推送异常信息 + pushException() { + if (this.checkSelect(this.selectRow)) { + const paramsVin = [] + for (let c = 0; c < this.selectRow.length; c++) { + paramsVin.push(this.selectRow[c].vin) + } + const toParams = { + vin: paramsVin.length > 1 ? paramsVin.join(',') : paramsVin[0] + } + ExceptionAPI.pushException(toParams).then(res => { + this.$message({ + message: '重新推送成功', + type: 'success', + duration: 2000 + }) + this.getList() + }).catch(err => { + console.log('错误', err) + }) + } + }, + // 异常处理 exceptionHandling() { if (this.selectRow.length === 1) { -- Gitee