|
@ -1,7 +1,11 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="Configurationsetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search |
|
|
|
|
|
:schema="Configurationsetting.allSchemas.searchSchema" |
|
|
|
|
|
@search="setSearchParams" |
|
|
|
|
|
@reset="setSearchParams" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
@ -41,7 +45,7 @@ |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="basicFormRef" |
|
|
ref="basicFormRef" |
|
|
@success="getList" |
|
|
@success="formsSuccess" |
|
|
:rules="ConfigurationsettingRules" |
|
|
:rules="ConfigurationsettingRules" |
|
|
:formAllSchemas="Configurationsetting.allSchemas" |
|
|
:formAllSchemas="Configurationsetting.allSchemas" |
|
|
:apiUpdate="ConfigurationsettingApi.updateConfigurationsetting" |
|
|
:apiUpdate="ConfigurationsettingApi.updateConfigurationsetting" |
|
@ -53,7 +57,12 @@ |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Configurationsetting.allSchemas" /> |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Configurationsetting.allSchemas" /> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/wms/configurationsetting/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
<ImportForm |
|
|
|
|
|
ref="importFormRef" |
|
|
|
|
|
url="/wms/configurationsetting/import" |
|
|
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
|
|
@success="importSuccess" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -96,7 +105,7 @@ const HeadButttondata = [ |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:configurationsetting:export' }), // 导出 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:configurationsetting:export' }), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), //刷新 |
|
|
defaultButtons.defaultFreshBtn(null), //刷新 |
|
|
defaultButtons.defaultFilterBtn(null), //筛选 |
|
|
defaultButtons.defaultFilterBtn(null), //筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
// { |
|
|
// { |
|
|
// label: '自定义扩展按钮', |
|
|
// label: '自定义扩展按钮', |
|
|
// name: 'zdy', |
|
|
// name: 'zdy', |
|
@ -109,16 +118,22 @@ const HeadButttondata = [ |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'add') { // 新增 |
|
|
if (val == 'add') { |
|
|
|
|
|
// 新增 |
|
|
openForm('create') |
|
|
openForm('create') |
|
|
} else if (val == 'import') { // 导入 |
|
|
} else if (val == 'import') { |
|
|
|
|
|
// 导入 |
|
|
handleImport() |
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { |
|
|
|
|
|
// 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { |
|
|
|
|
|
// 刷新 |
|
|
getList() |
|
|
getList() |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { |
|
|
} else { // 其他按钮 |
|
|
// 筛选 |
|
|
|
|
|
} else { |
|
|
|
|
|
// 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -126,15 +141,17 @@ const buttonBaseClick = (val, item) => { |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = [ |
|
|
const butttondata = [ |
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:configurationsetting:update' }), // 编辑 |
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:configurationsetting:update' }), // 编辑 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:configurationsetting:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:configurationsetting:delete' }) // 删除 |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'edit') { // 编辑 |
|
|
if (val == 'edit') { |
|
|
|
|
|
// 编辑 |
|
|
// const res = await ConfigurationsettingApi.getItempackaging(row.id) |
|
|
// const res = await ConfigurationsettingApi.getItempackaging(row.id) |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { |
|
|
|
|
|
// 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -144,6 +161,18 @@ const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
|
basicFormRef.value.open(type, row) |
|
|
basicFormRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
// form表单提交 |
|
|
|
|
|
const formsSuccess = async (formType, data) => { |
|
|
|
|
|
if (formType === 'create') { |
|
|
|
|
|
await ConfigurationsettingApi.createConfigurationsetting(data) |
|
|
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
|
|
} else { |
|
|
|
|
|
await ConfigurationsettingApi.updateConfigurationsetting(data) |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
} |
|
|
|
|
|
basicFormRef.value.dialogVisible = false |
|
|
|
|
|
getList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
@ -204,7 +233,7 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
const formatter = (type) => { |
|
|
const formatter = (type) => { |
|
|
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter(item=>type==item.value)[0].label; |
|
|
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter((item) => type == item.value)[0].label |
|
|
return str |
|
|
return str |
|
|
} |
|
|
} |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|