Browse Source

YT-412:生产退料默认没有批次格式化YYYYMMDD

intex_online20241111
songguoqiang 1 month ago
parent
commit
1e5e958821
  1. 17
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  2. 5
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

17
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -238,11 +238,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['qty'] = item['qty']
// 000000
if (item['batch'] !== '') {
if (item['batch'] != '') {
newRow['batch'] = item['batch']
}else{
const a = new Date();
newRow['batch'] = a.toISOString().split('T')[0]; // YYYY-MM-DD
newRow['batch'] = getFormattedDate(); // YYYYMMDD
}
// else {
@ -263,8 +262,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['batchFormItemType'] = 'FormDate'
newRow['disabled_batch'] = false
} else {
newRow['fromBatchFormItemType'] = ''
newRow['disabled_fromBatch'] = true
newRow['batchFormItemType'] = ''
newRow['disabled_batch'] = true
}
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){
@ -913,4 +912,12 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProductionreturnRequestMainApi.importTemplate()
})
const getFormattedDate = () =>{
const a = new Date();
const year = a.getFullYear();
const month = String(a.getMonth() + 1).padStart(2, '0');
const day = String(a.getDate()).padStart(2, '0');
return `${year}${month}${day}`;
}
</script>

5
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -1483,11 +1483,6 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
component: 'Input',
componentProps: {
disabled:true
// style: { width: '100%' },
// type: 'date',
// placeholder: '请选择从批次',
// format: 'YYYYMMDD',
// valueFormat: 'YYYYMMDD',
}
},
},

Loading…
Cancel
Save