|
|
@ -58,6 +58,7 @@ |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
@formFormDateChange="formFormDateChange" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -73,7 +74,6 @@ |
|
|
|
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
@formFormDateChange="formFormDateChange" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
@ -599,7 +599,12 @@ const handleDeleteTable = (item, index) => { |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
let isHave = data.subList.some((item) => item.produceDate > item.expireDate) |
|
|
|
let isHave = data.subList.some((item) => { |
|
|
|
console.log("CCCCC",item.expireDate) |
|
|
|
if(item.expireDate != null){ |
|
|
|
item.produceDate > item.expireDate |
|
|
|
} |
|
|
|
}) |
|
|
|
if (isHave) { |
|
|
|
message.error('生产日期不可以大于过期日期') |
|
|
|
formRef.value.formLoading = false |
|
|
@ -670,10 +675,10 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
|
|
|
|
const formFormDateChange = (field, val,row, index) => { |
|
|
|
console.log("AAAAA",field) |
|
|
|
console.log("BBBBB",row) |
|
|
|
console.log("CCCCC",val) |
|
|
|
console.log("DDDDD",index) |
|
|
|
if(field == 'produceDate'){ |
|
|
|
let produceDateStr = formatDate(val,'YYYYMMDD'); |
|
|
|
row.batch = produceDateStr |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|