gaoluyang
2 天以前 b64a0deae5b5d33f9e20671a68936b27f0b9b00b
src/views/mes/pro/task/data.ts
@@ -5,11 +5,11 @@
import { markRaw } from 'vue';
import { DICT_TYPE } from '../../../../packages/constants/src';
import { getDictOptions } from '../../../../packages/effects/hooks/src';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import CrmCustomerSelect from '#/components/crm-customer-select.vue';
import { getRangePickerDefaultProps } from '#/utils';
import { MdClientSelect } from '#/views/mes/md/client/components';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
import { ProProcessSelect } from '#/views/mes/process-design/process/components';
@@ -57,7 +57,7 @@
    {
      fieldName: 'clientId',
      label: '客户',
      component: markRaw(MdClientSelect),
      component: markRaw(CrmCustomerSelect),
      componentProps: {
        placeholder: '请选择客户',
      },
@@ -258,7 +258,7 @@
    {
      fieldName: 'clientId',
      label: '客户',
      component: markRaw(MdClientSelect),
      component: markRaw(CrmCustomerSelect),
      componentProps: {
        disabled: true,
      },
@@ -347,8 +347,8 @@
    },
    {
      field: 'duration',
      title: '生产时长',
      width: 80,
      title: '生产时长(h)',
      width: 120,
    },
    {
      field: 'endTime',
@@ -420,7 +420,7 @@
    },
    {
      fieldName: 'duration',
      label: '生产时长',
      label: '生产时长(h)',
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
@@ -456,7 +456,7 @@
  ];
}
/** 计算结束时间:开始时间 + 生产时长 × 8 小时 */
/** 计算结束时间:开始时间 + 生产时长(小时) */
async function recalcEndTime(formApi?: VbenFormApi) {
  if (!formApi) {
    return;
@@ -466,7 +466,7 @@
    const start = Number(values.startTime);
    await formApi.setFieldValue(
      'endTime',
      start + values.duration * 8 * 3600 * 1000,
      start + values.duration * 3600 * 1000,
    );
  }
}
@@ -553,7 +553,7 @@
      width: 170,
      formatter: 'formatDateTime',
    },
    { field: 'duration', title: '生产时长', width: 100 },
    { field: 'duration', title: '生产时长(h)', width: 120 },
    {
      field: 'endTime',
      title: '预计完成时间',