|
@ -91,6 +91,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import {importTemplateHoldOk} from "@/api/wms/inventorymoveRequestMain"; |
|
|
import {importTemplateHoldOk} from "@/api/wms/inventorymoveRequestMain"; |
|
|
|
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 隔离转线边申请HoldtoWipRequestMain |
|
|
// 隔离转线边申请HoldtoWipRequestMain |
|
|
// 只有隔离转线边申请在使用的 |
|
|
// 只有隔离转线边申请在使用的 |
|
@ -288,7 +289,8 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
const fromManagementPrecision = ref('') |
|
|
|
|
|
const toManagementPrecision = ref('') |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -310,6 +312,34 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
newRow['toInventoryStatus'] = "OK" //HoldtoWipRequestMain 隔离转线边 |
|
|
newRow['toInventoryStatus'] = "OK" //HoldtoWipRequestMain 隔离转线边 |
|
|
tableData.value.push(newRow) |
|
|
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 { |
|
|
} else { |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
} |
|
|
} |
|
@ -708,4 +738,11 @@ onMounted(async () => { |
|
|
importTemplateData.templateUrl = await InventorymoveRequestMainApi.importTemplateExceptMove() |
|
|
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> |
|
|
</script> |
|
|