From 9289aa81fa46955d3acd6d7bf915e68f1602084f Mon Sep 17 00:00:00 2001 From: gaojs Date: Thu, 11 Apr 2024 09:11:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=8B=86=E8=A7=A3=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E4=B8=BB=E5=AD=90=E5=B7=A5=E5=8D=95=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 3 ++- .../dismantlingMain/dismantlingMain.data.ts | 14 ++++++++++--- src/views/mes/dismantlingMain/index.vue | 21 +++++++++++++++++++ src/views/mes/qualityform/index.vue | 13 +++++------- 4 files changed, 39 insertions(+), 12 deletions(-) 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()