diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index d923bcaa8..94435be74 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -687,6 +687,7 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] } else if(formField == 'itemCode'){ - const isType = await isItemType(val[0]['code'], labelType.value) - if(!isType){ - message.warning('当前物料可制造与其他数据不一致,请重新选择!') - } else { - row['itemCode'] = val[0]['code'] - row['uom'] = val[0]['uom'] - // 有效期 \ 过期日期 - row['validityDays'] = val[0]['validityDays'] - // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) - // .then(res => { - // row['singlePrice'] = res.price - // }) + if(val.length==0){ + return + } + const enableBuy = val[0]['enableBuy'] + let newVal = val.filter(item=>item.enableBuy==enableBuy) + if(newVal.length{ + let tfk = JSON.parse(JSON.stringify(tableFormKeys)) + tfk.batch = formatTime(new Date(), 'yyyyMMdd') + //生产日期 到货日期 默认当天 + tfk['produceDate'] = dayjs().valueOf() + tfk['arriveDate'] = dayjs().valueOf() + tfk['itemCode'] = item['code'] + tfk['uom'] = item['uom'] + tfk['validityDays'] = item['validityDays'] + tableData.value.push(tfk) + }) } else if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] } else if(formField === 'qadProjectCode'){ diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 84d128f25..43ab7f668 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -615,6 +615,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive