|
@ -53,7 +53,6 @@ import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import { addDay } from '@/utils/formatTime' |
|
|
import { addDay } from '@/utils/formatTime' |
|
|
import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data' |
|
|
import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['getList']) |
|
|
const emit = defineEmits(['getList']) |
|
|
const getList = () =>{ |
|
|
const getList = () =>{ |
|
@ -236,22 +235,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
newRow.expireDate = item['expireTime']?addDay(newRow['produceDate'],item['expireTime']).valueOf():dayjs('2099-12-31').valueOf() |
|
|
newRow.expireDate = item['expireTime']?addDay(newRow['produceDate'],item['expireTime']).valueOf():dayjs('2099-12-31').valueOf() |
|
|
|
|
|
|
|
|
// if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['poLine'] == item['poLine']&&item1['poNumber'] == item['poNumber'])) return |
|
|
// if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['poLine'] == item['poLine']&&item1['poNumber'] == item['poNumber'])) return |
|
|
// 供应商发货申请时,如果物料不允许超发,那么发货数量等于计划数量,且不可以编辑 |
|
|
// 可以允许超发 |
|
|
console.log(777, newRow['allowOverShipment']) |
|
|
console.log(888,newRow['allowOverShipment']) |
|
|
SupplieritemApi.getSupplierItemListByCodes({ supplierCode: item['supplierCode'], itemCodes: item['itemCode'] }).then((result) => { |
|
|
if (newRow['allowOverShipment'] == 'TRUE') { |
|
|
if (result.length > 0) { |
|
|
|
|
|
const res1 = result[0] |
|
|
|
|
|
if (res1['allowOverShipment'] == 'TRUE') { |
|
|
|
|
|
newRow['qty'] =0 |
|
|
newRow['qty'] =0 |
|
|
newRow['disabled_qty'] = false |
|
|
newRow['disabled_qty'] = false |
|
|
} else { |
|
|
} else { |
|
|
newRow['qty'] = newRow['planQty'] |
|
|
newRow['qty'] = newRow['planQty'] |
|
|
newRow['disabled_qty'] = true |
|
|
newRow['disabled_qty'] = true |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tableData.value.push(newRow) |
|
|
|
|
|
itemCodes.push(item['itemCode']) |
|
|
itemCodes.push(item['itemCode']) |
|
|
|
|
|
tableData.value.push(newRow) |
|
|
|
|
|
}) |
|
|
if(itemCodes.length>0){ |
|
|
if(itemCodes.length>0){ |
|
|
//有效期 |
|
|
//有效期 |
|
|
ItembasicApi.getItembasicPage({ |
|
|
ItembasicApi.getItembasicPage({ |
|
@ -263,12 +258,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}).catch((err) => { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
@ -348,8 +337,9 @@ const getSearchTableData = async (number,formField,searchField,isAll)=>{ |
|
|
newRow['disabled_qty'] = true |
|
|
newRow['disabled_qty'] = true |
|
|
} |
|
|
} |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
}) |
|
|
|
|
|
itemCodes.push(row['itemCode']) |
|
|
itemCodes.push(row['itemCode']) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
//有效期 |
|
|
//有效期 |
|
|
ItembasicApi.getItembasicPage({ |
|
|
ItembasicApi.getItembasicPage({ |
|
|
code:itemCodes.join(',') |
|
|
code:itemCodes.join(',') |
|
|