|
@ -208,6 +208,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
newRow['planQty'] = item['planQty'] |
|
|
newRow['planQty'] = item['planQty'] |
|
|
newRow['shippedQty'] = item['shippedQty'] |
|
|
newRow['shippedQty'] = item['shippedQty'] |
|
|
newRow['qty'] = item['planQty'] - item['shippedQty'] |
|
|
newRow['qty'] = item['planQty'] - item['shippedQty'] |
|
|
|
|
|
newRow['minProduceDate'] = item['minProduceDate'] // 最小生产日期 |
|
|
newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 |
|
|
newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 |
|
|
let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['batch'] = produceDateStr |
|
|
newRow['batch'] = produceDateStr |
|
@ -289,6 +290,7 @@ const getSearchTableData = async (number,formField,searchField,isAll)=>{ |
|
|
newRow['planQty'] = row['planQty'] |
|
|
newRow['planQty'] = row['planQty'] |
|
|
newRow['shippedQty'] = row['shippedQty'] |
|
|
newRow['shippedQty'] = row['shippedQty'] |
|
|
newRow['qty'] = row['planQty'] - row['shippedQty'] |
|
|
newRow['qty'] = row['planQty'] - row['shippedQty'] |
|
|
|
|
|
newRow['minProduceDate'] = row['minProduceDate'] // 最小生产日期 |
|
|
newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 |
|
|
newRow['produceDate'] = dayjs().valueOf() // 是否允许超发 |
|
|
let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['batch'] = produceDateStr |
|
|
newRow['batch'] = produceDateStr |
|
@ -319,6 +321,16 @@ const submitForm = async (formType, submitData) => { |
|
|
if(data.masterId){ |
|
|
if(data.masterId){ |
|
|
data.id = data.masterId |
|
|
data.id = data.masterId |
|
|
} |
|
|
} |
|
|
|
|
|
let flag = true |
|
|
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
|
|
if(item['minProduceDate']&&item['produceDate']<item['minProduceDate']){ |
|
|
|
|
|
flag = false |
|
|
|
|
|
message.error(`${item['itemCode']}${t('ts.生产日期不能小于')}${formatDate(item['minProduceDate'],'YYYYMMDD')}`) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(!flag){ |
|
|
|
|
|
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) |
|
@ -415,6 +427,10 @@ 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']){ |
|
|
|
|
|
message.error(`${row['itemCode']}${t('ts.生产日期不能小于')}${formatDate(row['minProduceDate'],'YYYYMMDD')}`) |
|
|
|
|
|
val = row['minProduceDate'] |
|
|
|
|
|
} |
|
|
let produceDateStr = formatDate(val,'YYYYMMDD'); |
|
|
let produceDateStr = formatDate(val,'YYYYMMDD'); |
|
|
row.batch = produceDateStr |
|
|
row.batch = produceDateStr |
|
|
row.supplierBatch = produceDateStr |
|
|
row.supplierBatch = produceDateStr |
|
|