From 8c464937f5e258e778d68ab24dd1909b524e388b Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 29 Jan 2024 09:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchaseMain/index.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index e0e7b6599..22c8b509c 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -74,6 +74,7 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ItembasicApi from '@/api/wms/itembasic' +import { reAddTransferissueRequestMain } from '@/api/wms/transferissueRequestMain' // 采购订单 defineOptions({ name: 'PurchaseMain' }) @@ -95,8 +96,21 @@ nextTick(async() => { if (type == 'tableForm') { // 明细查询页赋值 - row[formField] = val[0][searchField] if(formField == 'itemCode'){ + let subList = tableData.value + let flag = false; + if(subList.length > 0){ + subList.forEach((item) => { + if(item.itemCode == val[0]['itemCode']){ + flag = true; + } + }) + } + if(flag){ + message.warning("物料代码已经存在"); + return; + } + row[formField] = val[0][searchField] await ItembasicApi.getItembasicPage({ code: row['itemCode'] }).then(res => {