Browse Source

HL-6067计划外出入库长春14测试环境,已经选择领用原因代码,项目代码必填,但是还是出现计划外出入库申请界面,没有填写项目代码系统直接保存通过,详见HL-5757

hella_online_20240924
yufei_wang 2 months ago
parent
commit
340e0b6c93
  1. 4
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  2. 3
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  3. 36
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

4
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -151,6 +151,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
setV['reasonDescRequisition'] = val[0]['accountingName']
//
if(UnplannedissueRequestMainRules['projectCode']){
UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
}
if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode']

3
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -674,6 +674,9 @@ export const UnplannedissueRequestMainRules = reactive({
reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' }
],
projectCode: [
{ required: false, message: '请输入项目代码', trigger: 'blur' }
],
})
/**

36
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -247,22 +247,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
if(formField === 'reasonCodeRequisition'){
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
}
}
// 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(UnplannedreceiptRequestMainRules['projectCode']){
UnplannedreceiptRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
}
if(formField === 'projectCode'){

Loading…
Cancel
Save