diff --git a/.env b/.env index 2308eb632..7af3e7916 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # 标题 -VITE_APP_TITLE=闻荫管理系统 +VITE_APP_TITLE=SFMS管理系统 # 项目本地运行端口号 VITE_PORT=80 diff --git a/.env.wyf b/.env.wyf new file mode 100644 index 000000000..ee1d6eb3a --- /dev/null +++ b/.env.wyf @@ -0,0 +1,48 @@ +# 生产环境 +NODE_ENV=test + +VITE_DEV=false + +# 请求路径 +VITE_BASE_URL='http://192.168.0.108:12080' +# 上传路径 +VITE_UPLOAD_URL='http://192.168.0.108:12080/admin-api/infra/file/upload' + +# # 请求路径 +# VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' + +# # 上传路径 +# VITE_UPLOAD_URL='http://dev.ccwin-in.com:25300/api/admin-api/infra/file/upload' + +# 接口前缀 +VITE_API_BASEPATH= + +# 接口地址 +VITE_API_URL=/admin-api + +# 是否删除debugger +VITE_DROP_DEBUGGER=true + +# 是否删除console.log +VITE_DROP_CONSOLE=true + +# 是否sourcemap +VITE_SOURCEMAP=false + +# 打包路径 +VITE_BASE_PATH=/ + +# 输出路径 +VITE_OUT_DIR=sfms3.0 + +# 自定义接口路径 +VITE_INTERFACE_URL='http://192.168.0.108:12080/magic/web/index.html' + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://192.168.0.108:12080' + +# # 自定义接口路径 +# VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html' + +# # 积木报表请求路径 +# VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' diff --git a/.gitignore b/.gitignore index 946878e02..07f908d37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules +.env.development .DS_Store dist dist-ssr diff --git a/README.md b/README.md index a28b719c2..4f12652d0 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,11 @@ tableForm:{ isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 }] -}, \ No newline at end of file +}, + +// 主子合并隐藏子 +hiddenInMain:true +// 主子排序 不配置默认999,不要设置0(留给左侧固定列使用) +sortTableDefault: +// 查询条件排序 +sortSearchDefault: \ No newline at end of file diff --git a/build/vite/index.ts b/build/vite/index.ts index 020671079..c67f8a856 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -2,7 +2,7 @@ import { resolve } from 'path' import Vue from '@vitejs/plugin-vue' import VueJsx from '@vitejs/plugin-vue-jsx' import progress from 'vite-plugin-progress' -import EslintPlugin from 'vite-plugin-eslint' +// import EslintPlugin from 'vite-plugin-eslint' import PurgeIcons from 'vite-plugin-purge-icons' import { ViteEjsPlugin } from 'vite-plugin-ejs' // @ts-ignore @@ -73,10 +73,10 @@ export function createVitePlugins() { resolvers: [ElementPlusResolver()], exclude: [/[\\/]node_modules[\\/]/] }), - EslintPlugin({ - cache: false, - include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件 - }), + // EslintPlugin({ + // cache: false, + // include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件 + // }), VueI18nPlugin({ runtimeOnly: true, compositionOnly: true, diff --git a/index.html b/index.html index 2fe32f5d2..eff7359f1 100644 --- a/index.html +++ b/index.html @@ -8,11 +8,11 @@ %VITE_APP_TITLE% diff --git a/package.json b/package.json index 32ae25c05..304bc3f61 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "private": false, "scripts": { "dev": "vite", + "wyf": "vite --mode wyf", "test": "vite build --mode test", "hella8": "vite build --mode hella8", "hella9": "vite build --mode hella9", diff --git a/src/api/mes/holiday/index.ts b/src/api/mes/holiday/index.ts new file mode 100644 index 000000000..546a0ee16 --- /dev/null +++ b/src/api/mes/holiday/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface HolidayVO { + id: number + status: string + remark: string + holidayYear: string + holidayType: string + keyDate: string + holidayName: string + holidayDate: Date +} + +// 查询节假日设置列表 +export const getHolidayPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/holiday/senior', data }) + } else { + return await request.get({ url: `/mes/holiday/page`, params }) + } +} + +// 查询节假日设置详情 +export const getHoliday = async (id: number) => { + return await request.get({ url: `/mes/holiday/get?id=` + id }) +} + +// 新增节假日设置 +export const createHoliday = async (data: HolidayVO) => { + return await request.post({ url: `/mes/holiday/create`, data }) +} + +// 修改节假日设置 +export const updateHoliday = async (data: HolidayVO) => { + return await request.put({ url: `/mes/holiday/update`, data }) +} + +// 删除节假日设置 +export const deleteHoliday = async (id: number) => { + return await request.delete({ url: `/mes/holiday/delete?id=` + id }) +} + +// 导出节假日设置 Excel +export const exportHoliday = async (params) => { + return await request.download({ url: `/mes/holiday/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/holiday/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/mes/orderDay/index.ts b/src/api/mes/orderDay/index.ts index 852c8f0e3..00f348d3e 100644 --- a/src/api/mes/orderDay/index.ts +++ b/src/api/mes/orderDay/index.ts @@ -98,8 +98,8 @@ export const getPlanDevices = async (params) => { } ///发布计划 -export const publishPlan = async (params) => { - return await request.post({ url: `/mes/orderday/publishPlan`,params }) +export const publishPlan = async (data: OrderDayVO) => { + return await request.post({ url: `/mes/orderday/publishPlan`,data }) } //终止计划 export const stopPlan = async (params) => { diff --git a/src/api/mes/orderDayConfig/index.ts b/src/api/mes/orderDayConfig/index.ts new file mode 100644 index 000000000..f1f5749d3 --- /dev/null +++ b/src/api/mes/orderDayConfig/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' +export interface OrderDayQueryParamVo { + planNoDay:String + productCode:String + workroomCode:String + lineCode:String + processrouteCode:String + batchCode:String + processCode:String +} + + +// 查询生产配置工艺路线 +export const getConfigProcessRoute = async (params) => { + return await request.get({ url: `/mes/orderDayRoute/getByOrder`, params }) +} +// 查询已经配置的工序 +export const getConfigProcessRouteNode = async (params) => { + return await request.get({ url: `/mes/orderDayRoutesub/getByOrder`, params }) +} +// 查询生产配置工序BOM +export const getOrderDayBomByOrder = async (params) => { + return await request.get({ url: `/mes/orderDayBom/getByOrder`, params }) +} + +// 查询已经配置工序工位 +export const getConfigProcessWorkstation = async (params) => { + return await request.get({ url: `/mes/orderDayWorkstation/getByOrder`, params }) +} +// 查询已经配置工序人员 +export const getConfigProcessWorker = async (params) => { + return await request.get({ url: `/mes/orderDayWorker/getByOrder`, params }) +} +// 查询已经的工序工位设备 +export const getConfigProcessEquipment = async (params) => { + return await request.get({ url: `/mes/orderDayequipment/getByOrder`, params }) +} + +/*批量保存工序人员配置*/ +export const saveWorker = async (data: any) => { + return await request.post({ url: `/mes/orderDayWorker/batchCreate`, data }) +} + +// 查询设备基本信息列表 +export const getDeviceInfoPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/device-info/senior', data }) + } else { + return await request.get({ url: `/mes/device-info/page`, params }) + } +} +/*批量保存工序模具配置*/ +export const saveEquipment = async (data: any) => { + return await request.post({ url: `/mes/orderDayequipment/batchCreate`, data }) +} diff --git a/src/api/mes/process/index.ts b/src/api/mes/process/index.ts new file mode 100644 index 000000000..0adec9ed9 --- /dev/null +++ b/src/api/mes/process/index.ts @@ -0,0 +1,158 @@ +import request from '@/config/axios' + +export interface ProcessVO { + code: string + name: string + description: string + type: string + workshopCode: string + productionLineCode: string + available: number + activeTime: Date + expireTime: Date + remark: string +} + +export const goalParams = { + processCode:null +} +// 查询工序列表 +export const getProcessPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/mes/process/senior', data }) + } else { + return await request.get({ url: `/mes/process/page`, params }) + } +} + +// 查询工序详情 +export const getProcess = async (id: number) => { + return await request.get({ url: `/mes/process/get?id=` + id }) +} + +// 新增工序 +export const createProcess: (data: ProcessVO) => Promise = async (data: ProcessVO) => { + return await request.post({ url: `/mes/process/create`, data }) +} + +// 修改工序 +export const updateProcess = async (data: ProcessVO) => { + return await request.put({ url: `/mes/process/update`, data }) +} + +// 删除工序 +export const deleteProcess: (id: number) => Promise = async (id: number) => { + return await request.delete({ url: `/mes/process/delete?id=` + id }) +} + +// 导出工序 Excel +export const exportProcess = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/mes/process/export-excel-senior`, data }) + } else { + return await request.download({ url: `/mes/process/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/process/get-import-template' }) +} + + +// 查询模具基本信息列表 +export const getPatternPage = async (params) => { + params.processCode = goalParams.processCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/mes/mes-process-pattern/senior', data }) + } else { + return await request.get({ url: `/mes/mes-process-pattern/pagePatternByProcessCode`, params }) + } +} + +//创建工序模具关联 +export const createPatternRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listPatternCode : Codes + } + return await request.post({ url: `/mes/mes-process-pattern/createRelation`, data }) +} + +//删除工序模具关联 +export const deletePatternRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listPatternCode : Codes + } + return await request.post({ url: `/mes/mes-process-pattern/deleteRelation`, data }) +} + + + +// 查询产线列表 +export const getProductionlinePage = async (params) => { + params.processCode = goalParams.processCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/mes/mes-process-productionline/senior', data }) + } else { + return await request.get({ url: `/mes/mes-process-productionline/pageByProcessCode`, params }) + } +} + +//创建工序产线关联 +export const createProductionlineRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listProductionlineCode : Codes + } + return await request.post({ url: `/mes/mes-process-productionline/createRelation`, data }) +} + +//删除工序产线关联 +export const deleteProductionlineRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listProductionlineCode : Codes + } + return await request.post({ url: `/mes/mes-process-productionline/deleteRelation`, data }) +} + + + +// 查询物料列表 +export const getItembasicPage = async (params) => { + params.processCode = goalParams.processCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/mes/mes-process-itembasic/senior', data }) + } else { + return await request.get({ url: `/mes/mes-process-itembasic/pageByProcessCode`, params }) + } +} + +//创建工序物料关联 +export const createItembasicRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listItembasicCode : Codes + } + return await request.post({ url: `/mes/mes-process-itembasic/createRelation`, data }) +} + +//删除工序物料关联 +export const deleteItembasicRelation = async (Codes:string[]) => { + const data = { + processCode : goalParams.processCode, + listItembasicCode : Codes + } + return await request.post({ url: `/mes/mes-process-itembasic/deleteRelation`, data }) +} diff --git a/src/api/mes/processroute/index.ts b/src/api/mes/processroute/index.ts index f80f4aab1..b18879dc3 100644 --- a/src/api/mes/processroute/index.ts +++ b/src/api/mes/processroute/index.ts @@ -30,6 +30,11 @@ export const getProcessroutePage = async (params) => { export const getProcessroute = async (id: number) => { return await request.get({ url: `/mes/processroute/get?id=` + id }) } +// 查询工艺路线定义的工序列表 +export const getProcessrouteNodeList = async (code:any) => { + return await request.get({ url: `/mes/processrouteNodeDetail/getRouteNodes?code=`+code }) +} + // 新增工艺路线定义 export const createProcessroute = async (data: ProcessrouteVO) => { @@ -61,38 +66,27 @@ export const importTemplate = () => { } // 获取工序工序列表- export const getProcessList =async (params) => { - return await request.get({ url: `/wms/process/page`, params }) + return await request.get({ url: `/mes/process/page`, params }) } // 获取工序工序信息- export const getProcesInfo = async(code:String) => { - return await request.get({ url: `/wms/process/getByCode?code=`,code }) + return await request.get({ url: `/mes/process/getByCode?code=`+code }) } // 获取产品信息列表- export const getProductInfo =async (code:String) => { return await request.get({ url: `/wms/itembasic/getProduct?code=`+code}) } -// 获取设备列表-参数为工序编码 -export const getDeviceList =async (code:String) => { - //return request.get({ url: `/wms/itembasic/getProduct?code=`+code}) - return request.get({ url: `/wms/itembasic/getProduct?code=`+code}) - return {code:0,data:[{name:"冲压设备1",code:"CY0001"},{name:"冲压设备2",code:"CY0002"}]} -} -// 获取工作人员信息--参数为工序编码 -export const getWorkerList =async (code:String) => { - // return request.get({ url: `/wms/itembasic/getProduct?code=`+code}) - return {code:0,data:[{name:"张三",code:"冲压1班"},{name:"李四",code:"冲压1班"}]} -} -// 获取工位信息 -export const getWorkStation =async (code:String) => { - //return request.get({ url: `/wms/itembasic/getProduct?code=`+code}) - return {code:0,data:{name:"冲压工位",code:"CYW0001"}} -} -// 获取车间信息列表- -// export const getWorkInfoList = () => { -// return request.get({ url: '/wms/workshop?code=',code }) -// } -// 获取产品信息列表- -// export const getProductInfo = (code:String) => { -// return request.get({ url: '/wms/itembasic/getProduct?code=',code }) -// } \ No newline at end of file +// 查询模具基本信息列表 +export const getPatternPage = async (code:String) => { + return await request.get({ url: `/mes/mes-process-pattern/pagePatternByProcessCode?pageSize=25&processCode=`+code }) +} + +// 查询物料列表 +export const getItembasicPage = async (code:String) => { + return await request.get({ url: `/mes/mes-process-itembasic/pageByProcessCode?pageSize=25&processCode=`+code}) +} + +export const getWorkstationPage = async (code:String) => { + return await request.get({ url: `/mes/workstation/page?pageSize=25&processCode=`+code}) +} diff --git a/src/api/mes/productBackline/index.ts b/src/api/mes/productBackline/index.ts new file mode 100644 index 000000000..c1403fca4 --- /dev/null +++ b/src/api/mes/productBackline/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface ProductBacklineVO { + offlineCode: string + productCode: string + workBillno: string + processCode: string + operCode: string + backlineBillno: string + planCode: string + deleteTime: Date + id: number + status: string + remark: string + deleter: string + siteId: number + workstationCode: string +} + +// 查询产品返线登记列表 +export const getProductBacklinePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/product-backline/senior', data }) + } else { + return await request.get({ url: `/mes/product-backline/page`, params }) + } +} + +// 查询产品返线登记详情 +export const getProductBackline = async (id: number) => { + return await request.get({ url: `/mes/product-backline/get?id=` + id }) +} + +// 新增产品返线登记 +export const createProductBackline = async (data: ProductBacklineVO) => { + return await request.post({ url: `/mes/product-backline/create`, data }) +} + +// 修改产品返线登记 +export const updateProductBackline = async (data: ProductBacklineVO) => { + return await request.put({ url: `/mes/product-backline/update`, data }) +} + +// 删除产品返线登记 +export const deleteProductBackline = async (id: number) => { + return await request.delete({ url: `/mes/product-backline/delete?id=` + id }) +} + +// 导出产品返线登记 Excel +export const exportProductBackline = async (params) => { + return await request.download({ url: `/mes/product-backline/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/product-backline/get-import-template' }) +} diff --git a/src/api/mes/productOffline/index.ts b/src/api/mes/productOffline/index.ts new file mode 100644 index 000000000..c5434f931 --- /dev/null +++ b/src/api/mes/productOffline/index.ts @@ -0,0 +1,71 @@ +import request from '@/config/axios' + +export interface ProductOfflineVO { + offlineCode: string + workBillno: string + planCode: string + productCode: string + offlineReson: string + productDestination: string + deleteTime: Date + id: number + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number + processCode: string + stationCode: string + checkPersonCode: string +} + +// 查询产品离线登记记录列表 +export const getProductOfflinePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/product-offline/senior', data }) + } else { + return await request.get({ url: `/mes/product-offline/page`, params }) + } +} + +// 查询产品离线登记记录详情 +export const getProductOffline = async (id: number) => { + return await request.get({ url: `/mes/product-offline/get?id=` + id }) +} + +// 新增产品离线登记记录 +export const createProductOffline = async (data: ProductOfflineVO) => { + return await request.post({ url: `/mes/product-offline/create`, data }) +} + +// 修改产品离线登记记录 +export const updateProductOffline = async (data: ProductOfflineVO) => { + return await request.put({ url: `/mes/product-offline/update`, data }) +} + +// 删除产品离线登记记录 +export const deleteProductOffline = async (id: number) => { + return await request.delete({ url: `/mes/product-offline/delete?id=` + id }) +} + +// 导出产品离线登记记录 Excel +export const exportProductOffline = async (params) => { + return await request.download({ url: `/mes/product-offline/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/product-offline/get-import-template' }) +} + +export const getworkSchedulingPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/work-scheduling/senior', data }) + } else { + return await request.get({ url: `/mes/work-scheduling/page`, params }) + } +} diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts new file mode 100644 index 000000000..08591d25b --- /dev/null +++ b/src/api/mes/workScheduling/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +export interface WorkSchedulingVO { + flagDo: string +} + +// 查询生产任务排产列表 +export const getWorkSchedulingPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/work-scheduling/senior', data }) + } else { + return await request.get({ url: `/mes/work-scheduling/page`, params }) + } +} + +// 查询生产任务排产详情 +export const getWorkScheduling = async (id: number) => { + return await request.get({ url: `/mes/work-scheduling/get?id=` + id }) +} + +// 新增生产任务排产 +export const createWorkScheduling = async (data: WorkSchedulingVO) => { + return await request.post({ url: `/mes/work-scheduling/create`, data }) +} + +// 修改生产任务排产 +export const updateWorkScheduling = async (data: WorkSchedulingVO) => { + return await request.put({ url: `/mes/work-scheduling/update`, data }) +} + +// 删除生产任务排产 +export const deleteWorkScheduling = async (id: number) => { + return await request.delete({ url: `/mes/work-scheduling/delete?id=` + id }) +} + +// 导出生产任务排产 Excel +export const exportWorkScheduling = async (params) => { + return await request.download({ url: `/mes/work-scheduling/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/work-scheduling/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/mes/workSchedulingDetail/index.ts b/src/api/mes/workSchedulingDetail/index.ts new file mode 100644 index 000000000..0bd6244ea --- /dev/null +++ b/src/api/mes/workSchedulingDetail/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface WorkSchedulingDetailVO { + schedulingCode: string + schedulingId: number + taskSort: number + nodeCode: string + workstationValidate: string + deviceValidate: string + personValidate: string + reportPerson: string + receivePerson: string + planCount: number + reportCount: number + reportType: number + qualifiedCount: number + unqualifiedCount: number + receiveWorkstation: string + receiveDevice: string + materialValidate: string +} + +// 查询工单任务明细列表 +export const getWorkSchedulingDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/work-scheduling-detail/senior', data }) + } else { + return await request.get({ url: `/mes/work-scheduling-detail/page`, params }) + } +} + +// 查询工单任务明细详情 +export const getWorkSchedulingDetail = async (id: number) => { + return await request.get({ url: `/mes/work-scheduling-detail/get?id=` + id }) +} + +// 新增工单任务明细 +export const createWorkSchedulingDetail = async (data: WorkSchedulingDetailVO) => { + return await request.post({ url: `/mes/work-scheduling-detail/create`, data }) +} + +// 修改工单任务明细 +export const updateWorkSchedulingDetail = async (data: WorkSchedulingDetailVO) => { + return await request.put({ url: `/mes/work-scheduling-detail/update`, data }) +} + +// 删除工单任务明细 +export const deleteWorkSchedulingDetail = async (id: number) => { + return await request.delete({ url: `/mes/work-scheduling-detail/delete?id=` + id }) +} + +// 导出工单任务明细 Excel +export const exportWorkSchedulingDetail = async (params) => { + return await request.download({ url: `/mes/work-scheduling-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/work-scheduling-detail/get-import-template' }) +} diff --git a/src/api/mes/workcalendar/index.ts b/src/api/mes/workcalendar/index.ts new file mode 100644 index 000000000..2769ea2ce --- /dev/null +++ b/src/api/mes/workcalendar/index.ts @@ -0,0 +1,81 @@ +import request from '@/config/axios' + + + +// 查询节假日 +export const getDismantlingDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/workCalendar/senior', data }) + } else { + return await request.get({ url: `/mes/workCalendar/page`, params }) + } +} + +//班组排班 信息 +export interface SchedulingcalendarCreateReqVO{ + keyDate:String, + //班组编码 + teamCode:String, +//班组名称 + teamName:String, +//班组类别" + teamType:String, +//班次名称" + shiftName:String, +//班次编码 +shiftCode:String, +//上班时间 +startTime:String, +//下班时间" +endTime:String, +//工作日期 +workDate:String, +//倒班规则 +shiftRule:String, +//倒班类型 +shiftRate:String, +sort:number +} +// +// 查询班组列表 +export const getTeamList = async (params) => { + return await request.get({ url: `/wms/team/page`, params }) +} + +// 保存排班信息 +export const saveWorkPlan = async (data:SchedulingcalendarCreateReqVO ) => { + return await request.post({ url: `/mes/schedulingcalendar/create`, data }) +} +// 删除班组排班信息 +export const deleteWorkPlan = async (data) => { + return await request.post({ url: `/mes/schedulingcalendar/deleteTeam`, data}) +} +//批量保存排班信息 +export const createBatch = async (data:any) => { + return await request.post({ url: `/mes/schedulingcalendar/createBatch`, data }) +} +//批量对象方式保存排班信息--保留 +export const createObj= async (data:any) => { + return await request.post({ url: `/mes/schedulingcalendar/createObj`, data }) +} + +// 查询排班信息 code startTime:开始时间" endTime:结束时间") +export const getWorkPlan = async (params ) => { + return await request.get({ url: `/mes/schedulingcalendar/getList`,params }) +} +// 查询班次信息 +export const getShiftInfos = async (code:any) => { + return await request.get({ url: `/mes/schedulingcalendar/shift?code=`+code}) +} +//查询节假日信息 +export const getHolidays = async (year:any) => { + return await request.get({ url: `/mes/holiday/listByYear?year=`+year}) +} + +// 导出排班信息 +export const exportWorkPlan = async (params) => { + return await request.download({ url: `/mes/schedulingcalendar/export-excel`, params }) +} + diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index a3dfde12d..fcd745b8e 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -20,11 +20,6 @@ export const getWorkstationPage = async (params) => { } } -// 查询工位详情 -export const getWorkstation = async (id: number) => { - return await request.get({ url: `/mes/workstation/get?id=` + id }) -} - // 新增工位 export const createWorkstation = async (data: WorkstationVO) => { return await request.post({ url: `/mes/workstation/create`, data }) @@ -47,7 +42,7 @@ export const getEquipmentPage = async (params) => { const data = {...params} return await request.post({ url: '/mes/equipment/senior', data }) } else { - return await request.get({ url: `/mes/equipment/pageListByWorkstationCode`, params }) + return await request.get({ url: `/mes/equipment/getEquipmentPage`, params }) } } // 查询选择设备列表 @@ -58,11 +53,11 @@ export const checkEquipmentPageList = async (params) => { const data = {...params} return await request.post({ url: '/mes/equipment/senior', data }) } else { - return await request.get({ url: `/mes/equipment/pageCheckListByWorkstationCode`, params }) + return await request.get({ url: `/mes/equipment/pageCheckList`, params }) } } // 添加设备关联 -export const createEquipmentRelation = async (equipmentCodes:string[]) => { +export const createEquipment = async (equipmentCodes:string[]) => { const data = { workstationCode : goalParams.workstationCode, equipmentCodes : equipmentCodes @@ -71,87 +66,95 @@ export const createEquipmentRelation = async (equipmentCodes:string[]) => { } // 删除设备关联 -export const deleteEquipmentRelation = async (equipmentCodes:string[]) => { - debugger +export const deleteEquipment = async (equipmentCodes:string[]) => { const data = { workstationCode : goalParams.workstationCode, equipmentCodes : equipmentCodes } return await request.post({ url: `/mes/equipment/deleteRelation`, data }) } -export const getProcessPage = async (params) => { - params.workstationCode = goalParams.workstationCode - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/workstation-process/senior', data }) - } else { - return await request.get({ url: `/mes/workstation-process/pageListByWorkstationCode`, params }) - } -} -export const checkProcessPageList = async (params) => { + + +export const getOperstepsPage = async (params) => { params.workstationCode = goalParams.workstationCode if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/mes/workstation-process/senior', data }) + return await request.post({ url: '/mes/workstation-opersteps/senior', data }) } else { - return await request.get({ url: `/mes/workstation-process/pageCheckListByWorkstationCode`, params }) + return await request.get({ url: `/mes/workstation-opersteps/getWorkstationOperstepsPage`, params }) } } -// 添加工序关联 -export const createProcessRelation = async (processCodes:string[]) => { +// 添加操作步骤关联 +export const createOpersteps = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + operstepsCodes : codes } - return await request.post({ url: `/mes/workstation-process/createRelation`, data }) + return await request.post({ url: `/mes/workstation-opersteps/create`, data }) } -// 删除工序关联 -export const deleteProcessRelation = async (processCodes:string[]) => { +// 删除操作步骤关联 +export const deleteOpersteps = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + operstepsCodes : codes } - return await request.post({ url: `/mes/workstation-process/deleteRelation`, data }) + return await request.post({ url: `/mes/workstation-opersteps/delete`, data }) } - -export const getOperstepsPage = async (params) => { +export const getAbilityPage = async (params) => { params.workstationCode = goalParams.workstationCode if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/strategy/workstation-opersteps/senior', data }) + return await request.post({ url: '/mes/workstation-ability/senior', data }) } else { - return await request.get({ url: `/strategy/workstation-opersteps/pageListByWorkstationCode`, params }) + return await request.get({ url: `/mes/workstation-ability/getWorkstationAbilityPage`, params }) } } -export const checkOperstepsPageList = async (params) => { +// 添加能力关联 +export const createAbility = async (codes:string[]) => { + const data = { + workstationCode : goalParams.workstationCode, + abilityCodes : codes + } + return await request.post({ url: `/mes/workstation-ability/create`, data }) +} + +// 删除能力关联 +export const deleteAbility = async (codes:string[]) => { + const data = { + workstationCode : goalParams.workstationCode, + abilityCodes : codes + } + return await request.post({ url: `/mes/workstation-ability/delete`, data }) +} +// 查询工位岗位关联 +export const getPostPage = async (params) => { params.workstationCode = goalParams.workstationCode if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/strategy/workstation-opersteps/senior', data }) + return await request.post({ url: '/mes/workstation-post/senior', data }) } else { - return await request.get({ url: `/strategy/workstation-opersteps/pageCheckListByWorkstationCode`, params }) + return await request.get({ url: `/mes/workstation-post/getWorkstationPostPage`, params }) } } -// 添加操作步骤关联 -export const createOperstepsRelation = async (processCodes:string[]) => { +// 添加能力关联 +export const createAPost = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + postCodes : codes } - return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data }) + return await request.post({ url: `/mes/workstation-post/create`, data }) } -// 删除操作步骤关联 -export const deleteOperstepsRelation = async (processCodes:string[]) => { +// 删除能力关联 +export const deletePost = async (codes:string[]) => { const data = { workstationCode : goalParams.workstationCode, - processCodes : processCodes + postCodes : codes } - return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data }) + return await request.post({ url: `/mes/workstation-post/delete`, data }) } diff --git a/src/api/qms/aql/index.ts b/src/api/qms/aql/index.ts index dda72b699..2a3317051 100644 --- a/src/api/qms/aql/index.ts +++ b/src/api/qms/aql/index.ts @@ -105,3 +105,11 @@ export const importTemplate = () => { export const getSamplingScheme = async () => { return await request.get({ url: `/qms/sampling-scheme/get-available-list`}) } +// 启用 +export const enableAql = async (id: number) => { + return await request.enable({ url: `/qms/aql/enable?id=` + id }) +} +// 禁用 +export const disableAql = async (id: number) => { + return await request.disable({ url: `/qms/aql/disable?id=` + id }) +} diff --git a/src/api/qms/counter/index.ts b/src/api/qms/counter/index.ts index 9190e34f5..cd6d8e2a9 100644 --- a/src/api/qms/counter/index.ts +++ b/src/api/qms/counter/index.ts @@ -59,4 +59,4 @@ export const exportCounter = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/counter/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/qms/dynamicRule/index.ts b/src/api/qms/dynamicRule/index.ts index d08387fee..3e457babf 100644 --- a/src/api/qms/dynamicRule/index.ts +++ b/src/api/qms/dynamicRule/index.ts @@ -50,4 +50,13 @@ export const exportDynamicRule = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/dynamic-rule/get-import-template' }) -} \ No newline at end of file +} + +// 启用 +export const enableDynamicRule = async (id: number) => { + return await request.enable({ url: `/qms/dynamic-rule/enable?id=` + id }) +} +// 禁用 +export const disableDynamicRule = async (id: number) => { + return await request.disable({ url: `/qms/dynamic-rule/disable?id=` + id }) +} diff --git a/src/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage.ts b/src/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage.ts new file mode 100644 index 000000000..ff82af696 --- /dev/null +++ b/src/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage.ts @@ -0,0 +1,13 @@ +import request from '@/config/axios' +export interface InspectionRequestPackageVO { + number: string + packageCode: string + packageSpecificationCode: string + amount: string + measuringUnit: string +} + +//查询包装列表 +export const getInspectionJobPackageList = async (id: number) => { + return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id }) +} diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index 372fef2dc..2b59a7401 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -55,8 +55,5 @@ export const exportInspectionJobMain = async (params) => { export const importTemplate = () => { return request.download({ url: '/qms/inspection-job-main/get-import-template' }) } -//查询包装列表 -export const getInspectionJobPackageList = async (id: number) => { -   return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id }) -} + \ No newline at end of file diff --git a/src/api/qms/inspectionMethod/index.ts b/src/api/qms/inspectionMethod/index.ts index 5721037b9..d11347e87 100644 --- a/src/api/qms/inspectionMethod/index.ts +++ b/src/api/qms/inspectionMethod/index.ts @@ -51,3 +51,11 @@ export const exportInspectionMethod = async (params) => { export const importTemplate = () => { return request.download({ url: '/qms/inspection-method/get-import-template' }) } +// 启用 +export const enableInspectionMethod = async (id: number) => { + return await request.enable({ url: `/qms/inspection-method/enable?id=` + id }) +} +// 禁用 +export const disableInspectionMethod = async (id: number) => { + return await request.disable({ url: `/qms/inspection-method/disable?id=` + id }) +} diff --git a/src/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage.ts b/src/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage.ts new file mode 100644 index 000000000..cb0c2e6aa --- /dev/null +++ b/src/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage.ts @@ -0,0 +1,13 @@ +import request from '@/config/axios' +export interface InspectionRequestPackageVO { + number: string + packageCode: string + packageSpecificationCode: string + amount: string + measuringUnit: string +} + +//查询包装列表 +export const getInspectionRecordPackageList = async (id: number) => { + return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id }) +} diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts index 8214ed279..2f5215b03 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -67,7 +67,3 @@ export const importTemplate = () => { export const publishInspectionRecordMain = async (id) => { return await request.put({ url: `/qms/inspection-record-main/publish?id=`+id }) } -//查询包装列表 -export const getInspectionRecordPackageList = async (id: number) => { - return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id }) -} \ No newline at end of file diff --git a/src/api/qms/inspectionRequest/InspectionRequestPackage.ts b/src/api/qms/inspectionRequest/InspectionRequestPackage.ts new file mode 100644 index 000000000..34acfaea4 --- /dev/null +++ b/src/api/qms/inspectionRequest/InspectionRequestPackage.ts @@ -0,0 +1,27 @@ +import request from '@/config/axios' +export interface InspectionRequestPackageVO { + number: string + packageCode: string + packageSpecificationCode: string + amount: string + measuringUnit: string +} + +//查询包装列表 +export const getInspectionRequestPackageList = async (id: number) => { + return await request.get({ url: `/qms/inspection-request-package/list?masterId=` + id }) +} +// 新增检验申请 +export const createInspectionRequestPackage = async (data: InspectionRequestPackageVO) => { + return await request.post({ url: `/qms/inspection-request-package/create`, data }) +} + +// 修改检验申请 +export const updateInspectionRequestPackage = async (data: InspectionRequestPackageVO) => { + return await request.put({ url: `/qms/inspection-request-package/update`, data }) +} + +// 删除检验申请 +export const deleteInspectionRequestPackage = async (id: number) => { + return await request.delete({ url: `/qms/inspection-request-package/delete?id=` + id }) +} \ No newline at end of file diff --git a/src/api/qms/inspectionRequest/index.ts b/src/api/qms/inspectionRequest/index.ts index c018b87ac..5aaf60961 100644 --- a/src/api/qms/inspectionRequest/index.ts +++ b/src/api/qms/inspectionRequest/index.ts @@ -2,25 +2,19 @@ import request from '@/config/axios' export interface InspectionMainVO { number: string - applicationDate: localdate + applicationDate: Date applicationTime: Date requestStartTime: Date requestEndTime: Date finishTime: Date supplierCode: string - materialCode: string + itemCode: string batch: string requestInspectionNum: number referenceOrderCode: string referenceOrderRow: number referenceCertificateCode: string referenceCertificateRow: number - inspectionSchemeCode: string - inspectionStageCode: string - applicationPackageCode: string - inspectionLevel: string - aqlValue: number - available: string } // 查询检验申请列表 @@ -92,8 +86,3 @@ export const refusedInspectRequestMain = async (id) => { export const handleInspectRequestMain = async (id) => { return await request.put({ url: `/qms/inspection-request-main/handle?id=` + id }) } - -//查询检验申请列表 -export const getInspectionRequestPackageList = async (id: number) => { - return await request.get({ url: `/qms/inspection-request-package/list?masterId=` + id }) -} \ No newline at end of file diff --git a/src/api/qms/inspectionScheme/index.ts b/src/api/qms/inspectionScheme/index.ts index c54e11372..358acd359 100644 --- a/src/api/qms/inspectionScheme/index.ts +++ b/src/api/qms/inspectionScheme/index.ts @@ -21,3 +21,12 @@ export const InspectionSchemePage = async (params) => { return await request.get({ url: `/qms/inspection-scheme/page`, params }) } } + +// 启用 +export const enableInspectionScheme = async (id: number) => { + return await request.enable({ url: `/qms/inspection-scheme/enable?id=` + id }) +} +// 禁用 +export const disableInspectionScheme = async (id: number) => { + return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id }) +} diff --git a/src/api/qms/inspectionTemplate/index.ts b/src/api/qms/inspectionTemplate/index.ts index 8443de973..f3bf638d2 100644 --- a/src/api/qms/inspectionTemplate/index.ts +++ b/src/api/qms/inspectionTemplate/index.ts @@ -2,7 +2,7 @@ import request from '@/config/axios' -// 查询采样过程列表 +// 列表 export const getListByTempleteCode = async (code) => { return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=`+code}) } @@ -27,4 +27,13 @@ export const inspectionTemplatePage = async (params) => { } else { return await request.get({ url: `/qms/programme-template/page`, params }) } -} \ No newline at end of file +} + +// 启用 +export const enableInspectionTemplate = async (id: number) => { + return await request.enable({ url: `/qms/programme-template/enable?id=` + id }) +} +// 禁用 +export const disableInspectionTemplate = async (id: number) => { + return await request.disable({ url: `/qms/programme-template/disable?id=` + id }) +} diff --git a/src/api/qms/sampleCode/index.ts b/src/api/qms/sampleCode/index.ts index 374a97e8a..9f7f9f13e 100644 --- a/src/api/qms/sampleCode/index.ts +++ b/src/api/qms/sampleCode/index.ts @@ -59,3 +59,12 @@ export const importTemplate = () => { export const getSamplingScheme = async () => { return await request.get({ url: `/qms/sampling-scheme/get-available-list`}) } + +// 启用 +export const enableSampleCode = async (id: number) => { + return await request.enable({ url: `/qms/sample-code/enable?id=` + id }) +} +// 禁用 +export const disableSampleCode = async (id: number) => { + return await request.disable({ url: `/qms/sample-code/disable?id=` + id }) +} diff --git a/src/api/qms/samplingProcess/index.ts b/src/api/qms/samplingProcess/index.ts index 9fcdcd20f..398238653 100644 --- a/src/api/qms/samplingProcess/index.ts +++ b/src/api/qms/samplingProcess/index.ts @@ -61,3 +61,11 @@ export const importTemplate = () => { export const getSamplingScheme = async () => { return await request.get({ url: `/qms/sampling-scheme/get-available-list`}) } +// 启用 +export const enableSamplingProcess = async (id: number) => { + return await request.enable({ url: `/qms/sampling-process/enable?id=` + id }) +} +// 禁用 +export const disableSamplingProcess = async (id: number) => { + return await request.disable({ url: `/qms/sampling-process/disable?id=` + id }) +} diff --git a/src/api/qms/samplingScheme/index.ts b/src/api/qms/samplingScheme/index.ts index f60047e97..c65058f2e 100644 --- a/src/api/qms/samplingScheme/index.ts +++ b/src/api/qms/samplingScheme/index.ts @@ -47,3 +47,12 @@ export const exportSamplingScheme = async (params) => { export const importTemplate = () => { return request.download({ url: '/qms/sampling-scheme/get-import-template' }) } + +// 启用 +export const enableSamplingScheme = async (id: number) => { + return await request.enable({ url: `/qms/sampling-scheme/enable?id=` + id }) +} +// 禁用 +export const disableSamplingScheme = async (id: number) => { + return await request.disable({ url: `/qms/sampling-scheme/disable?id=` + id }) +} diff --git a/src/api/qms/selectedSet/index.ts b/src/api/qms/selectedSet/index.ts index 69add3718..5e4348d17 100644 --- a/src/api/qms/selectedSet/index.ts +++ b/src/api/qms/selectedSet/index.ts @@ -52,4 +52,13 @@ export const exportSelectedSet = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/selected-set/get-import-template' }) -} \ No newline at end of file +} + +// 启用 +export const enableSelectedSet = async (id: number) => { + return await request.enable({ url: `/qms/selected-set/enable?id=` + id }) +} +// 禁用 +export const disableSelectedSet = async (id: number) => { + return await request.disable({ url: `/qms/selected-set/disable?id=` + id }) +} diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 6224f0e85..0aaa49507 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -1,44 +1,57 @@ import request from '@/config/axios' export interface UserVO { - id: number - username: string - nickname: string - deptId: number - postIds: string[] - email: string - mobile: string - sex: number - avatar: string - loginIp: string - status: number - remark: string - loginDate: Date - createTime: Date + id : number + username : string + nickname : string + deptId : number + postIds : string[] + email : string + mobile : string + sex : number + avatar : string + loginIp : string + status : number + remark : string + loginDate : Date + createTime : Date + userType : string + mailKey : string } -// 查询用户管理列表 -export const getUserPage = (params: PageParam) => { - return request.get({ url: '/system/user/page', params }) +export const getUserPage = async (params) => { + console.log(params) + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/system/user/senior', data }) + } else { + return await request.get({ url: '/system/user/page', params }) + } } +// 查询用户管理列表 +// export const getUserPage = (params: PageParam) => { +// return request.get({ url: '/system/user/page', params }) +// } + // 查询用户详情 -export const getUser = (id: number) => { +export const getUser = (id : number) => { return request.get({ url: '/system/user/get?id=' + id }) } // 新增用户 -export const createUser = (data: UserVO) => { +export const createUser = (data : UserVO) => { return request.post({ url: '/system/user/create', data }) } // 修改用户 -export const updateUser = (data: UserVO) => { +export const updateUser = (data : UserVO) => { return request.put({ url: '/system/user/update', data }) } // 删除用户 -export const deleteUser = (id: number) => { +export const deleteUser = (id : number) => { return request.delete({ url: '/system/user/delete?id=' + id }) } @@ -53,7 +66,7 @@ export const importUserTemplate = () => { } // 用户密码重置 -export const resetUserPwd = (id: number, password: string) => { +export const resetUserPwd = (id : number, password : string) => { const data = { id, password @@ -62,7 +75,7 @@ export const resetUserPwd = (id: number, password: string) => { } // 用户状态修改 -export const updateUserStatus = (id: number, status: number) => { +export const updateUserStatus = (id : number, status : number) => { const data = { id, status @@ -71,6 +84,16 @@ export const updateUserStatus = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getSimpleUserList = (): Promise => { +export const getSimpleUserList = () : Promise => { return request.get({ url: '/system/user/list-all-simple' }) } + +// 忘记密码 +export const forgetPassword = (data : UserVO) => { + return request.put({ url: '/system/user/forgetPassword', data }) +} + +// 忘记密码->修改密码 +export const updatePassword = (data : UserVO) => { + return request.put({ url: '/system/user/updatePassword', data }) +} diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index 38b2e1f9e..68b471769 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -48,6 +48,24 @@ export const deleteDemandforecastingMain = async (id: number) => { return await request.delete({ url: `/wms/demandforecasting-main/delete?id=` + id }) } + +// 关闭要货预测 +export const closePurchaseMain = async (id: number) => { + return await request.post({ url: `/wms/demandforecasting-main/close?id=` + id }) +} +// 打开要货预测 +export const openPurchaseMain = async (id: number) => { + return await request.post({ url: `/wms/demandforecasting-main/open?id=` + id }) +} +// 发布要货预测 +export const publishPurchaseMain = async (id: number) => { + return await request.post({ url: `/wms/demandforecasting-main/publish?id=` + id }) +} +// 下架要货预测 +export const witPurchaseMain = async (id: number) => { + return await request.post({ url: `/wms/demandforecasting-main/wit?id=` + id }) +} + // 导出要货预测主 Excel export const exportDemandforecastingMain = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/interfaceInfo/index.ts b/src/api/wms/interfaceInfo/index.ts new file mode 100644 index 000000000..9af0ea39d --- /dev/null +++ b/src/api/wms/interfaceInfo/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface InterfaceInfoVO { + number:string + id: number + interfaceType: string + interfaceName: string + interfaceStatus: string + url: string + reqBody: string + respBody: string + errorMsg: string + remark: string + extraProperties: string + concurrencyStamp: number +} + +// 查询接口调用信息列表 +export const getInterfaceInfoPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/interface-info/senior', data }) + } else { + return await request.get({ url: `/wms/interface-info/page`, params }) + } +} + +// 查询接口调用信息详情 +export const getInterfaceInfo = async (id: number) => { + return await request.get({ url: `/wms/interface-info/get?id=` + id }) +} + +// 新增接口调用信息 +export const createInterfaceInfo = async (data: InterfaceInfoVO) => { + return await request.post({ url: `/wms/interface-info/create`, data }) +} + +// 修改接口调用信息 +export const updateInterfaceInfo = async (data: InterfaceInfoVO) => { + return await request.put({ url: `/wms/interface-info/update`, data }) +} + +// 删除接口调用信息 +export const deleteInterfaceInfo = async (id: number) => { + return await request.delete({ url: `/wms/interface-info/delete?id=` + id }) +} + +// 导出接口调用信息 Excel +export const exportInterfaceInfo = async (params) => { + return await request.download({ url: `/wms/interface-info/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/interface-info/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/issueRequestMain/index.ts b/src/api/wms/issueRequestMain/index.ts index efaf03d24..40d37e803 100644 --- a/src/api/wms/issueRequestMain/index.ts +++ b/src/api/wms/issueRequestMain/index.ts @@ -47,6 +47,11 @@ export const createIssueRequestMain = async (data: IssueRequestMainVO) => { return await request.post({ url: `/wms/issue-request-main/create`, data }) } +// 新增PDA发料申请主 +export const createIssueRequestMainSetInterval = async (data: IssueRequestMainVO) => { + return await request.post({ url: `/wms/issue-request-main/createPDA`, data }) +} + // 修改发料申请主 export const updateIssueRequestMain = async (data: IssueRequestMainVO) => { return await request.put({ url: `/wms/issue-request-main/update`, data }) diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts index d43f45766..7a11fd47f 100644 --- a/src/api/wms/package/index.ts +++ b/src/api/wms/package/index.ts @@ -94,3 +94,19 @@ export const importTemplate = () => { export const createPackageLabel = async (data: PackageVO) => { return await request.post({ url: `/wms/package/createLabel`, data }) } + + +// 批量打印标签 +export const batchPrintingLable = async (data: any) => { + return await request.post({ url: `/wms/package/batchPrintingLable`, data }) +} + +// 打印标签获取包装列表 +export const getLabel = async (id: number) => { + return await request.get({ url: `/wms/package/getLabel?id=` + id }) +} + +// 根据库存余额获取包装信息进行打印标签 +export const getBalanceToPackage = async (packingNumber: String) => { + return await request.get({ url: `/wms/package/getBalanceToPackage?packingNumber=` + packingNumber}) +} \ No newline at end of file diff --git a/src/api/wms/productputawayJobDetail/index.ts b/src/api/wms/productputawayJobDetail/index.ts index 0265d3f03..b6008e1c0 100644 --- a/src/api/wms/productputawayJobDetail/index.ts +++ b/src/api/wms/productputawayJobDetail/index.ts @@ -26,6 +26,19 @@ export interface ProductputawayJobDetailVO { // 查询制品上架任务子列表 export const getProductputawayJobDetailPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-job-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-job-detail/page`, params }) + } +} + +// 查询制品上架任务子列表 +export const getProductputawayJobDetailPageAssemble = async (params) => { +   params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productputawayJobMain/index.ts b/src/api/wms/productputawayJobMain/index.ts index 9789444e8..d9379684f 100644 --- a/src/api/wms/productputawayJobMain/index.ts +++ b/src/api/wms/productputawayJobMain/index.ts @@ -42,6 +42,7 @@ export interface ProductputawayJobMainVO { // 查询制品上架任务主列表 export const getProductputawayJobMainPage = async (params) => { + params.type = 'predict' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -51,6 +52,17 @@ export const getProductputawayJobMainPage = async (params) => { } } +// 查询制品上架任务主列表 +export const getProductputawayJobMainAssemblePage = async (params) => { + params.type = 'assemble' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-job-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-job-main/page`, params }) + } +} // 查询制品上架任务主详情 export const getProductputawayJobMain = async (id: number) => { return await request.get({ url: `/wms/productputaway-job-main/get?id=` + id }) @@ -73,6 +85,19 @@ export const deleteProductputawayJobMain = async (id: number) => { // 导出制品上架任务主 Excel export const exportProductputawayJobMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productputaway-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productputaway-job-main/export-excel`, params }) + } +} + + +// 导出制品上架任务主 Excel +export const exportProductputawayJobMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/productputaway-job-main/export-excel-senior`, data }) diff --git a/src/api/wms/productputawayRecordDetail/index.ts b/src/api/wms/productputawayRecordDetail/index.ts index 2ab8e2d61..008a7aa60 100644 --- a/src/api/wms/productputawayRecordDetail/index.ts +++ b/src/api/wms/productputawayRecordDetail/index.ts @@ -36,6 +36,7 @@ export interface ProductputawayRecordDetailVO { // 查询制品上架记录子列表 export const getProductputawayRecordDetailPage = async (params) => { + params.type = 'predict' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -45,6 +46,17 @@ export const getProductputawayRecordDetailPage = async (params) => { } } +// 查询制品上架记录子列表 +export const getProductputawayRecordDetailPageAssemble = async (params) => { +   params.type = 'assemble' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-record-detail/page`, params }) + } +} // 查询制品上架记录子详情 export const getProductputawayRecordDetail = async (id: number) => { return await request.get({ url: `/wms/productputaway-record-detail/get?id=` + id }) diff --git a/src/api/wms/productputawayRecordMain/index.ts b/src/api/wms/productputawayRecordMain/index.ts index ef29d16f6..716646115 100644 --- a/src/api/wms/productputawayRecordMain/index.ts +++ b/src/api/wms/productputawayRecordMain/index.ts @@ -30,6 +30,19 @@ export interface ProductputawayRecordMainVO { // 查询制品上架记录主列表 export const getProductputawayRecordMainPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-record-main/page`, params }) + } +} + +// 查询制品上架记录主列表 +export const getProductputawayRecordMainAssemblePage = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -61,6 +74,19 @@ export const deleteProductputawayRecordMain = async (id: number) => { // 导出制品上架记录主 Excel export const exportProductputawayRecordMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-record-main/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/productputaway-record-main/export-excel`, params }) + } +} + +// 导出制品上架记录主 Excel +export const exportProductputawayRecordMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productputawayRequestDetail/index.ts b/src/api/wms/productputawayRequestDetail/index.ts index 0f3a061bf..d1cc153e2 100644 --- a/src/api/wms/productputawayRequestDetail/index.ts +++ b/src/api/wms/productputawayRequestDetail/index.ts @@ -27,6 +27,19 @@ export interface ProductputawayRequestDetailVO { // 查询制品上架申请子列表 export const getProductputawayRequestDetailPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-request-detail/page`, params }) + } +} + +// 查询制品上架申请子列表 +export const getProductputawayRequestDetailPageAssemble = async (params) => { +   params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productputawayRequestMain/index.ts b/src/api/wms/productputawayRequestMain/index.ts index 7975d1ea5..6696beea6 100644 --- a/src/api/wms/productputawayRequestMain/index.ts +++ b/src/api/wms/productputawayRequestMain/index.ts @@ -28,6 +28,19 @@ export interface ProductputawayRequestMainVO { // 查询制品上架申请主列表 export const getProductputawayRequestMainPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productputaway-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productputaway-request-main/page`, params }) + } +} + +// 查询制品上架申请主列表 +export const getProductputawayRequestMainAssemblePage = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} @@ -59,6 +72,18 @@ export const deleteProductputawayRequestMain = async (id: number) => { // 导出制品上架申请主 Excel export const exportProductputawayRequestMain = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productputaway-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productputaway-request-main/export-excel`, params }) + } +} + +// 导出制品上架申请主 Excel +export const exportProductputawayRequestMainAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/productputaway-request-main/export-excel-senior`, data }) diff --git a/src/api/wms/productreceiptJobDetail/index.ts b/src/api/wms/productreceiptJobDetail/index.ts index df00da6fa..e53490096 100644 --- a/src/api/wms/productreceiptJobDetail/index.ts +++ b/src/api/wms/productreceiptJobDetail/index.ts @@ -31,6 +31,19 @@ export interface ProductreceiptJobDetailVO { // 查询制品收货任务子列表 export const getProductreceiptJobDetailPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-job-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-job-detail/page`, params }) + } +} + +// 查询制品收货任务子列表 +export const getProductreceiptJobDetailPageAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productreceiptRecordDetail/index.ts b/src/api/wms/productreceiptRecordDetail/index.ts index 8dafd938a..db76ba703 100644 --- a/src/api/wms/productreceiptRecordDetail/index.ts +++ b/src/api/wms/productreceiptRecordDetail/index.ts @@ -36,6 +36,19 @@ export interface ProductreceiptRecordDetailVO { // 查询制品收货记录子列表 export const getProductreceiptRecordDetailPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-record-detail/page`, params }) + } +} + +// 查询制品收货记录子列表 +export const getProductreceiptRecordDetailPageAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/productreceiptRequestDetail/index.ts b/src/api/wms/productreceiptRequestDetail/index.ts index f832fb50d..292cf3600 100644 --- a/src/api/wms/productreceiptRequestDetail/index.ts +++ b/src/api/wms/productreceiptRequestDetail/index.ts @@ -32,6 +32,19 @@ export interface ProductreceiptRequestDetailVO { // 查询制品收货申请子列表 export const getProductreceiptRequestDetailPage = async (params) => { + params.type = 'predict' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-request-detail/page`, params }) + } +} + +// 查询制品收货申请子列表 +export const getProductreceiptRequestDetailPageAssemble = async (params) => { + params.type = 'assemble' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/wms/purchasereceiptJobDetail/index.ts b/src/api/wms/purchasereceiptJobDetail/index.ts index 6020d680f..4163887b2 100644 --- a/src/api/wms/purchasereceiptJobDetail/index.ts +++ b/src/api/wms/purchasereceiptJobDetail/index.ts @@ -44,6 +44,17 @@ export const getPurchasereceiptJobDetailPage = async (params) => { } } +// 查询备件收货任务子列表 +export const getPurchasereceiptJobDetailPageSapre = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-job-detail/seniorSpare', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-job-detail/pageSpare`, params }) + } +} + // 查询采购收货任务子详情 export const getPurchasereceiptJobDetail = async (id: number) => { return await request.get({ url: `/wms/purchasereceipt-job-detail/get?id=` + id }) diff --git a/src/api/wms/purchasereceiptRecordDetail/index.ts b/src/api/wms/purchasereceiptRecordDetail/index.ts index 04699eb06..17503b4e7 100644 --- a/src/api/wms/purchasereceiptRecordDetail/index.ts +++ b/src/api/wms/purchasereceiptRecordDetail/index.ts @@ -61,6 +61,28 @@ export const getPurchasereceiptRecordDetailPage = async (params) => { } } +// 查询备件收货记录子列表 +export const getPurchasereceiptRecordDetailPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorSpare', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-record-detail/pageSpare`, params }) + } +} + + +export const getPurchasereceiptRecordDetailPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-record-detail/pageSCP`, params }) + } +} + // 查询采购收货记录子列表 export const getPurchasereceiptRecordDetailPageBySupplierCode = async (params) => { if (params.isSearch) { diff --git a/src/api/wms/purchasereceiptRequestDetail/index.ts b/src/api/wms/purchasereceiptRequestDetail/index.ts index ae652347a..13ce13323 100644 --- a/src/api/wms/purchasereceiptRequestDetail/index.ts +++ b/src/api/wms/purchasereceiptRequestDetail/index.ts @@ -46,6 +46,17 @@ export const getPurchasereceiptRequestDetailPage = async (params) => { } } +// 查询备件收货申请子列表 +export const getPurchasereceiptRequestDetailPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereceipt-request-detail/seniorSpare', data }) + } else { + return await request.get({ url: `/wms/purchasereceipt-request-detail/pageSpare`, params }) + } +} + // 查询采购收货申请子详情 export const getPurchasereceiptRequestDetail = async (id: number) => { return await request.get({ url: `/wms/purchasereceipt-request-detail/get?id=` + id }) diff --git a/src/api/wms/purchasereceiptRequestMain/index.ts b/src/api/wms/purchasereceiptRequestMain/index.ts index 148b8e98a..ba9f8a8a0 100644 --- a/src/api/wms/purchasereceiptRequestMain/index.ts +++ b/src/api/wms/purchasereceiptRequestMain/index.ts @@ -124,6 +124,6 @@ export const handlePurchasereceiptRequestMain = async (id) => { } // 生成标签 -export const genLabel = async (id) => { - return await request.post({ url: `/wms/purchasereceipt-request-main/genLabel?id=` + id }) +export const genLabel = async (data) => { + return await request.post({ url: `/wms/purchasereceipt-request-main/genLabel`, data }) } diff --git a/src/api/wms/purchasereturnRecordDetail/index.ts b/src/api/wms/purchasereturnRecordDetail/index.ts index f1366853a..99f783649 100644 --- a/src/api/wms/purchasereturnRecordDetail/index.ts +++ b/src/api/wms/purchasereturnRecordDetail/index.ts @@ -48,6 +48,15 @@ export const getPurchasereturnRecordDetailPage = async (params) => { return await request.get({ url: `/wms/purchasereturn-record-detail/page`, params }) } } +export const getPurchasereturnRecordDetailPageSCP = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/purchasereturn-record-detail/seniorSCP', data }) + } else { + return await request.get({ url: `/wms/purchasereturn-record-detail/pageSCP`, params }) + } +} // 查询采购退货记录子详情 export const getPurchasereturnRecordDetail = async (id: number) => { diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index 7a5d2122b..ced9da32c 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -68,11 +68,11 @@ export const cloSupplierinvoiceRequestMain = async (id: number) => { export const subSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id }) } -// 供应商--审批通过供应商发货申请主 +// 采购--审批通过供应商发货申请主 export const appSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id }) } -// 供应商--驳回供应商发货申请主 +// 采购--驳回供应商发货申请主 export const rejSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id }) } @@ -95,6 +95,17 @@ export const financerejSupplierinvoiceRequestMain = async (id: number) => { export const genRecordsSupplierinvoiceRequestMain = async (id) => { return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id }) } + +// 打印单挑供应商发货记录 +export const printSupplierRecord = async (asnBillNum:string) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/querySupplierRecord?asnBillNum=`+asnBillNum }) +} + +// 打印单挑供应商发货记录 +export const printSupplierRecordByMasterId = async (masterId:number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/querySupplierRecordByMasterId?masterId=`+masterId }) +} + // 导出供应商发票申请主 Excel export const exportSupplierinvoiceRequestMain = async (params) => { if(params.isSearch){ @@ -104,6 +115,11 @@ export const exportSupplierinvoiceRequestMain = async (params) => { } } +// 导出供应商发票申请明细 Excel +export const exportSupplierinvoiceRequestDetail = async (params) => { + return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel-detail`, params }) +} + // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) diff --git a/src/api/wms/team/index.ts b/src/api/wms/team/index.ts index 6c978a410..ea1ee0a98 100644 --- a/src/api/wms/team/index.ts +++ b/src/api/wms/team/index.ts @@ -9,6 +9,11 @@ export interface TeamVO { expireTime: Date remark: string available: string + teamGroup: string + workshopCode: string + productionLineCode: string + teamMonitorCode: string + teamMonitorName: string } // 查询班组列表 @@ -22,6 +27,17 @@ export const getTeamPage = async (params) => { } } +export const geTeamUserByCode = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/team/queryTeamUserByCode', data }) + } + // else { + // return await request.get({ url: `/wms/team/queryTeamUserByCode`, params }) + // } +} + // 查询班组详情 export const getTeam = async (id: number) => { return await request.get({ url: `/wms/team/get?id=` + id }) @@ -55,4 +71,4 @@ export const exportTeam = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/team/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/api/wms/unplannedissueRecordDetail/index.ts b/src/api/wms/unplannedissueRecordDetail/index.ts index a8dd317ea..b72dd7835 100644 --- a/src/api/wms/unplannedissueRecordDetail/index.ts +++ b/src/api/wms/unplannedissueRecordDetail/index.ts @@ -33,8 +33,33 @@ export const getUnplannedissueRecordDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} + const dataTypeCondition = { + 'column':'detailDataType', + 'action':'==', + 'value':'1' + } + data.filters.push(dataTypeCondition) return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data }) } else { + params.detailDataType='1' + return await request.get({ url: `/wms/unplannedissue-record-detail/page`, params }) + } +} + +// 查询备件领用出库记录子列表 +export const getUnplannedissueRecordDetailPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + const dataTypeCondition = { + 'column':'detailDataType', + 'action':'==', + 'value':'2' + } + data.filters.push(dataTypeCondition) + return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data }) + } else { + params.detailDataType='2' return await request.get({ url: `/wms/unplannedissue-record-detail/page`, params }) } } diff --git a/src/api/wms/unplannedissueRequestDetail/index.ts b/src/api/wms/unplannedissueRequestDetail/index.ts index e5105fcb8..be5249f00 100644 --- a/src/api/wms/unplannedissueRequestDetail/index.ts +++ b/src/api/wms/unplannedissueRequestDetail/index.ts @@ -28,8 +28,33 @@ export const getUnplannedissueRequestDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} + const dataTypeCondition = { + 'column':'detailDataType', + 'action':'==', + 'value':'1' + } + data.filters.push(dataTypeCondition) return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data }) } else { + params.detailDataType='1' + return await request.get({ url: `/wms/unplannedissue-request-detail/page`, params }) + } +} + +// 查询计划外出库申请子列表 +export const getUnplannedissueRequestDetailPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + const dataTypeCondition = { + 'column':'detailDataType', + 'action':'==', + 'value':'2' + } + data.filters.push(dataTypeCondition) + return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data }) + } else { + params.detailDataType='2' return await request.get({ url: `/wms/unplannedissue-request-detail/page`, params }) } } diff --git a/src/api/wms/unplannedissueRequestMain/index.ts b/src/api/wms/unplannedissueRequestMain/index.ts index be6d7eb07..4796b2cb7 100644 --- a/src/api/wms/unplannedissueRequestMain/index.ts +++ b/src/api/wms/unplannedissueRequestMain/index.ts @@ -40,26 +40,6 @@ export const getUnplannedissueRequestMainPage = async (params) => { } } - -// 查询计划外出库申请主列表 -export const getUnplannedissueRequestMainPageSpare = async (params) => { - if (params.isSearch) { - delete params.isSearch - const data = {...params} - const dataTypeCondition = { - 'column':'dataType', - 'action':'==', - 'value':'2' - } - data.filters.push(dataTypeCondition) - return await request.post({ url: '/wms/unplannedissue-request-main/senior', data }) - } else { - params.dataType='2' - return await request.get({ url: `/wms/unplannedissue-request-main/page`, params }) - } -} - - // 查询计划外出库申请主详情 export const getUnplannedissueRequestMain = async (id: number) => { return await request.get({ url: `/wms/unplannedissue-request-main/get?id=` + id }) @@ -95,6 +75,8 @@ export const importTemplate = () => { return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' }) } + + // 关闭-计划外出库申请 export const closeUnplannedissueRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedissue-request-main/close?id=` + id }) @@ -124,3 +106,28 @@ export const agreeUnplannedissueRequestMain = async (id) => { export const handleUnplannedissueRequestMain = async (id) => { return await request.put({ url: `/wms/unplannedissue-request-main/handle?id=` + id }) } + + +// 查询备件领用主列表 +export const getUnplannedissueRequestMainPageSpare = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + const dataTypeCondition = { + 'column':'dataType', + 'action':'==', + 'value':'2' + } + data.filters.push(dataTypeCondition) + return await request.post({ url: '/wms/unplannedissue-request-main/senior', data }) + } else { + params.dataType='2' + return await request.get({ url: `/wms/unplannedissue-request-main/page`, params }) + } +} + + +// 备件领用下载用户导入模板 +export const spareImportTemplate = () => { + return request.download({ url: '/wms/unplannedissue-request-main/get-import-template-spare' }) +} diff --git a/src/assets/imgs/logo_white.svg b/src/assets/imgs/logo_white.svg new file mode 100644 index 000000000..f0374070c --- /dev/null +++ b/src/assets/imgs/logo_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Annex/src/Annex.vue b/src/components/Annex/src/Annex.vue index 7d7ce3ee7..ef289c6a8 100644 --- a/src/components/Annex/src/Annex.vue +++ b/src/components/Annex/src/Annex.vue @@ -3,8 +3,8 @@
- +
@@ -16,7 +16,8 @@
{{ item.size }}KB
来自 {{ item.nickname }}
- + +
{{ formatDate(item.createTime) }}
@@ -44,6 +45,14 @@ const props = defineProps({ type: Object, required: true }, + showDownload: { + type: Boolean, + required: false + }, + hiddenDelete: { + type: Boolean, + required: false + }, }) // 子传父的时候需要先定义好emit这个方法 const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess']) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 53d983090..3c2a924e4 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -15,6 +15,7 @@ :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" + @clearSearchInput="clearSearchInput" @onChange="onChange" @onBlur="onBlur" @onEnter="onEnter" @@ -272,12 +273,17 @@ const props = defineProps({ required: false, default: false }, - // TableForm 的第几列按钮 + // TableForm 的第几列按钮 (后续用 fieldTableColumn替换 ,indexTableColumn容易出问题) indexTableColumn :{ type: Number, required: false, default: 0 }, + fieldTableColumn:{ + type: String, + required: false, + default: '' + }, //表单中展示的数据,需要用searchTable中字段计算 /***[{ formField:form中对应的field, @@ -292,6 +298,11 @@ const props = defineProps({ type:Function, required: false, default: null + }, + sumFormDataByTableCustom:{ + type:Function, + required: false, + default: null } }) @@ -344,7 +355,9 @@ const opensearchTable = ( searchCondition, multiple, type, - row + row, + isConcatDetailSchemas=false, + searchDetailSchemas: any ) => { const _searchCondition = {} // 判断查询条件中,是否存在指向主表的数据 @@ -371,14 +384,27 @@ const opensearchTable = ( message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') return } + }else if(searchCondition[i].isTableRowValue){ + //查询当前table表数据的值 + _searchCondition[searchCondition[i].key] = row[searchCondition[i].value] } else { // 扩展 转换为筛选条件进行查询 if (searchCondition[i].isSearch) { - filters.push({ - action: searchCondition[i].action, - column: searchCondition[i].key, - value: searchCondition[i].value - }) + if (searchCondition[i].isFormModel) { + //用formModel中的值 + filters.push({ + action: searchCondition[i].action, + column: searchCondition[i].key, + value: formRef.value.formModel[searchCondition[i].value] + }) + }else{ + filters.push({ + action: searchCondition[i].action, + column: searchCondition[i].key, + value: searchCondition[i].value + }) + } + } else { _searchCondition[searchCondition[i].key] = searchCondition[i].value } @@ -401,11 +427,16 @@ const opensearchTable = ( multiple, type, row, - _searchCondition + _searchCondition, + undefined, + isConcatDetailSchemas, + searchDetailSchemas ) } - +const clearSearchInput = (field)=>{ + emit('clearSearchInput',field) +} const sumFormDataByTable = () => { if(props.sumFormDataField){ const sumObject = {} @@ -419,7 +450,10 @@ const sumFormDataByTable = () => { } watch(()=>props.tableData,() => { sumFormDataByTable() - + if(props?.sumFormDataByTableCustom&&unref(formRef)?.formModel&&props.tableData){ + props?.sumFormDataByTableCustom(formRef,unref(formRef)?.formModel,props.tableData) + } + },{ deep:true }) @@ -438,9 +472,11 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { } /** 打开弹窗 */ -const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { +const open = async (type: string, row?: any, masterParmas?: any, titleName?: any, alltitleName?: any) => { dialogVisible.value = true - if (titleName) { + if(alltitleName){ + dialogTitle.value = alltitleName + }else if (titleName) { dialogTitle.value = t('action.' + titleName) } else { dialogTitle.value = t('action.' + type) @@ -475,7 +511,13 @@ const handleAddTable = () => { tableAllSchemas.value.tableFormColumns.forEach(item => { tableFormKeys[item.field] = item.default ? item.default : '' }) - inpuFocus(tableAllSchemas.value.tableFormColumns[props.indexTableColumn],tableFormKeys,0) + if(props.fieldTableColumn!=''){ + console.log('handleAddTable',tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn)) + inpuFocus(tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn),tableFormKeys,0) + }else{ + inpuFocus(tableAllSchemas.value.tableFormColumns[props.indexTableColumn],tableFormKeys,0) + + } }else{ emit('handleAddTable') } @@ -539,6 +581,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel emit('submitForm', formType.value, data) } finally { + formLoading.value = false } } else { // 编辑 @@ -546,6 +589,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel emit('submitForm', formType.value, data) } finally { + formLoading.value = false } } } else { @@ -592,7 +636,8 @@ const emit = defineEmits([ 'onEnter', 'inputNumberChange', 'formFormDateChange', - 'footButtonClick' + 'footButtonClick', + 'clearSearchInput' ]) //普通下拉改变事件 const formSelectChange = (field, val, row) => { @@ -653,7 +698,9 @@ const inpuFocus = (headerItem, row, index) => { headerItem.tableForm.searchCondition, headerItem.tableForm.multiple, 'tableForm', - row + row, + headerItem.tableForm?.isConcatDetailSchemas, + headerItem.tableForm?.searchDetailSchemas ) } /** @@ -678,8 +725,8 @@ const onBlur = (field, e) => { * @param field 当前操作字段 * @param e */ -const onEnter = (field, e) => { - emit('onEnter', field, e) +const onEnter = (field,value, e) => { + emit('onEnter', field,value, e) } // 修改盘点类型 diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 56540d68b..6f00f10c2 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -15,8 +15,8 @@ const mobile = computed(() => appStore.getMobile) const attrs = useAttrs() const slots = useSlots() -const height = ref('200px') -const isShow = ref(false) +const height = ref('auto') +const isShow = ref(true) const props = defineProps({ @@ -155,9 +155,9 @@ const showAll = () =>{ -
+
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 0f0132a20..d3308ecf0 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -12,7 +12,8 @@ {{ titleValueRef }} {{ titleNameRef }} - + + - -
- + +
+ + + + + + + + + + - + - - [] + }, + //展示附件组件的tab标签 + annexAlias: { + type: Object, + required: false, + default: ()=>({ + label: '附件', + showDownload:false, + hiddenDelete:false + }) }, + // 是否是基础数据 展现详情顶部表单 isBasic: { type: Boolean, @@ -355,7 +392,7 @@ if (props.isBasic == true) { } const otherList = [...props.annexTable,{ - label:'附件', + label:props.annexAlias.label, prop:'Annex' },{ label:'备注', @@ -372,6 +409,13 @@ if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.leng prop: 'Detail' }) } +if(!props.isBasic){ + tabsList.value.unshift({ + label: '主数据', + prop: 'Descriptions' + }) +} + // Tabs const tabRef = ref() @@ -392,7 +436,7 @@ const remarkHeight = computed(() => { const annexData = reactive({ annexList: [] }) -// 其他附件默认数据数组 +// // 其他附件默认数据数组 const annexTableData = ref>([]) // 备注数据 @@ -416,7 +460,8 @@ const getFileList = async () => { } } // 获取其他附件列表篇 -const getAnnexFileList = async () => { +const getAnnexFileList = async (row:id) => { + console.log('getAnnexFileList') props.annexTable?.forEach(async (item) => { let requstData = {...remarksData.data,tableName: item?.tableName} const annexList = await FileApi.getFileList(requstData) @@ -425,10 +470,28 @@ const getAnnexFileList = async () => { annexData.annexList = annexList }else{ annexTableData.value.push({ + align:item.align, label: item.label, tableName: item?.tableName || '', - annexList + annexList, + hasSubDetail:item.hasSubDetail||false, + subDetailTableData:item.subDetailTableData, + showDownload:item.showDownload||false, // 是否展示下载按钮 + hiddenDelete:item.hiddenDelete || false, // 是否展示删除按钮 }) + if(item?.subDetailTableData){ + const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({ + getListApi: item.subDetailTableData.getSubList // 分页接口 + }) + const {getList:getSubList} = subTableMethods + subTableObject.params= {} + item.subDetailTableData.queryParams.forEach(queryItem => { + subTableObject.params[queryItem.queryField] = row[queryItem.rowField] + }); + await getSubList() + item.subDetailTableData.tableList = subTableObject.tableList + console.log('subTableObject',annexTableData.value) + } } }) } @@ -444,7 +507,7 @@ const deleteAnnexSuccess = async () => { } /** 追加的附件 */ const updateAnnexTableHandle = () => { - getAnnexFileList() + getAnnexFileList(detailData.value) getChangeRecordList() } @@ -504,18 +567,18 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: titleNameRef.value = titleName titleValueRef.value = titleValue remarksData.data = { - tableId: row.id, + tableId: row.masterId||row.id, tableName: tableName } count.value++ // 加载明细列表 if (!props.isBasic) { // 设置主表id - masterParmas.value.masterId = row.id + masterParmas.value.masterId = row.masterId||row.id masterParmas.value.number = row.number masterParmas.value.status = row.status tableObjectRef.value.params = { - masterId: row.id + masterId: row.masterId||row.id } await getList() } @@ -526,7 +589,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: detailData.value = row getRemarkList() getFileList() - getAnnexFileList() + getAnnexFileList(row) getChangeRecordList() // 判断详情按钮是否显示 let detailButtonFilter: any = [] diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 6dfbcc921..8ecd0fe2b 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -54,7 +54,7 @@ export default defineComponent({ vLoading: propTypes.bool.def(false), labelPosition: propTypes.string.def('left'), }, - emits: ['register','opensearchTable', 'onChange', 'onBlur','onEnter'], + emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter'], setup(props, { slots, expose, emit }) { // element form 实例 const elFormRef = ref>() @@ -120,10 +120,13 @@ export default defineComponent({ return unref(elFormRef) as ComponentRef } - const opensearchTable = (field, searchField,searchTitle,searchAllSchemas, searchPage, searchCondition,multiple) => { - emit('opensearchTable',field, searchField, searchTitle, searchAllSchemas, searchPage, searchCondition,multiple) + const opensearchTable = (field, searchField,searchTitle,searchAllSchemas, searchPage, searchCondition,multiple,isConcatDetailSchemas,searchDetailSchemas) => { + emit('opensearchTable',field, searchField, searchTitle, searchAllSchemas, searchPage, searchCondition,multiple,undefined,null,isConcatDetailSchemas,searchDetailSchemas) } + const clearSearchInput = (field) => { + emit('clearSearchInput') + } expose({ setValues, formModel, @@ -248,7 +251,7 @@ export default defineComponent({ { if(event.keyCode === 13){ //回车 - emit('onEnter',item.field,event) + emit('onEnter',item.field,formModel.value[item.field],event) } }} v-slots={{ suffix: () => ( @@ -258,6 +261,7 @@ export default defineComponent({ }else{ formModel.value[item.field] = '' } + clearSearchInput(item.field) }}> ) @@ -271,6 +275,8 @@ export default defineComponent({ item?.componentProps?.searchPage, item?.componentProps?.searchCondition, item?.componentProps?.multiple, + item?.componentProps?.isConcatDetailSchemas, + item?.componentProps?.searchDetailSchemas, )}}/> ) @@ -282,7 +288,7 @@ export default defineComponent({ { if(event.keyCode === 13){ //回车 - emit('onEnter',item.field,event) + emit('onEnter',item.field,formModel.value[item.field],event) } }} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{ suffix: () => ( @@ -292,6 +298,7 @@ export default defineComponent({ }else{ formModel.value[item.field] = '' } + clearSearchInput(item.field) }}> ) @@ -306,6 +313,8 @@ export default defineComponent({ item?.componentProps?.searchPage, item?.componentProps?.searchCondition, item?.componentProps?.multiple, + item?.componentProps?.isConcatDetailSchemas, + item?.componentProps?.searchDetailSchemas, )}}/> ) diff --git a/src/components/ListTable/src/ListTable.vue b/src/components/ListTable/src/ListTable.vue index b9985a8d0..c5427483d 100644 --- a/src/components/ListTable/src/ListTable.vue +++ b/src/components/ListTable/src/ListTable.vue @@ -1,40 +1,202 @@ diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue index f33d32e36..0966638e6 100644 --- a/src/components/RouterSearch/index.vue +++ b/src/components/RouterSearch/index.vue @@ -35,6 +35,7 @@ diff --git a/src/views/login/forgetPassword.vue b/src/views/login/forgetPassword.vue new file mode 100644 index 000000000..3511c919b --- /dev/null +++ b/src/views/login/forgetPassword.vue @@ -0,0 +1,85 @@ + + + + diff --git a/src/views/login/updatePassword.vue b/src/views/login/updatePassword.vue new file mode 100644 index 000000000..cbebe4dff --- /dev/null +++ b/src/views/login/updatePassword.vue @@ -0,0 +1,105 @@ + + + + diff --git a/src/views/mes/abilityInfo/index.vue b/src/views/mes/abilityInfo/index.vue index f73f10e03..945375f6f 100644 --- a/src/views/mes/abilityInfo/index.vue +++ b/src/views/mes/abilityInfo/index.vue @@ -51,7 +51,8 @@ /> - + @@ -64,7 +65,7 @@ import * as AbilityInfoApi from '@/api/mes/abilityInfo' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'AbilityInfo' }) diff --git a/src/views/mes/components/Detail.vue b/src/views/mes/components/Detail.vue new file mode 100644 index 000000000..a5072d7e9 --- /dev/null +++ b/src/views/mes/components/Detail.vue @@ -0,0 +1,969 @@ + + + + + diff --git a/src/views/mes/dismantlingMain/index.vue b/src/views/mes/dismantlingMain/index.vue index b41931c64..c4c87bdf8 100644 --- a/src/views/mes/dismantlingMain/index.vue +++ b/src/views/mes/dismantlingMain/index.vue @@ -53,6 +53,7 @@ ([ + { + label: '主键', + field: 'id', + sort: 'custom', + isForm: false, + }, + + + { + label: 'KEY', + field: 'keyDate', + sort: 'custom', + isSearch: false, + isTable:false, + isForm:false + }, + { + label: '节日名称', + field: 'holidayName', + sort: 'custom', + isSearch: true, + }, + { + label: '节日类型;', + field: 'holidayType', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.HOLIDAY_TYPE, + dictClass: 'string', + form: { + component: 'Select', + value: '1', + }, + }, + { + label: '节日年份', + field: 'holidayYear', + sort: 'custom', + isSearch: true, + isForm:false, + isTable:true, + form: { + component: 'InputNumber', + value: '2023', + }, + }, + { + label: '节日日期', + field: 'holidayDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'YYYY-MM-DD', + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'x' + } + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.QUALIFY_STATUS, + dictClass: 'string', + isForm: true, + isSearch: false, + isTable: true, + form: { + component: 'Switch', + value: '1', + componentProps: { + inactiveValue: '2', + activeValue: '1' + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/holiday/index.vue b/src/views/mes/holiday/index.vue new file mode 100644 index 000000000..a646cfdf0 --- /dev/null +++ b/src/views/mes/holiday/index.vue @@ -0,0 +1,226 @@ + + + diff --git a/src/views/mes/hrPersonAbility/index.vue b/src/views/mes/hrPersonAbility/index.vue index e0558d661..f4b11845f 100644 --- a/src/views/mes/hrPersonAbility/index.vue +++ b/src/views/mes/hrPersonAbility/index.vue @@ -51,7 +51,8 @@ /> - + @@ -64,7 +65,7 @@ import * as HrPersonAbilityApi from '@/api/mes/hrPersonAbility' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'HrPersonAbility' }) diff --git a/src/views/mes/item/index.vue b/src/views/mes/item/index.vue index 3ddf781ac..148c77cae 100644 --- a/src/views/mes/item/index.vue +++ b/src/views/mes/item/index.vue @@ -167,9 +167,7 @@ const openForm = (type: string, row?: any) => { if (item.field == 'dataStandvalue') { item.componentProps.disabled = false } - if (item.field == 'status') { - item.componentProps.disabled = true - } + } if(row.dataType == 'SWITCH'){ if (item.field == 'dataVerify') { @@ -178,9 +176,7 @@ const openForm = (type: string, row?: any) => { if (item.field == 'dataStandvalue') { item.componentProps.disabled = true } - if (item.field == 'status') { - item.componentProps.disabled = false - } + } if(row.dataType == 'TEXT'){ if (item.field == 'dataVerify') { @@ -189,9 +185,7 @@ const openForm = (type: string, row?: any) => { if (item.field == 'dataStandvalue') { item.componentProps.disabled = true } - if (item.field == 'status') { - item.componentProps.disabled = true - } + } }) }else{ @@ -208,9 +202,7 @@ const openForm = (type: string, row?: any) => { if (item.field == 'dataStandvalue') { item.componentProps.disabled = false } - if (item.field == 'status') { - item.componentProps.disabled = false - } + }) } basicFormRef.value.open(type, row) diff --git a/src/views/mes/opersteps/index.vue b/src/views/mes/opersteps/index.vue index 896b1659e..4e2c1abc8 100644 --- a/src/views/mes/opersteps/index.vue +++ b/src/views/mes/opersteps/index.vue @@ -51,7 +51,7 @@ /> - + @@ -64,7 +64,7 @@ import * as OperstepsApi from '@/api/mes/opersteps' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'Opersteps' }) diff --git a/src/views/mes/operstepsType/index.vue b/src/views/mes/operstepsType/index.vue index 7079cc3f5..20c4d9940 100644 --- a/src/views/mes/operstepsType/index.vue +++ b/src/views/mes/operstepsType/index.vue @@ -51,7 +51,7 @@ /> - + @@ -64,7 +64,7 @@ import * as OperstepsTypeApi from '@/api/mes/operstepsType' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'OperstepsType' }) diff --git a/src/views/mes/orderDay/components/orderDetail.vue b/src/views/mes/orderDay/components/orderDetail.vue index b2901483c..486efad04 100644 --- a/src/views/mes/orderDay/components/orderDetail.vue +++ b/src/views/mes/orderDay/components/orderDetail.vue @@ -199,7 +199,7 @@ const emit = defineEmits([ ]) //监视属性 -watch() +//watch() - diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index e7d0f5653..a67084f4d 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -63,7 +63,7 @@ export const OrderDay = useCrudSchemas(reactive([ disabled: true } }, - + }, { label: '', @@ -142,7 +142,7 @@ export const OrderDay = useCrudSchemas(reactive([ value: 'CCP,BCP',//,SEMI] isMainValue: false }, - + ] } } @@ -169,7 +169,7 @@ export const OrderDay = useCrudSchemas(reactive([ }] } }, - + }, { label: '产线编码', @@ -360,3 +360,52 @@ export const OrderDay = useCrudSchemas(reactive([ } } ])) + + +export const DeviceInfo = useCrudSchemas(reactive([ + { + label: '设备编码', + field: 'deviceCode', + sort: 'custom', + isSearch: true, + }, + { + label: '设备名称', + field: 'deviceName', + sort: 'custom', + isSearch: true, + }, + // { + // label: '设备类型', + // field: 'deviceType', + // sort: 'custom', + // isSearch: true, + // form: { + // component: 'SelectV2' + // }, + // }, + { + label: '所属车间', + field: 'workroomCode', + sort: 'custom', + isSearch: true, + }, + { + label: '所属产线', + field: 'lineCode', + sort: 'custom', + isSearch: true, + }, + // { + // label: '设备分组', + // field: 'deviceGroup', + // sort: 'custom', + // isSearch: true, + // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, +])) diff --git a/src/views/mes/ordermonthplan/index.vue b/src/views/mes/ordermonthplan/index.vue index 32805630a..fc5c30e21 100644 --- a/src/views/mes/ordermonthplan/index.vue +++ b/src/views/mes/ordermonthplan/index.vue @@ -44,8 +44,6 @@ @success="formsSuccess" :rules="MesOrderMonthMainRules" :formAllSchemas="MesOrderMonthMain.allSchemas" - :apiUpdate="updateMesOrderMonthMain" - :apiCreate="createMesOrderMonthMain" :apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain" @searchTableSuccess="searchTableSuccess" :isBusiness="false" diff --git a/src/views/mes/pattern/index.vue b/src/views/mes/pattern/index.vue index 7d201886a..e7a6f128d 100644 --- a/src/views/mes/pattern/index.vue +++ b/src/views/mes/pattern/index.vue @@ -51,7 +51,7 @@ /> - + @@ -64,7 +64,7 @@ import * as PatternApi from '@/api/mes/pattern' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'Pattern' }) diff --git a/src/views/mes/patternType/index.vue b/src/views/mes/patternType/index.vue index acedd71fe..6a1ad681a 100644 --- a/src/views/mes/patternType/index.vue +++ b/src/views/mes/patternType/index.vue @@ -51,7 +51,7 @@ /> - + @@ -64,7 +64,7 @@ import * as PatternTypeApi from '@/api/mes/patternType' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'PatternType' }) diff --git a/src/views/mes/process/components/Detail.vue b/src/views/mes/process/components/Detail.vue new file mode 100644 index 000000000..a888b982b --- /dev/null +++ b/src/views/mes/process/components/Detail.vue @@ -0,0 +1,820 @@ + + + + + diff --git a/src/views/mes/process/index.vue b/src/views/mes/process/index.vue new file mode 100644 index 000000000..352a1b523 --- /dev/null +++ b/src/views/mes/process/index.vue @@ -0,0 +1,368 @@ + + + diff --git a/src/views/mes/process/process.data.ts b/src/views/mes/process/process.data.ts new file mode 100644 index 000000000..0f6dce604 --- /dev/null +++ b/src/views/mes/process/process.data.ts @@ -0,0 +1,513 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import { validateYS } from '@/utils/validator' + +import * as PatternApi from "@/api/mes/pattern"; +import * as ItembasicApi from "@/api/wms/itembasic"; +import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; + +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 工序 + */ +export const Process = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.PROCESS_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工序节拍', + field: 'actionClock', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 1 + } + }, + table: { + width: 120 + } + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否报工', + field: 'isReport', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否质检', + field: 'isCheck', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否关键', + field: 'isSerious', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '生效时间', + field: 'activeTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTable: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单检验 +export const ProcessRules = reactive({ + code: [ + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} + ], + name: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + workshopCode: [ + { required: true, message: '请输入车间代码', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请输入生产线代码', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], + isReport: [ + { required: true, message: '请选择是否报工', trigger: 'change' } + ], + isCheck: [ + { required: true, message: '请选择是否质检', trigger: 'change' } + ], + isSerious: [ + { required: true, message: '请选择是否关键', trigger: 'change' } + ], +}) + +export const ProductionlineTab = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) + +export const PatternTab = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true + } +])) + +export const ItembasicTab = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true + } +])) + + + +export const TabsList = [ + { + label: "产线", + prop: 'ProductionlineTab', + }, + { + label: "模具", + prop: 'PatternTab', + }, + { + label: "物料", + prop: 'ItembasicTab', + } + +] + +export const ProductionlinePopList = useCrudSchemas(reactive([ + { + label: '选择产线', + field: 'list', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + multiple:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '选择产线', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '选择产线', // 查询弹窗标题 + searchAllSchemas: ProductionlineTab.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + }] + } + } + } +])) +export const PatternPopList = useCrudSchemas(reactive([ + { + label: '选择模具', + field: 'list', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + multiple:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '选择模具', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '选择模具', // 查询弹窗标题 + searchAllSchemas: PatternTab.allSchemas, // 查询弹窗所需类 + searchPage: PatternApi.getPatternPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + } + } + } +])) + +export const ItembasicPopList = useCrudSchemas(reactive([ + { + label: '选择物料', + field: 'list', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + multiple:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '选择物料', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '选择物料', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + } +])) diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue index 0b89f8423..cf4426e07 100644 --- a/src/views/mes/processroute/components/configDialog.vue +++ b/src/views/mes/processroute/components/configDialog.vue @@ -42,7 +42,7 @@ @@ -51,7 +51,7 @@
- +
@@ -95,11 +95,11 @@ 物料信息 - - + + = - - + + @@ -110,8 +110,8 @@ 模具信息 - - + + 工位信息 - + @@ -145,7 +145,6 @@ import { start_node, end_node, createGraph, getNewNode } from './graphbase.data' import {ProcessSearch} from '../../publicUtil/processSearch.data' import * as ProcessrouteApi from '@/api/mes/processroute' import { Graph } from '@antv/x6' -import { get } from 'http' const graphContainer = ref(null) defineOptions({ name: 'ProcessRouteConfig' }) const isShowDrawer = ref(false) @@ -162,12 +161,10 @@ const titleValueRef = ref() const processRouteId = ref() const processData = ref([]) //工序数据 const tableProcess = ref() -// const workshopCodeOptions = ref([{ code: '', name: '车间1' }]) -// const productionLineCodeOptions = ref([{ code: '', name: '产线' }]) const productData = ref({ name: '', code: '', desc1: '--' }) //产品数据 const materialData=ref() const mouldData = ref() -const workstationData = ref() //工位数据 +const workStationList = ref() //工位数据 // 附件默认数据 const annexData = reactive({ annexList: [] @@ -182,7 +179,6 @@ const routeVersion=ref() const searchTableRef = ref() const opensearchTable = ( ) => { - //console.log("opensearchTable") const _searchCondition = {} const _searchTableTitle = "工序查询" const _searchTableAllSchemas = ProcessSearch.allSchemas @@ -216,8 +212,9 @@ const deleteNode=(row)=>{ } //初始化图形组件 const graph = ref() -const openDetail = (rowData: any) => { - rowData.value = rowData +const rowData = ref() +const openDetail = (row: any) => { + rowData.value = row console.log('rowData',rowData.value) titleNameRef.value = rowData.value.processrouteCode titleValueRef.value = rowData.value.processName @@ -230,78 +227,97 @@ const openDetail = (rowData: any) => { if(rowData){ let graphJson = JSON.parse(rowData.value.graphJson) isShowDrawer.value = true - nextTick(() => { + nextTick?.(() => { graph.value = createGraph(graphContainer.value as HTMLElement,true,640,480) - graph.value.on('node:click', ({ e, x, y, node, view }) => { + //首次打开弹窗,将物料,模具,工位对应的表单清空 + materialData.value = [] + mouldData.value = [] + workStationList.value = [] + graph.value.on('node:dblclick', ({ e, x, y, node, view }) => { nodeClick(e, x, y, node, view) }) graph.value.fromJSON(graphJson.cells) }) - getItembasicInfo(rowData.value.productCode) - getRemarkList() - getFileList() - getChangeRecordList()} + getProcessList(rowData.value.processrouteCode) + getItembasicInfo(rowData.value.productCode) + getRemarkList() + getFileList() + getChangeRecordList() + } } //关闭后销毁图形组件 const handleDrawerClose = () => { //console.log('close') if (graph && graph.value != undefined) { //console.log(graph.value.toJSON()) + rowData.value=null } } //**获取 工序信息 */ -const getProcessInfo = async (id: number) => { - const res = await ProcessrouteApi.getProcesInfo(id) - return res +const getProcessInfo = async (id: any) => { + return await ProcessrouteApi.getProcesInfo(id) } /** 获取产品信息 */ const getItembasicInfo = async (code: String) => { const res = await ProcessrouteApi.getProductInfo(code) productData.value = res - //console.log(productData.value) } -/** 获取设备列表 */ -const getDeviceList = async (code: String) => { - const res = await ProcessrouteApi.getDeviceList(code) - deviceList.value = res.data - //console.log(productData.value) +/** 获取物料列表 */ +const getItembasicPage = async (code) => { + return await ProcessrouteApi.getItembasicPage(code); } -/** 获取工位信息 */ -const getWorkStation = async (code: String) => { - const res = await ProcessrouteApi.getWorkStation(code) - workStationData.value = res.data - //console.log(productData.value) +/** 查询模具基本信息列表 */ +const getPatternPage = async (code) => { + return await ProcessrouteApi.getPatternPage(code); } -/** 获取人员信息列表 */ -const getWorkerList = async (code: String) => { - const res = await ProcessrouteApi.getWorkerList(code) - workerList.value = res.data - //console.log(productData.value) +/** 查询模具基本信息列表 */ +const getWorkstationPage = async (code) => { + return await ProcessrouteApi.getWorkstationPage(code); } -const processListParmas = ref({ - name: '', - workshopCode: '', - productionLineCode:'', - pageNum: 1, - pageSize: 50 -}) -/**获取工序列表 */ -const getProcessList = async () => { - //console.log(processListParmas.value) - const res = await ProcessrouteApi.getProcessList(processListParmas.value) - - processData.value = res.list - +// const processListParmas = ref({ +// name: '', +// workshopCode: '', +// productionLineCode:'', +// pageNum: 1, +// pageSize: 50 +// }) +// /**获取基础工序列表 */ +// const getProcessList = async () => { +// const res = await ProcessrouteApi.getProcessList(processListParmas.value) +// processData.value = res.list +// //return res +// } +/**获取工艺路线定义的工序列表 */ +const getProcessList = async (code) => { + console.log('code',code) + const res = await ProcessrouteApi.getProcessrouteNodeList(code) + processData.value = res //return res } +// 并行执行所有异步操作 const nodeClick = (e, x, y, node, view) => { - //console.log('nodeClick', e, x, y, node, view) - let data = getProcessInfo(node.id) - getDeviceList(node.id) - getWorkerList(node.id) - getWorkStation(node.id) - message.info(data.toString()) + Promise.all([ + getProcessInfo(node.id), + getItembasicPage(node.id), + getPatternPage(node.id), + getWorkstationPage(node.id) + ]).then(([processIndoList,itembasicPage, patternPage,workstationInfoList]) => { + // 在这里处理所有异步操作的结果 + message.info(JSON.stringify(processIndoList)) + console.log(processIndoList) + //获取绑定的物料信息 + materialData.value = itembasicPage.list + //获取绑定的模具信息 + mouldData.value = patternPage.list + //获取绑定的工位信息 + workStationList.value = workstationInfoList.list + }).catch(error => { + console.error("Error:", error); + materialData.value = [] + mouldData.value = [] + workStationList.value = [] + }); } //添加节点 @@ -341,10 +357,10 @@ const userAddNode = (row) => { } //------- defineExpose({ openDetail, createGraph }) // 提供 open 方法,用于打开弹窗 -onMounted(() => { +onMounted?.(() => { //registerNodes() - getProcessList() + //getProcessList() }) //保存图形 const saveResult = async () => { @@ -418,7 +434,7 @@ const deleteAnnexSuccess = async () => { getChangeRecordList() } // 验证图形 -onUnmounted(() => {}) +onUnmounted?.(() => {}) const emit = defineEmits(['close']) diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue index 5e48c1d11..2e174e39d 100644 --- a/src/views/mes/processroute/index.vue +++ b/src/views/mes/processroute/index.vue @@ -51,7 +51,7 @@ /> - + @@ -140,7 +140,7 @@ const butttondata = [ defaultButtons.mainListHandleBtn({label: '配置', name: 'config', hide: false, - type: 'warning', + type: 'primary', icon: '', color: '', hasPermi: ''}), // 路由设置 @@ -148,18 +148,22 @@ const butttondata = [ // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - + if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) - } else if (val == 'config') { // + } else if (val == 'config') { // openDetail(row) } } const dailogClose=() => { console.log('close'); - + nextTick?.(()=>{ + debugger + getList() + }) + } /** 添加/修改操作 */ const basicFormRef = ref() @@ -194,7 +198,8 @@ const formsSuccess = async (formType,data) => { /** 详情操作 */ const configDialogRef = ref() const openDetail =(row) => { - + + // configDialogRef.value.openDetail(row) } @@ -257,5 +262,10 @@ onMounted(async () => { getList() importTemplateData.templateUrl = await ProcessrouteApi.importTemplate() }) +// +// watch( +// () => tableObject.tableList, +// console.log(tableObject.tableList) +// ) diff --git a/src/views/mes/productBackline/index.vue b/src/views/mes/productBackline/index.vue new file mode 100644 index 000000000..9872e5958 --- /dev/null +++ b/src/views/mes/productBackline/index.vue @@ -0,0 +1,250 @@ + + + diff --git a/src/views/mes/productBackline/productBackline.data.ts b/src/views/mes/productBackline/productBackline.data.ts new file mode 100644 index 000000000..32a949e54 --- /dev/null +++ b/src/views/mes/productBackline/productBackline.data.ts @@ -0,0 +1,170 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import {workscheduling} from "@/views/mes/productionPlan/productionPlan.data"; +import * as ProductOfflineApi from "@/api/mes/productOffline"; +import {ProductOffline} from "@/views/mes/productOffline/productOffline.data"; + +// 表单校验 +export const ProductBacklineRules = reactive({ + productCode: [ + { required: true, message: '请选择产品编码', trigger: 'change' }, + ], +}) + +export const ProductBackline = useCrudSchemas(reactive([ + { + label: '返线工单号', + field: 'backlineBillno', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + width: 200 + }, + }, + { + label: '离线编码', + field: 'offlineCode', + sort: 'custom', + isSearch: true, + isForm: true, + table: { + width: 200 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择离线编码', // 输入框占位文本 + searchField: 'offlineCode', // 查询弹窗赋值字段 + searchTitle: '产品离线登记信息', // 查询弹窗标题 + searchAllSchemas: ProductOffline.allSchemas, // 查询弹窗所需类 + searchPage: ProductOfflineApi.getProductOfflinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'flagDo', + // value: '3', + // action: '==', + // isSearch: true, + // isMainValue: false + // }] + } + } + }, + { + label: '产品编码', + field: 'productCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '计划编码', + field: 'planCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '工单编码', + field: 'workBillno', + sort: 'custom', + isSearch: true, + table: { + width: 140 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '返线工序', + field: 'processCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '返线工位', + field: 'workstationCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '加工人员', + field: 'operCode', + sort: 'custom', + isSearch: false, + table: { + width: 120 + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + isTable: true, + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/productOffline/index.vue b/src/views/mes/productOffline/index.vue new file mode 100644 index 000000000..fa7244d44 --- /dev/null +++ b/src/views/mes/productOffline/index.vue @@ -0,0 +1,251 @@ + + + diff --git a/src/views/mes/productOffline/productOffline.data.ts b/src/views/mes/productOffline/productOffline.data.ts new file mode 100644 index 000000000..95a1784df --- /dev/null +++ b/src/views/mes/productOffline/productOffline.data.ts @@ -0,0 +1,186 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import {workscheduling} from "@/views/mes/productionPlan/productionPlan.data"; +import * as ProductOfflineApi from "@/api/mes/productOffline"; + +// 表单校验 +export const ProductOfflineRules = reactive({ + checkPersonCode: [ + { required: true, message: '请输入质检人员', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + offlineReson: [ + { required: true, message: '请输入离线原因', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + productCode: [ + { required: true, message: '请选择产品编码', trigger: 'change' }, + ], +}) + +export const ProductOffline = useCrudSchemas(reactive([ + { + label: '离线编码', + field: 'offlineCode', + sort: 'custom', + isForm: false, + fixed: 'left' + }, + { + label: '产品编码', + field: 'productCode', + sort: 'custom', + isSearch: true, + table: { + width: 120, + fixed: 'left' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择产品编码', // 输入框占位文本 + searchField: 'productCode', // 查询弹窗赋值字段 + searchTitle: '生产任务信息表', // 查询弹窗标题 + searchAllSchemas: workscheduling.allSchemas, // 查询弹窗所需类 + searchPage: ProductOfflineApi.getworkSchedulingPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'flagDo', + value: '3', + action: '==', + isSearch: true, + isMainValue: false + }] + } + } + }, + { + label: '工单编码', + field: 'workBillno', + sort: 'custom', + isSearch: true, + disabled:true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '计划编码', + field: 'planCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '工序编码', + field: 'processCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '工位编码', + field: 'stationCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '产品去向', + field: 'productDestination', + sort: 'custom', + isSearch: false, + table: { + width: 120 + } + }, + { + label: '离线原因', + field: 'offlineReson', + sort: 'custom', + // dictType: DICT_TYPE.BASIC_TEAM_TYPE, + // dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + } + }, + { + label: '质检人员', + field: 'checkPersonCode', + sort: 'custom', + isSearch: false, + isSearch: true, + table: { + width: 120 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + isTable: true, + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/productionPlan/productionPlan.data.ts b/src/views/mes/productionPlan/productionPlan.data.ts index f6f8f68ec..5e6a4bbd1 100644 --- a/src/views/mes/productionPlan/productionPlan.data.ts +++ b/src/views/mes/productionPlan/productionPlan.data.ts @@ -180,3 +180,103 @@ export const ProductionPlan = useCrudSchemas(reactive([ } } ])) + + +export const workscheduling = useCrudSchemas(reactive([ + { + label: '产品编号', + field: 'productCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '产品名称', + field: 'productName', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '计划编号', + field: 'planMaserCode', + sort: 'custom', + isSearch: true, + table: { + width: 120, + fixed: 'left' + }, + }, + { + label: '当前工序', + field: 'workingNode', + sort: 'custom', + isSearch: false, + table: { + width: 120 + } + }, + { + label: '当前工位', + field: 'currentWorkstation', + sort: 'custom', + isSearch: false, + table: { + width: 120 + } + }, + { + label: '工单编码', + field: 'schedulingCode', + sort: 'custom', + isSearch: false, + disabled:true, + table: { + width: 120 + }, + }, + { + label: '车间编号', + field: 'workroomCode', + sort: 'custom', + isSearch: true, + table: { + width: 120 + }, + form: { + componentProps: { + disabled:true, + } + } + }, + { + label: '产线编号', + field: 'lineCode', + sort: 'custom', + isSearch: true, + isTable: true, + table: { + width: 120 + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + } +])) diff --git a/src/views/mes/qualityform/index.vue b/src/views/mes/qualityform/index.vue index 27052503c..c3a6fce37 100644 --- a/src/views/mes/qualityform/index.vue +++ b/src/views/mes/qualityform/index.vue @@ -52,7 +52,8 @@ ([ }, }, { - label: '表单编号', + label: '表单模板编号', field: 'formNo', sort: 'custom', isSearch: true, }, + { + label: '日计划单号', + field: 'planNoDay', + sort: 'custom', + isSearch: true, + }, { label: '操作类型', field: 'operation', sort: 'custom', - dictType: DICT_TYPE.QUALIFY_FORM_OPERATION, - dictClass: 'string', isSearch: true, }, { @@ -182,6 +186,12 @@ export const Qualityformlog = useCrudSchemas(reactive([ } }, }, + { + label: '原因', + field: 'reason', + sort: 'custom', + isSearch: true, + }, { label: '操作', field: 'action', diff --git a/src/views/mes/reworkBatch/index.vue b/src/views/mes/reworkBatch/index.vue index f2b515fd3..d081b8355 100644 --- a/src/views/mes/reworkBatch/index.vue +++ b/src/views/mes/reworkBatch/index.vue @@ -51,7 +51,8 @@ /> - + @@ -64,7 +65,7 @@ import * as ReworkBatchApi from '@/api/mes/reworkBatch' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'MesReworkBatch' }) diff --git a/src/views/mes/reworkSingle/index.vue b/src/views/mes/reworkSingle/index.vue index 3fe6a7eb8..a5254d728 100644 --- a/src/views/mes/reworkSingle/index.vue +++ b/src/views/mes/reworkSingle/index.vue @@ -51,7 +51,8 @@ /> - + @@ -64,7 +65,7 @@ import * as ReworkSingleApi from '@/api/mes/reworkSingle' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import Detail from '@/components/Detail/src/Detail.vue' +import Detail from '../components/Detail.vue' defineOptions({ name: 'MesReworkSingle' }) diff --git a/src/views/mes/workScheduling/components/Detail.vue b/src/views/mes/workScheduling/components/Detail.vue new file mode 100644 index 000000000..c58a01025 --- /dev/null +++ b/src/views/mes/workScheduling/components/Detail.vue @@ -0,0 +1,943 @@ + + + + + diff --git a/src/views/mes/workScheduling/index.vue b/src/views/mes/workScheduling/index.vue new file mode 100644 index 000000000..d41e3d2bc --- /dev/null +++ b/src/views/mes/workScheduling/index.vue @@ -0,0 +1,260 @@ + + + diff --git a/src/views/mes/workScheduling/workScheduling.data.ts b/src/views/mes/workScheduling/workScheduling.data.ts new file mode 100644 index 000000000..3201a4e1f --- /dev/null +++ b/src/views/mes/workScheduling/workScheduling.data.ts @@ -0,0 +1,333 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const WorkSchedulingRules = reactive({ +}) + +export const WorkScheduling = useCrudSchemas(reactive([ + { + label: '主键', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + }, + { + label: '创建时间', + field: 'createTime', + 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')] + } + }, + isForm: false, + }, + { + label: '计划编号', + field: 'planMaserCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '任务编号', + field: 'schedulingCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '产品编号', + field: 'productCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '车间', + field: 'workroomCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '产线', + field: 'lineCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '工艺路线', + field: 'prouteCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '计划数量', + field: 'planCount', + sort: 'custom', + isForm: false, + }, + { + label: '完工数量', + field: 'finishCount', + sort: 'custom', + isForm: false, + }, + { + label: '合格数量', + field: 'qualifiedCount', + sort: 'custom', + isForm: false, + }, + { + label: '不合格数量', + field: 'unqualifiedCount', + sort: 'custom', + isForm: false, + }, + { + label: '执行状态', + field: 'flagDo', + sort: 'custom', + isSearch: true, + }, + { + label: '当前工序', + field: 'workingNode', + sort: 'custom', + isForm: false, + }, + { + label: '当前任务号', + field: 'workingTaskSort', + sort: 'custom', + isForm: false, + }, + { + label: '工单模式', + field: 'formType', + sort: 'custom', + isForm: false, + }, + { + label: '生产序号', + field: 'workSort', + sort: 'custom', + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + + +// 表单校验 +export const WorkSchedulingDetailRules = reactive({ +}) + +export const WorkSchedulingDetail = useCrudSchemas(reactive([ + { + label: '主键', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + isTable: false, + isForm:false, + isDetail:false, + }, + { + label: '创建时间', + field: 'createTime', + 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')] + } + }, + }, + { + label: '工单号', + field: 'schedulingCode', + sort: 'custom', + isSearch: true, + }, + { + label: '任务ID', + field: 'schedulingId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '任务序号', + field: 'taskSort', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '工序编号', + field: 'nodeCode', + sort: 'custom', + isSearch: true, + }, + { + label: '允许工位', + field: 'workstationValidate', + sort: 'custom', + }, + { + label: '允许设备', + field: 'deviceValidate', + sort: 'custom', + }, + { + label: '允许人员', + field: 'personValidate', + sort: 'custom', + }, + { + label: '报工人', + field: 'reportPerson', + sort: 'custom', + isSearch: true, + }, + { + label: '生产人', + field: 'receivePerson', + sort: 'custom', + isSearch: true, + }, + { + label: '计划数量', + field: 'planCount', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '报工数量', + field: 'reportCount', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '报工方式', + field: 'reportType', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: '合格数', + field: 'qualifiedCount', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '不合格数', + field: 'unqualifiedCount', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '生产工位', + field: 'receiveWorkstation', + sort: 'custom', + isSearch: true, + }, + { + label: '生产设备', + field: 'receiveDevice', + sort: 'custom', + isSearch: true, + }, + { + label: '生产物料', + field: 'materialValidate', + sort: 'custom', + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/workcalendar/index.vue b/src/views/mes/workcalendar/index.vue new file mode 100644 index 000000000..4876ec101 --- /dev/null +++ b/src/views/mes/workcalendar/index.vue @@ -0,0 +1,879 @@ + + + + \ No newline at end of file diff --git a/src/views/mes/workstation/components/Detail.vue b/src/views/mes/workstation/components/Detail.vue index d950d28da..c8c2ae9eb 100644 --- a/src/views/mes/workstation/components/Detail.vue +++ b/src/views/mes/workstation/components/Detail.vue @@ -488,11 +488,13 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: code: row.code } await getList() + } isShowDrawer.value = true if (row) { detailLoading.value = true try { + detailData.value = row getRemarkList() getFileList() diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 092a7e41b..13b6a688f 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -52,21 +52,23 @@ import { + abilityPopList, Equipment, - Opersteps, + equipmentPopList, postPopList, + stepPopList, TabsList, Workstation, - WorkstationRules,equipmentPopList,stepPopList + WorkstationRules } from './workstation.data' import * as WorkstationApi from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' -import ImportForm from '@/components/ImportForm/src/ImportForm.vue' -import { - goalParams, -} from "@/api/mes/workstation"; import Detail from './components/Detail.vue' + defineOptions({ name: 'Workstation' }) -let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation -let tabsCreateApi = WorkstationApi.createEquipmentRelation +let tabsDeleteApi = WorkstationApi.deleteEquipment +let tabsCreateApi = WorkstationApi.createEquipment const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 @@ -103,10 +104,12 @@ const tableColumns = ref(Workstation.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { - nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) + nextTick(async () => { + if (formRef) { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + } }) } @@ -225,7 +228,7 @@ onMounted(async () => { /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { - goalParams.workstationCode = row.code + WorkstationApi.goalParams.workstationCode = row.code detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') } // 子包装数据 @@ -238,16 +241,24 @@ const changeTabs = (data) =>{ tableKey.value = data.prop if(data.prop == 'Equipment'){ apiPage.value = WorkstationApi.getEquipmentPage - detailAllSchemas.value = Equipment.allSchemas - tabsDeleteApi = WorkstationApi.deleteEquipmentRelation - tabsCreateApi = WorkstationApi.createEquipmentRelation + tabsDeleteApi = WorkstationApi.deleteEquipment + tabsCreateApi = WorkstationApi.createEquipment tmpPopList = equipmentPopList.allSchemas }else if(data.prop == 'Opersteps'){ apiPage.value = WorkstationApi.getOperstepsPage - detailAllSchemas.value = Opersteps.allSchemas - tabsDeleteApi = WorkstationApi.deleteOperstepsRelation - tabsCreateApi = WorkstationApi.createOperstepsRelation + tabsDeleteApi = WorkstationApi.deleteOpersteps + tabsCreateApi = WorkstationApi.createOpersteps tmpPopList = stepPopList.allSchemas + }else if(data.prop == 'Ability'){ + apiPage.value = WorkstationApi.getAbilityPage + tabsDeleteApi = WorkstationApi.deleteAbility + tabsCreateApi = WorkstationApi.createAbility + tmpPopList = abilityPopList.allSchemas + }else if(data.prop == 'Post'){ + apiPage.value = WorkstationApi.getPostPage + tabsDeleteApi = WorkstationApi.deletePost + tabsCreateApi = WorkstationApi.createAPost + tmpPopList = postPopList.allSchemas } } const tmpPopListRef = ref() diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 6d405e1a9..50c88e58b 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -7,13 +7,20 @@ import { Productionline } from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data"; import * as ProductionlineApi from "@/api/wms/productionline"; +import * as ProcessApi from "@/api/mes/process"; +import * as AbilityInfoApi from "@/api/mes/abilityInfo"; +import {AbilityInfo} from "@/views/mes/abilityInfo/abilityInfo.data"; +import {getOperstepsPage} from "@/api/mes/opersteps"; +import {Opersteps} from "@/views/mes/opersteps/opersteps.data"; +import {getPostPage} from "@/api/system/post"; // 表单校验 export const WorkstationRules = reactive({ code: [required], name: [required], workshopCode:[required], - productionLineCode: [required] + productionLineCode: [required], + processCode: [required] }) export const TabsList = [{ label: "设备", @@ -22,6 +29,14 @@ export const TabsList = [{ { label: "操作步骤", prop: 'Opersteps', + }, + { + label: "能力", + prop: 'Ability', + }, + { + label: "岗位", + prop: 'Post', } ] @@ -73,7 +88,7 @@ export const Workstation = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchListPlaceholder: '请选择生产线', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 @@ -81,7 +96,7 @@ export const Workstation = useCrudSchemas(reactive([ searchCondition: [{ key:'workshopCode', value:'workshopCode', - message: '请填写车间代码!', + message: '请选择车间!', isMainValue: true },{ key: 'available', @@ -91,6 +106,31 @@ export const Workstation = useCrudSchemas(reactive([ } } }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工序', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工序信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProcessApi.getProcessPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, { label: '生效时间', field: 'activeTime', @@ -157,22 +197,6 @@ export const Workstation = useCrudSchemas(reactive([ } } ])) -export const select = useCrudSchemas(reactive([ - { - label: '代码', - field: 'code', - sort: 'custom', - isSearch: true, - isForm: false - }, - { - label: '名称', - field: 'name', - sort: 'custom', - isSearch: true, - isForm: false - } -])) export const Equipment = useCrudSchemas(reactive([ { @@ -201,7 +225,7 @@ export const Equipment = useCrudSchemas(reactive([ isTableForm:true } ])) -export const Opersteps = useCrudSchemas(reactive([ +export const Post = useCrudSchemas(reactive([ { label: '代码', field: 'code', @@ -225,10 +249,9 @@ export const Opersteps = useCrudSchemas(reactive([ width: 150, fixed: 'right' }, - isTableForm:true, + isTableForm:true } ])) - export const equipmentPopList = useCrudSchemas(reactive([ { label: '选择设备', @@ -243,7 +266,7 @@ export const equipmentPopList = useCrudSchemas(reactive([ searchListPlaceholder: '选择设备', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '选择设备', // 查询弹窗标题 - searchAllSchemas: select.allSchemas, // 查询弹窗所需类 + searchAllSchemas: Equipment.allSchemas, // 查询弹窗所需类 searchPage: WorkstationApi.checkEquipmentPageList, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', @@ -254,9 +277,9 @@ export const equipmentPopList = useCrudSchemas(reactive([ } } ])) -export const processPopList = useCrudSchemas(reactive([ +export const stepPopList = useCrudSchemas(reactive([ { - label: '选择工序', + label: '选择操作步骤', field: 'list', sort: 'custom', isSearch: false, @@ -265,11 +288,11 @@ export const processPopList = useCrudSchemas(reactive([ componentProps: { multiple:true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '选择工序', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '选择工序', // 查询弹窗标题 - searchAllSchemas: select.allSchemas, // 查询弹窗所需类 - searchPage: WorkstationApi.checkProcessPageList, // 查询弹窗所需分页方法 + searchListPlaceholder: '选择操作步骤', // 输入框占位文本 + searchField: 'stepsCode', // 查询弹窗赋值字段 + searchTitle: '选择操作步骤', // 查询弹窗标题 + searchAllSchemas: Opersteps.allSchemas, // 查询弹窗所需类 + searchPage: getOperstepsPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -279,9 +302,9 @@ export const processPopList = useCrudSchemas(reactive([ } } ])) -export const stepPopList = useCrudSchemas(reactive([ +export const abilityPopList = useCrudSchemas(reactive([ { - label: '选择操作步骤', + label: '选择能力', field: 'list', sort: 'custom', isSearch: false, @@ -290,11 +313,36 @@ export const stepPopList = useCrudSchemas(reactive([ componentProps: { multiple:true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '选择操作步骤', // 输入框占位文本 + searchListPlaceholder: '选择能力', // 输入框占位文本 + searchField: 'ablityCode', // 查询弹窗赋值字段 + searchTitle: '选择能力', // 查询弹窗标题 + searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类 + searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + } +])) +export const postPopList = useCrudSchemas(reactive([ + { + label: '选择岗位', + field: 'list', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + multiple:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '选择岗位', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '选择操作步骤', // 查询弹窗标题 - searchAllSchemas: select.allSchemas, // 查询弹窗所需类 - searchPage: WorkstationApi.checkOperstepsPageList, // 查询弹窗所需分页方法 + searchTitle: '选择岗位', // 查询弹窗标题 + searchAllSchemas: Post.allSchemas, // 查询弹窗所需类 + searchPage: getPostPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/qms/aql/aql.data.ts b/src/views/qms/aql/aql.data.ts index f62070d8e..8751dfa9c 100644 --- a/src/views/qms/aql/aql.data.ts +++ b/src/views/qms/aql/aql.data.ts @@ -1,66 +1,66 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import {getSamplingScheme} from "@/api/qms/aql"; -import {validateNum} from "@/utils/validator"; +import { getSamplingScheme } from "@/api/qms/aql"; +import { validateNum } from "@/utils/validator"; // 表单校验 export const AqlRules = reactive({ code: [required], inspectionQualification: [required], - sampleCharacterCode: [required], + sampleCharacterCode: [{ required, max: 1, message: '长度不得超过1个字符', trigger: 'blur' }], sampleSize: [required], - a0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator010: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator015: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator025: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator040: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator065: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r0separator65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r1separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r1separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r2separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r4separator0: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r6separator5: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r10: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r15: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r25: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r40: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r65: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r100: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r150: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r250: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r400: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r650: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - a1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], - r1000: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], + a0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator010: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator015: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator015: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator025: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator025: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator040: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator040: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator065: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator065: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator10: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator10: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator15: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator15: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator25: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator25: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator40: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator40: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a0separator65: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r0separator65: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a1separator0: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r1separator0: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a1separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r1separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a2separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r2separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a4separator0: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r4separator0: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a6separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r6separator5: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a10: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r10: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a15: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r15: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a25: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r25: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a40: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r40: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a65: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r65: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a100: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r100: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a150: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r150: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a250: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r250: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a400: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r400: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a650: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r650: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + a1000: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], + r1000: [{ validator: validateNum, message: '请输入整数', trigger: 'blur' }], }) const samplingSchemeList = await getSamplingScheme() export const Aql = useCrudSchemas(reactive([ @@ -88,12 +88,12 @@ export const Aql = useCrudSchemas(reactive([ label: '检验严格性', field: 'inspectionQualification', sort: 'custom', - dictType: DICT_TYPE.INSPECTION_SEVERITY, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + dictType: DICT_TYPE.INSPECTION_SEVERITY, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, - form: { - component: 'Select' - }, + form: { + component: 'Select' + }, table: { width: 130 } @@ -116,7 +116,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_010', + label: 'A0.01', field: 'a0separator010', sort: 'custom', table: { @@ -124,7 +124,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_010', + label: 'R0.01', field: 'r0separator010', sort: 'custom', table: { @@ -132,7 +132,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_015', + label: 'A0.015', field: 'a0separator015', sort: 'custom', table: { @@ -140,7 +140,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_015', + label: 'R0.015', field: 'r0separator015', sort: 'custom', table: { @@ -148,7 +148,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_025', + label: 'A0.025', field: 'a0separator025', sort: 'custom', table: { @@ -156,7 +156,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_025', + label: 'R0.025', field: 'r0separator025', sort: 'custom', table: { @@ -164,7 +164,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_040', + label: 'A0.04', field: 'a0separator040', sort: 'custom', table: { @@ -172,7 +172,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_040', + label: 'R0.04', field: 'r0separator040', sort: 'custom', table: { @@ -180,7 +180,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_065', + label: 'A0.065', field: 'a0separator065', sort: 'custom', table: { @@ -188,7 +188,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_065', + label: 'R0.065', field: 'r0separator065', sort: 'custom', table: { @@ -196,7 +196,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_10', + label: 'A0.1', field: 'a0separator10', sort: 'custom', table: { @@ -204,7 +204,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_10', + label: 'R0.1', field: 'r0separator10', sort: 'custom', table: { @@ -212,7 +212,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_15', + label: 'A0.15', field: 'a0separator15', sort: 'custom', table: { @@ -220,7 +220,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_15', + label: 'R0.15', field: 'r0separator15', sort: 'custom', table: { @@ -228,7 +228,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_25', + label: 'A0.25', field: 'a0separator25', sort: 'custom', table: { @@ -236,7 +236,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_25', + label: 'R0.25', field: 'r0separator25', sort: 'custom', table: { @@ -244,7 +244,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_40', + label: 'A0.4', field: 'a0separator40', sort: 'custom', table: { @@ -252,7 +252,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_40', + label: 'R0.4', field: 'r0separator40', sort: 'custom', table: { @@ -260,7 +260,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A0_65', + label: 'A0.65', field: 'a0separator65', sort: 'custom', table: { @@ -268,7 +268,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R0_65', + label: 'R0.65', field: 'r0separator65', sort: 'custom', table: { @@ -276,7 +276,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A1_0', + label: 'A1.0', field: 'a1separator0', sort: 'custom', table: { @@ -284,7 +284,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R1_0', + label: 'R1.0', field: 'r1separator0', sort: 'custom', table: { @@ -292,7 +292,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A1_5', + label: 'A1.5', field: 'a1separator5', sort: 'custom', table: { @@ -300,7 +300,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R1_5', + label: 'R1.5', field: 'r1separator5', sort: 'custom', table: { @@ -308,7 +308,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A2_5', + label: 'A2.5', field: 'a2separator5', sort: 'custom', table: { @@ -316,7 +316,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R2_5', + label: 'R2.5', field: 'r2separator5', sort: 'custom', table: { @@ -324,7 +324,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A4_0', + label: 'A4.0', field: 'a4separator0', sort: 'custom', table: { @@ -332,7 +332,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R4_0', + label: 'R4.0', field: 'r4separator0', sort: 'custom', table: { @@ -340,7 +340,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'A6_5', + label: 'A6.5', field: 'a6separator5', sort: 'custom', table: { @@ -348,7 +348,7 @@ export const Aql = useCrudSchemas(reactive([ } }, { - label: 'R6_5', + label: 'R6.5', field: 'r6separator5', sort: 'custom', table: { @@ -540,8 +540,35 @@ export const Aql = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + table: { + width: 175 + } + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, table: { - width: 115 + width: 110 } }, { diff --git a/src/views/qms/aql/index.vue b/src/views/qms/aql/index.vue index 378d5b12c..44911263b 100644 --- a/src/views/qms/aql/index.vue +++ b/src/views/qms/aql/index.vue @@ -33,7 +33,7 @@
@@ -132,18 +132,29 @@ const buttonBaseClick = (val, item) => { } } -// 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'qms:aql:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'qms:aql:delete'}), // 删除 -] +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi: 'qms:aql:update'}), + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:aql:enable'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:aql:disable'}), + ] +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) + } else if (val == 'enable') { + handleEnable(row.id) + }else if (val == 'disable') { + handleDisable(row.id) } } @@ -195,6 +206,22 @@ const handleDelete = async (id: number) => { await getList() } catch {} } +const handleEnable = async (id: number) => { + try { + await AqlApi.enableAql(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +const handleDisable = async (id: number) => { + try { + await AqlApi.disableAql(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 diff --git a/src/views/qms/basicDataManage/counter/counter.data.ts b/src/views/qms/basicDataManage/counter/counter.data.ts index c5aa501fe..9cdd8ac2d 100644 --- a/src/views/qms/basicDataManage/counter/counter.data.ts +++ b/src/views/qms/basicDataManage/counter/counter.data.ts @@ -19,31 +19,47 @@ export const Counter = useCrudSchemas(reactive([ field: 'itemCode', sort: 'custom', isSearch: true, - fixed: 'left' + fixed: 'left', + table: { + fixed: 'left', + width: 175 + } }, { label: '检验类型编码', field: 'inspectionType', sort: 'custom', - isSearch: true + isSearch: true, + table: { + width: 175 + } }, { label: '供应商编码', field: 'supplierCode', sort: 'custom', - isSearch: true + isSearch: true, + table: { + width: 175 + } }, { label: '连续合格次数', field: 'qualifiedTimes', sort: 'custom', isSearch: false, + table: { + width: 140 + } }, { label: '最后合格批次', field: 'lastQualifiedBatch', sort: 'custom', - isSearch: false + isSearch: false, + table: { + width: 140 + } }, { label: '最后合格时间', @@ -65,6 +81,9 @@ export const Counter = useCrudSchemas(reactive([ type: 'datetime', valueFormat: 'x' } + }, + table: { + width: 175 } }, { @@ -75,6 +94,9 @@ export const Counter = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + table: { + width: 140 } }, { @@ -85,6 +107,9 @@ export const Counter = useCrudSchemas(reactive([ form: { component: 'InputNumber', value: 0 + }, + table: { + width: 175 } }, { @@ -107,6 +132,9 @@ export const Counter = useCrudSchemas(reactive([ type: 'datetime', valueFormat: 'x' } + }, + table: { + width: 175 } }, { @@ -114,6 +142,9 @@ export const Counter = useCrudSchemas(reactive([ field: 'nextStage', sort: 'custom', isSearch: false, + table: { + width: 140 + } }, // { // label: '操作', diff --git a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts index fbe16c839..55c0c56fa 100644 --- a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts +++ b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts @@ -34,13 +34,31 @@ export const DynamicRule = useCrudSchemas(reactive([ isSearch: true }, { - label: '操作', - field: 'action', - isForm: false, - isDetail: false, + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, table: { - width: 150, - fixed: 'right' + width: 110 } - } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 330, + fixed: 'right' + }, + } ])) diff --git a/src/views/qms/basicDataManage/dynamicRule/index.vue b/src/views/qms/basicDataManage/dynamicRule/index.vue index bdce56369..49e9ff621 100644 --- a/src/views/qms/basicDataManage/dynamicRule/index.vue +++ b/src/views/qms/basicDataManage/dynamicRule/index.vue @@ -33,7 +33,7 @@ @@ -163,11 +163,21 @@ const buttonBaseClick = (val, item) => { } } -// 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'qms:dynamic-rule:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'qms:dynamic-rule:delete'}), // 删除 -] +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi: 'qms:dynamic-rule:update'}), + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:dynamic-rule:enable'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:dynamic-rule:disable'}), + ] +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -175,6 +185,10 @@ const buttonTableClick = async (val, row) => { editForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + }else if (val == 'enable') { + handleEnable(row.id) + }else if (val == 'disable') { + handleDisable(row.id) } } @@ -235,6 +249,22 @@ const handleDelete = async (id: number) => { await getList() } catch {} } +const handleEnable = async (id: number) => { + try { + await DynamicRuleApi.enableDynamicRule(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +const handleDisable = async (id: number) => { + try { + await DynamicRuleApi.disableDynamicRule(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 @@ -306,7 +336,6 @@ const submitForm = async (formType, data) => { return } data.inspectionStageDOList = tableData.value// 拼接子表数据参数 - console.log(data.subList) try { if (formType === 'create') { await DynamicRuleApi.createDynamicRule(data) diff --git a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue index 135df48f1..50c0c07a5 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue @@ -18,7 +18,7 @@
- + - + - + { @@ -771,6 +772,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any dialogTitle.value = t('action.' + type) } formType.value = type + isShowField.value=0//设置isShowField == 0隐藏aql和检验水平字段 if (row) { data.value = JSON.parse(JSON.stringify(row)) let list = [] @@ -779,7 +781,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any } else { list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) } - rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false @@ -797,7 +798,18 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true } + if(item.inspectionCharacteristicsBaseVO.sampleType == 4){ + isShowField.value+=1//设置isShowField > 0显示aql和检验水平字段 + } }) + // 显示aql和检验水平字段的时候添加必填规则 + if( isShowField.value>0){ + rules.value.aql[0].required = true + rules.value.aql[0].required = true + }else{ + rules.value.aql[0].required = false + rules.value.aql[0].required = false + } data.value.process = list } else { data.value = { @@ -1085,13 +1097,10 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { } else if (formField == 'inspectionType') { data.value.testTypeName = val[0].description } else if (formField == 'programmeTemplateCode') { + isShowField.value=0//设置isShowField == 0隐藏aql和检验水平字段 data.value.programmeTemplateName = val[0].description data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode data.value.dynamicUpdateName = val[0].dynamicUpdateName - - } - if (formField == 'programmeTemplateCode') { - let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false @@ -1110,11 +1119,20 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true } + if(item.inspectionCharacteristicsBaseVO.sampleType == 4){ + isShowField.value+=1//设置isShowField > 0显示aql和检验水平字段 + } }) + // 显示aql和检验水平字段的时候添加必填规则 + if( isShowField.value>0){ + rules.value.aql[0].required = true + rules.value.aql[0].required = true + }else{ + rules.value.aql[0].required = false + rules.value.aql[0].required = false + } data.value.process = list - } - - if (formField == 'dynamicUpdateCode') { + }else if (formField == 'dynamicUpdateCode') { data.value[formField] = val[0].code data.value.dynamicUpdateName = val[0].description } diff --git a/src/views/qms/basicDataManage/inspectionScheme/index.vue b/src/views/qms/basicDataManage/inspectionScheme/index.vue index 13e7a84a7..e6a591505 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/index.vue +++ b/src/views/qms/basicDataManage/inspectionScheme/index.vue @@ -33,7 +33,7 @@ @@ -117,11 +117,21 @@ const buttonBaseClick = (val, item) => { } } -// 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'qms:type-template:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'qms:type-template:delete'}), // 删除 -] +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi: 'qms:type-template:update'}), + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:type-template:enable'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:type-template:disable'}), + ] +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -129,6 +139,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + }else if (val == 'enable') { + handleEnable(row.id) + }else if (val == 'disable') { + handleDisable(row.id) } } @@ -198,7 +212,22 @@ const handleDelete = async (id: number) => { await getList() } catch {} } - +const handleEnable = async (id: number) => { + try { + await InspectionSchemeApi.enableInspectionScheme(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +const handleDisable = async (id: number) => { + try { + await InspectionSchemeApi.disableInspectionScheme(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} // 筛选提交 const searchFormClick = (searchData) => { diff --git a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts index c15af9eec..bf7dab566 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts +++ b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts @@ -5,10 +5,10 @@ import { dateFormatter } from '@/utils/formatTime' export const InspectionTemplateRules = reactive({ description: [ - { required: true , message: '请填写描述', trigger: 'blur' } + { required: true, message: '请填写描述', trigger: 'blur' } ], version: [ - { required: true , message: '请填写版本', trigger: 'blur' } + { required: true, message: '请填写版本', trigger: 'blur' } ], inspectionCode: [ { required: true, message: '请选择检验方案模板编码', trigger: 'blur' } @@ -77,11 +77,11 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ width: 220, fixed: 'left' }, - isSearch:true, - form:{ - componentProps:{ - disabled:true, - placeholder:'系统自动获取' + isSearch: true, + form: { + componentProps: { + disabled: true, + placeholder: '系统自动获取' } } }, @@ -90,9 +90,9 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ field: 'itemName', sort: 'custom', table: { - width: 150 + width: 200 }, - isSearch:true, + isSearch: true, }, { label: '物料编码', @@ -101,44 +101,47 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch:true, + isSearch: true, }, { label: '描述', field: 'description', sort: 'custom', - },{ + table: { + width: 150 + }, + }, { label: '版本', field: 'version', sort: 'custom', table: { width: 150 } - },{ + }, { label: '检验类型编码', field: 'inspectionType', dictType: DICT_TYPE.INSPECTION_TYPE, dictClass: 'string', sort: 'custom', table: { - width: 150 + width: 175 } - },{ + }, { label: '检验模板编码', field: 'programmeTemplateCode', sort: 'custom', table: { - width: 150 + width: 175 } - },{ + }, { label: '拆分规则', field: 'splitRule', sort: 'custom', dictType: DICT_TYPE.SPLIT_RULES, dictClass: 'string', // 默认都是字符串类型其他暂不考虑 table: { - width: 150 - }, - },{ + width: 175 + }, + }, { label: 'aql', field: 'aql', sort: 'custom', @@ -147,57 +150,84 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 } - },{ + }, { label: '检验水平', field: 'inspectionLevel', sort: 'custom', dictType: DICT_TYPE.INSPECTION_LEVEL, - dictClass: 'string', + dictClass: 'string', table: { width: 150 - }, - isSearch:true, - },{ + }, + isSearch: true, + }, + { label: '生效时间', field: 'effectiveDate', sort: 'custom', formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, table: { - width: 180 - } - },{ + width: 175 + }, + }, + { label: '失效时间', field: 'expirationDate', sort: 'custom', formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + table: { + width: 175 + }, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, table: { - width: 180 + width: 110 } }, - // { - // label: '是否可用', - // field: 'available', - // dictType: DICT_TYPE.TRUE_FALSE, - // dictClass: 'string', - // isTable: true, - // sort: 'custom', - // table: { - // width: 150 - // }, - // form: { - // component: 'Switch', - // value: 'TRUE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE' - // } - // }, - // }, { label: '操作', field: 'action', isDetail: false, - isForm: false , + isForm: false, table: { width: 150, fixed: 'right' diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index 931f8deab..cd63b2c85 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -345,7 +345,7 @@ - + @@ -363,7 +363,7 @@ { editableTabsValue.value = index + 1 diff --git a/src/views/qms/basicDataManage/inspectionTemplate/index.vue b/src/views/qms/basicDataManage/inspectionTemplate/index.vue index 109d8a0fc..c04889e45 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/index.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/index.vue @@ -33,7 +33,7 @@ @@ -125,11 +125,21 @@ const buttonBaseClick = (val, item) => { } } -// 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'qms:programme-template:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'qms:programme-template:delete'}), // 删除 -] +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi: 'qms:programme-template:update'}), + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:programme-template:enable'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:programme-template:disable'}), + ] +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -137,6 +147,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + }else if (val == 'enable') { + handleEnable(row.id) + }else if (val == 'disable') { + handleDisable(row.id) } } @@ -148,7 +162,6 @@ const openForm = (type: string, row?: any) => { // form表单提交 const submitForm = async (formType,data) => { - console.log(data.value) if (formType === 'create') { await InspectionProcessPageApi.inspectionTemplateCreat(data.value) message.success(t('common.createSuccess')) @@ -178,7 +191,22 @@ const handleDelete = async (id: number) => { await getList() } catch {} } - +const handleEnable = async (id: number) => { + try { + await InspectionProcessPageApi.enableInspectionTemplate(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +const handleDisable = async (id: number) => { + try { + await InspectionProcessPageApi.disableInspectionTemplate(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} // 筛选提交 const searchFormClick = (searchData) => { diff --git a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts index 425576ac8..fd906fac4 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts +++ b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts @@ -89,12 +89,29 @@ export const InspectionTemplateMain = useCrudSchemas(reactive([ label: '动态修改规则', field: 'dynamicUpdateName', sort: 'custom', - }, - ,{ + },{ label: '版本', field: 'version', sort: 'custom', }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 110 + } + }, { label: '操作', field: 'action', @@ -291,4 +308,4 @@ export const InspectionTemplateFeatures= useCrudSchemas(reactive([ component:'Select' } } -])) \ No newline at end of file +])) diff --git a/src/views/qms/basicDataManage/selectedSet/index.vue b/src/views/qms/basicDataManage/selectedSet/index.vue index 2ac80a8ef..32dbc8100 100644 --- a/src/views/qms/basicDataManage/selectedSet/index.vue +++ b/src/views/qms/basicDataManage/selectedSet/index.vue @@ -33,7 +33,7 @@ @@ -77,6 +77,7 @@ :detailButtonIsShowDelete=true @detailOpenForm="detailOpenForm" @detailBasicFormOnChange="detailBasiFormOnChange" + :detailButtonIsShowFilter="false" /> @@ -110,9 +111,6 @@ const optionsList = ref() routeName.value = route.name const tableColumns = ref(SelectedSet.allSchemas.tableColumns) - - - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { @@ -168,11 +166,21 @@ const buttonBaseClick = (val, item) => { } } -// 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'qms:selected-set:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'qms:selected-set:delete'}), // 删除 -] +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi: 'qms:selected-set:update'}), + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:selected-set:enable'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:selected-set:disable'}), + ] +} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -180,6 +188,10 @@ const buttonTableClick = async (val, row) => { editForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + }else if (val == 'enable') { + handleEnable(row.id) + }else if (val == 'disable') { + handleDisable(row.id) } } @@ -240,7 +252,22 @@ const handleDelete = async (id: number) => { await getList() } catch {} } - +const handleEnable = async (id: number) => { + try { + await SelectedSetApi.enableSelectedSet(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +const handleDisable = async (id: number) => { + try { + await SelectedSetApi.disableSelectedSet(id) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { @@ -324,7 +351,6 @@ const submitForm = async (formType, data) => { dictionaryLabel }; }); - console.log(data.subList) try { if (formType === 'create') { await SelectedSetApi.createSelectedSet(data) @@ -414,8 +440,6 @@ const detailOpenForm = (type, row, masterParmas) => { const detailBasiFormOnChange = (field,val,detailFormRef) => { - console.log(field) - console.log(33,detailFormRef) if(field == 'dictionaryTypeAndCode'){ // 按照 '-%%%-'' 拆分 dictionaryCode const [dictionaryCode, dictionaryValue] = val.split('-%%%-'); @@ -432,7 +456,6 @@ const detailBasiFormOnChange = (field,val,detailFormRef) => { } const formSelectChange = (a,b,c,d) => { - console.log(111) } const getDicDetails = ()=>{ diff --git a/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts b/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts index 6371cdb26..9bd2e1a8c 100644 --- a/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts +++ b/src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts @@ -26,6 +26,24 @@ export const SelectedSet = useCrudSchemas(reactive([ sort: 'custom', isSearch: true }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + table: { + width: 110 + } + }, { label: '操作', field: 'action', diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue index 267d771d5..74718db60 100644 --- a/src/views/qms/inspection/inspectionJob/addForm.vue +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -1,69 +1,25 @@ - +
- + @@ -365,19 +170,8 @@ import { getCurrentInstance } from 'vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail' import { SearchTable } from '@/components/SearchTable' -import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data' -// import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data' -// import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate' -// import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' -// import * as ItemBasicApi from '@/api/wms/itembasic' -import * as SamplingProcessApi from '@/api/qms/samplingProcess' //采样过程 -import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //检验方法 -import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //检验方法 -import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则 -import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //动态修改规则 -import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 -import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //选择集 - import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' + import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' +import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage' const { proxy } = getCurrentInstance() @@ -523,6 +317,9 @@ const rules = ref({ 'inspectionJobCharacteristicsUpdateReqVO.estimateCode': [ { required: true, message: '请选择评估代码', trigger: 'blur' } ], + 'inspectionJobCharacteristicsUpdateReqVO.inspectionQty': [ + { required: true, message: '请输入样品份数', trigger: 'blur' } + ], qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }] }) @@ -537,11 +334,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any formType.value = type if (row) { data.value = JSON.parse(JSON.stringify(row)) - console.log(data.value)// 发起承接 - await InspectionJobMainApi.acceptInspectionJobMain(row.id) + // console.log(data.value)// 发起承接 + // await InspectionJobMainApi.acceptInspectionJobMain(row.id) let list = [] list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) - data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id) + data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) list.forEach((item, index) => { editableTabsValue.value = index + 1 item.name = index + 1 @@ -700,7 +497,7 @@ const buttonBaseClick =async(val) => { } // 关闭 else if (val == 'close') { - await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) + // await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) dialogVisible.value = false } } @@ -732,14 +529,15 @@ const submitForm = async () => { if(data.value.packageList?.length>0){ const validateForm1 = await tableFormRef.value.validateForm() if (!validateForm1) return - let number = 0 - data.value.packageList.forEach(cur=>{ - number += parseFloat(cur.sampleAmount) - }) - if(number != data.value.sampleTotalAmount){ - message.error(`采样数量之和不等于总数量`) - return - } + // let number = 0 + // data.value.packageList.forEach(cur=>{ + // number += parseFloat(cur.sampleAmount) + // }) + // number = number.toFixed('2') + // if(number != data.value.sampleTotalAmount){ + // message.error(`采样数量之和必须等于采样总数量`) + // return + // } } const bol2 = await validateForm(formFeaturesRef.value) @@ -751,6 +549,7 @@ const submitForm = async () => { let arrBol = [] let isOutweigh = []//结束时间是否大于开始时间 let numberList = []//判断合格数量和不合格数量之和是否等于主表数量 + let parseFloatList = []//判断合格数量和不合格数量是否是整数 data.value.subList.forEach((item, index) => { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { arrBol.push( @@ -761,15 +560,6 @@ const submitForm = async () => { ) ) } - // if (item.samplingProcessRespVO.evaluationMode == 1) { - // arrBol.push( - // item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( - // (cur, key) => { - // return !cur.estimateCode - // } - // ) - // ) - // } if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { arrBol.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( @@ -792,12 +582,23 @@ const submitForm = async () => { if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) } - // 合格数量和不合格数量之和不等于总数量 + // 合格数量和不合格数量之和不能是小数 if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { + parseFloatList.push( + item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( + (cur, key) => { + return String(cur.qualifiedQuantity).indexOf('.')>-1 || String(cur.unqualifiedQuantity).indexOf('.')>-1 + } + ) + ) + // 合格数量和不合格数量之和不等于总数量 numberList.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( (cur, key) => { - return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != data.value.sampleTotalAmount + console.log(12,cur.qualifiedQuantity) + console.log(13,cur.unqualifiedQuantity) + console.log(14,item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty) + return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty) } ) ) @@ -805,6 +606,7 @@ const submitForm = async () => { }) let isEmpty1 = arrBol.some(item=>item == true) let isEmptyNumberList = numberList.some(item=>item == true) + let isParseFloat = parseFloatList.some(item=>item == true) if(isEmpty1){ message.error('检验工序和检验特性有字段未填写完全') return; @@ -813,9 +615,12 @@ const submitForm = async () => { message.error('检验特性中有开始时间大于结束时间') return; } - console.log(44,numberList) + if(isParseFloat){ + message.error('合格数量和不合格数量之和不可以是小数') + return; + } if(isEmptyNumberList){ - message.error('合格数量和不合格数量之和不等于总数量') + message.error('合格数量和不合格数量之和必须等于样品份数') return; } if (formType.value == 'create') { @@ -978,7 +783,7 @@ const resultEntryMethodChange = (e, item) => { item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] if (e == 0) { // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true - for (let i = 0; i < data.value.sampleTotalAmount; i++) { + for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty); i++) { item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ inspectionValue: '', //检验值 qualitativeCode: '', //定性字典项值 diff --git a/src/views/qms/inspection/inspectionJob/detail.vue b/src/views/qms/inspection/inspectionJob/detail.vue index 1a2673a19..3d93cde1d 100644 --- a/src/views/qms/inspection/inspectionJob/detail.vue +++ b/src/views/qms/inspection/inspectionJob/detail.vue @@ -1,43 +1,17 @@ diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 680aa7eb7..1c3b1f33b 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -51,7 +51,9 @@ :isShowAddBtn="false" :detailButtonIsShow="true" /> - + diff --git a/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts new file mode 100644 index 000000000..03b579e46 --- /dev/null +++ b/src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts @@ -0,0 +1,134 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const InterfaceInfoRules = reactive({ + concurrencyStamp: [required], +}) + +export const InterfaceInfo = useCrudSchemas(reactive([ + { + label: '序号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 300, + fixed: 'left' + }, + }, + { + label: '接口类型', + field: 'interfaceType', + sort: 'custom', + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '接口名称', + field: 'interfaceName', + sort: 'custom', + isSearch: true, + table: { + width: 180, + }, + }, + { + label: '状态', + field: 'interfaceStatus', + dictType: DICT_TYPE.INTERFACE_STATUS, + dictClass: 'string', + sort: 'custom', + form: { + component: 'Radio' + }, + table: { + width: 180, + }, + isSearch: true, + }, + { + label: '请求地址', + field: 'url', + sort: 'custom', + table: { + width: 180, + }, + }, + { + label: '请求参数', + field: 'reqBody', + sort: 'custom', + table: { + width: 180, + }, + }, + { + label: '返回结果', + field: 'respBody', + sort: 'custom', + table: { + width: 180, + }, + }, + { + label: '错误信息', + field: 'errorMsg', + sort: 'custom', + table: { + width: 180, + }, + }, + { + 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, + table: { + width: 180, + }, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isTable:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + isTable:false, + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/basicDataManage/customerManage/customer/index.vue b/src/views/wms/basicDataManage/customerManage/customer/index.vue index b955c988d..8b8572c04 100644 --- a/src/views/wms/basicDataManage/customerManage/customer/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customer/index.vue @@ -16,7 +16,7 @@ - -
-
-
-
-
-
-
-
-
-
-
{ } getList() // 刷新当前列表 } +const success = async (formType, data) => { + const res = await SwitchApi.updateSwitch(data) + if(true===res){ + message.success(t('common.updateSuccess')) + getList() + }else{ + message.error('修改失败') + } +} /** 初始化 **/ onMounted(async() => { getList() diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue index 2157545ea..0e4c0f822 100644 --- a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue @@ -16,7 +16,7 @@ -
-
-
-
-
-
-
-
-
-
-
-
setV['outPackUnit'] = val[0]['packUnit'] }else if(formField == 'itemCode') { setV['itemCode'] = val[0]['code'] + }else if(formField == 'overflowLocationCode') { + setV['overflowLocationCode'] = val[0]['code'] }else{ setV[formField] = setV[0][searchField] } diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 7c4b61e89..d20f50532 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -83,6 +83,30 @@ export const Itemarea = useCrudSchemas(reactive([ } } }, + { + label: '溢出库位', + field: 'overflowLocationCode', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择溢出库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + }] + } + } + }, { label: '入库包装规格', field: 'inPackUnit', @@ -279,7 +303,6 @@ export const Itemarea = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, - isTable:false }, { label: '出库自动转为出库包装规格', @@ -300,7 +323,6 @@ export const Itemarea = useCrudSchemas(reactive([ activeValue: 'TRUE' } }, - isTable:false }, { label: '需要接收确认', diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue index 2810c290b..2335a1dee 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue @@ -17,7 +17,7 @@ -
diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue index 35721bc60..e2bdd9751 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue @@ -20,7 +20,7 @@ -
-
-
-
-
-
([ } }, { - label: '库位', - field: 'location', + label: '包装规格', + field: 'packUnit', sort: 'custom', table: { width: 150 @@ -65,17 +69,16 @@ export const Callmaterials = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '库位信息', // 查询弹窗标题 - searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchTitle: '包装规格信息', // 查询弹窗标题 + searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 + searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 } - }, - isSearch: true + } }, { - label: '数量', + label: '包装数量', field: 'qty', sort: 'custom', table: { @@ -91,9 +94,9 @@ export const Callmaterials = useCrudSchemas(reactive([ } }, { - label: '计量单位', + label: '包装单位', field: 'uom', - dictType: DICT_TYPE.UOM, + dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', isTable: true, sort: 'custom', @@ -110,34 +113,15 @@ export const Callmaterials = useCrudSchemas(reactive([ } } }, - { - label: '批次', - field: 'batch', - sort: 'custom', - isSearch: true, - table: { - width: 120 - } - }, - { - label: '包装规格', - field: 'packUnit', - sort: 'custom', - table: { - width: 150 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 - } - } - }, + // { + // label: '批次', + // field: 'batch', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 120 + // } + // }, { label: '仓库代码', field: 'warehouseCode', @@ -258,6 +242,42 @@ export const Callmaterials = useCrudSchemas(reactive([ }] }, }, + { + label: '库位', + field: 'location', + sort: 'custom', + table: { + width: 150 + }, + isForm:false, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '库位信息', // 查询弹窗标题 + // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + // searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workStationCode', + // value:'workStationCode', + // message: '请填写工位代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }, + // { + // key: 'areaType', + // value: confgiDataOne.areaType, + // isMainValue: false + // }] + // } + // }, + isSearch: true + }, { label: '是否确认接收', field: 'isRecive', @@ -268,14 +288,15 @@ export const Callmaterials = useCrudSchemas(reactive([ table: { width: 150 }, - form: { - component: 'Switch', - value: 'FALSE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } + isForm:false + // form: { + // component: 'Switch', + // value: 'FALSE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } }, { label: '创建者id', diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue index 93a27d450..5e23364c5 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue @@ -16,7 +16,7 @@ -
- -