Browse Source

YT-448:库区管理和物料库区配置管理,隔离区管理精度没有按数量

intex_online20241111
宋国强 5 months ago
parent
commit
6a06c0f694
  1. 14
      src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue
  2. 17
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  3. 33
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  4. 8
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

14
src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue

@ -200,11 +200,12 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
} else if (item.field == 'manageMode') {
if (row.type == 'WIP') {
item.componentProps.options = manageModeOptions.value
} else {
item.componentProps.options =manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
}
// if (row.type == 'WIP') {
// item.componentProps.options = manageModeOptions.value
// } else {
// item.componentProps.options =manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
// }
item.componentProps.options = manageModeOptions.value
}
})
}else {
@ -215,7 +216,8 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = false
item.componentProps.isSearchList = true
}else if (item.field == 'manageMode') {
item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
item.componentProps.options = manageModeOptions.value
//item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
basicFormRef.value.formRef.formModel.manageMode = item.componentProps.options[0].value
}
})

17
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -158,7 +158,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
Itemarea.allSchemas.formSchema.forEach((item) => {
if (item.field == 'manageMode') {
item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
item.componentProps.options = manageModeOptions.value
// item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
setV['manageMode'] = item.componentProps.options[0].value
}
})
@ -332,11 +333,12 @@ const openForm =async (type: string, row?: number) => {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
} else if (item.field == 'manageMode') {
if (row.areaType == 'WIP') {
item.componentProps.options = manageModeOptions.value
} else {
item.componentProps.options =manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
}
// if (row.areaType == 'WIP') {
// item.componentProps.options = manageModeOptions.value
// } else {
// item.componentProps.options =manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
// }
item.componentProps.options = manageModeOptions.value
}
})
}else {
@ -346,7 +348,8 @@ const openForm =async (type: string, row?: number) => {
}else if (item.field == 'itemCode') {
item.componentProps.isSearchList = true
}else if (item.field == 'manageMode') {
item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
item.componentProps.options = manageModeOptions.value
//item.componentProps.options = manageModeOptions.value?.filter(item=>item.value!='BY_QUANTITY')
formRef.value.formRef.formModel.manageMode = item.componentProps.options[0].value
}
})

33
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -91,6 +91,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import {importTemplateHoldOk} from "@/api/wms/inventorymoveRequestMain";
import * as ruleApi from '@/api/wms/rule/index'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'InventorymoveRequestMain' })
@ -348,20 +349,37 @@ console.log('tableFormColumns',InventorymoveRequestDetail.allSchemas.tableFormCo
const updataTableColumns = (val) => {
tableColumns.value = val
}
const fromManagementPrecision = ref('')
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
nextTick(async() => {
if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(val.length==0) return
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch']
if (item['batch'] != '') {
newRow['fromBatch'] = item['batch']
}else{
newRow['fromBatch'] = getFormattedDate(); // YYYYMMDD
}
await ruleApi.getManagementPrecision({
itemCodes: [row['itemCode']],
locationCode:val[0]['locationCode']
}).then((res) => {
fromManagementPrecision.value = res[0].ManagementPrecision
})
if (fromManagementPrecision.value == 'BY_QUANTITY') {
newRow['fromBatchFormItemType'] = 'FormDate'
newRow['disabled_fromBatch'] = false
} else {
newRow['fromBatchFormItemType'] = ''
newRow['disabled_fromBatch'] = true
}
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
@ -824,4 +842,11 @@ onMounted(async () => {
importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateExceptMove()
}
})
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>

8
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -558,11 +558,15 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled: true
disabled: true,
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
},
form: {
componentProps: {
disabled: true
disabled: true,
valueFormat: 'YYYYMMDD',
}
}
},

Loading…
Cancel
Save