采购/到货:去掉方案里没有的质检字段与入口
客户方案没有质量管理模块(菜单里无 IQC/检验页面),采购申请、采购订单、
到货通知却仍带「是否质检/是否检验」开关和「执行质检」按钮,属于死入口:
- 采购申请单、采购订单:明细表单去掉是否质检开关,列表/详情去掉对应列
- 到货通知:行表单/行选择弹窗去掉是否检验,列表去掉是否检验/质检结果/
合格数量/检验单号列,去掉「执行质检」按钮与跳转 IQC 的逻辑
采购订单生成到货通知时质检标识随之为空,到货通知直接进入待入库。
Co-Authored-By: Claude Code <noreply@anthropic.com>
| | |
| | | slots: { default: 'remark' }, |
| | | }, |
| | | { |
| | | field: 'qcCheckFlag', |
| | | title: '是否质检', |
| | | minWidth: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'qcCheckFlag' }, |
| | | }, |
| | | { |
| | | field: 'count', |
| | | title: '数量', |
| | | minWidth: 120, |
| | |
| | | erpPriceMultiply, |
| | | } from '@vben/utils'; |
| | | |
| | | import { Input, InputNumber, Switch } from 'ant-design-vue'; |
| | | import { Input, InputNumber } from 'ant-design-vue'; |
| | | |
| | | import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | |
| | | taxPrice: undefined, |
| | | totalPrice: undefined, |
| | | remark: undefined, |
| | | qcCheckFlag: false, |
| | | }; |
| | | tableData.value.push(newRow); |
| | | // 通知父组件更新 |
| | |
| | | <template #remark="{ row }"> |
| | | <Input v-if="!disabled" v-model:value="row.remark" class="w-full" /> |
| | | <span v-else>{{ row.remark || '-' }}</span> |
| | | </template> |
| | | <template #qcCheckFlag="{ row }"> |
| | | <Switch |
| | | v-if="!disabled" |
| | | v-model:checked="row.qcCheckFlag" |
| | | checked-children="是" |
| | | un-checked-children="否" |
| | | @change="handleRowChange(row)" |
| | | /> |
| | | <span v-else>{{ row.qcCheckFlag ? '是' : '否' }}</span> |
| | | </template> |
| | | <template #taxPercent="{ row }"> |
| | | <InputNumber |
| | |
| | | slots: { default: 'remark' }, |
| | | }, |
| | | { |
| | | field: 'qcCheckFlag', |
| | | title: '是否质检', |
| | | minWidth: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'qcCheckFlag' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | fixed: 'right', |
| | |
| | | minWidth: 160, |
| | | showOverflow: 'tooltip', |
| | | }, |
| | | { |
| | | field: 'qcCheckFlag', |
| | | title: '是否质检', |
| | | minWidth: 80, |
| | | formatter: ({ cellValue }) => (cellValue ? '是' : '否'), |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | count: item.count, |
| | | taxPercent: item.taxPercent, |
| | | demandTime: item.demandTime, |
| | | qcCheckFlag: item.qcCheckFlag, |
| | | remark: item.remark, |
| | | })); |
| | | try { |
| | |
| | | erpPriceMultiply, |
| | | } from '@vben/utils'; |
| | | |
| | | import { Input, InputNumber, DatePicker, Switch } from 'ant-design-vue'; |
| | | import { Input, InputNumber, DatePicker } from 'ant-design-vue'; |
| | | |
| | | import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | |
| | | demandTime: undefined, |
| | | remark: undefined, |
| | | totalPrice: 0, |
| | | qcCheckFlag: false, |
| | | }; |
| | | tableData.value.push(newRow); |
| | | emit('update:items', [...tableData.value]); |
| | |
| | | <template #remark="{ row }"> |
| | | <Input v-if="!disabled" v-model:value="row.remark" class="w-full" @change="handleRowChange(row)" /> |
| | | <span v-else>{{ row.remark || '-' }}</span> |
| | | </template> |
| | | <template #qcCheckFlag="{ row }"> |
| | | <Switch |
| | | v-if="!disabled" |
| | | v-model:checked="row.qcCheckFlag" |
| | | checked-children="是" |
| | | un-checked-children="否" |
| | | @change="handleRowChange(row)" |
| | | /> |
| | | <span v-else>{{ row.qcCheckFlag ? '是' : '否' }}</span> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <TableAction |
| | |
| | | |
| | | import { nextTick, ref } from 'vue'; |
| | | |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | | |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | |
| | | import { useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | |
| | | { |
| | | field: 'arrivalQuantity', |
| | | title: '到货数量', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'iqcCheckFlag', |
| | | title: '是否检验', |
| | | width: 90, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'qualifiedQuantity', |
| | | title: '合格数量', |
| | | width: 100, |
| | | }, |
| | | { |
| | |
| | | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { z } from '#/adapter/form'; |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'iqcCheckFlag', |
| | | title: '是否检验', |
| | | width: 90, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING }, |
| | | }, |
| | | }, |
| | | { |
| | | field: 'iqcCheckResult', |
| | | title: '质检结果', |
| | | width: 100, |
| | | slots: { default: 'iqcCheckResult' }, |
| | | }, |
| | | { |
| | | field: 'qualifiedQuantity', |
| | | title: '合格数量', |
| | | width: 100, |
| | | }, |
| | | { |
| | | field: 'iqcCode', |
| | | title: '检验单号', |
| | | minWidth: 140, |
| | | slots: { default: 'iqcCode' }, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '备注', |
| | | minWidth: 120, |
| | |
| | | precision: 2, |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | | { |
| | | fieldName: 'iqcCheckFlag', |
| | | label: '是否检验', |
| | | component: 'Switch', |
| | | rules: z.boolean().default(false), |
| | | }, |
| | | { |
| | | fieldName: 'remark', |
| | |
| | | } |
| | | } |
| | | |
| | | /** 提示前往质检模块 */ |
| | | function handleQc() { |
| | | message.info('请前往【质量管理 - IQC检验】中进行来料检验操作'); |
| | | } |
| | | |
| | | /** 执行入库:根据到货通知单生成采购入库单 */ |
| | | async function handleReceipt(row: MesWmArrivalNoticeApi.ArrivalNotice) { |
| | | const hideLoading = message.loading({ |
| | |
| | | title: $t('ui.actionMessage.deleteConfirm', [row.code]), |
| | | confirm: handleDelete.bind(null, row), |
| | | }, |
| | | }, |
| | | { |
| | | label: '执行质检', |
| | | type: 'link', |
| | | ifShow: row.status === MesWmArrivalNoticeStatusEnum.PENDING_QC, |
| | | onClick: handleQc, |
| | | }, |
| | | { |
| | | label: '执行入库', |
| | |
| | | |
| | | import { computed } from 'vue'; |
| | | |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | |
| | | import { Button, message, Tag } from 'ant-design-vue'; |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { |
| | |
| | | noticeId: number; |
| | | }>(); |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const isEditable = computed(() => |
| | | // 是否可编辑明细行 |
| | |
| | | handleRefresh(); |
| | | } finally { |
| | | hideLoading(); |
| | | } |
| | | } |
| | | |
| | | /** 跳转 IQC 检验单详情 */ |
| | | function handleOpenIqc(row: MesWmArrivalNoticeLineApi.ArrivalNoticeLine) { |
| | | if (row.iqcId) { |
| | | router.push({ name: 'MesQcIqc', query: { id: row.iqcId } }); |
| | | } |
| | | } |
| | | |
| | |
| | | }, |
| | | ]" |
| | | /> |
| | | </template> |
| | | <template #iqcCode="{ row }"> |
| | | <Button |
| | | v-if="row.iqcCode" |
| | | size="small" |
| | | type="link" |
| | | @click="handleOpenIqc(row)" |
| | | > |
| | | {{ row.iqcCode }} |
| | | </Button> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template #iqcCheckResult="{ row }"> |
| | | <Tag v-if="row.iqcCheckResult === 1" color="success">合格</Tag> |
| | | <Tag v-else-if="row.iqcCheckResult === 2" color="warning">特采</Tag> |
| | | <Tag v-else-if="row.iqcCheckResult === 3" color="error">不合格退货</Tag> |
| | | <Tag v-else-if="row.iqcCheckResult === 4" color="error">不合格报废</Tag> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <TableAction |