Browse Source

HL-6322线边原料报废中的项目代码是否为填写项,要求根据领用原因所选代码控制

hella_chenfang
yufei_wang 1 month ago
parent
commit
5e34912486
  1. 21
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue
  2. 3
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

21
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue

@ -299,6 +299,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
if(formField == 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
//
if(ProductionscrapRequestMainRules['projectCode']){
ProductionscrapRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
ProductionscrapRequestMain.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
}
}
})
}
setV[formField] = val[0][searchField]
tableData.value = [] //

3
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -1453,6 +1453,9 @@ export const ProductionscrapRequestMain = useCrudSchemas(
//表单校验
export const ProductionscrapRequestMainRules = reactive({
projectCode: [
{ required: false, message: '请输入项目代码', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],

Loading…
Cancel
Save