| | |
| | | import type { NumberDictDataType } from '../../../../packages/effects/hooks/src'; |
| | | import type { NumberDictDataType } from '@vben/hooks'; |
| | | |
| | | import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | |
| | | DICT_TYPE, |
| | | MesAutoCodeRuleCode, |
| | | WlsStockTakingTypeEnum, |
| | | } 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'; |
| | | |
| | |
| | | componentProps: { |
| | | placeholder: '请选择开始时间', |
| | | showTime: true, |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['type'], |
| | |
| | | componentProps: { |
| | | placeholder: '请选择结束时间', |
| | | showTime: true, |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['type'], |
| | |
| | | unCheckedChildren: '否', |
| | | }, |
| | | rules: z.boolean().default(false), |
| | | }, |
| | | { |
| | | fieldName: 'autoGenerate', |
| | | label: '自动生成', |
| | | component: 'Switch', |
| | | componentProps: { |
| | | checkedChildren: '是', |
| | | unCheckedChildren: '否', |
| | | }, |
| | | rules: z.boolean().default(false), |
| | | }, |
| | | { |
| | | fieldName: 'generateCron', |
| | | label: '生成周期(Cron)', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入 Cron 表达式,如 0 0 2 * * ?', |
| | | helpMessage: |
| | | '启用自动生成后,需在「系统管理->定时任务」配置 handler=MesWmStockTakingPlanAutoJob 的 cron 任务,到期自动按本方案生成盘点任务', |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['autoGenerate'], |
| | | show: (values) => !!values.autoGenerate, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'lastGenerateTime', |
| | | label: '上次生成时间', |
| | | component: 'Input', |
| | | disabled: true, |
| | | dependencies: { |
| | | triggerFields: [''], |
| | | show: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'remark', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | field: 'autoGenerate', |
| | | title: '自动生成', |
| | | width: 100, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'lastGenerateTime', |
| | | title: '上次生成时间', |
| | | width: 180, |
| | | formatter: 'formatDateTime', |
| | | }, |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | | width: 120, |
| | |
| | | component: markRaw(StockTakingPlanConditionValueInput), |
| | | // 条件值控件内部按条件类型切换选择器,仅选择类型后展示 |
| | | dependencies: { |
| | | triggerFields: ['type'], |
| | | if: (values) => values.type !== null, |
| | | triggerFields: ['type', 'valueCode'], |
| | | show: (values) => values.type != null, |
| | | componentProps: (values) => ({ |
| | | type: values.type, |
| | | valueCode: values.valueCode, |