|
|
@ -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 => { |
|
|
|