From 38573647316872cd633f3aa697aaca4612868cf4 Mon Sep 17 00:00:00 2001
From: gaojs <757918719@qq.com>
Date: Mon, 29 Apr 2024 16:29:00 +0800
Subject: [PATCH] =?UTF-8?q?MES=E2=80=94=E2=80=94>=20=E6=8A=A5=E5=B7=A5?=
=?UTF-8?q?=E6=A3=80=E6=9F=A5=20=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/mes/workSchedulingQaform/index.ts | 63 +++++
src/views/mes/workSchedulingQaform/index.vue | 244 ++++++++++++++++++
.../workSchedulingQaform.data.ts | 208 +++++++++++++++
3 files changed, 515 insertions(+)
create mode 100644 src/api/mes/workSchedulingQaform/index.ts
create mode 100644 src/views/mes/workSchedulingQaform/index.vue
create mode 100644 src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts
diff --git a/src/api/mes/workSchedulingQaform/index.ts b/src/api/mes/workSchedulingQaform/index.ts
new file mode 100644
index 000000000..e964dad35
--- /dev/null
+++ b/src/api/mes/workSchedulingQaform/index.ts
@@ -0,0 +1,63 @@
+import request from '@/config/axios'
+
+export interface WorkSchedulingQaformVO {
+ deleteTime: Date
+ id: number
+ status: string
+ concurrencyStamp: number
+ remark: string
+ deleter: string
+ siteId: number
+ planMaserCode: string
+ schedulingCode: string
+ nodeCode: string
+ qaFormNo: string
+ qaFormName: string
+ qaFormType: string
+ qaTime: Date
+ qaCount: number
+ qaCountPassed: number
+ qaCountNotpassed: number
+ qaPassRate: string
+}
+
+// 查询任务质检单列表
+export const getWorkSchedulingQaformPage = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/mes/work-scheduling-qaform/senior', data })
+ } else {
+ return await request.get({ url: `/mes/work-scheduling-qaform/page`, params })
+ }
+}
+
+// 查询任务质检单详情
+export const getWorkSchedulingQaform = async (id: number) => {
+ return await request.get({ url: `/mes/work-scheduling-qaform/get?id=` + id })
+}
+
+// 新增任务质检单
+export const createWorkSchedulingQaform = async (data: WorkSchedulingQaformVO) => {
+ return await request.post({ url: `/mes/work-scheduling-qaform/create`, data })
+}
+
+// 修改任务质检单
+export const updateWorkSchedulingQaform = async (data: WorkSchedulingQaformVO) => {
+ return await request.put({ url: `/mes/work-scheduling-qaform/update`, data })
+}
+
+// 删除任务质检单
+export const deleteWorkSchedulingQaform = async (id: number) => {
+ return await request.delete({ url: `/mes/work-scheduling-qaform/delete?id=` + id })
+}
+
+// 导出任务质检单 Excel
+export const exportWorkSchedulingQaform = async (params) => {
+ return await request.download({ url: `/mes/work-scheduling-qaform/export-excel`, params })
+}
+
+// 下载用户导入模板
+export const importTemplate = () => {
+ return request.download({ url: '/mes/work-scheduling-qaform/get-import-template' })
+}
\ No newline at end of file
diff --git a/src/views/mes/workSchedulingQaform/index.vue b/src/views/mes/workSchedulingQaform/index.vue
new file mode 100644
index 000000000..ac06996b3
--- /dev/null
+++ b/src/views/mes/workSchedulingQaform/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.id }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts b/src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts
new file mode 100644
index 000000000..eaaf4d434
--- /dev/null
+++ b/src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts
@@ -0,0 +1,208 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+
+// 表单校验
+export const WorkSchedulingQaformRules = reactive({
+ concurrencyStamp: [required],
+})
+
+export const WorkSchedulingQaform = useCrudSchemas(reactive([
+ {
+ label: '删除时间',
+ field: 'deleteTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: false,
+ isTable: false,
+ isForm: false,
+ isDetail:false,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ valueFormat: 'x'
+ }
+ },
+ },
+ {
+ label: '主键',
+ field: 'id',
+ sort: 'custom',
+ isForm: false,
+ },
+ {
+ label: '状态',
+ field: 'status',
+ sort: 'custom',
+ isSearch: false,
+ isTable: false,
+ isForm: false,
+ isDetail:false,
+ form: {
+ component: 'Radio'
+ },
+ },
+ {
+ label: '并发乐观锁',
+ field: 'concurrencyStamp',
+ sort: 'custom',
+ iisSearch: false,
+ isTable: false,
+ isForm: false,
+ isDetail:false,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ isForm: false,
+ },
+ {
+ label: '删除用户名',
+ field: 'deleter',
+ sort: 'custom',
+ isSearch: false,
+ isTable: false,
+ isForm: false,
+ isDetail:false,
+ },
+ {
+ label: '位置ID',
+ field: 'siteId',
+ sort: 'custom',
+ isSearch: false,
+ isTable: false,
+ isForm: false,
+ isDetail:false,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '主计划编号',
+ field: 'planMasterCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '工单编号',
+ field: 'schedulingCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '工序编号',
+ field: 'nodeCode',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验单编号',
+ field: 'qaFormNo',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验单名称',
+ field: 'qaFormName',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '检验类型',
+ field: 'qaFormType',
+ sort: 'custom',
+ isSearch: true,
+
+ },
+ {
+ label: '检验时间',
+ field: 'qaTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ valueFormat: 'x'
+ }
+ },
+ },
+ {
+ label: '检测数量',
+ field: 'qaCount',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '检测合格数量',
+ field: 'qaCountPassed',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '检测不合格数量',
+ field: 'qaCountNotpassed',
+ sort: 'custom',
+ isSearch: true,
+ form: {
+ component: 'InputNumber',
+ value: 0
+ },
+ },
+ {
+ label: '合格率',
+ field: 'qaPassRate',
+ sort: 'custom',
+ isSearch: true,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isForm: false,
+ table: {
+ width: 150,
+ fixed: 'right'
+ }
+ }
+]))