Browse Source

列表字段点击跳转到详情

master
陈薪名 1 year ago
parent
commit
40c3582d16
  1. 22
      src/utils/disposition/defaultButtons.ts
  2. 2
      src/utils/disposition/tableColumns.ts
  3. 7
      src/views/wms/itempackaging/index.vue

22
src/utils/disposition/defaultButtons.ts

@ -165,17 +165,17 @@ export function drawerDeleteBtn(option:any) {
}
// 主列表-详情按钮
export function mainListDetailBtn(option:any) {
return __defaultBtnOption(option,{
label: '详情',
name: 'detail',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// export function mainListDetailBtn(option:any) {
// return __defaultBtnOption(option,{
// label: '详情',
// name: 'detail',
// hide: false,
// type: 'primary',
// color: '',
// link: true, // 文本展现按钮
// hasPermi: ''
// })
// }
// 主列表-编辑按钮
export function mainListEditBtn(option:any) {

2
src/utils/disposition/tableColumns.ts

@ -428,7 +428,7 @@ export const ItemBasicRules = reactive({
export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物品代码',
field: 'itemCode',
field: 'default',
sort: 'custom',
table: {
width: 150

7
src/views/wms/itempackaging/index.vue

@ -23,6 +23,11 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #default="{row}">
<el-button type="primary" link @click="openDetail(row.id)">
<span>{{ row.itemCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="butttondata"
@ -93,7 +98,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListDetailBtn(null), //
// defaultButtons.mainListDetailBtn(null), //
defaultButtons.mainListEditBtn({hasPermi:'wms:itempackaging:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:itempackaging:delete'}), //
]

Loading…
Cancel
Save