zhou zhou
3 天以前 7c2bffa1a495cc4a3a263f654c08c231009c5c4e
rsf-design/src/views/orders/delivery/deliveryPage.helpers.js
@@ -1,16 +1,18 @@
import { $t } from '@/locales'
const DELIVERY_STATUS_META = {
  1: { text: '正常', type: 'success', bool: true },
  0: { text: '禁用', type: 'danger', bool: false }
  1: { text: $t('pages.orders.delivery.status.normal'), type: 'success', bool: true },
  0: { text: $t('pages.orders.delivery.status.disabled'), type: 'danger', bool: false }
}
const DELIVERY_EXCE_STATUS_META = {
  0: { text: '未执行', type: 'info' },
  1: { text: '执行中', type: 'warning' },
  2: { text: '部分完成', type: 'primary' },
  3: { text: '已完成', type: 'success' }
  0: { text: $t('pages.orders.delivery.status.pending'), type: 'info' },
  1: { text: $t('pages.orders.delivery.status.running'), type: 'warning' },
  2: { text: $t('pages.orders.delivery.status.partial'), type: 'primary' },
  3: { text: $t('pages.orders.delivery.status.completed'), type: 'success' }
}
export const DELIVERY_REPORT_TITLE = 'DO单报表'
export const DELIVERY_REPORT_TITLE = $t('pages.orders.delivery.reportTitle')
export const DELIVERY_REPORT_STYLE = {
  titleAlign: 'center',
  titleLevel: 'strong',
@@ -38,7 +40,7 @@
  if (status === false || Number(status) === 0) {
    return DELIVERY_STATUS_META[0]
  }
  return { text: '未知', type: 'info', bool: false }
  return { text: $t('common.status.unknown'), type: 'info', bool: false }
}
function normalizeExceStatusMeta(exceStatus, exceStatusText) {
@@ -229,7 +231,7 @@
  orientation = DELIVERY_REPORT_STYLE.orientation
} = {}) {
  return {
    reportTitle: 'DO单明细报表',
    reportTitle: $t('pages.orders.delivery.detailReportTitle'),
    reportDate: previewMeta.reportDate,
    printedAt: previewMeta.printedAt,
    operator: previewMeta.operator,
@@ -246,12 +248,12 @@
  const actions = [
    {
      key: 'view',
      label: '查看详情',
      label: $t('pages.orders.delivery.actions.view'),
      icon: 'ri:eye-line'
    },
    {
      key: 'items',
      label: '明细',
      label: $t('pages.orders.delivery.actions.items'),
      icon: 'ri:list-check-3'
    }
  ]
@@ -259,7 +261,7 @@
  if (Number(normalizedRow.exceStatus) === 0) {
    actions.push({
      key: 'delete',
      label: '删除',
      label: $t('pages.orders.delivery.actions.delete'),
      icon: 'ri:delete-bin-5-line',
      color: 'var(--art-error)'
    })