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) { // export function mainListDetailBtn(option:any) {
return __defaultBtnOption(option,{ // return __defaultBtnOption(option,{
label: '详情', // label: '详情',
name: 'detail', // name: 'detail',
hide: false, // hide: false,
type: 'primary', // type: 'primary',
color: '', // color: '',
link: true, // 文本展现按钮 // link: true, // 文本展现按钮
hasPermi: '' // hasPermi: ''
}) // })
} // }
// 主列表-编辑按钮 // 主列表-编辑按钮
export function mainListEditBtn(option:any) { 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[]>([ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '物品代码', label: '物品代码',
field: 'itemCode', field: 'default',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

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

@ -23,6 +23,11 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" 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 }"> <template #action="{ row }">
<ButtonBase <ButtonBase
:Butttondata="butttondata" :Butttondata="butttondata"
@ -93,7 +98,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListDetailBtn(null), // // defaultButtons.mainListDetailBtn(null), //
defaultButtons.mainListEditBtn({hasPermi:'wms:itempackaging:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:itempackaging:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:itempackaging:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:itempackaging:delete'}), //
] ]

Loading…
Cancel
Save