|
@ -71,7 +71,6 @@ |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@inputNumberChange="inputNumberChange" |
|
|
@inputNumberChange="inputNumberChange" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|
|
|
|
|
@clearSearchInput="clearSearchInput" |
|
|
@clearSearchInput="clearSearchInput" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
@ -90,7 +89,6 @@ |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@detailBasicFormOnChange="qtyOnChange" |
|
|
@detailBasicFormOnChange="qtyOnChange" |
|
|
:detailValidate="detailValidate" |
|
|
:detailValidate="detailValidate" |
|
|
@onBlur="onBlur" |
|
|
|
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
@ -139,7 +137,11 @@ const tableColumns = ref([ |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
const defaultReasonCodeRequisition = ref(true) |
|
|
|
|
|
const setDefaultrReasonCodeRequisition = ()=>{ |
|
|
|
|
|
formRef.value.setDefaultBlurValue('reasonCodeRequisition','SC99') |
|
|
|
|
|
defaultReasonCodeRequisition.value = false |
|
|
|
|
|
} |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -201,6 +203,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
} |
|
|
} |
|
|
if (formField == 'q2Number') { |
|
|
if (formField == 'q2Number') { |
|
|
setV['noticeRemark'] = val[0]['desc'] |
|
|
setV['noticeRemark'] = val[0]['desc'] |
|
|
|
|
|
if(val[0]['number']){ |
|
|
|
|
|
setV['reasonCodeRequisition'] = '' |
|
|
|
|
|
setV['projectCode'] = '' |
|
|
|
|
|
} |
|
|
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'q1Number' || item.field == 'q3Number') { |
|
|
if (item.field == 'q1Number' || item.field == 'q3Number') { |
|
|
item.componentProps.enterSearch = false |
|
|
item.componentProps.enterSearch = false |
|
@ -227,14 +233,43 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
setV['costcentreCode'] = val[0]['costcentreCode'] |
|
|
setV['costcentreCode'] = val[0]['costcentreCode'] |
|
|
setV['costCenterType'] = val[0]['costcentreType'] |
|
|
setV['costCenterType'] = val[0]['costcentreType'] |
|
|
} |
|
|
} |
|
|
if(formField === 'reasonCodeRequisition'){ |
|
|
if(formField == 'reasonCodeRequisition'){ |
|
|
setV['reasonCodeRequisition'] = val[0]['code'] |
|
|
setV['reasonCodeRequisition'] = val[0]['code'] |
|
|
|
|
|
// 项目是否必填 |
|
|
|
|
|
if(ScrapRequestMainRules['projectCode']){ |
|
|
|
|
|
ScrapRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' |
|
|
|
|
|
} |
|
|
|
|
|
ScrapRequestMain.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(val[0]['code']){ |
|
|
|
|
|
setV['q2Number'] = '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(formField === 'projectCode'){ |
|
|
if(formField === 'projectCode'){ |
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|
} |
|
|
} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
|
|
|
if(formField == 'costCenterCode'){ |
|
|
|
|
|
if(defaultReasonCodeRequisition.value){ |
|
|
|
|
|
setDefaultrReasonCodeRequisition() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
@ -578,6 +613,12 @@ const openForm = async (type: string, row?: any) => { |
|
|
|
|
|
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
|
|
|
if(type == 'create'){ |
|
|
|
|
|
nextTick(()=>{ |
|
|
|
|
|
defaultReasonCodeRequisition.value = true |
|
|
|
|
|
// formRef.value.setDefaultBlurValue('costCenterCode','DEFC') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
|