diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index b05f796e8..cc916eb4c 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1283,6 +1283,7 @@ export default { '确认撤销报工吗?': 'Are you sure to cancel the job application?', '收货数量不可以大于订单数量!': 'The received quantity cannot exceed the order quantity', 撤销报工成功:'Revocation of work report successful', + 生产日期不能小于:'The date of production cannot be less than' }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 2387dbe25..b0ab60a46 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1279,6 +1279,7 @@ export default { '确认撤销报工吗?': "确认撤销报工吗?", '收货数量不可以大于订单数量!':'收货数量不可以大于订单数量', 撤销报工成功:'撤销报工成功', + 生产日期不能小于:'生产日期不能小于' }, } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue index c2cca72bb..6e1efa992 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue @@ -208,7 +208,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => newRow['planQty'] = item['planQty'] newRow['shippedQty'] = item['shippedQty'] newRow['qty'] = item['planQty'] - item['shippedQty'] - newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 + newRow['minProduceDate'] = item['minProduceDate'] // 最小生产日期 + newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); newRow['batch'] = produceDateStr newRow['supplierBatch'] = produceDateStr @@ -289,6 +290,7 @@ const getSearchTableData = async (number,formField,searchField,isAll)=>{ newRow['planQty'] = row['planQty'] newRow['shippedQty'] = row['shippedQty'] newRow['qty'] = row['planQty'] - row['shippedQty'] + newRow['minProduceDate'] = row['minProduceDate'] // 最小生产日期 newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); newRow['batch'] = produceDateStr @@ -319,6 +321,16 @@ const submitForm = async (formType, submitData) => { if(data.masterId){ data.id = data.masterId } + let flag = true + tableData.value.forEach(item=>{ + if(item['minProduceDate']&&item['produceDate'] { console.log("CCCCC",item.expireDate) @@ -415,6 +427,10 @@ const inputNumberChange = (field, val,row, index) => { const formFormDateChange = (field, val,row, index) => { console.log('formFormDateChange',field, val,row, index) if(field == 'produceDate'){ + if(row['minProduceDate']&&val