Browse Source

Merge branch 'hella_online_20240829' into master_hella

hella_online_20240904
陈薪名 3 months ago
parent
commit
6fd5dac425
  1. 50
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

50
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -323,21 +323,21 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
let flag = true
let currentTime = dayjs().valueOf()
tableData.value.forEach(item=>{
if(item['minProduceDate']&&item['produceDate']<item['minProduceDate']){
flag = false
message.error(`${item['itemCode']}${t('ts.生产日期不能小于')}${formatDate(item['minProduceDate'],'YYYY-MM-DD')}`)
}
if(item['produceDate']>currentTime){
flag = false
message.error(`${item['itemCode']}${t('ts.生产日期不能大于当前系统日期')}`)
}
})
if(!flag){
return
}
// let flag = true
// let currentTime = dayjs().valueOf()
// tableData.value.forEach(item=>{
// if(item['minProduceDate']&&item['produceDate']<item['minProduceDate']){
// flag = false
// message.error(`${item['itemCode']}${t('ts.')}${formatDate(item['minProduceDate'],'YYYY-MM-DD')}`)
// }
// if(item['produceDate']>currentTime){
// flag = false
// message.error(`${item['itemCode']}${t('ts.')}`)
// }
// })
// if(!flag){
// return
// }
data.subList = tableData.value //
let isHave = data.subList.some((item) => {
console.log("CCCCC",item.expireDate)
@ -434,17 +434,17 @@ 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<row['minProduceDate']){
message.error(`${row['itemCode']}${t('ts.生产日期不能小于')}${formatDate(row['minProduceDate'],'YYYY-MM-DD')}`)
// row['produceDate'] = row['minProduceDate']
}
// if(row['minProduceDate']&&val<row['minProduceDate']){
// message.error(`${row['itemCode']}${t('ts.')}${formatDate(row['minProduceDate'],'YYYY-MM-DD')}`)
// // row['produceDate'] = row['minProduceDate']
// }
let currentTime = dayjs().valueOf()
if(val>currentTime){
val = currentTime
message.error(`${row['itemCode']}${t('ts.生产日期不能大于当前系统日期')}`)
// row['produceDate'] = currentTime
}
// let currentTime = dayjs().valueOf()
// if(val>currentTime){
// val = currentTime
// message.error(`${row['itemCode']}${t('ts.')}`)
// // row['produceDate'] = currentTime
// }
let produceDateStr = formatDate(val,'YYYYMMDD');
row.batch = produceDateStr
row.supplierBatch = produceDateStr

Loading…
Cancel
Save