Browse Source

SBBJ-881备件申领,申请审批,明细编辑保存,没反应

master
张立 1 month ago
parent
commit
363c3bf22a
  1. 21
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  2. 19
      src/views/eam/item/applicationRecord/index.vue
  3. 5
      src/views/eam/item/itemOrderMain/index.vue

21
src/views/eam/item/applicationRecord/applicationRecordMain.data.ts

@ -173,6 +173,22 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemNumber',
sort: 'custom',
isSearch: true,
form:{
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
multiple: true,
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号',
@ -196,6 +212,11 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
componentProps: {
disabled:true
}
}
},
{
label: '类型',

19
src/views/eam/item/applicationRecord/index.vue

@ -45,7 +45,7 @@
:apiDelete="ApplicationRecordDetailApi.deleteApplicationRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true" />
:detailButtonIsShow="true" @detailSubmitForm="detailSubmitForm"/>
<!-- 审批详情 -->
<approveDetail ref="detailRef1" :isBasic="false" :allSchemas="ApplicationRecordMain.allSchemas"
:detailAllSchemas="ApplicationRecordDetail.allSchemas" :detailAllSchemasRules="ApplicationRecordDetailRules"
@ -332,7 +332,22 @@
}
})
}
const detailSubmitForm =async (formType, data, formRef) => {
try {
if (formType === 'create') {
await ApplicationRecordDetailApi.createApplicationRecordDetail(data)
message.success(t('common.createSuccess'))
} else {
await ApplicationRecordDetailApi.updateApplicationRecordDetail(data)
message.success(t('common.updateSuccess'))
}
formRef.dialogVisible = false
//
detailRef.value.getList()
} finally {
formRef.formLoading = false
}
}
/** 初始化 **/
onMounted(async () => {
getList()

5
src/views/eam/item/itemOrderMain/index.vue

@ -297,9 +297,8 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
}
getList() //
}
const detailSubmitForm =async (formType, data, formRef) => {
console.log(formType, data, formRef)
try {
const detailSubmitForm =async (formType, data, formRef) => {
try {
if (formType === 'create') {
await ItemOrderDetailApi.createItemOrderDetail(data)
message.success(t('common.createSuccess'))

Loading…
Cancel
Save