|
@ -56,11 +56,12 @@ |
|
|
@success="getList" |
|
|
@success="getList" |
|
|
:rules="detailAllSchemasRules" |
|
|
:rules="detailAllSchemasRules" |
|
|
:formAllSchemas="detailAllSchemas" |
|
|
:formAllSchemas="detailAllSchemas" |
|
|
:isBusiness="false" |
|
|
:isBusiness="true" |
|
|
:apiUpdate="apiUpdate" |
|
|
:apiUpdate="apiUpdate" |
|
|
:apiCreate="apiCreate" |
|
|
:apiCreate="apiCreate" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
:detailData="detailData" |
|
|
:detailData="detailData" |
|
|
|
|
|
@submitForm="submitForm" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@ -257,7 +258,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
// 动态显示操作列按钮 |
|
|
// 动态显示操作列按钮 |
|
|
buttondata.value = [ |
|
|
buttondata.value = [ |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','1','PLAN_PURCHASE_READY','1'])}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','1','PLAN_PURCHASE_READY','1'])}), // 编辑 |
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1','1','PLAN_PURCHASE_READY','1'])}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1','1','PLAN_PURCHASE_READY','1'])}), // 删除 |
|
|
] |
|
|
] |
|
|
} finally { |
|
|
} finally { |
|
|
detailLoading.value = false |
|
|
detailLoading.value = false |
|
@ -337,6 +338,24 @@ const formRef = ref() |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
formRef.value.open(type, row, masterParmas.value) |
|
|
formRef.value.open(type, row, masterParmas.value) |
|
|
} |
|
|
} |
|
|
|
|
|
// form 提交 |
|
|
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
|
|
try { |
|
|
|
|
|
if (formType === 'create') { |
|
|
|
|
|
await props.apiCreate(data) |
|
|
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
|
|
} else { |
|
|
|
|
|
await props.apiUpdate(data) |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
} |
|
|
|
|
|
formRef.value.dialogVisible = false |
|
|
|
|
|
// 刷新当前列表 |
|
|
|
|
|
getList() |
|
|
|
|
|
} finally { |
|
|
|
|
|
formRef.value.formLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
emit('searchTableSuccessDetail', formField, searchField, val, formRef) |
|
|
emit('searchTableSuccessDetail', formField, searchField, val, formRef) |
|
|