feat(qc): 添加质检方案选择和检测日期筛选功能
- 在IPQC、IQQ、OQC、RQC质检模块中新增质检方案下拉选择组件
- 添加检测日期范围筛选功能,支持按时间段导出质检数据
- 新增通用质检导出时间范围选择弹窗组件
- 实现质检方案与生产订单、任务、物料的动态关联
- 优化导出功能,增加时间范围参数支持
- 统一质检模块的数据结构和表单验证规则
| | |
| | | /** 请åç³è¯· */ |
| | | export interface Leave { |
| | | id?: number; |
| | | employeeId?: number; |
| | | employeeName?: string; |
| | | userId?: number; |
| | | userName?: string; |
| | | deptName?: string; |
| | | leaveType?: number; |
| | | startTime?: string; |
| | |
| | | processInstanceId?: string; |
| | | remark?: string; |
| | | createTime?: string; |
| | | } |
| | | |
| | | /** å®¡æ¹æµç¨ */ |
| | | export interface ApproveProcess { |
| | | key: string; |
| | | name: string; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** æäº¤è¯·åç³è¯·ï¼å起审æ¹ï¼ */ |
| | | export function submitLeave(id: number) { |
| | | return requestClient.post(`/hrm/leave/submit?id=${id}`); |
| | | export function submitLeave(id: number, processDefinitionKey: string) { |
| | | return requestClient.post('/hrm/leave/submit', null, { |
| | | params: { id, processDefinitionKey }, |
| | | }); |
| | | } |
| | | |
| | | /** æ¤é请åç³è¯· */ |
| | |
| | | |
| | | /** è·åå¯ç¨æµç¨å®ä¹å表 */ |
| | | export function getLeaveApproveProcessDefinitionList() { |
| | | return requestClient.get<any[]>('/hrm/leave/approve-process-definition-list'); |
| | | return requestClient.get<HrmLeaveApi.ApproveProcess[]>( |
| | | '/hrm/leave/approve-process-definition-list', |
| | | ); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** è´¨æ£æ¹æ¡éé¡¹ï¼æ¹æ¡-产åå
³èï¼ */ |
| | | export namespace MesQcTemplateItemOptionApi { |
| | | export interface Option { |
| | | id?: number; // 产åå
³èç¼å· |
| | | templateId?: number; // è´¨æ£æ¹æ¡ ID |
| | | templateCode?: string; // è´¨æ£æ¹æ¡ç¼å· |
| | | templateName?: string; // è´¨æ£æ¹æ¡åç§° |
| | | quantityCheck?: number; // æä½æ£æµæ° |
| | | quantityUnqualified?: number; // æå¤§ä¸åæ ¼æ° |
| | | criticalRate?: number; // æå¤§è´å½ç¼ºé·çï¼%ï¼ |
| | | majorRate?: number; // æå¤§ä¸¥é缺é·çï¼%ï¼ |
| | | minorRate?: number; // æå¤§è½»å¾®ç¼ºé·çï¼%ï¼ |
| | | } |
| | | } |
| | | |
| | | /** æ¥è¯¢äº§åå
³èå页 */ |
| | | export function getTemplateItemPage( |
| | | params: PageParam & { templateId?: number }, |
| | |
| | | export function deleteTemplateItem(id: number) { |
| | | return requestClient.delete(`/mes/qc/template/item/delete?id=${id}`); |
| | | } |
| | | |
| | | /** æ ¹æ®ç©ææå·¥å/ä»»å¡åæ£æµç§ç±»è·åå¯ç¨è´¨æ£æ¹æ¡å表 */ |
| | | export function getTemplateItemOptionList(params: { |
| | | itemId?: number; |
| | | qcType: number; |
| | | taskId?: number; |
| | | workOrderId?: number; |
| | | }) { |
| | | return requestClient.get<MesQcTemplateItemOptionApi.Option[]>( |
| | | '/mes/qc/template/item/list-by-item-and-type', |
| | | { params }, |
| | | ); |
| | | } |
| | |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { HrmLeaveApi } from '#/api/hrm/leave'; |
| | | |
| | | import { markRaw } from 'vue'; |
| | | |
| | | import { DICT_TYPE } from '#/packages/constants/src'; |
| | | import { getDictOptions } from '#/packages/effects/hooks/src'; |
| | | |
| | | import { UserSelect } from '#/views/system/user/components'; |
| | | |
| | | /** 表åç±»å */ |
| | | export type FormType = 'create' | 'detail' | 'update'; |
| | |
| | | triggerFields: [''], |
| | | show: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'userId', |
| | | label: 'ç³è¯·äºº', |
| | | component: markRaw(UserSelect), |
| | | componentProps: { |
| | | placeholder: 'è¯·éæ©ç³è¯·äºº', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'leaveType', |
| | |
| | | export function useGridColumns(): VxeTableGridOptions<HrmLeaveApi.Leave>['columns'] { |
| | | return [ |
| | | { field: 'id', title: 'ç³è¯·ç¼å·', width: 80 }, |
| | | { field: 'employeeName', title: 'ç³è¯·äºº', minWidth: 100 }, |
| | | { field: 'userName', title: 'ç³è¯·äºº', minWidth: 100 }, |
| | | { field: 'deptName', title: 'é¨é¨', minWidth: 120 }, |
| | | { |
| | | field: 'leaveType', |
| | |
| | | bordered: true, |
| | | column: 2, |
| | | schema: [ |
| | | { label: 'åå·¥å§å', field: 'employeeName', render: textRender }, |
| | | { label: 'ç³è¯·äºº', field: 'userName', render: textRender }, |
| | | { label: 'æå±é¨é¨', field: 'deptName', render: textRender }, |
| | | { |
| | | label: '请åç±»å', |
| | |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { HrmLeaveApi } from '#/api/hrm/leave'; |
| | | |
| | | import { ref } from 'vue'; |
| | | |
| | | import { Page, useVbenModal } from '#/packages/effects/common-ui/src'; |
| | | |
| | | import { message, Tag } from 'ant-design-vue'; |
| | | import { message, Modal, Select, Tag } from 'ant-design-vue'; |
| | | |
| | | import { DICT_TYPE } from '#/packages/constants/src'; |
| | | import { getDictLabel } from '#/packages/effects/hooks/src'; |
| | |
| | | import { |
| | | cancelLeave, |
| | | deleteLeave, |
| | | getLeaveApproveProcessDefinitionList, |
| | | getLeavePage, |
| | | submitLeave, |
| | | } from '#/api/hrm/leave'; |
| | |
| | | } |
| | | } |
| | | |
| | | /** æäº¤è¯·åç³è¯· */ |
| | | const submitModalVisible = ref(false); |
| | | const currentRow = ref<HrmLeaveApi.Leave>(); |
| | | const processList = ref<HrmLeaveApi.ApproveProcess[]>([]); |
| | | const selectedProcessKey = ref<string>(); |
| | | const submitLoading = ref(false); |
| | | |
| | | /** æäº¤è¯·åç³è¯·ï¼å
éæ©å®¡æ¹æµç¨ï¼ */ |
| | | async function handleSubmit(row: HrmLeaveApi.Leave) { |
| | | await submitLeave(row.id!); |
| | | message.success('æäº¤æå'); |
| | | handleRefresh(); |
| | | processList.value = await getLeaveApproveProcessDefinitionList(); |
| | | currentRow.value = row; |
| | | selectedProcessKey.value = undefined; |
| | | submitModalVisible.value = true; |
| | | } |
| | | |
| | | async function confirmSubmit() { |
| | | if (!selectedProcessKey.value) { |
| | | message.warning('è¯·éæ©è¯·åå®¡æ¹æµç¨'); |
| | | return; |
| | | } |
| | | submitLoading.value = true; |
| | | try { |
| | | await submitLeave(currentRow.value!.id!, selectedProcessKey.value); |
| | | message.success('æäº¤æå'); |
| | | submitModalVisible.value = false; |
| | | handleRefresh(); |
| | | } finally { |
| | | submitLoading.value = false; |
| | | } |
| | | } |
| | | |
| | | /** æ¤é请åç³è¯· */ |
| | |
| | | /> |
| | | </template> |
| | | </Grid> |
| | | <Modal |
| | | v-model:open="submitModalVisible" |
| | | title="æäº¤è³åååå
¬" |
| | | width="420px" |
| | | :confirm-loading="submitLoading" |
| | | @ok="confirmSubmit" |
| | | > |
| | | <Select |
| | | v-model:value="selectedProcessKey" |
| | | class="w-full" |
| | | placeholder="è¯·éæ©è¯·åå®¡æ¹æµç¨" |
| | | :options="processList.map((item) => ({ label: item.name, value: item.key }))" |
| | | /> |
| | | </Modal> |
| | | </Page> |
| | | </template> |
| | |
| | | |
| | | import { computed, ref } from 'vue'; |
| | | |
| | | import { useUserStore } from '@vben/stores'; |
| | | |
| | | import { useVbenModal } from '#/packages/effects/common-ui/src'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | |
| | | |
| | | const emit = defineEmits(['success']); |
| | | const formType = ref<FormType>('create'); |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const isDetail = computed(() => formType.value === 'detail'); |
| | | const getTitle = computed(() => { |
| | |
| | | formApi.setDisabled(data.formType === 'detail'); |
| | | modalApi.setState({ showConfirmButton: data.formType !== 'detail' }); |
| | | if (!data?.id) { |
| | | // æ°å¢æ¶é»è®¤ç³è¯·äººä¸ºå½åç»å½ç¨æ·ï¼å¯ä¿®æ¹ |
| | | await formApi.setFieldValue('userId', userStore.userInfo?.id); |
| | | return; |
| | | } |
| | | modalApi.lock(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <script lang="ts" setup> |
| | | import { ref } from 'vue'; |
| | | |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { DatePicker, message } from 'ant-design-vue'; |
| | | |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | |
| | | /** 导åºåæ°ï¼å端 PageReqVO 以æ°ç»è§£æ inspectDate èµ·æ¢ï¼ */ |
| | | interface ExportParams { |
| | | inspectDate?: [string, string]; |
| | | } |
| | | |
| | | interface ExportModalData { |
| | | /** å¼¹çªæ é¢ */ |
| | | title?: string; |
| | | /** 模å导åºå½æ°ï¼requestClient.download(...) è¿å Blob */ |
| | | exportApi: (params: ExportParams) => Promise<Blob>; |
| | | /** å¯¼åºæä»¶å */ |
| | | fileName: string; |
| | | } |
| | | |
| | | defineOptions({ name: 'QcExportRangeModal' }); |
| | | |
| | | const rangePickerProps = getRangePickerDefaultProps(); |
| | | |
| | | const modalData = ref<ExportModalData>(); |
| | | const range = ref<[string, string] | undefined>(undefined); |
| | | const exporting = ref(false); |
| | | const title = ref('导åº'); |
| | | |
| | | const [Modal, modalApi] = useVbenModal({ |
| | | async onConfirm() { |
| | | if (exporting.value) { |
| | | return; |
| | | } |
| | | const data = modalData.value; |
| | | if (!data) { |
| | | return; |
| | | } |
| | | exporting.value = true; |
| | | modalApi.lock(); |
| | | try { |
| | | const params: ExportParams = |
| | | range.value && range.value.length === 2 |
| | | ? { inspectDate: range.value } |
| | | : {}; |
| | | const blob = await data.exportApi(params); |
| | | downloadFileFromBlobPart({ fileName: data.fileName, source: blob }); |
| | | message.success('å¯¼åºæå'); |
| | | await modalApi.close(); |
| | | } finally { |
| | | exporting.value = false; |
| | | modalApi.unlock(); |
| | | } |
| | | }, |
| | | onOpenChange(isOpen: boolean) { |
| | | if (!isOpen) { |
| | | modalData.value = undefined; |
| | | range.value = undefined; |
| | | return; |
| | | } |
| | | const data = modalApi.getData<ExportModalData>(); |
| | | modalData.value = data; |
| | | range.value = undefined; |
| | | title.value = data?.title ?? '导åº'; |
| | | modalApi.setState({ confirmText: '导åº' }); |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | | <Modal :title="title" class="w-2/5" :mask-closable="false"> |
| | | <div class="px-1 py-3"> |
| | | <div class="mb-2 text-sm font-medium text-gray-700">æ£éªæ¶é´</div> |
| | | <DatePicker.RangePicker |
| | | v-model:value="range" |
| | | v-bind="rangePickerProps" |
| | | allow-clear |
| | | class="w-full" |
| | | /> |
| | | <div class="mt-2 text-xs text-gray-400"> |
| | | ä¸éæ¶é´å导åºå
¨é¨æ°æ®ï¼å¯¼åºæãæ£æµæ¥æãè¿æ»¤ |
| | | </div> |
| | | </div> |
| | | </Modal> |
| | | </template> |
| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplateItemOptionList } from '#/api/mes/qc/template/item'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdWorkstationSelect } from '#/views/mes/md/workstation/components'; |
| | | import { ProTaskSelect } from '#/views/mes/pro/task/components'; |
| | |
| | | statuses: [MesProTaskStatusEnum.PREPARE], |
| | | workOrderId: values.workOrderId, |
| | | workstationId: values.workstationId, |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'templateId', |
| | | label: 'è´¨æ£æ¹æ¡', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | placeholder: 'è¯·éæ©è´¨æ£æ¹æ¡', |
| | | }, |
| | | rules: 'selectRequired', |
| | | dependencies: { |
| | | triggerFields: ['workOrderId', 'taskId'], |
| | | componentProps: (values) => ({ |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | disabled: formType !== 'create' || !values.workOrderId, |
| | | params: values.workOrderId |
| | | ? { |
| | | qcType: 2, |
| | | workOrderId: values.workOrderId, |
| | | taskId: values.taskId, |
| | | } |
| | | : {}, |
| | | placeholder: values.workOrderId |
| | | ? 'è¯·éæ©è´¨æ£æ¹æ¡' |
| | | : '请å
éæ©ç产订å', |
| | | }), |
| | | }, |
| | | }, |
| | |
| | | placeholder: 'è¯·éæ©æ£æµç»æ', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'inspectDate', |
| | | label: 'æ£æµæ¥æ', |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { MesQcStatusEnum } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { deleteIpqc, exportIpqc, getIpqcPage } from '#/api/mes/qc/ipqc'; |
| | | import { $t } from '#/locales'; |
| | | import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ExportRangeModal, exportRangeModalApi] = useVbenModal({ |
| | | connectedComponent: QcExportRangeModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** 导åºè¡¨æ ¼ */ |
| | | async function handleExport() { |
| | | const data = await exportIpqc(await gridApi.formApi.getValues()); |
| | | downloadFileFromBlobPart({ fileName: 'è¿ç¨æ£éªå.xls', source: data }); |
| | | /** 导åºè¡¨æ ¼ï¼å¼¹çªéæ£éªæ¶é´èå´ï¼ */ |
| | | function handleExport() { |
| | | exportRangeModalApi |
| | | .setData({ |
| | | title: 'ææ£éªæ¶é´å¯¼åºè¿ç¨æ£éªå', |
| | | exportApi: exportIpqc, |
| | | fileName: 'è¿ç¨æ£éªå.xls', |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ExportRangeModal /> |
| | | <Grid table-title="è¿ç¨æ£éªåå表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplateItemOptionList } from '#/api/mes/qc/template/item'; |
| | | import { getSupplierSimpleList } from '#/api/srm/supplier'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'templateId', |
| | | label: 'è´¨æ£æ¹æ¡', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | placeholder: 'è¯·éæ©è´¨æ£æ¹æ¡', |
| | | }, |
| | | rules: 'selectRequired', |
| | | dependencies: { |
| | | triggerFields: ['itemId'], |
| | | componentProps: (values) => ({ |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | disabled: formType !== 'create' || !values.itemId, |
| | | params: values.itemId |
| | | ? { itemId: values.itemId, qcType: 1 } |
| | | : {}, |
| | | placeholder: values.itemId ? 'è¯·éæ©è´¨æ£æ¹æ¡' : '请å
éæ©äº§åç©æ', |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: 'ä¾åºå', |
| | | component: 'ApiSelect', |
| | |
| | | |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { MesQcStatusEnum } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { deleteIqc, exportIqc, getIqcPage } from '#/api/mes/qc/iqc'; |
| | | import { $t } from '#/locales'; |
| | | import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ExportRangeModal, exportRangeModalApi] = useVbenModal({ |
| | | connectedComponent: QcExportRangeModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** 导åºè¡¨æ ¼ */ |
| | | async function handleExport() { |
| | | const data = await exportIqc(await gridApi.formApi.getValues()); |
| | | downloadFileFromBlobPart({ fileName: 'æ¥ææ£éªå.xls', source: data }); |
| | | /** 导åºè¡¨æ ¼ï¼å¼¹çªéæ£éªæ¶é´èå´ï¼ */ |
| | | function handleExport() { |
| | | exportRangeModalApi |
| | | .setData({ |
| | | title: 'ææ£éªæ¶é´å¯¼åºæ¥ææ£éªå', |
| | | exportApi: exportIqc, |
| | | fileName: 'æ¥ææ£éªå.xls', |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ExportRangeModal /> |
| | | <Grid table-title="æ¥ææ£éªåå表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplateItemOptionList } from '#/api/mes/qc/template/item'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import CrmCustomerSelect from '#/components/crm-customer-select.vue'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | | |
| | |
| | | componentProps: (values) => ({ |
| | | disabled: !!values.sourceDocId, |
| | | placeholder: 'è¯·éæ©äº§åç©æ', |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'templateId', |
| | | label: 'è´¨æ£æ¹æ¡', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | placeholder: 'è¯·éæ©è´¨æ£æ¹æ¡', |
| | | }, |
| | | rules: 'selectRequired', |
| | | dependencies: { |
| | | triggerFields: ['itemId'], |
| | | componentProps: (values) => ({ |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | disabled: formType !== 'create' || !values.itemId, |
| | | params: values.itemId |
| | | ? { itemId: values.itemId, qcType: 3 } |
| | | : {}, |
| | | placeholder: values.itemId ? 'è¯·éæ©è´¨æ£æ¹æ¡' : '请å
éæ©äº§åç©æ', |
| | | }), |
| | | }, |
| | | }, |
| | |
| | | placeholder: 'è¯·éæ©æ£æµç»æ', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'inspectDate', |
| | | label: 'æ£æµæ¥æ', |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { MesQcStatusEnum } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { deleteOqc, exportOqc, getOqcPage } from '#/api/mes/qc/oqc'; |
| | | import { $t } from '#/locales'; |
| | | import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ExportRangeModal, exportRangeModalApi] = useVbenModal({ |
| | | connectedComponent: QcExportRangeModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** 导åºè¡¨æ ¼ */ |
| | | async function handleExport() { |
| | | const data = await exportOqc(await gridApi.formApi.getValues()); |
| | | downloadFileFromBlobPart({ fileName: 'åºè´§æ£éªå.xls', source: data }); |
| | | /** 导åºè¡¨æ ¼ï¼å¼¹çªéæ£éªæ¶é´èå´ï¼ */ |
| | | function handleExport() { |
| | | exportRangeModalApi |
| | | .setData({ |
| | | title: 'ææ£éªæ¶é´å¯¼åºè´§æ£éªå', |
| | | exportApi: exportOqc, |
| | | fileName: 'åºè´§æ£éªå.xls', |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ExportRangeModal /> |
| | | <Grid table-title="åºè´§æ£éªåå表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getTemplateItemOptionList } from '#/api/mes/qc/template/item'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | | |
| | | /** 表åç±»å */ |
| | |
| | | componentProps: (values) => ({ |
| | | disabled: !!values.sourceDocId, |
| | | placeholder: 'è¯·éæ©äº§åç©æ', |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'templateId', |
| | | label: 'è´¨æ£æ¹æ¡', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | placeholder: 'è¯·éæ©è´¨æ£æ¹æ¡', |
| | | }, |
| | | rules: 'selectRequired', |
| | | dependencies: { |
| | | triggerFields: ['itemId'], |
| | | componentProps: (values) => ({ |
| | | api: getTemplateItemOptionList, |
| | | autoSelect: 'first', |
| | | labelField: 'templateName', |
| | | valueField: 'templateId', |
| | | disabled: formType !== 'create' || !values.itemId, |
| | | params: values.itemId |
| | | ? { itemId: values.itemId, qcType: 4 } |
| | | : {}, |
| | | placeholder: values.itemId ? 'è¯·éæ©è´¨æ£æ¹æ¡' : '请å
éæ©äº§åç©æ', |
| | | }), |
| | | }, |
| | | }, |
| | |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'inspectDate', |
| | | label: 'æ£æµæ¥æ', |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { MesQcStatusEnum } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { deleteRqc, exportRqc, getRqcPage } from '#/api/mes/qc/rqc'; |
| | | import { $t } from '#/locales'; |
| | | import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ExportRangeModal, exportRangeModalApi] = useVbenModal({ |
| | | connectedComponent: QcExportRangeModal, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** 导åºè¡¨æ ¼ */ |
| | | async function handleExport() { |
| | | const data = await exportRqc(await gridApi.formApi.getValues()); |
| | | downloadFileFromBlobPart({ fileName: 'éè´§æ£éªå.xls', source: data }); |
| | | /** 导åºè¡¨æ ¼ï¼å¼¹çªéæ£éªæ¶é´èå´ï¼ */ |
| | | function handleExport() { |
| | | exportRangeModalApi |
| | | .setData({ |
| | | title: 'ææ£éªæ¶é´å¯¼éè´§æ£éªå', |
| | | exportApi: exportRqc, |
| | | fileName: 'éè´§æ£éªå.xls', |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ExportRangeModal /> |
| | | <Grid table-title="éè´§æ£éªåå表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |