From 73ce4ebf168e84edd92aed049f222884b5c69b88 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 29 Jul 2024 16:40:26 +0800 Subject: [PATCH] =?UTF-8?q?loading=20=E6=8A=A5=E8=A1=A8=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 18 ++++++------ .../printBusinesstypeTemplate.data.ts | 1 - src/views/report/printClientPrinter/index.vue | 12 ++++---- .../printClientPrinter.data.ts | 29 ++++++++++++++++++- 4 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index c6843b4eb..1cc45251d 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -706,20 +706,20 @@ const submitForm = async () => { return } // 主子表——提交请求 - // try { + try { const data = unref(formRef)?.formModel emit('submitForm', formType.value, data) - // } finally { - // formLoading.value = false - // } + } finally { + // formLoading.value = false + } } else { // 编辑 - // try { + try { const data = unref(formRef)?.formModel emit('submitForm', formType.value, data) - // } finally { - // formLoading.value = false - // } + } finally { + // formLoading.value = false + } } } else { // 基础数据单表——提交请求 @@ -728,7 +728,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel emit('success', formType.value, data) } finally { - formLoading.value = false + // formLoading.value = false } } } diff --git a/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts b/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts index d237fccff..2204b0d92 100644 --- a/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts +++ b/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts @@ -64,7 +64,6 @@ export const PrintBusinesstypeTemplate = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - isSearch: true, }, { label: '操作', diff --git a/src/views/report/printClientPrinter/index.vue b/src/views/report/printClientPrinter/index.vue index 98f685147..59c64000d 100644 --- a/src/views/report/printClientPrinter/index.vue +++ b/src/views/report/printClientPrinter/index.vue @@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:printClientPrinter:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'wms:printClientPrinter:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'wms:printClientPrinter:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'wms:print-client-printer:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'wms:print-client-printer:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'wms:print-client-printer:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'wms:printClientPrinter:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:printClientPrinter:delete'}), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'wms:print-client-printer:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'wms:print-client-printer:delete'}), // 删除 ] // 列表-操作按钮事件 @@ -165,6 +165,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await PrintClientPrinterApi.createPrintClientPrinter(data) message.success(t('common.createSuccess')) @@ -172,6 +173,7 @@ const formsSuccess = async (formType,data) => { await PrintClientPrinterApi.updatePrintClientPrinter(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/report/printClientPrinter/printClientPrinter.data.ts b/src/views/report/printClientPrinter/printClientPrinter.data.ts index d7c112767..f988470d9 100644 --- a/src/views/report/printClientPrinter/printClientPrinter.data.ts +++ b/src/views/report/printClientPrinter/printClientPrinter.data.ts @@ -18,18 +18,45 @@ export const PrintClientPrinter = useCrudSchemas(reactive([ field: 'clientCode', sort: 'custom', isSearch: true, + form: { + component: 'Select', + componentProps: { + options: [{ + name:1111, + id:111 + }], + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '打印机名称', field: 'printerName', sort: 'custom', isSearch: true, + form: { + component: 'Select', + componentProps: { + options: [{ + name:2222, + id:222 + }], + optionsAlias: { + labelField: 'name', + valueField: 'id' + }, + filterable: true, + } + } }, { label: '备注', field: 'remark', sort: 'custom', - isSearch: true, }, { label: '操作',