diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 18c4a5a4c..6437a5922 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -453,7 +453,7 @@ const buttonTableClick = async (val, row) => { handleReAdd(row.masterId) } else if (val == 'mainSubmit') { // 提交审批 console.log('列表-操作按钮事件-提交审批') - handleSubmit(row.masterId) + handleSubmit(row) } else if (val == 'mainTurnDown') { // 驳回 console.log('列表-操作按钮事件-驳回') handleRefused(row.masterId) @@ -588,11 +588,24 @@ const handleReAdd = async (id: number) => { } /** 提交按钮操作 */ -const handleSubmit = async (id: number) => { +const handleSubmit = async (row:any) => { + // 判断 是否已创建标签 + let isCreateLabel = false + await PackageApi.getPackagePage({ + requestNumber: row.number + }).then(res => { + if (res) { + if (res.list.length > 0) isCreateLabel = true + } + }) + if (!isCreateLabel) { + message.warning('还没有创建标签!!!') + return + } await message.confirm(t('common.confirmSubmit')) tableObject.loading = true try{ - await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) + await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(row.masterId) message.success(t('common.submitSuccess')) tableObject.loading = false buttonBaseClick('refresh',null)