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['inventoryStatus'] = item['inventoryStatus']
newRow['qty'] = item['qty'] newRow['qty'] = item['qty']
// 000000 // 000000
if (item['batch'] !== '') { if (item['batch'] != '') {
newRow['batch'] = item['batch'] newRow['batch'] = item['batch']
}else{ }else{
const a = new Date(); newRow['batch'] = getFormattedDate(); // YYYYMMDD
newRow['batch'] = a.toISOString().split('T')[0]; // YYYY-MM-DD
} }
// else { // else {
@ -263,8 +262,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['batchFormItemType'] = 'FormDate' newRow['batchFormItemType'] = 'FormDate'
newRow['disabled_batch'] = false newRow['disabled_batch'] = false
} else { } else {
newRow['fromBatchFormItemType'] = '' newRow['batchFormItemType'] = ''
newRow['disabled_fromBatch'] = true newRow['disabled_batch'] = true
} }
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){ if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){
@ -913,4 +912,12 @@ onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await ProductionreturnRequestMainApi.importTemplate() 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> </script>

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

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

Loading…
Cancel
Save