diff --git a/.env.production b/.env.production
index 7024ed4..2e1b905 100644
--- a/.env.production
+++ b/.env.production
@@ -1,2 +1,2 @@
-VITE_BASE_URL=http://10.62.139.32:81/api/admin-api
-VITE_BASE_URL_IMAGE=http://10.62.139.32:81/api/admin-api
\ No newline at end of file
+VITE_BASE_URL=http://dev.ccwin-in.com:25210/admin-api
+VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25210/admin-api
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 6c43042..a482a03 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,7 +18,6 @@
// 获取自定义的store
const store = useCountStore()
-
onLaunch(async () => {
// #ifdef MP-WEIXIN
if (uni.canIUse('getUpdateManager')) {
diff --git a/src/api/device.js b/src/api/device.js
index 04e0a76..c3cad9e 100644
--- a/src/api/device.js
+++ b/src/api/device.js
@@ -8,18 +8,6 @@ export function getDeviceDetailsByNumber(params) {
export function getDeviceByFactoryAreaNumber(factoryAreaNumber) {
return http.get('/eam/device-accounts/selectData?factoryAreaNumber='+factoryAreaNumber)
}
-// 添加报修
-export function deviceRepairCreate(data) {
- return http.post('/eam/device-repair-request/create',data)
-}
-// 报修列表
-export function deviceRepairPage(params) {
- return http.get('/eam/device-repair-request/getAppPage',{params})
-}
-// 撤销
-export function rejected(id) {
- return http.delete('/eam/device-repair-request/rejected?id='+id)
-}
// 设备列表
export function deviceList(params) {
return http.get('/eam/device-accounts/selectData',{params})
diff --git a/src/api/overhaulOrder.js b/src/api/overhaulOrder.js
index fe4a538..c051fa9 100644
--- a/src/api/overhaulOrder.js
+++ b/src/api/overhaulOrder.js
@@ -2,38 +2,92 @@ import http from './http'
// 添加工单
-export function overhaulOrderCreate(data) {
- return http.post('/eam/device-inspection-job-main/create',data)
+export function overhaulOrderCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-inspection-job-main/create',data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-inspection-job-main/create',data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-inspection-job-main/create',data)
+ }
}
// 编辑工单
-export function overhaulOrderUpdate(data) {
- return http.put('/eam/device-inspection-job-main/updat',data)
+export function overhaulOrderUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-inspection-job-main/updat',data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-inspection-job-main/updat',data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-inspection-job-main/updat',data)
+ }
}
// 报修列表
-export function overhaulOrderPage(params) {
- return http.get('/eam/device-inspection-job-main/getAppPage',{params})
+export function overhaulOrderPage(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-inspection-job-main/getAppPage',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-inspection-job-main/getAppPage',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-inspection-job-main/getAppPage',{params})
+ }
}
-// 操作工单
-export function orderClick(params) {
- return http.get('/eam/device-inspection-job-main/onClick',{params})
+// 完成
+export function orderClickFinish(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-inspection-job-main/orderClickFinish',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-inspection-job-main/orderClickFinish',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-inspection-job-main/orderClickFinish',{params})
+ }
}
-
-export function onVerify(params) {
- return http.get('/eam/device-inspection-job-main/onVerify',{params})
+// 验证
+export function orderClickVerify(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-inspection-job-main/orderClickVerify',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-inspection-job-main/orderClickVerify',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-inspection-job-main/orderClickVerify',{params})
+ }
}
// 添加维修工单子项维修内容
-export function overhaulOrderDetailCreate(data) {
- return http.post('/eam/device-inspection-job-detail/create',data)
+export function overhaulOrderDetailCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-inspection-job-detail/create',data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-inspection-job-detail/create',data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-inspection-job-detail/create',data)
+ }
}
// 编辑维修工单子项维修内容
-export function overhaulOrderDetailUpdate(data) {
- return http.put('/eam/device-inspection-job-detail/update',data)
+export function overhaulOrderDetailUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-inspection-job-detail/update',data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-inspection-job-detail/update',data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-inspection-job-detail/update',data)
+ }
}
// 获得维修工单子列表
-export function overhaulOrderDetailList(params) {
- return http.get('/eam/device-inspection-job-detail/selectListByNumber',{params})
+export function overhaulOrderDetailList(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-inspection-job-detail/selectListByNumber',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-inspection-job-detail/selectListByNumber',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-inspection-job-detail/selectListByNumber',{params})
+ }
}
// 删除维修工单子
-export function overhaulOrderDetailDelete(id) {
- return http.delete('/eam/device-inspection-job-detail/delete?id='+id)
+export function overhaulOrderDetailDelete(id,type) {
+ if (type == 'DEVICE') {
+ return http.delete('/eam/device-inspection-job-detail/delete?id='+id)
+ } else if (type == 'MOLD') {
+ return http.delete('/eam/mold-inspection-job-detail/delete?id='+id)
+ } else if (type == 'TECH') {
+ return http.delete('/eam/tech-inspection-job-detail/delete?id='+id)
+ }
}
diff --git a/src/api/repairOrder.js b/src/api/repairOrder.js
index 251c291..c2ad432 100644
--- a/src/api/repairOrder.js
+++ b/src/api/repairOrder.js
@@ -2,51 +2,144 @@ import http from './http'
// 添加工单
-export function repairOrderCreate(data) {
- return http.post('/eam/device-maintenance-job-main/create',data)
+export function repairOrderCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-maintenance-job-main/create', data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-maintenance-job-main/create', data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-maintenance-job-main/create', data)
+ }
}
// 编辑工单
-export function repairOrderUpdate(data) {
- return http.put('/eam/device-maintenance-job-main/update',data)
+export function repairOrderUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-maintenance-job-main/update', data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-maintenance-job-main/update', data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-maintenance-job-main/update', data)
+ }
}
// 工单列表
-export function repairOrderPage(params) {
- return http.get('/eam/device-maintenance-job-main/getAppPage',{params})
+export function repairOrderPage(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/getAppPage', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/getAppPage', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/getAppPage', {params})
+ }
}
// 获取维修工单详情信息
-export function getDeviceRepairDetail(number) {
- return http.get('eam/device-maintenance-job-main/getAppByNumber?number='+number)
+export function getDeviceRepairDetail(number,type) {
+ if (type == 'DEVICE') {
+ return http.get('eam/device-maintenance-job-main/getAppByNumber?number=' + number)
+ } else if (type == 'MOLD') {
+ return http.get('eam/mold-maintenance-job-main/getAppByNumber?number=' + number)
+ } else if (type == 'TECH') {
+ return http.get('eam/tech-maintenance-job-main/getAppByNumber?number=' + number)
+ }
}
-// 操作工单
-export function orderClick(params) {
- return http.get('/eam/device-maintenance-job-main/orderClick',{params})
+// 接单
+export function orderClick(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/orderClick', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/orderClick', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/orderClick', {params})
+ }
+}
+// 完成
+export function orderClickFinish(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/orderClickFinish', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/orderClickFinish', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/orderClickFinish', {params})
+ }
+}
+// 确认
+export function orderClickConfirm(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/orderClickConfirm', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/orderClickConfirm', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/orderClickConfirm', {params})
+ }
+}
+// 验证
+export function orderClickVerify(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/orderClickVerify', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/orderClickVerify', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/orderClickVerify', {params})
+ }
}
// 添加维修工单子项维修内容
-export function repairOrderDetailCreate(data) {
- return http.post('/eam/device-maintenance-job-detail/create',data)
+export function repairOrderDetailCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-maintenance-job-detail/create', data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-maintenance-job-detail/create', data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-maintenance-job-detail/create', data)
+ }
}
// 编辑维修工单子项维修内容
-export function repairOrderDetailUpdate(data) {
- return http.put('/eam/device-maintenance-job-detail/update',data)
+export function repairOrderDetailUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-maintenance-job-detail/update', data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-maintenance-job-detail/update', data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-maintenance-job-detail/update', data)
+ }
}
// 获得维修工单子列表
-export function repairOrderDetailList(params) {
- return http.get('/eam/device-maintenance-job-detail/selectListByNumber',{params})
+export function repairOrderDetailList(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-detail/selectListByNumber', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-detail/selectListByNumber', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-detail/selectListByNumber', {params})
+ }
}
// 删除维修工单子
-export function repairOrderDetailDelete(id) {
- return http.delete( '/eam/device-maintenance-job-detail/delete?id='+id)
+export function repairOrderDetailDelete(id,type) {
+ if (type == 'DEVICE') {
+ return http.delete('/eam/device-maintenance-job-detail/delete?id=' + id)
+ } else if (type == 'MOLD') {
+ return http.delete('/eam/mold-maintenance-job-detail/delete?id=' + id)
+ } else if (type == 'TECH') {
+ return http.delete('/eam/tech-maintenance-job-detail/delete?id=' + id)
+ }
}
//转办
-export function transfer(params) {
- return http.get('/eam/device-maintenance-job-main/turnTo',{params})
+export function transfer(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintenance-job-main/turnTo', {params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintenance-job-main/turnTo', {params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintenance-job-main/turnTo', {params})
+ }
}
// 获取采取临时措施的维修工单
export function repairOrderList(params) {
- return http.get('/eam/device-maintenance-job-main/getList',{params})
+ return http.get('/eam/device-maintenance-job-main/getList', {
+ params
+ })
}
// 获取维修工单的报修信息
export function getDeviceRepairDetailsByNumber(params) {
- return http.get('/eam/device-repair-request/getDetailsByNumber',{params})
-}
-
+ return http.get('/eam/device-repair-request/getDetailsByNumber', {
+ params
+ })
+}
\ No newline at end of file
diff --git a/src/api/report.js b/src/api/report.js
new file mode 100644
index 0000000..d18ccfb
--- /dev/null
+++ b/src/api/report.js
@@ -0,0 +1,33 @@
+import http from './http'
+
+
+// 添加报修
+export function repairCreate(data,type) {
+ if(type == 'DEVICE'){
+ return http.post('/eam/device-repair-request/create',data)
+ }else if(type == 'MOLD'){
+ return http.post('/eam/mold-repair-request/create',data)
+ }else if(type == 'TECH'){
+ return http.post('/eam/tech-repair-request/create',data)
+ }
+}
+// 报修列表
+export function repairPage(params,type) {
+ if(type == 'DEVICE'){
+ return http.get('/eam/device-repair-request/getAppPage',{params})
+ }else if(type == 'MOLD'){
+ return http.post('/eam/mold-repair-request/getAppPage',{params})
+ }else if(type == 'TECH'){
+ return http.post('/eam/tech-repair-request/getAppPage',{params})
+ }
+}
+// 撤销
+export function repairCancel(id,type) {
+ if(type == 'DEVICE'){
+ return http.delete('/eam/device-repair-request/cancel?id='+id)
+ }else if(type == 'MOLD'){
+ return http.post('/eam/mold-repair-request/cancel?id='+id)
+ }else if(type == 'TECH'){
+ return http.post('/eam/tech-repair-request/cancel?id='+id)
+ }
+}
diff --git a/src/api/sparePartsApplicationApprove.js b/src/api/sparePartsApplicationApprove.js
index e4def43..25c4047 100644
--- a/src/api/sparePartsApplicationApprove.js
+++ b/src/api/sparePartsApplicationApprove.js
@@ -1,9 +1,14 @@
import http from './http'
-// 备件领用审批列表
+// 备件一级审批领用审批列表
export function sparePartsApplicationApprovePage(params) {
return http.get('/eam/item-apply-request-main/getAppApprovePage',{params})
}
+
+// 备件二级审批领用审批列表
+export function sparePartsApplicationApprovePage1(params) {
+ return http.get('/eam/item-apply-request-main/getAppApprovePage1',{params})
+}
// 通过申请
export function sparePartsApplicationAgree(id) {
return http.get('/eam/item-apply-request-main/agree?id='+id)
diff --git a/src/api/spotCheckOrder.js b/src/api/spotCheckOrder.js
index fb65753..6241be0 100644
--- a/src/api/spotCheckOrder.js
+++ b/src/api/spotCheckOrder.js
@@ -1,29 +1,65 @@
import http from './http'
// 添加工单
-export function spotCheckOrderCreate(data) {
- return http.post('/eam/device-spot-inspection-record-main/create',data)
+export function spotCheckOrderCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-spot-inspection-record-main/create',data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-spot-inspection-record-main/create',data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-spot-inspection-record-main/create',data)
+ }
}
// 编辑工单
-export function spotCheckOrderUpdate(data) {
- return http.put('/eam/device-spot-inspection-record-main/update',data)
+export function spotCheckOrderUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-spot-inspection-record-main/update',data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-spot-inspection-record-main/update',data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-spot-inspection-record-main/update',data)
+ }
}
// 工单列表
-export function spotCheckOrderPage(params) {
- return http.get('/eam/device-spot-inspection-record-main/getAppPage',{params})
+export function spotCheckOrderPage(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-spot-inspection-record-main/getAppPage',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-spot-inspection-record-main/getAppPage',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-spot-inspection-record-main/getAppPage',{params})
+ }
}
// 操作工单
-export function orderClick(params) {
- return http.get('/eam/device-spot-inspection-record-main/onClick',{params})
+export function orderClick(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-spot-inspection-record-main/onClick',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-spot-inspection-record-main/onClick',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-spot-inspection-record-main/onClick',{params})
+ }
}
// 操作工单
-export function selectListByNumber(params) {
- return http.get('/eam/device-spot-inspection-record-detail/getList',{params})
+export function selectListByNumber(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-spot-inspection-record-detail/getList',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-spot-inspection-record-detail/getList',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-spot-inspection-record-detail/getList',{params})
+ }
}
// 工程师审批
-export function orderClickApprove(params) {
- return http.get('/eam/device-spot-inspection-record-main/orderClickApprove',{params})
+export function orderClickVerify(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-spot-inspection-record-main/orderClickVerify',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-spot-inspection-record-main/orderClickVerify',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-spot-inspection-record-main/orderClickVerify',{params})
+ }
}
diff --git a/src/api/upkeepOrder.js b/src/api/upkeepOrder.js
index 7cfc7f1..944701e 100644
--- a/src/api/upkeepOrder.js
+++ b/src/api/upkeepOrder.js
@@ -1,44 +1,104 @@
-import http from './http'
+ import http from './http'
// 添加工单
-export function upkeepOrderCreate(data) {
- return http.post('/eam/device-maintain-job-main/create',data)
+export function upkeepOrderCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-maintain-job-main/create',data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-maintain-job-main/create',data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-maintain-job-main/create',data)
+ }
}
// 编辑工单
-export function upkeepOrderUpdate(data) {
- return http.put('/eam/device-maintain-job-main/update',data)
+export function upkeepOrderUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-maintain-job-main/update',data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-maintain-job-main/update',data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-maintain-job-main/update',data)
+ }
}
// 工单列表
-export function upkeepOrderPage(params) {
- return http.get('/eam/device-maintain-job-main/getAppPage',{params})
+export function upkeepOrderPage(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintain-job-main/getAppPage',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintain-job-main/getAppPage',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintain-job-main/getAppPage',{params})
+ }
}
// 接单
-export function orderClick(params) {
- return http.get('/eam/device-maintain-job-main/orderClick',{params})
+export function orderClick(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintain-job-main/orderClick',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintain-job-main/orderClick',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintain-job-main/orderClick',{params})
+ }
}
-export function orderClickVerify(params) {
- return http.get('/eam/device-maintain-job-main/orderClickVerify',{params})
+export function orderClickVerify(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintain-job-main/orderClickVerify',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintain-job-main/orderClickVerify',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintain-job-main/orderClickVerify',{params})
+ }
}
// 完成保养工单
-export function orderClickFinish(params) {
- return http.get('/eam/device-maintain-job-main/orderClickFinish',{params})
+export function orderClickFinish(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintain-job-main/orderClickFinish',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintain-job-main/orderClickFinish',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintain-job-main/orderClickFinish',{params})
+ }
}
// 添加维修工单子项维修内容
-export function upkeepOrderDetailCreate(data) {
- return http.post('/eam/device-maintain-job-detail/create',data)
+export function upkeepOrderDetailCreate(data,type) {
+ if (type == 'DEVICE') {
+ return http.post('/eam/device-maintain-job-detail/create',data)
+ } else if (type == 'MOLD') {
+ return http.post('/eam/mold-maintain-job-detail/create',data)
+ } else if (type == 'TECH') {
+ return http.post('/eam/tech-maintain-job-detail/create',data)
+ }
}
// 编辑维修工单子项维修内容
-export function upkeepOrderDetailUpdate(data) {
- return http.put('/eam/device-maintain-job-detail/update',data)
+export function upkeepOrderDetailUpdate(data,type) {
+ if (type == 'DEVICE') {
+ return http.put('/eam/device-maintain-job-detail/update',data)
+ } else if (type == 'MOLD') {
+ return http.put('/eam/mold-maintain-job-detail/update',data)
+ } else if (type == 'TECH') {
+ return http.put('/eam/tech-maintain-job-detail/update',data)
+ }
}
// 获得维修工单子列表
-export function upkeepOrderDetailList(params) {
- return http.get('/eam/device-maintain-job-detail/selectListByNumber',{params})
+export function upkeepOrderDetailList(params,type) {
+ if (type == 'DEVICE') {
+ return http.get('/eam/device-maintain-job-detail/selectListByNumber',{params})
+ } else if (type == 'MOLD') {
+ return http.get('/eam/mold-maintain-job-detail/selectListByNumber',{params})
+ } else if (type == 'TECH') {
+ return http.get('/eam/tech-maintain-job-detail/selectListByNumber',{params})
+ }
}
// 删除维修工单子
-export function upkeepOrderDetailDelete(id) {
- return http.delete('/eam/device-maintain-job-detail/delete?id='+id)
+export function upkeepOrderDetailDelete(id,type) {
+ if (type == 'DEVICE') {
+ return http.delete('/eam/device-maintain-job-detail/delete?id='+id)
+ } else if (type == 'MOLD') {
+ return http.delete('/eam/mold-maintain-job-detail/delete?id='+id)
+ } else if (type == 'TECH') {
+ return http.delete('/eam/tech-maintain-job-detail/delete?id='+id)
+ }
}
diff --git a/src/main.ts b/src/main.ts
index c19c964..c24d283 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -9,6 +9,10 @@ import App from './App.vue'
import tab from './plugins/tab'
import modal from './plugins/modal'
import time from './plugins/time'
+// import auth from './plugins/auth'
+
+// 权限
+import { setupAuth } from '@/directives'
// unocss
@@ -30,6 +34,9 @@ export function createApp() {
app.config.globalProperties.$modal = modal
// 时间对象
app.config.globalProperties.$time = time
+ // app.config.globalProperties.$auth = auth
+
+
diff --git a/src/pages/deviceReport/addForm.vue b/src/pages/deviceReport/addForm.vue
index 9464a16..ce41fb3 100644
--- a/src/pages/deviceReport/addForm.vue
+++ b/src/pages/deviceReport/addForm.vue
@@ -16,14 +16,14 @@
-
+
+ @blur="blur()" @confirm='blur()' />
扫描
-
@@ -31,11 +31,11 @@
+ :placeholder="`根据${type=='DEVICE'?'设备' :type == 'TECH'?'工艺' : '模具'}编码获得`" disabled />
+ :placeholder="`根据${type=='DEVICE'?'设备':type == 'TECH'?'工艺' : '模具'}编码获得`" disabled />
@@ -71,6 +71,7 @@
getCurrentInstance
} from 'vue'
import * as deviceApi from "@/api/device.js"
+ import * as reportApi from "@/api/report.js"
import * as moldApi from "@/api/mold.js"
import * as dictApi from "@/api/dict.js"
import * as uploadApi from "@/api/upload.js"
@@ -87,7 +88,7 @@
factoryAreaName: '',
factoryAreaNumber: '',
type: '',
- typeName:''
+ typeName: ''
})
const singleColumnShow = ref(false)
const singleColumnDefaultValue = ref([])
@@ -136,7 +137,7 @@
deviceApi.getDeviceDetailsByNumber({
number: form.value.deviceNumber,
type: type.value,
- flag:1
+ flag: 1
}).then((res) => {
if (!res.data) {
msg.value = res.msg
@@ -156,7 +157,7 @@
} else if (type.value == 'MOLD') {
moldApi.getMoldDetailsByNumber({
number: form.value.deviceNumber,
- flag:1
+ flag: 1
}).then((res) => {
if (!res.data) {
msg.value = res.msg
@@ -187,7 +188,7 @@
return;
}
if (!form.value.deviceNumber) {
- proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}`)
+ proxy.$modal.showToast(`请选择${type.value == 'DEVICE' ? '设备' : type == 'TECH' ? '工艺' : '模具'}`)
return;
}
if (!form.value.deviceName) {
@@ -208,7 +209,7 @@
proxy.$modal.confirm('是否添加报修').then(() => {
proxy.$modal.loading('加载中')
loading.value = true
- deviceApi.deviceRepairCreate(data).then((res) => {
+ reportApi.repairCreate(data, type.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data) {
proxy.$modal.showToast('添加成功')
@@ -217,9 +218,9 @@
loading.value = false
}, 1500)
} else {
- if(res.msg){
+ if (res.msg) {
proxy.$modal.showToast(res.msg)
- }else{
+ } else {
proxy.$modal.showToast('添加失败')
}
loading.value = false
@@ -249,7 +250,7 @@
}
// 单列模式点击确定之后
function chooseSingleColumn(e) {
- if(form.value[field.value] == e[0].value)return;
+ if (form.value[field.value] == e[0].value) return;
form.value[field.value] = e[0].value
if (field.value == 'factoryAreaNumber') {
form.value.deviceNumber = ''
@@ -258,7 +259,7 @@
}
if (field.value == 'type') {
type.value = form.value[field.value]
- form.value.typeName = e[0].label
+ form.value.typeName = e[0].label
form.value.deviceNumber = ''
form.value.deviceName = ''
form.value.factoryAreaName = ''
@@ -298,15 +299,11 @@
if (option.type) type.value = option.type;
appDeviceMoldType.value = await dictApi.getDict('app_device_mold_type')
if (type.value == 'DEVICE') {
- appDeviceMoldType.value = appDeviceMoldType.value.filter((item => item.value != "MOLD"))
- uni.setNavigationBarTitle({
- title: '设备报修'
- })
- } else {
- uni.setNavigationBarTitle({
- title: '模具报修'
- })
- appDeviceMoldType.value =appDeviceMoldType.value.filter((item => item.value == "MOLD"))
+ appDeviceMoldType.value = appDeviceMoldType.value.filter((item => item.value == "DEVICE"))
+ } else if (type.value == 'MOLD') {
+ appDeviceMoldType.value = appDeviceMoldType.value.filter((item => item.value == "MOLD"))
+ } else if (type.value == 'TECH') {
+ appDeviceMoldType.value = appDeviceMoldType.value.filter((item => item.value == "TECH"))
}
form.value.type = appDeviceMoldType.value[0].value
form.value.typeName = appDeviceMoldType.value[0].label
diff --git a/src/pages/deviceReport/index.vue b/src/pages/deviceReport/index.vue
index 8982982..3620cd2 100644
--- a/src/pages/deviceReport/index.vue
+++ b/src/pages/deviceReport/index.vue
@@ -2,9 +2,10 @@
+ :title="title">
-
+
@@ -43,8 +44,7 @@
type="primary" shape='circle' />
- 撤销
+ 撤销
@@ -66,7 +66,12 @@
ref,
getCurrentInstance
} from 'vue'
- import * as deviceApi from "@/api/device.js"
+ import * as reportApi from "@/api/report.js"
+ import auth from '@/plugins/auth'
+ import { useCountStore } from '@/store'
+ // 获取自定义的store
+ const store = useCountStore()
+ console.log(store.id)
const { proxy } = getCurrentInstance()
const params = ref({
pageNo: 1,
@@ -77,6 +82,7 @@
const status = ref('loadmore') //是否显示没有更多了
const list = ref([])
const type = ref()
+ const title = ref('')
function addForm() {
proxy.$tab.navigateTo(`/pages/deviceReport/addForm?type=${params.value.type}`)
@@ -85,7 +91,8 @@
if (status.value == 'nomore') return;
status.value = 'loading';
proxy.$modal.loading('加载中')
- await deviceApi.deviceRepairPage(params.value).then((res) => {
+ console.log(type.value)
+ await reportApi.repairPage(params.value,type.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list);
@@ -99,7 +106,7 @@
function cancle(item) {
proxy.$modal.confirm('确定撤销报修吗?').then(() => {
proxy.$modal.loading('加载中')
- deviceApi.rejected(item.id).then(async (res) => {
+ reportApi.repairCancel(item.id,type.value).then(async (res) => {
proxy.$modal.closeLoading()
params.value.pageNo = 1
list.value = []
@@ -123,19 +130,21 @@
}
});
}
+ function hasPermi1(val) {
+ console.log(proxy.$auth)
+ }
onLoad((option) => {
- if (option.type) params.value.type = option.type;
- if (type.value == 'DEVICE') {
- uni.setNavigationBarTitle({
- title: '设备报修'
- })
- } else {
- uni.setNavigationBarTitle({
- title: '模具报修'
- })
+ if (option.type) type.value = option.type;
+ params.value.type = type.value
+ if (option.type == 'DEVICE') {
+ title.value = '设备报修'
+ } else if (option.type == 'MOLD') {
+ title.value = '模具报修'
+ } else if (option.type == 'TECH') {
+ title.value = '工艺报修'
}
})
- onShow(async() => {
+ onShow(async () => {
params.value.pageNo = 1
list.value = []
status.value = 'loadmore'
@@ -147,10 +156,11 @@