Browse Source

国强--解决线上发版问题--临时去除日期最小值和当前日期最大值校验

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

Loading…
Cancel
Save