|
@ -135,6 +135,7 @@ import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import * as SubjectAccountApi from '@/api/wms/subjectAccount' |
|
|
import * as SubjectAccountApi from '@/api/wms/subjectAccount' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
|
|
import * as ruleApi from '@/api/wms/rule/index' |
|
|
// 计划外入库申请 |
|
|
// 计划外入库申请 |
|
|
defineOptions({ name: 'UnplannedreceiptRequestMain' }) |
|
|
defineOptions({ name: 'UnplannedreceiptRequestMain' }) |
|
|
|
|
|
|
|
@ -194,6 +195,7 @@ const isItemType = async (itemCode, labelTypeParams) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
|
|
|
const fromManagementPrecision = ref('') |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
nextTick(async () => { |
|
|
nextTick(async () => { |
|
|
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row ) |
|
|
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row ) |
|
@ -201,6 +203,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
if(formField == 'toLocationCode'){ |
|
|
if(formField == 'toLocationCode'){ |
|
|
row['toLocationCode'] = val[0]['code'] |
|
|
row['toLocationCode'] = val[0]['code'] |
|
|
|
|
|
|
|
|
|
|
|
await ruleApi.getManagementPrecision({ |
|
|
|
|
|
itemCodes: [row['itemCode']], |
|
|
|
|
|
locationCode:val[0]['code'] |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
fromManagementPrecision.value = res[0].ManagementPrecision |
|
|
|
|
|
if (fromManagementPrecision.value == 'BY_QUANTITY') { |
|
|
|
|
|
// row['disabled_batch'] = false |
|
|
|
|
|
UnplannedreceiptRequestDetailRules.batch[0].required = false |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
// row['disabled_batch'] = true |
|
|
|
|
|
UnplannedreceiptRequestDetailRules.batch[0].required = true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} else if(formField == 'itemCode'){ |
|
|
} else if(formField == 'itemCode'){ |
|
|
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['code'])) |
|
|
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['code'])) |
|
|
if(itemCodes.length>0){ |
|
|
if(itemCodes.length>0){ |
|
@ -525,7 +542,20 @@ const buttonTableClick = async (val, row) => { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
ruleApi.getManagementPrecision({ |
|
|
|
|
|
itemCodes: [item['itemCode']], |
|
|
|
|
|
locationCode:item['toLocationCode'] |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
fromManagementPrecision.value = res[0].ManagementPrecision |
|
|
|
|
|
if (fromManagementPrecision.value == 'BY_QUANTITY') { |
|
|
|
|
|
item.batch = formatDate(new Date(),'YYYYMMDD') |
|
|
|
|
|
item['disabled_batch'] = false |
|
|
|
|
|
} else { |
|
|
|
|
|
item['disabled_batch'] = true |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|