zhou zhou
16 小时以前 0d93ec4c10d146ffe287e7f4430ee66ad5832a17
rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js
@@ -5,7 +5,11 @@
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',
@@ -29,6 +33,13 @@
      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',
@@ -61,6 +72,27 @@
      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,
@@ -72,20 +104,48 @@
        )
    },
    {
      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)
        })
    }