diff --git a/src/api/qms/inspectionQ1/index.ts b/src/api/qms/inspectionQ1/index.ts new file mode 100644 index 000000000..dab41fa63 --- /dev/null +++ b/src/api/qms/inspectionQ1/index.ts @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export interface Q1VO { + id: number + number: string + customerCode: string + costCode: string + itemCode: string + qty: number + uom: string + code: string + priority: number + responUser: string + claimAmount: number + claimReason: number + claimTime: Date + handleTime: Date + desc: string + status: string + available: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询Q1通知单列表 +export const getQ1Page = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/qms/inspectionQ1/senior', data }) + } else { + return await request.get({ url: `/qms/inspectionQ1/page`, params }) + } +} + +// 查询Q1通知单详情 +export const getQ1 = async (id: number) => { + return await request.get({ url: `/qms/inspectionQ1/get?id=` + id }) +} + +// 新增Q1通知单 +export const createQ1 = async (data: Q1VO) => { + return await request.post({ url: `/qms/inspectionQ1/create`, data }) +} + +// 修改Q1通知单 +export const updateQ1 = async (data: Q1VO) => { + return await request.put({ url: `/qms/inspectionQ1/update`, data }) +} + +// 删除Q1通知单 +export const deleteQ1 = async (id: number) => { + return await request.delete({ url: `/qms/inspectionQ1/delete?id=` + id }) +} + +// 导出Q1通知单 Excel +export const exportQ1 = async (params) => { + return await request.download({ url: `/qms/inspectionQ1/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/inspectionQ1/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/inspectionQ2/index.ts b/src/api/qms/inspectionQ2/index.ts new file mode 100644 index 000000000..19d1f6f40 --- /dev/null +++ b/src/api/qms/inspectionQ2/index.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface Q2VO { + id: number + number: string + supplierCode: string + itemCode: string + q1Number: string + purchaseReceiptNumber: string + qty: number + uom: string + code: string + desc: string + priority: number + responUser: string + claimAmount: number + costCode: string + claimTime: Date + handleTime: Date + status: string + available: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询Q2通知单列表 +export const getQ2Page = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/qms/inspectionQ2/senior', data }) + } else { + return await request.get({ url: `/qms/inspectionQ2/page`, params }) + } +} + +// 查询Q2通知单详情 +export const getQ2 = async (id: number) => { + return await request.get({ url: `/qms/inspectionQ2/get?id=` + id }) +} + +// 新增Q2通知单 +export const createQ2 = async (data: Q2VO) => { + return await request.post({ url: `/qms/inspectionQ2/create`, data }) +} + +// 修改Q2通知单 +export const updateQ2 = async (data: Q2VO) => { + return await request.put({ url: `/qms/inspectionQ2/update`, data }) +} + +// 删除Q2通知单 +export const deleteQ2 = async (id: number) => { + return await request.delete({ url: `/qms/inspectionQ2/delete?id=` + id }) +} + +// 导出Q2通知单 Excel +export const exportQ2 = async (params) => { + return await request.download({ url: `/qms/inspectionQ2/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/inspectionQ2/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/inspectionQ3/index.ts b/src/api/qms/inspectionQ3/index.ts new file mode 100644 index 000000000..616376561 --- /dev/null +++ b/src/api/qms/inspectionQ3/index.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface Q3VO { + id: number + number: string + q1Number: string + itemCode: string + qty: number + code: string + uom: string + desc: string + defectLocation: string + defectType: string + problemReason: string + priority: number + responUser: string + amount: number + costCode: string + handleTime: Date + status: string + available: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询Q3通知单列表 +export const getQ3Page = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/qms/inspectionQ3/senior', data }) + } else { + return await request.get({ url: `/qms/inspectionQ3/page`, params }) + } +} + +// 查询Q3通知单详情 +export const getQ3 = async (id: number) => { + return await request.get({ url: `/qms/inspectionQ3/get?id=` + id }) +} + +// 新增Q3通知单 +export const createQ3 = async (data: Q3VO) => { + return await request.post({ url: `/qms/inspectionQ3/create`, data }) +} + +// 修改Q3通知单 +export const updateQ3 = async (data: Q3VO) => { + return await request.put({ url: `/qms/inspectionQ3/update`, data }) +} + +// 删除Q3通知单 +export const deleteQ3 = async (id: number) => { + return await request.delete({ url: `/qms/inspectionQ3/delete?id=` + id }) +} + +// 导出Q3通知单 Excel +export const exportQ3 = async (params) => { + return await request.download({ url: `/qms/inspectionQ3/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/inspectionQ3/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index c753f6ff7..6c806f0d1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -385,4 +385,5 @@ export enum DICT_TYPE { IS_LINE_ITEM = 'is_line_item', // 是否是线边 PUT_IN_TYPE = 'put_in_type', // 入库类型 PURCHASE_JOB_STATUS = 'purchase_job_status', // 采购收货任务状态 + PUBLISHE_STATUS = 'publishe_status', // 采购收货任务状态 } diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue new file mode 100644 index 000000000..d693ad893 --- /dev/null +++ b/src/views/qms/inspectionQ1/index.vue @@ -0,0 +1,250 @@ + + + diff --git a/src/views/qms/inspectionQ1/inspectionQ1.data.ts b/src/views/qms/inspectionQ1/inspectionQ1.data.ts new file mode 100644 index 000000000..0acc3299c --- /dev/null +++ b/src/views/qms/inspectionQ1/inspectionQ1.data.ts @@ -0,0 +1,352 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as CustomerApi from '@/api/wms/customer' +import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' + +import * as CustomeritemApi from '@/api/wms/customeritem' +import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' + +import * as QadCostcentreApi from '@/api/wms/qadCostcentre' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' + +// 表单校验 +export const Q1Rules = reactive({ + customerCode: [required], + costCode: [required], + itemCode: [required], + qty: [required], + code: [required], + priority: [required], + claimAmount: [required], + claimReason: [required], + claimTime: [required], + handleTime: [required] +}) + +export const Q1 = useCrudSchemas( + reactive([ + { + label: '通知单号', + field: 'number', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 150, + fixed: 'left' + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PUBLISHE_STATUS, + dictClass: 'string', + isForm: false, + isSearch: false, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + }, + isSearch: true + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '客户物料信息', // 查询弹窗标题 + searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类 + searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'customerCode', + value: 'customerCode', + message: '请填写客户代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + + { + label: '单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '编码', + field: 'code', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '负责用户', + field: 'responUser', + sort: 'custom', + isSearch: false + }, + { + label: '索赔金额', + field: 'claimAmount', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + label: '成本中心', + field: 'costCode', + sort: 'custom', + isSearch: false, + isTable: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + } + }, + { + label: '索赔原因', + field: 'claimReason', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '索赔日期', + field: 'claimTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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: 'handleTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: 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: 'desc', + sort: 'custom', + isSearch: false, + table: { + width: '150' + }, + form: { + component: 'Input', + componentProps: { + type: 'textarea' + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + isSearch: true, + isForm: false, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + search: { + value: 'TRUE' + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 110 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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')] + } + }, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +) diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue new file mode 100644 index 000000000..5731edb26 --- /dev/null +++ b/src/views/qms/inspectionQ2/index.vue @@ -0,0 +1,258 @@ + + + diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts new file mode 100644 index 000000000..2ec6ee0e1 --- /dev/null +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -0,0 +1,395 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as QadCostcentreApi from '@/api/wms/qadCostcentre' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' + +import * as InspectionQ1Api from '@/api/qms/inspectionQ1' +import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data' + +import * as SupplieritemApi from '@/api/wms/supplieritem' +import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' + +import * as SupplierApi from '@/api/wms/supplier' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' + +import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' +import { PurchasereceiptRecordMain1 } from '@/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data' + +// 表单校验 +export const Q2Rules = reactive({ + number: [required], + supplierCode: [required], + itemCode: [required], + purchaseReceiptNumber: [required], + qty: [required], + code: [required], + priority: [required], + claimAmount: [required], + costCode: [required], + claimTime: [required], + handleTime: [required], + available: [required], + concurrencyStamp: [required] +}) + +export const Q2 = useCrudSchemas( + reactive([ + { + label: '通知单号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 150, + fixed: 'left' + } + }, + { + label: 'q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q1通知单', // 查询弹窗标题 + searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + }, + isSearch: true + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PUBLISHE_STATUS, + dictClass: 'string', + isForm: false, + isSearch: false, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '供应商编码', + field: 'supplierCode', + sort: 'custom', + isSearch: true, + table: { + width: 175 + }, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 190 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + message: '请填写供应商代码!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '采购收货单号', + field: 'purchaseReceiptNumber', + sort: 'custom', + table: { + width: 180 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + disabled: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '采购收货记录', // 查询弹窗标题 + searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类 + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + }, + { + key: 'itemCode', + value: 'itemCode', + isMainValue: true + } + ] + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + + { + label: '编码', + field: 'code', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + + { + label: '优先级', + field: 'priority', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '负责用户', + field: 'responUser', + sort: 'custom', + isSearch: false + }, + { + label: '索赔金额', + field: 'claimAmount', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + label: '成本中心代码', + field: 'costCode', + sort: 'custom', + isSearch: false, + isTable: true, + isForm: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + } + }, + + { + label: '索赔日期', + field: 'claimTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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: 'handleTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: 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: 'desc', + sort: 'custom', + isSearch: false, + table: { + width: '150' + }, + form: { + component: 'Input', + componentProps: { + type: 'textarea' + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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')] + } + }, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +) diff --git a/src/views/qms/inspectionQ3/index.vue b/src/views/qms/inspectionQ3/index.vue new file mode 100644 index 000000000..18b256c52 --- /dev/null +++ b/src/views/qms/inspectionQ3/index.vue @@ -0,0 +1,252 @@ + + + diff --git a/src/views/qms/inspectionQ3/inspectionQ3.data.ts b/src/views/qms/inspectionQ3/inspectionQ3.data.ts new file mode 100644 index 000000000..2e002b789 --- /dev/null +++ b/src/views/qms/inspectionQ3/inspectionQ3.data.ts @@ -0,0 +1,328 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as InspectionQ1Api from '@/api/qms/inspectionQ1' +import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data' + +import * as QadCostcentreApi from '@/api/wms/qadCostcentre' +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' + +import * as CustomeritemApi from '@/api/wms/customeritem' +import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' + +// 表单校验 +export const Q3Rules = reactive({ + number: [required], + itemCode: [required], + qty: [required], + code: [required], + defectLocation: [required], + defectType: [required], + problemReason: [required], + priority: [required], + amount: [required], + costCode: [required], + handleTime: [required], + available: [required], + concurrencyStamp: [required] +}) + +export const Q3 = useCrudSchemas( + reactive([ + { + label: '通知单号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 150, + fixed: 'left' + } + }, + { + label: 'q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q1通知单', // 查询弹窗标题 + searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + }, + isSearch: true + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PUBLISHE_STATUS, + dictClass: 'string', + isForm: false, + isSearch: false, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '客户物料信息', // 查询弹窗标题 + searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类 + searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'customerCode', + value: 'customerCode', + message: '请填写客户代码!', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + label: '单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '编码', + field: 'code', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + + { + label: '缺陷位置', + field: 'defectLocation', + sort: 'custom', + isSearch: false, + isTable: false + }, + { + label: '缺陷类型', + field: 'defectType', + sort: 'custom', + isSearch: false, + isTable: false, + form: { + component: 'SelectV2' + } + }, + { + label: '问题原因', + field: 'problemReason', + sort: 'custom', + isSearch: false, + isTable: false + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '负责用户', + field: 'responUser', + sort: 'custom', + isSearch: false + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + isTable: false, + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber' + } + }, + { + label: '成本中心代码', + field: 'costCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心信息', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + } + } + }, + { + label: '处理时间', + field: 'handleTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: 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: 'desc', + sort: 'custom', + isSearch: false, + table: { + width: '150' + }, + form: { + component: 'Input', + componentProps: { + type: 'textarea' + } + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: 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')] + } + }, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +)