From a275a734ddf4802f786d22f88e80bc080f381757 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 31 Jan 2024 15:18:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E6=A3=80=E4=BF=AE=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/dept.js | 10 + api/overhaulOrder.js | 75 ++++ api/repairOrder.js | 48 +++ api/spareParts.js | 10 + api/user.js | 9 + config.js | 1 + pages.json | 46 +- pages/index.vue | 13 +- pages/mine/changePassword.vue | 293 ++++++------- pages/mine/index.vue | 5 +- pages/overhaulOrder/addForm.vue | 325 +++++++++++++++ pages/overhaulOrder/addServiceRecord.vue | 507 +++++++++++++++++++++++ pages/overhaulOrder/detail.vue | 482 +++++++++++++++++++++ pages/overhaulOrder/index.vue | 251 +++++++++++ pages/overhaulOrder/myRepairOrder.vue | 226 ++++++++++ pages/overhaulOrder/transfer.vue | 400 ++++++++++++++++++ pages/repairOrder/addForm.vue | 19 +- pages/repairOrder/addServiceRecord.vue | 506 ++++++++++++++++++++++ pages/repairOrder/detail.vue | 338 ++++++++++----- pages/repairOrder/screen.vue | 261 ------------ pages/repairOrder/transfer.vue | 400 ++++++++++++++++++ plugins/tab.js | 6 +- 22 files changed, 3709 insertions(+), 522 deletions(-) create mode 100644 api/dept.js create mode 100644 api/overhaulOrder.js create mode 100644 api/spareParts.js create mode 100644 api/user.js create mode 100644 pages/overhaulOrder/addForm.vue create mode 100644 pages/overhaulOrder/addServiceRecord.vue create mode 100644 pages/overhaulOrder/detail.vue create mode 100644 pages/overhaulOrder/index.vue create mode 100644 pages/overhaulOrder/myRepairOrder.vue create mode 100644 pages/overhaulOrder/transfer.vue create mode 100644 pages/repairOrder/addServiceRecord.vue delete mode 100644 pages/repairOrder/screen.vue create mode 100644 pages/repairOrder/transfer.vue diff --git a/api/dept.js b/api/dept.js new file mode 100644 index 0000000..04d8a54 --- /dev/null +++ b/api/dept.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 获取人员列表 +export function getSelecUser(params) { + return request({ + url: '/system/dept/selecUserByType', + 'method': 'GET', + params + }) +} diff --git a/api/overhaulOrder.js b/api/overhaulOrder.js new file mode 100644 index 0000000..5374490 --- /dev/null +++ b/api/overhaulOrder.js @@ -0,0 +1,75 @@ +import request from '@/utils/request' + + +// 添加工单 +export function overhaulOrderCreate(data) { + return request({ + url: '/eam/device-inspection-main/create', + 'method': 'POST', + data + }) +} +// 编辑工单 +export function overhaulOrderUpdate(data) { + return request({ + url: '/eam/device-inspection-main/update', + 'method': 'PUT', + data + }) +} +// 报修列表 +export function overhaulOrderPage(params) { + return request({ + url: '/eam/device-inspection-main/getAppPage', + 'method': 'GET', + params + }) +} +// 操作工单 +export function orderClick(params) { + return request({ + url: '/eam/device-maintenance-main/orderClick', + 'method': 'GET', + params + }) +} +// 添加维修工单子项维修内容 +export function repairOrderDetailCreate(data) { + return request({ + url: '/eam/device-maintenance-detail/create', + 'method': 'POST', + data + }) +} +// 编辑维修工单子项维修内容 +export function repairOrderDetailUpdate(data) { + return request({ + url: '/eam/device-maintenance-detail/update', + 'method': 'PUT', + data + }) +} +// 获得维修工单子列表 +export function repairOrderDetailList(params) { + return request({ + url: '/eam/device-maintenance-detail/selectListByNumber', + 'method': 'GET', + params + }) +} +// 删除维修工单子 +export function repairOrderDetailDelete(id) { + return request({ + url: '/eam/device-maintenance-detail/delete?id='+id, + 'method': 'DELETE' + }) +} + +//转办 +export function transfer(params) { + return request({ + url: '/eam/device-maintenance-main/turnTo', + 'method': 'GET', + params + }) +} \ No newline at end of file diff --git a/api/repairOrder.js b/api/repairOrder.js index 9c926bc..5c16629 100644 --- a/api/repairOrder.js +++ b/api/repairOrder.js @@ -33,4 +33,52 @@ export function orderClick(params) { params }) } +// 添加维修工单子项维修内容 +export function repairOrderDetailCreate(data) { + return request({ + url: '/eam/device-maintenance-detail/create', + 'method': 'POST', + data + }) +} +// 编辑维修工单子项维修内容 +export function repairOrderDetailUpdate(data) { + return request({ + url: '/eam/device-maintenance-detail/update', + 'method': 'PUT', + data + }) +} +// 获得维修工单子列表 +export function repairOrderDetailList(params) { + return request({ + url: '/eam/device-maintenance-detail/selectListByNumber', + 'method': 'GET', + params + }) +} +// 删除维修工单子 +export function repairOrderDetailDelete(id) { + return request({ + url: '/eam/device-maintenance-detail/delete?id='+id, + 'method': 'DELETE' + }) +} + +//转办 +export function transfer(params) { + return request({ + url: '/eam/device-maintenance-main/turnTo', + 'method': 'GET', + params + }) +} +// 获取采取临时措施的维修工单 +export function repairOrderList(params) { + return request({ + url: '/eam/device-maintenance-main/getList', + 'method': 'GET', + params + }) +} \ No newline at end of file diff --git a/api/spareParts.js b/api/spareParts.js new file mode 100644 index 0000000..9baa334 --- /dev/null +++ b/api/spareParts.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 获取备件列表 +export function getSparePartsList(params) { + return request({ + url: '/eam/item/getListByNumber', + 'method': 'GET', + params + }) +} diff --git a/api/user.js b/api/user.js new file mode 100644 index 0000000..c2f72a6 --- /dev/null +++ b/api/user.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' +// 用户密码重置 +export function updateUserPassword(data){ + return request({ + url: '/system/user/profile/update-password', + 'method': 'PUT', + data + }) +} diff --git a/config.js b/config.js index 42a267a..1fdbab3 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,6 @@ // 应用全局配置 module.exports = { + // http://192.168.0.165:1208 baseUrl: process.env.NODE_ENV === 'development' ? 'http://192.168.0.165:12080' : 'http://api-dashboard.yudao.iocoder.cn', baseApi:process.env.NODE_ENV === 'development' ? '/admin-api' : '/api/admin-api', // 应用信息 diff --git a/pages.json b/pages.json index 2cc6c11..72a8b3b 100644 --- a/pages.json +++ b/pages.json @@ -69,25 +69,59 @@ "navigationBarTextStyle": "white" } },{ - "path": "pages/repairOrder/screen", + "path": "pages/repairOrder/detail", "style": { - "navigationBarTitleText": "筛选", + "navigationBarTitleText": "维修工单详情", "navigationBarBackgroundColor": "#409eff", "navigationBarTextStyle": "white" } },{ - "path": "pages/repairOrder/detail", + "path": "pages/repairOrder/myRepairOrder", "style": { - "navigationBarTitleText": "维修工单详情", + "navigationBarTitleText": "维修工单", + "navigationStyle": "custom" + } + },{ + "path": "pages/repairOrder/addServiceRecord", + "style": { + "navigationBarTitleText": "添加维修记录", "navigationBarBackgroundColor": "#409eff", "navigationBarTextStyle": "white" } },{ - "path": "pages/repairOrder/myRepairOrder", + "path": "pages/repairOrder/transfer", "style": { - "navigationBarTitleText": "维修工单", + "navigationBarTitleText": "转办", + "navigationBarBackgroundColor": "#409eff", + "navigationBarTextStyle": "white" + } + },{ + "path": "pages/overhaulOrder/index", + "style": { + "navigationBarTitleText": "检修工单", "navigationStyle": "custom" } + },{ + "path": "pages/overhaulOrder/addForm", + "style": { + "navigationBarTitleText": "添加检修工单", + "navigationBarBackgroundColor": "#409eff", + "navigationBarTextStyle": "white" + } + },{ + "path": "pages/overhaulOrder/detail", + "style": { + "navigationBarTitleText": "检修工单详情", + "navigationBarBackgroundColor": "#409eff", + "navigationBarTextStyle": "white" + } + },{ + "path": "pages/mine/changePassword", + "style": { + "navigationBarTitleText": "修改密码", + "navigationBarBackgroundColor": "#409eff", + "navigationBarTextStyle": "white" + } }], "tabBar": { "color": "#8f9bb3", diff --git a/pages/index.vue b/pages/index.vue index c3163c7..159673f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -13,15 +13,15 @@ - 32 + {{counts.allCount}} 设备总数 - 32 + {{counts.breakDownCount}} 故障中设备 - 32 + {{counts.repairCount}} 已报修设备 @@ -57,7 +57,7 @@ - + 检修工单 @@ -90,7 +90,7 @@ - + 检修工单 @@ -135,7 +135,7 @@ data() { return { bgOpacity: 0, - + counts:'' } }, @@ -156,6 +156,7 @@ getCounts() { getCounts().then(res => { console.log((res)) + this.counts = res.data }) }, }, diff --git a/pages/mine/changePassword.vue b/pages/mine/changePassword.vue index c0f11bc..265789c 100644 --- a/pages/mine/changePassword.vue +++ b/pages/mine/changePassword.vue @@ -1,149 +1,158 @@ + page { + background-color: #f8f9fb; + } + + .box { + width: 94vw; + margin: 20rpx auto; + border-radius: 20rpx; + overflow: hidden; + } + + .item { + background-color: #FFFFFF; + padding: 0rpx 30rpx; + display: flex; + align-items: center; + + image { + width: 44rpx; + height: 44rpx; + margin-right: 30rpx; + } + + .item2 { + display: flex; + align-items: center; + justify-content: space-between; + flex: 1; + border-bottom: 1rpx solid #efefef; + padding: 25rpx 0rpx; + + input { + font-size: 28rpx; + } + + view { + color: #1a4f9f; + border: 1rpx solid #1a4f9f; + font-size: 30rpx; + border-radius: 50rpx; + padding: 10rpx 18rpx; + } + } + + } + + .btn { + width: calc(100vw - 80rpx); + position: fixed; + bottom: 200rpx; + left: 40rpx; + background-color: rgb(64, 158, 255); + color: #FFFFFF; + height: 90rpx; + line-height: 90rpx; + text-align: center; + border-radius: 50rpx; + font-size: 32rpx; + } + + .noborder { + border-bottom: none !important; + } + + .padd35 { + padding: 35rpx 0 !important; + } + \ No newline at end of file diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 9840be7..bfa046a 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -56,7 +56,7 @@ - + 修改密码 @@ -129,6 +129,9 @@ handleLogin() { this.$tab.navigateTo('/pages/login/index') }, + handleEditPassword(){ + this.$tab.navigateTo('/pages/mine/changePassword') + } }, onShow() { if (getAccessToken()) { diff --git a/pages/overhaulOrder/addForm.vue b/pages/overhaulOrder/addForm.vue new file mode 100644 index 0000000..64ecfb9 --- /dev/null +++ b/pages/overhaulOrder/addForm.vue @@ -0,0 +1,325 @@ + + + + + \ No newline at end of file diff --git a/pages/overhaulOrder/addServiceRecord.vue b/pages/overhaulOrder/addServiceRecord.vue new file mode 100644 index 0000000..66a44d2 --- /dev/null +++ b/pages/overhaulOrder/addServiceRecord.vue @@ -0,0 +1,507 @@ + + + + + \ No newline at end of file diff --git a/pages/overhaulOrder/detail.vue b/pages/overhaulOrder/detail.vue new file mode 100644 index 0000000..7bce8aa --- /dev/null +++ b/pages/overhaulOrder/detail.vue @@ -0,0 +1,482 @@ + + + + + \ No newline at end of file diff --git a/pages/overhaulOrder/index.vue b/pages/overhaulOrder/index.vue new file mode 100644 index 0000000..87bcabd --- /dev/null +++ b/pages/overhaulOrder/index.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/pages/overhaulOrder/myRepairOrder.vue b/pages/overhaulOrder/myRepairOrder.vue new file mode 100644 index 0000000..06fc4f3 --- /dev/null +++ b/pages/overhaulOrder/myRepairOrder.vue @@ -0,0 +1,226 @@ + + + + + \ No newline at end of file diff --git a/pages/overhaulOrder/transfer.vue b/pages/overhaulOrder/transfer.vue new file mode 100644 index 0000000..2202ef4 --- /dev/null +++ b/pages/overhaulOrder/transfer.vue @@ -0,0 +1,400 @@ + + + + + \ No newline at end of file diff --git a/pages/repairOrder/addForm.vue b/pages/repairOrder/addForm.vue index ef9648c..f2de396 100644 --- a/pages/repairOrder/addForm.vue +++ b/pages/repairOrder/addForm.vue @@ -3,7 +3,7 @@ - + @@ -93,7 +93,7 @@ this.$modal.showToast('请输入故障描述') return; } - if (!this.form.deviceName) { + if (!this.form.deviceNumber) { this.$modal.showToast(`请选择${this.type=='DEVICE'?'设备' : '模具'}名称`) return; } @@ -105,10 +105,6 @@ this.$modal.showToast('请选择班次') return; } - if (!this.form.classes) { - this.$modal.showToast('请选择班次') - return; - } const data = { id: this.form && this.form.id ? this.form.id : '', describes: this.form.describes, @@ -175,8 +171,12 @@ }, // selectFormat(val, array) { - let str = array.filter(item => item.value == val)[0].label - return str + if(array.length>0){ + let str = array.filter(item => item.value == val)[0].label + return str + }else{ + return '' + } }, // 单列模式 openSingleColumn(field, val, list) { @@ -192,7 +192,6 @@ }, // 单列模式点击确定之后 chooseSingleColumn(e) { - console.log(e[0]) this.form[this.field] = e[0].value if (this.field == 'deviceNumber') { this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value) @@ -237,7 +236,7 @@ deviceName: data.name, factoryAreaName: data.factoryAreaName, factoryAreaNumber: data.factoryAreaNumber, - classes: data.classes ? data.classes : '0', + classes: data.classes ? data.classes : '', faultType: data.faultType, // faultTypeName:data.faultTypeName, } diff --git a/pages/repairOrder/addServiceRecord.vue b/pages/repairOrder/addServiceRecord.vue new file mode 100644 index 0000000..b667054 --- /dev/null +++ b/pages/repairOrder/addServiceRecord.vue @@ -0,0 +1,506 @@ + + + + + \ No newline at end of file diff --git a/pages/repairOrder/detail.vue b/pages/repairOrder/detail.vue index afbe7a1..ebbcae6 100644 --- a/pages/repairOrder/detail.vue +++ b/pages/repairOrder/detail.vue @@ -4,27 +4,27 @@ 维修工单 - 转办 + 转办 - 工单单号 + 工单单号: {{data.number}} - 报修描述 + 报修描述: {{data.describes}} - 班次 + 班次: {{data.classesName}} - 故障类型 + 故障类型: {{data.faultTypeName}} - 维修工 + 维修工: {{data.maintenance}} @@ -41,74 +41,121 @@ - 设备编号 + 设备编号: {{deviceInfo.number}} - 设备名称 + 设备名称: {{deviceInfo.name}} - 所属厂区 + 所属厂区: {{deviceInfo.factoryAreaName}} - 设备类型 + 设备类型: {{deviceInfo.typeName}} - 工单单号 + 工单单号: {{data.number}} - 报修描述 + 报修描述: {{data.describes}} - 维修工 + 维修工: {{data.maintenance}} - - - + + + + + + {{item.describes}} + + + + + 故障真因: + {{item.describes1}} + + + 解决措施: + {{item.workOut}} + + + 维修人员: + {{item.maintenancesName}} + + + 备件: + + + + {{cur.name}} + + + 备件编号:{{cur.number}} + + + 数量:{{cur.qty}} + + + + + + + 添加维修内容 + - 接单 - 完成 - 验证完结 + 接单 + 完成 + 验证完结 - - 添加记录 + + + 完成类型 -
+ + + {{item.label}} + +
- 取消 - 确认 + 取消 + 确认
+
@@ -294,11 +358,50 @@ &:nth-child(2) { color: #888888; flex: 1; + width: 0px; + word-wrap: break-word; } } } } + .dec2 { + padding: 10rpx 30rpx; + display: flex; + + view { + &:nth-child(1) { + width: 160rpx; + } + + &:nth-child(2) { + color: #888888; + flex: 1; + width: 0px; + word-wrap: break-word; + } + } + + + } + + .items { + margin: 20rpx 30rpx; + border-radius: 12rpx; + background: #F5F5F5; + padding-bottom: 20rpx; + + .items-name { + padding: 20rpx; + border-bottom: 1px solid #dedede; + } + + .items-dec { + padding: 0px 20rpx; + margin-top: 20rpx; + } + } + .popup-title { text-align: center; font-size: 32rpx; @@ -360,4 +463,51 @@ } } } + + .list { + padding: 20rpx; + + .item { + display: flex; + margin-bottom: 20rpx; + + .item-box { + border-radius: 12rpx; + border: 1px solid #dedede; + border-radius: 12rpx; + + flex: 1; + width: 0rpx; + } + + .spare-title { + padding: 20rpx 30rpx; + border-bottom: 1px solid #e4e4e4; + display: flex; + + .title-txt { + color: #409eff; + font-size: 30rpx; + font-weight: bold; + flex: 1; + } + } + + .dec { + color: #9c9c9c; + padding: 0rpx 30rpx 20rpx; + } + + } + } + + .add-btn { + display: flex; + justify-content: flex-start; + align-items: center; + } + ::v-deep .u-radio-group { + display: grid !important; + padding-bottom: 20rpx; + } \ No newline at end of file diff --git a/pages/repairOrder/screen.vue b/pages/repairOrder/screen.vue deleted file mode 100644 index 85faacc..0000000 --- a/pages/repairOrder/screen.vue +++ /dev/null @@ -1,261 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/repairOrder/transfer.vue b/pages/repairOrder/transfer.vue new file mode 100644 index 0000000..2202ef4 --- /dev/null +++ b/pages/repairOrder/transfer.vue @@ -0,0 +1,400 @@ + + + + + \ No newline at end of file diff --git a/plugins/tab.js b/plugins/tab.js index 5d1b305..294253d 100644 --- a/plugins/tab.js +++ b/plugins/tab.js @@ -24,7 +24,9 @@ export default { }) }, // 关闭当前页面,返回上一页面或多级页面 - navigateBack() { - return uni.navigateBack() + navigateBack(level) { + return uni.navigateBack({ + delta:level + }) } }