5 天以前 91c82965b2d987452ca276e3a03b48c8dcda2ae9
src/views/mes/md/item/data.ts
@@ -9,8 +9,8 @@
  CommonStatusEnum,
  DICT_TYPE,
  MesAutoCodeRuleCode,
} from '../../../../packages/constants/src';
import { getDictOptions } from '../../../../packages/effects/hooks/src';
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Button } from 'ant-design-vue';
@@ -111,7 +111,7 @@
      component: 'RadioGroup',
      componentProps: {
        buttonStyle: 'solid',
        disabled: false,
        disabled: true,
        optionType: 'button',
        options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
      },
@@ -257,12 +257,7 @@
}
/** 列表的字段 */
export function useGridColumns(
  onStatusChange?: (
    newStatus: number,
    row: MesMdItemApi.Item,
  ) => PromiseLike<boolean | undefined>,
): VxeTableGridOptions<MesMdItemApi.Item>['columns'] {
export function useGridColumns(): VxeTableGridOptions<MesMdItemApi.Item>['columns'] {
  return [
    {
      field: 'code',
@@ -315,15 +310,11 @@
    {
      field: 'status',
      title: '状态',
      width: 120,
      width: 100,
      align: 'center',
      cellRender: {
        attrs: { beforeChange: onStatusChange },
        name: 'CellSwitch',
        props: {
          checkedValue: CommonStatusEnum.ENABLE,
          unCheckedValue: CommonStatusEnum.DISABLE,
        },
        name: 'CellDict',
        props: { type: DICT_TYPE.COMMON_STATUS },
      },
    },
    {
@@ -341,31 +332,31 @@
  ];
}
/** 物料选择弹窗搜索表单 */
/** 品种选择弹窗搜索表单 */
export function useItemSelectGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'code',
      label: '物料编码',
      label: '品种编码',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入物料编码',
        placeholder: '请输入品种编码',
      },
    },
    {
      fieldName: 'name',
      label: '物料名称',
      label: '品种名称',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入物料名称',
        placeholder: '请输入品种名称',
      },
    },
  ];
}
/** 物料选择弹窗列表字段 */
/** 品种选择弹窗列表字段 */
export function useItemSelectGridColumns(
  multiple = true,
): VxeTableGridOptions<MesMdItemApi.Item>['columns'] {
@@ -373,12 +364,12 @@
    { type: multiple ? 'checkbox' : 'radio', width: 50 },
    {
      field: 'code',
      title: '物料编码',
      title: '品种编码',
      width: 180,
    },
    {
      field: 'name',
      title: '物料名称',
      title: '品种名称',
      minWidth: 160,
      align: 'left',
    },
@@ -396,7 +387,7 @@
    },
    {
      field: 'itemOrProduct',
      title: '物料/产品',
      title: '品种/产品',
      width: 110,
      align: 'center',
      cellRender: {