Browse Source

HL-6425维修备件领用申请界面增加与计划外出入库项目代码必填相同校验,如果选择的领用原因强制填写项目则必填,否则不需要填写

hella_online_20241121
yufei_wang 2 weeks ago
parent
commit
1b249bb307
  1. 21
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  2. 3
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

21
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

@ -149,6 +149,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
if(formField === 'reasonCodeRequisition'){ if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code'] setV['reasonCodeRequisition'] = val[0]['code']
//
if(UnplannedissueRequestMainRules['projectCode']){
UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
UnplannedissueRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'projectCode') {
//
if(val[0]['isProject']=='TRUE'){
//-
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}else{
//-
setV['projectCode'] = ''
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
}
})
} }
if(formField === 'projectCode'){ if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']

3
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

@ -544,6 +544,9 @@ export const UnplannedissueRequestMainRules = reactive({
// dueTime: [ // dueTime: [
// { required: true, message: '请输入截止时间', trigger: 'blur' } // { required: true, message: '请输入截止时间', trigger: 'blur' }
// ], // ],
projectCode: [
{ required: false, message: '请输入项目代码', trigger: 'blur' }
],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],

Loading…
Cancel
Save