diff --git a/nginx.conf b/nginx.conf index d5aa0a2..1b3fb61 100644 --- a/nginx.conf +++ b/nginx.conf @@ -32,7 +32,7 @@ http { server { listen 25200; server_name_in_redirect off; - server_name dev.ccwin-in.com; + server_name _; location /api/ { proxy_pass http://eam/; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; @@ -57,4 +57,4 @@ http { index index.html index.htm; } } -} \ No newline at end of file +} diff --git a/nginx_prod.conf b/nginx_prod.conf index 8cb1610..c358f63 100644 --- a/nginx_prod.conf +++ b/nginx_prod.conf @@ -32,7 +32,7 @@ http { server { listen 80; server_name_in_redirect off; - server_name dev.ccwin-in.com; + server_name _; location /api/ { proxy_pass http://eam/; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; diff --git a/src/api/eam/basic/fixedAssets/index.ts b/src/api/eam/basic/fixedAssets/index.ts index 6911147..aaa2a02 100644 --- a/src/api/eam/basic/fixedAssets/index.ts +++ b/src/api/eam/basic/fixedAssets/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' import { getStrDictOptions } from '@/utils/dict' import { useUserStore } from '@/store/modules/user' - +import { checkPermi } from '@/utils/permission' export interface FixedAssetsVO { number: string name: string @@ -30,14 +30,7 @@ export const getFixedAssetsPage = async (params) => { deviceMoldTypeList.some(deviceMold => deviceMold.value === role) ); - const admin = userStore.roles.find(role => { - if (role == 'gdzc_admin') { - return true; - } else { - return false; - } - }); - + const admin = checkPermi(['gdzc_admin']); // 如果找到了匹配的角色,将它作为manageDept的值加入到params中 if (matchingRole) { params.manageDept = matchingRole; // 这里只添加第一个匹配的角色 diff --git a/src/api/eam/basic/inspection/index.ts b/src/api/eam/basic/inspection/index.ts index 4931600..a422e70 100644 --- a/src/api/eam/basic/inspection/index.ts +++ b/src/api/eam/basic/inspection/index.ts @@ -55,7 +55,6 @@ export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { } //新增模具 export const creatMoldItems = async (data: DeviceMoldItemsVO) => { - debugger data.type="MOLD" data.status="INSPECTION" return await request.post({ url: `/eam/device-mold-items/create`, data }) diff --git a/src/api/eam/device/deviceAccounts/index.ts b/src/api/eam/device/deviceAccounts/index.ts index cba18c7..7476910 100644 --- a/src/api/eam/device/deviceAccounts/index.ts +++ b/src/api/eam/device/deviceAccounts/index.ts @@ -13,6 +13,7 @@ export interface DeviceAccountsVO { productionDate: Date purchasePrice: number siteId: string + status: string available: string concurrencyStamp: number } @@ -70,3 +71,4 @@ export const getDeviceAccountsAllNoPage = async (data: DeviceAccountsVO) => { return await request.post({ url: `/eam/device-accounts/noPage`,data }) } + diff --git a/src/api/eam/device/deviceMaintenanceDetail/index.ts b/src/api/eam/device/deviceMaintenanceDetail/index.ts index b3b9c78..b2aa8e6 100644 --- a/src/api/eam/device/deviceMaintenanceDetail/index.ts +++ b/src/api/eam/device/deviceMaintenanceDetail/index.ts @@ -12,7 +12,7 @@ export const getDeviceMaintenanceDetailPage = async (params) => {   if (params.isSearch) {     delete params.isSearch     const data = {...params} -    return await request.post({ url: '/wms/purchasereceipt-request-detail/senior', data }) +    return await request.post({ url: '/eam/device-maintenance-job-detail/senior', data })   } else {     return await request.get({ url: `/eam/device-maintenance-job-detail/page`, params })   } @@ -42,10 +42,10 @@ export const deleteDeviceMaintenanceDetail = async (id: number) => { // 导出维修工单子 Excel export const exportPurchasereceiptRequestDetail = async (params) => { -  return await request.download({ url: `/wms/purchasereceipt-request-detail/export-excel`, params }) +  return await request.download({ url: `/eam/device-maintenance-job-detail/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { -  return request.download({ url: '/wms/purchasereceipt-request-detail/get-import-template' }) +  return request.download({ url: '/eam/device-maintenance-job-detail/get-import-template' }) } diff --git a/src/api/eam/device/deviceMaintenanceMain/index.ts b/src/api/eam/device/deviceMaintenanceMain/index.ts index 8684350..8547c06 100644 --- a/src/api/eam/device/deviceMaintenanceMain/index.ts +++ b/src/api/eam/device/deviceMaintenanceMain/index.ts @@ -16,7 +16,7 @@ export interface DeviceMaintenanceMainVO { concurrencyStamp: number } -// 查询维修工单主列表 +// 查询设备维修工单主列表 export const getDeviceMaintenanceMainPage = async (params) => { if (params.isSearch) { delete params.isSearch diff --git a/src/api/eam/device/techMaintenanceDetail/index.ts b/src/api/eam/device/techMaintenanceDetail/index.ts new file mode 100644 index 0000000..e1342a9 --- /dev/null +++ b/src/api/eam/device/techMaintenanceDetail/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface DeviceMaintenanceDetailVO { +  describes: string +  describes1: string +  workOut: string +  maintenances: string +} + +// 查询维修工单子列表 +export const getDeviceMaintenanceDetailPage = async (params) => { +  if (params.isSearch) { +    delete params.isSearch +    const data = {...params} +    return await request.post({ url: '/eam/tech-maintenance-job-detail/senior', data }) +  } else { +    return await request.get({ url: `/eam/tech-maintenance-job-detail/page`, params }) +  } +} + +// 查询维修工单子详情 +export const getPurchasereceiptRequestDetail = async (id) => { +  return await request.get({ url: `/eam/tech-maintenance-job-detail/selectListByNumber?id=` + id }) +} + +// 新增维修工单子 +export const createDeviceMaintenanceDetail = async (data: DeviceMaintenanceDetailVO) => { +  return await request.post({ url: `/eam/tech-maintenance-job-detail/create`, data }) +} + +// 修改维修工单子 +export const updateDeviceMaintenanceDetail = async (data: DeviceMaintenanceDetailVO) => { +  return await request.put({ url: `/eam/tech-maintenance-job-detail/update`, data }) +} + +// 删除维修工单子 +export const deleteDeviceMaintenanceDetail = async (id: number) => { +  return await request.delete({ url: `/eam/tech-maintenance-job-detail/delete?id=` + id }) +} + + + +// 导出维修工单子 Excel +export const exportPurchasereceiptRequestDetail = async (params) => { +  return await request.download({ url: `/eam/tech-maintenance-job-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { +  return request.download({ url: '/eam/tech-maintenance-job-detail/get-import-template' }) +} diff --git a/src/api/eam/device/techMaintenanceMain/index.ts b/src/api/eam/device/techMaintenanceMain/index.ts new file mode 100644 index 0000000..b735af8 --- /dev/null +++ b/src/api/eam/device/techMaintenanceMain/index.ts @@ -0,0 +1,94 @@ +import request from '@/config/axios' + +export interface DeviceMaintenanceMainVO { + id: number + number: string + requestNumber: string + describe: string + deviceNumber: string + factoryAreaNumber: string + maintenance: number + maintenancePhone: string + status: string + type: string + siteId: string + available: string + concurrencyStamp: number +} + +// 查询工艺维修工单主列表 +export const getTechMaintenanceMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/tech-maintenance-job-main/senior', data }) + } else { + return await request.get({ url: `/eam/tech-maintenance-job-main/page`, params }) + } +} + +// 查询维修工单主详情 +export const getDeviceMaintenanceMain = async (id: number) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/get?id=` + id }) +} + +// 新增维修工单主 +export const createDeviceMaintenanceMain = async (data: DeviceMaintenanceMainVO) => { + return await request.post({ url: `/eam/tech-maintenance-job-main/createPC`, data }) +} + +// 修改维修工单主 +export const updateDeviceMaintenanceMain = async (data: DeviceMaintenanceMainVO) => { + return await request.put({ url: `/eam/tech-maintenance-job-main/update`, data }) +} +// 删除维修工单主 +export const deleteDeviceMaintenanceMain = async (id: number) => { + return await request.delete({ url: `/eam/tech-maintenance-job-main/delete?id=` + id }) +} + +// 导出维修工单主 Excel +export const exportDeviceMaintenanceMain = async (params) => { + return await request.download({ url: `/eam/tech-maintenance-job-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tech-maintenance-job-main/get-import-template' }) +} + +// 修改维修工单主 +export const orderStepChange = async (data: DeviceMaintenanceMainVO) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/orderClick?number=`+data.number+`&status=`+data.status+`&id=`+data.id+`&requestNumber=`+data.requestNumber }) +} + +// 修改维修工单主 +export const orderTurnTo = async (data: DeviceMaintenanceMainVO) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/turnTo?deviceNumber=`+data.deviceNumber +`&id=`+data.id + `&receiverType=`+ data.type +`&receiverUserId=` + data.maintenance }) +} + + +// 查询维修工单主列表不分页 +export const getDeviceMainTempList = async (type: String) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/getList?type=` + type }) +} + + + +// 完成维修工单 +export const finishOrder = async (params) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/orderClickFinish`, params}) +} + + + +// 校验维修工单 +export const verifyOrder = async (params) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/orderClickVerify`, params}) +} + + +// 确认维修工单 +export const confirmOrder = async (params) => { + return await request.get({ url: `/eam/tech-maintenance-job-main/orderClickConfirm`, params}) +} + diff --git a/src/api/eam/device/techRepair/index.ts b/src/api/eam/device/techRepair/index.ts new file mode 100644 index 0000000..ce1d3a9 --- /dev/null +++ b/src/api/eam/device/techRepair/index.ts @@ -0,0 +1,68 @@ +import request from '@/config/axios' + +export interface DeviceRepairVO { + id: number + number: string + describe: string + deviceNumber: string + factoryAreaNumber: string + declarer: number + declarerPhone: string + faultType: string + type: string + siteId: string + available: string + concurrencyStamp: number +} + +// 查询报修申请列表 +export const getDeviceRepairPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/tech-repair-request/senior', data }) + } else { + return await request.get({ url: `/eam/tech-repair-request/page`, params }) + } +} + +// 查询报修申请详情 +export const getDeviceRepair = async (id: number) => { + return await request.get({ url: `/eam/tech-repair-request/get?id=` + id }) +} + +// 新增报修申请 +export const createDeviceRepair = async (data: DeviceRepairVO) => { + return await request.post({ url: `/eam/tech-repair-request/create`, data }) +} + +// 修改报修申请 +export const updateDeviceRepair = async (data: DeviceRepairVO) => { + return await request.put({ url: `/eam/tech-repair-request/update`, data }) +} + +// 删除报修申请 +export const deleteDeviceRepair = async (id: number) => { + return await request.delete({ url: `/eam/tech-repair-request/delete?id=` + id }) +} + +// 导出报修申请 Excel +export const exportDeviceRepair = async (params) => { + return await request.download({ url: `/eam/tech-repair-request/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tech-repair-request/get-import-template' }) +} + +// 撤销申请 +export const cancel = (id: Number) => { + return request.delete({ url: '/eam/tech-repair-request/cancel?id=' + id }) +} + + +// 根据单号查询申请工单信息 +export const getOrderByNumber = (number: Number) => { + return request.get({ url: '/eam/tech-repair-request/getOrderByNumber?number=' + number }) +} diff --git a/src/api/eam/mold/moldInspectionMain/index.ts b/src/api/eam/mold/moldInspectionMain/index.ts index 10190c7..59f633f 100644 --- a/src/api/eam/mold/moldInspectionMain/index.ts +++ b/src/api/eam/mold/moldInspectionMain/index.ts @@ -58,6 +58,12 @@ export const importTemplate = () => { } +// 检修完成 +export const finishInspection = (id: number) => { + return request.get({ url: `/eam/mold-inspection-job-main/orderClickFinish?id=` + id }) +} + + // 查询检修工单主列表 export const getMoldInspectionMainNoPage = async (params) => { return await request.get({ url: `/eam/mold-inspection-job-main/noPage`, params }) @@ -66,5 +72,5 @@ export const getMoldInspectionMainNoPage = async (params) => { //验证 export const verifyOrder = async (id: number,verifyContent: string) => { - return await request.get({ url: `/eam/mold-inspection-job-main/onVerify?id=`+id+`&verifyContent=` + verifyContent }) + return await request.get({ url: `/eam/mold-inspection-job-main/orderClickVerify?id=`+id+`&verifyContent=` + verifyContent }) } diff --git a/src/api/eam/mold/moldMaintenanceMain/index.ts b/src/api/eam/mold/moldMaintenanceMain/index.ts index 9adbda2..fce98be 100644 --- a/src/api/eam/mold/moldMaintenanceMain/index.ts +++ b/src/api/eam/mold/moldMaintenanceMain/index.ts @@ -18,7 +18,6 @@ export interface MoldMaintenanceMainVO { // 查询维修工单主列表 export const getMoldMaintenanceMainPage = async (params) => { - params.type = 'MOLD' if (params.isSearch) { delete params.isSearch const data = {...params} diff --git a/src/api/eam/mold/moldRepair/index.ts b/src/api/eam/mold/moldRepair/index.ts index 028f2b4..0af3d79 100644 --- a/src/api/eam/mold/moldRepair/index.ts +++ b/src/api/eam/mold/moldRepair/index.ts @@ -16,7 +16,6 @@ export interface MoldRepairVO { // 查询报修申请列表 export const getMoldRepairPage = async (params) => { - params.type = 'MOLD' if (params.isSearch) { delete params.isSearch const data = { ...params } diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue index c2cc3a7..18a2490 100644 --- a/src/components/Detail/src/DetailDeviceLedger.vue +++ b/src/components/Detail/src/DetailDeviceLedger.vue @@ -912,8 +912,8 @@ const setBeiJian = () => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({ hide: !hasmMilestoneRight(row)}), // 编辑 - defaultButtons.uploadFileBtn({ hide: !hasmMilestoneRight(row)}),//上传 + defaultButtons.mainListEditBtn({ hasPermi: 'eam:mold-milestone:edit'}), // 编辑 + defaultButtons.uploadFileBtn({ hasPermi: 'eam:mold-milestone:upload'}),//上传 ] } @@ -984,8 +984,8 @@ const getDialogUpload = (row) => { function dialogUploadFile() { let data = { number: dialogUploadNumber.value, - filePathList: fileDialogUploadData.value.filePathList.map((item) => item.url), - fileInfoList: fileDialogUploadData.value.filePathList, + filePathList: fileDialogUploadData.value.filePathList?fileDialogUploadData.value.filePathList.map((item) => item.url):null, + fileInfoList: fileDialogUploadData.value.filePathList?fileDialogUploadData.value.filePathList:[], funcCode: props.milestoneFuncCode, fileBusiType: dialogUploadBusiCode.value } @@ -996,17 +996,6 @@ function dialogUploadFile() { }) } -const hasmMilestoneRight = (row) => { - const rolesOk = userStore.roles.find(item => { - return item == 'mold_Engineer_role' - }) - if (rolesOk != undefined && rolesOk != null) { - return true - } else { - return false - } -} -