diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 5f7a5e26c..a19b01b04 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -713,7 +713,6 @@ const opensearchTable = ( // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - debugger if (val == 'edit') { // 编辑 if(props.isOpenSearchTable){ @@ -759,6 +758,7 @@ const submitForm = async (formType, data) => { await props.apiUpdate(data) message.success(t('common.updateSuccess')) } + emit('handleMainFefresh') formRef.value.dialogVisible = false // 刷新当前列表 await getList() @@ -802,6 +802,7 @@ const handleDelete = async (id: number) => { await props.apiDelete(id) tableObject.loading = false message.success(t('common.delSuccess')) + emit('handleMainFefresh') // 刷新列表 await getList() updateKey.value += 1 diff --git a/src/views/mes/dismantlingMain/dismantlingMain.data.ts b/src/views/mes/dismantlingMain/dismantlingMain.data.ts index 7de151710..0df99a562 100644 --- a/src/views/mes/dismantlingMain/dismantlingMain.data.ts +++ b/src/views/mes/dismantlingMain/dismantlingMain.data.ts @@ -143,13 +143,21 @@ export const DismantlingMain = useCrudSchemas(reactive([ }, { label: '工单状态', + field: 'workbillStatus', + sort: 'custom', + dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS, + dictClass: 'string', + isSearch: true, + }, + { + label: '是否可用', field: 'status', sort: 'custom', dictType: DICT_TYPE.QUALIFY_STATUS, dictClass: 'string', - isForm: true, - isSearch: true, - isTable: true, + isForm: false, + isSearch: false, + isTable: false, form: { component: 'Switch', value: '2', diff --git a/src/views/mes/dismantlingMain/index.vue b/src/views/mes/dismantlingMain/index.vue index d617b45e1..b41931c64 100644 --- a/src/views/mes/dismantlingMain/index.vue +++ b/src/views/mes/dismantlingMain/index.vue @@ -63,6 +63,7 @@ :detailButtonIsShowAdd="true" :detailButtonIsShowEdit="true" :detailButtonIsShowDelete="true" + @handleMainFefresh="handleMainFefresh" @searchTableSuccessDetail="searchTableSuccessDetail" :key="count" /> @@ -170,9 +171,29 @@ const buttonTableClick = async (val, row) => { } } +let count = ref(0) +const handleMainFefresh = async()=>{ + count.value++; + await getList() +} + /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + DismantlingMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'workbillStatus'){ + item.value = '2'; + item.componentProps.disabled = true + } + }) + }else{ + DismantlingMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'workbillStatus'){ + item.componentProps.disabled = true + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/mes/qualityform/index.vue b/src/views/mes/qualityform/index.vue index fafd85101..d8b5c40dd 100644 --- a/src/views/mes/qualityform/index.vue +++ b/src/views/mes/qualityform/index.vue @@ -63,8 +63,7 @@ :detailButtonIsShowAdd="true" :detailButtonIsShowEdit="true" :detailButtonIsShowDelete="true" - @handleDeleteDetail="handleDeleteDetail" - @handleCreateDetail="handleCreateDetail" + @handleMainFefresh="handleMainFefresh" @searchTableSuccessDetail="searchTableSuccessDetail" :key="count" /> @@ -188,15 +187,13 @@ const buttonTableClick = async (val, row) => { handleDelete(row.id) } } -const handleDeleteDetail = async()=>{ - getList() - -} +// const handleDeleteDetail = async()=>{ +// getList() +// } let count = ref(0) -const handleCreateDetail = async()=>{ +const handleMainFefresh = async()=>{ count.value++ getList() - } /** 添加/修改操作 */ const basicFormRef = ref()