From 1112879bcd77c9ae5a0f65951fa1ea878e8ccfc1 Mon Sep 17 00:00:00 2001 From: x_z Date: Mon, 25 Apr 2022 17:36:54 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B7=B2=E5=AE=8C=E6=88=90=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E7=A0=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=202.=E5=8D=95=E6=8D=AE=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warehouse/stockOrderDelSearch.vue | 105 +++++++++++++++----- 1 file changed, 79 insertions(+), 26 deletions(-) diff --git a/src/views/warehouse/stockOrderDelSearch.vue b/src/views/warehouse/stockOrderDelSearch.vue index b81bc14..396fcc3 100644 --- a/src/views/warehouse/stockOrderDelSearch.vue +++ b/src/views/warehouse/stockOrderDelSearch.vue @@ -86,6 +86,13 @@ @@ -287,6 +303,7 @@ import {filterAllByUser} from "@/api/basic/invWarehouse"; import StockOrderEdit from "@/views/warehouse/stockOrderEdit"; import {updateSpms} from "@/api/warehouse/order"; + import codeDetail from "./code"; export default { name: "stockOrderDelSearch", @@ -323,6 +340,7 @@ salesListNoFormVisible: false, firstSalesInvNoFormVisible: false, secSalesInvNoFormVisible: false, + codeDetailVisible: false, formLabelWidth: "150px", total: 0, detailTotal: 0, @@ -696,6 +714,10 @@ }); }, + intentDetail(row) { + this.codeDetailVisible = true; + this.idQuery.id = row.orderId; + }, // 显示表单 handleDetailForm(index, row) { this.stockOrderEditVisible = true; @@ -787,37 +809,68 @@ }); }, uploadSpms(row) { - this.$confirm('是否确认提交到 “' + row.fromCorp + '” 的UDI自助平台?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - let orderIds = []; - orderIds.push(row.orderId); - let query = {orderIds: orderIds}; - row.uploadStatus = 1; - updateSpms(query) - .then((response) => { - if (response.code == 20000) { - this.$message.success(response.data); - this.getList(); - } else { - this.$message.error(response.message); - } - }) - .catch(() => { + if (row.uploadStatus == "1") { + //单据已经提交,重新提交需要给提示 + this.$confirm('单据已上传,是否确认重新上传到 “' + row.fromCorp + '” 的UDI自助平台?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let orderIds = []; + orderIds.push(row.orderId); + let query = {orderIds: orderIds}; + row.uploadStatus = 1; + updateSpms(query) + .then((response) => { + if (response.code == 20000) { + this.$message.success(response.data); + this.getList(); + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' }); - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消' }); - }); + } else { + this.$confirm('是否确认提交到 “' + row.fromCorp + '” 的UDI自助平台?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let orderIds = []; + orderIds.push(row.orderId); + let query = {orderIds: orderIds}; + row.uploadStatus = 1; + updateSpms(query) + .then((response) => { + if (response.code == 20000) { + this.$message.success(response.data); + this.getList(); + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }); + }); + } } }, components: { draggable, + codeDetail, stockOrderDistribution, stockOrderQRCodeDetail, stockQRCodeExport,