| | |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | import { getAsnOrderActionList } from './asnOrderPage.helpers' |
| | | |
| | | export function createAsnOrderTableColumns({ handleActionClick }) { |
| | | export function createAsnOrderTableColumns({ |
| | | handleActionClick, |
| | | canEdit = false, |
| | | canDelete = false |
| | | }) { |
| | | return [ |
| | | { |
| | | type: 'selection', |
| | |
| | | label: $t('pages.orders.asnOrder.search.poCode'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'poId', |
| | | label: $t('pages.orders.asnOrder.search.poId'), |
| | | width: 110, |
| | | align: 'right', |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'wkTypeLabel', |
| | |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'purchaseOrgName', |
| | | label: $t('pages.orders.asnOrder.table.purchaseOrgName'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'businessTimeText', |
| | | label: $t('pages.orders.asnOrder.table.businessTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'supplierId', |
| | | label: $t('pages.orders.asnOrder.table.supplierId'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'exceStatusText', |
| | | label: $t('pages.orders.asnOrder.search.exceStatus'), |
| | | width: 120, |
| | |
| | | ) |
| | | }, |
| | | { |
| | | prop: 'updateByText', |
| | | label: $t('table.updateBy'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: $t('pages.orders.asnOrder.detail.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'createByText', |
| | | label: $t('table.createBy'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'createTimeText', |
| | | label: $t('pages.orders.asnOrder.detail.createTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'memo', |
| | | label: $t('table.remark'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | visible: false |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: $t('table.operation'), |
| | | width: 120, |
| | | width: 130, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: getAsnOrderActionList(row), |
| | | list: getAsnOrderActionList(row, { canEdit, canDelete }), |
| | | onClick: (item) => handleActionClick(item, row) |
| | | }) |
| | | } |