Browse Source

loading 报表模块

hella_online_20240829
wangyufei 4 months ago
parent
commit
73ce4ebf16
  1. 18
      src/components/BasicForm/src/BasicForm.vue
  2. 1
      src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts
  3. 12
      src/views/report/printClientPrinter/index.vue
  4. 29
      src/views/report/printClientPrinter/printClientPrinter.data.ts

18
src/components/BasicForm/src/BasicForm.vue

@ -706,20 +706,20 @@ const submitForm = async () => {
return return
} }
// //
// try { try {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data) emit('submitForm', formType.value, data)
// } finally { } finally {
// formLoading.value = false // formLoading.value = false
// } }
} else { } else {
// //
// try { try {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data) emit('submitForm', formType.value, data)
// } finally { } finally {
// formLoading.value = false // formLoading.value = false
// } }
} }
} else { } else {
// //
@ -728,7 +728,7 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} }

1
src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts

@ -64,7 +64,6 @@ export const PrintBusinesstypeTemplate = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '操作', label: '操作',

12
src/views/report/printClientPrinter/index.vue

@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:printClientPrinter:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:print-client-printer:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:printClientPrinter:import'}), // defaultButtons.defaultImportBtn({hasPermi:'wms:print-client-printer:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:printClientPrinter:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:print-client-printer:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:printClientPrinter:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:print-client-printer:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:printClientPrinter:delete'}), // 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.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true
if (formType === 'create') { if (formType === 'create') {
await PrintClientPrinterApi.createPrintClientPrinter(data) await PrintClientPrinterApi.createPrintClientPrinter(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -172,6 +173,7 @@ const formsSuccess = async (formType,data) => {
await PrintClientPrinterApi.updatePrintClientPrinter(data) await PrintClientPrinterApi.updatePrintClientPrinter(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} }

29
src/views/report/printClientPrinter/printClientPrinter.data.ts

@ -18,18 +18,45 @@ export const PrintClientPrinter = useCrudSchemas(reactive<CrudSchema[]>([
field: 'clientCode', field: 'clientCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'Select',
componentProps: {
options: [{
name:1111,
id:111
}],
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
}
}
}, },
{ {
label: '打印机名称', label: '打印机名称',
field: 'printerName', field: 'printerName',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'Select',
componentProps: {
options: [{
name:2222,
id:222
}],
optionsAlias: {
labelField: 'name',
valueField: 'id'
},
filterable: true,
}
}
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '操作', label: '操作',

Loading…
Cancel
Save