Browse Source

YT-563:隔离转线边申请

intex_online20241111
宋国强 3 months ago
parent
commit
5755f2d92c
  1. 39
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/index.vue
  2. 8
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts

39
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainHOLDWIP/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()
// 线HoldtoWipRequestMain
// 线使
@ -288,7 +289,8 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
const updataTableColumns = (val) => {
tableColumns.value = val
}
const fromManagementPrecision = ref('')
const toManagementPrecision = ref('')
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
@ -310,6 +312,34 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['toInventoryStatus'] = "OK" //HoldtoWipRequestMain 线
tableData.value.push(newRow)
})
}else if(formField == 'toLocationCode'){//
debugger
//
await ruleApi.getManagementPrecision({
itemCodes: [row['itemCode']],
locationCode:row['fromLocationCode']
}).then((res) => {
fromManagementPrecision.value = res[0].ManagementPrecision
})
if (fromManagementPrecision.value == 'BY_QUANTITY') {//+
//
await ruleApi.getManagementPrecision({
itemCodes: [row['itemCode']],
locationCode:row['locationCode']
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
})
if (toManagementPrecision.value != 'BY_QUANTITY') {//+
if(newRow['fromBatch']==''){
newRow['fromBatch'] = getFormattedDate(); // YYYYMMDD
}
newRow['fromBatchFormItemType'] = 'FormDate'
newRow['disabled_fromBatch'] = false
}else {
newRow['fromBatchFormItemType'] = ''
newRow['disabled_fromBatch'] = true
}
} else {
row[formField] = val[0][searchField]
}
@ -708,4 +738,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/inventorymoveRequestMainHOLDWIP/inventorymoveRequestMain.data.ts

@ -557,11 +557,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