| | |
| | | <script lang="ts" setup> |
| | | <script lang="ts" setup> |
| | | import type { FormType } from '../data'; |
| | | |
| | | import type { MesProFeedbackApi } from '#/api/mes/pro/feedback'; |
| | |
| | | import { MesAutoCodeRuleCode, MesProFeedbackStatusEnum } from '@vben/constants'; |
| | | import { useUserStore } from '@vben/stores'; |
| | | |
| | | import { Button, message, Popconfirm, Tabs } from 'ant-design-vue'; |
| | | import { Alert, Button, message, Popconfirm, Tabs } from 'ant-design-vue'; |
| | | |
| | | import { useVbenForm } from '#/adapter/form'; |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | |
| | | } |
| | | |
| | | /** 加载工序的 checkFlag 用于回显数量区域 */ |
| | | async function resolveCheckFlag(routeId?: number, processId?: number) { |
| | | async function resolveCheckFlag( |
| | | routeId?: number, |
| | | processId?: number, |
| | | taskCheckFlag?: boolean, |
| | | ) { |
| | | // 是否质检以任务(工单工序快照)为准 |
| | | if (typeof taskCheckFlag === 'boolean') { |
| | | return taskCheckFlag; |
| | | } |
| | | if (!routeId || !processId) { |
| | | return true; |
| | | } |
| | |
| | | const checkFlag = await resolveCheckFlag( |
| | | formData.value.routeId, |
| | | formData.value.processId, |
| | | formData.value.checkFlag, |
| | | ); |
| | | // 设置到 values |
| | | await formApi.setValues({ ...formData.value, checkFlag }); |
| | |
| | | |
| | | <template> |
| | | <Modal :title="getTitle" class="w-3/5"> |
| | | <Alert |
| | | v-if="canApprove" |
| | | class="mx-4 mb-4" |
| | | type="info" |
| | | show-icon |
| | | message="审批前请核对生产与库存配置" |
| | | description="自动扣料工序需要线边库有足够物料;需检工序需要配置过程检验方案。末道工序请先配置成品入库仓位。" |
| | | /> |
| | | <Form class="mx-4" /> |
| | | <FeedbackParamFields ref="paramFields" :task-id="paramTaskId" :snapshot="paramSnapshot" :readonly="!isEditable" /> |
| | | <Tabs |