|
|
@ -238,11 +238,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
|
newRow['qty'] = item['qty'] |
|
|
|
// 如果有批次 赋值库存余额批次 无批次 赋值 000000 |
|
|
|
if (item['batch'] !== '') { |
|
|
|
if (item['batch'] != '') { |
|
|
|
newRow['batch'] = item['batch'] |
|
|
|
}else{ |
|
|
|
const a = new Date(); |
|
|
|
newRow['batch'] = a.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的日期 |
|
|
|
newRow['batch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 |
|
|
|
} |
|
|
|
|
|
|
|
// else { |
|
|
@ -263,8 +262,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
newRow['batchFormItemType'] = 'FormDate' |
|
|
|
newRow['disabled_batch'] = false |
|
|
|
} else { |
|
|
|
newRow['fromBatchFormItemType'] = '' |
|
|
|
newRow['disabled_fromBatch'] = true |
|
|
|
newRow['batchFormItemType'] = '' |
|
|
|
newRow['disabled_batch'] = true |
|
|
|
} |
|
|
|
|
|
|
|
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){ |
|
|
@ -913,4 +912,12 @@ onMounted(async () => { |
|
|
|
getList() |
|
|
|
importTemplateData.templateUrl = await ProductionreturnRequestMainApi.importTemplate() |
|
|
|
}) |
|
|
|
|
|
|
|
const getFormattedDate = () =>{ |
|
|
|
const a = new Date(); |
|
|
|
const year = a.getFullYear(); |
|
|
|
const month = String(a.getMonth() + 1).padStart(2, '0'); |
|
|
|
const day = String(a.getDate()).padStart(2, '0'); |
|
|
|
return `${year}${month}${day}`; |
|
|
|
} |
|
|
|
</script> |
|
|
|