|
@ -133,6 +133,7 @@ import { getAccessToken } from '@/utils/auth' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
|
|
import * as SubjectAccountApi from '@/api/wms/subjectAccount' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 计划外入库申请 |
|
|
// 计划外入库申请 |
|
|
defineOptions({ name: 'UnplannedreceiptRequestMain' }) |
|
|
defineOptions({ name: 'UnplannedreceiptRequestMain' }) |
|
@ -246,6 +247,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
} |
|
|
} |
|
|
if(formField === 'reasonCodeRequisition'){ |
|
|
if(formField === 'reasonCodeRequisition'){ |
|
|
setV['reasonCodeRequisition'] = val[0]['code'] |
|
|
setV['reasonCodeRequisition'] = val[0]['code'] |
|
|
|
|
|
let accountRes = await SubjectAccountApi.getSubjectAccountPage({ |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
code: val[0]['code'], |
|
|
|
|
|
costcentreType: formRef.formModel['costCenterType'], |
|
|
|
|
|
sort: '', |
|
|
|
|
|
by: 'ASC' |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules) |
|
|
|
|
|
if( UnplannedreceiptRequestMainRules['projectCode']){ |
|
|
|
|
|
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false |
|
|
|
|
|
if(accountRes&&accountRes.list&&accountRes.list.length>0){ |
|
|
|
|
|
if(accountRes.list[0]['isProject']=='TRUE'){ |
|
|
|
|
|
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(formField === 'projectCode'){ |
|
|
if(formField === 'projectCode'){ |
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|