From 5bc6161cf2fbcd0d41e3c17345dacbc6df25c87c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sun, 18 Feb 2024 17:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=B6=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=A4=87=E4=BB=B6=E9=A2=86=E7=94=A8=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E5=A4=87=E4=BB=B6=E7=BB=B4=E4=BF=AE=EF=BC=8C=E6=88=91=E7=9A=84?= =?UTF-8?q?=E4=BF=9D=E5=85=BB=EF=BC=8C=E6=88=91=E7=9A=84=E6=8A=A5=E4=BF=AE?= =?UTF-8?q?=EF=BC=8C=E6=88=91=E7=9A=84=E7=BB=B4=E4=BF=AE=EF=BC=8C=E6=88=91?= =?UTF-8?q?=E7=9A=84=E7=82=B9=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/device.js | 7 + api/mold.js | 7 + api/spareParts.js | 24 +- api/sparePartsApplication.js | 32 + api/sparePartsServiceWorkOrderList.js | 10 + api/spotCheckOrder.js | 2 +- api/upkeepOrder.js | 2 +- components/form/index.vue | 8 +- components/search/index.vue | 5 + .../sparePartsApplicationList/index.vue | 97 --- components/sparePartsCard/index.vue | 114 ---- pages.json | 40 +- pages/deviceReport/addForm.vue | 5 - pages/deviceReport/index.vue | 9 +- pages/deviceReport/myDeviceReport.vue | 31 +- pages/index.vue | 4 +- pages/mine/index.vue | 12 +- pages/overhaulOrder/detail.vue | 6 - pages/repairOrder/detail.vue | 1 - .../index.vue => repairOrder/myOrder.vue} | 54 +- pages/repairOrder/myRepairOrder.vue | 223 ------- pages/spareParts/index.vue | 74 ++- pages/sparePartsApplication/addForm.vue | 597 ++++++++++++----- pages/sparePartsApplication/detail.vue | 210 ++++++ pages/sparePartsApplication/index.vue | 183 ++--- pages/sparePartsApplication/screen.vue | 188 ------ .../addForm.vue | 313 ++++----- .../sparePartsServiceWorkOrderList/index.vue | 88 --- .../sparePartsServiceWorkOrderList/screen.vue | 211 ------ pages/spotCheckOrder/addServiceRecord.vue | 629 ------------------ pages/spotCheckOrder/detail.vue | 487 -------------- .../{myRepairOrder.vue => myOrder.vue} | 102 ++- pages/upkeepOrder/detail.vue | 6 - .../myOrder.vue} | 108 ++- pages/upkeepOrder/myRepairOrder.vue | 223 ------- 35 files changed, 1233 insertions(+), 2879 deletions(-) create mode 100644 api/sparePartsApplication.js create mode 100644 api/sparePartsServiceWorkOrderList.js delete mode 100644 components/sparePartsApplicationList/index.vue delete mode 100644 components/sparePartsCard/index.vue rename pages/{spotCheckOrder/index.vue => repairOrder/myOrder.vue} (81%) delete mode 100644 pages/repairOrder/myRepairOrder.vue create mode 100644 pages/sparePartsApplication/detail.vue delete mode 100644 pages/sparePartsApplication/screen.vue delete mode 100644 pages/sparePartsServiceWorkOrderList/index.vue delete mode 100644 pages/sparePartsServiceWorkOrderList/screen.vue delete mode 100644 pages/spotCheckOrder/addServiceRecord.vue delete mode 100644 pages/spotCheckOrder/detail.vue rename pages/spotCheckOrder/{myRepairOrder.vue => myOrder.vue} (56%) rename pages/{overhaulOrder/myRepairOrder.vue => upkeepOrder/myOrder.vue} (54%) delete mode 100644 pages/upkeepOrder/myRepairOrder.vue diff --git a/api/device.js b/api/device.js index 5a616ff..828b1b0 100644 --- a/api/device.js +++ b/api/device.js @@ -57,3 +57,10 @@ export function getSubList(params) { params }) } +// 新增申领备件时获取备件列表 +export function getApplyDeviceList() { + return request({ + url: '/eam/device-accounts/selectAll', + 'method': 'GET' + }) +} \ No newline at end of file diff --git a/api/mold.js b/api/mold.js index c6254a3..c5ddb6c 100644 --- a/api/mold.js +++ b/api/mold.js @@ -23,3 +23,10 @@ export function moldList(params) { params }) } +// 新增申领备件时获取模具列表 +export function getApplyMoldList() { + return request({ + url: '/eam/item-accounts/selectAll', + 'method': 'GET' + }) +} diff --git a/api/spareParts.js b/api/spareParts.js index 9baa334..4c1d011 100644 --- a/api/spareParts.js +++ b/api/spareParts.js @@ -1,5 +1,12 @@ import request from '@/utils/request' - +// 获取tabs备件列表 +export function getSparePartsPage(params) { + return request({ + url: '/eam/item/getAppPage', + 'method': 'GET', + params + }) +} // 获取备件列表 export function getSparePartsList(params) { return request({ @@ -8,3 +15,18 @@ export function getSparePartsList(params) { params }) } +// 新增申领备件时获取备件列表 +export function getApplySparePartsList() { + return request({ + url: '/eam/item/getApplyList', + 'method': 'GET' + }) +} + +// 新增备件维修获取备件列表 +export function getServiceSparePartsList() { + return request({ + url: '/eam/item/getItemMaintainList', + 'method': 'GET' + }) +} \ No newline at end of file diff --git a/api/sparePartsApplication.js b/api/sparePartsApplication.js new file mode 100644 index 0000000..a27074d --- /dev/null +++ b/api/sparePartsApplication.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +// 备件领用列表 +export function sparePartsApplicationPage(params) { + return request({ + url: '/eam/item-apply-main/getAppPage', + 'method': 'GET', + params + }) +} +// 领用备件 +export function sparePartsApplicationCreate(data) { + return request({ + url: '/eam/item-apply-main/create', + 'method': 'POST', + data + }) +} +// 撤回领用备件 +export function sparePartsApplicationCancle(id) { + return request({ + url: '/eam/item-apply-main/backout?id=' + id, + 'method': 'GET', + }) +} +// 领用备件详情 +export function sparePartsApplicationDetail(number) { + return request({ + url: '/eam/item-apply-main/appGetByNumber?number=' + number, + 'method': 'GET', + }) +} \ No newline at end of file diff --git a/api/sparePartsServiceWorkOrderList.js b/api/sparePartsServiceWorkOrderList.js new file mode 100644 index 0000000..84578ad --- /dev/null +++ b/api/sparePartsServiceWorkOrderList.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 领用备件 +export function sparePartsServiceWorkOrderListCreate(data) { + return request({ + url: '/eam/item-maintenance/create', + 'method': 'POST', + data + }) +} diff --git a/api/spotCheckOrder.js b/api/spotCheckOrder.js index 9f36f77..02d1278 100644 --- a/api/spotCheckOrder.js +++ b/api/spotCheckOrder.js @@ -17,7 +17,7 @@ export function spotCheckOrderUpdate(data) { data }) } -// 报修列表 +// 工单列表 export function spotCheckOrderPage(params) { return request({ url: '/eam/device-spot-inspection-record-main/getAppPage', diff --git a/api/upkeepOrder.js b/api/upkeepOrder.js index 1449ee7..cf7cbb3 100644 --- a/api/upkeepOrder.js +++ b/api/upkeepOrder.js @@ -17,7 +17,7 @@ export function upkeepOrderUpdate(data) { data }) } -// 报修列表 +// 工单列表 export function upkeepOrderPage(params) { return request({ url: '/eam/device-maintain-order-main/getAppPage', diff --git a/components/form/index.vue b/components/form/index.vue index 4920a8e..dc78e5a 100644 --- a/components/form/index.vue +++ b/components/form/index.vue @@ -273,11 +273,11 @@ - - \ No newline at end of file diff --git a/components/sparePartsCard/index.vue b/components/sparePartsCard/index.vue deleted file mode 100644 index 33a3eca..0000000 --- a/components/sparePartsCard/index.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages.json b/pages.json index 2c468ee..69edb03 100644 --- a/pages.json +++ b/pages.json @@ -76,9 +76,9 @@ "navigationBarTextStyle": "white" } },{ - "path": "pages/repairOrder/myRepairOrder", + "path": "pages/repairOrder/myOrder", "style": { - "navigationBarTitleText": "维修工单", + "navigationBarTitleText": "我的维修工单", "navigationStyle": "custom" } },{ @@ -143,9 +143,9 @@ "navigationBarTextStyle": "white" } },{ - "path": "pages/spotCheckOrder/index", + "path": "pages/upkeepOrder/myOrder", "style": { - "navigationBarTitleText": "点检工单", + "navigationBarTitleText": "我的保养工单", "navigationStyle": "custom" } },{ @@ -156,23 +156,43 @@ "navigationBarTextStyle": "white" } },{ - "path": "pages/spotCheckOrder/detail", + "path": "pages/spotCheckOrder/myOrder", + "style": { + "navigationBarTitleText": "我的点检工单", + "navigationStyle": "custom" + } + },{ + "path": "pages/mine/changePassword", + "style": { + "navigationBarTitleText": "修改密码", + "navigationBarBackgroundColor": "#409eff", + "navigationBarTextStyle": "white" + } + },{ + "path": "pages/sparePartsApplication/index", "style": { - "navigationBarTitleText": "点检工单详情", + "navigationBarTitleText": "领用申请", + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } + },{ + "path": "pages/sparePartsApplication/addForm", + "style": { + "navigationBarTitleText": "领用备件", "navigationBarBackgroundColor": "#409eff", "navigationBarTextStyle": "white" } },{ - "path": "pages/spotCheckOrder/addServiceRecord", + "path": "pages/sparePartsApplication/detail", "style": { - "navigationBarTitleText": "添加点检内容", + "navigationBarTitleText": "详情", "navigationBarBackgroundColor": "#409eff", "navigationBarTextStyle": "white" } },{ - "path": "pages/mine/changePassword", + "path": "pages/sparePartsServiceWorkOrderList/addForm", "style": { - "navigationBarTitleText": "修改密码", + "navigationBarTitleText": "添加备件维修工单", "navigationBarBackgroundColor": "#409eff", "navigationBarTextStyle": "white" } diff --git a/pages/deviceReport/addForm.vue b/pages/deviceReport/addForm.vue index 04c6f43..28f23ea 100644 --- a/pages/deviceReport/addForm.vue +++ b/pages/deviceReport/addForm.vue @@ -157,7 +157,6 @@ }, // 重置 reset() { - console.log('表单数据信息1:', this.data); this.form = {} }, selectFormat(val, array) { @@ -177,11 +176,7 @@ }, // 单列模式点击确定之后 chooseSingleColumn(e) { - console.log(e[0]) this.form[this.field] = e[0].value - // if (this.field == 'receiverType') { - // this.type = this.form[this.field] - // } this.singleColumnShow = false this.$emit('singleColumn', this.field, this.form[this.field]) this.$forceUpdate() diff --git a/pages/deviceReport/index.vue b/pages/deviceReport/index.vue index 2cd45d7..2dac7c3 100644 --- a/pages/deviceReport/index.vue +++ b/pages/deviceReport/index.vue @@ -75,11 +75,11 @@ this.$tab.navigateTo(`/pages/deviceReport/addForm?type=${this.params.type}`) }, // 获取设备保修列表 - getList() { + async getList() { if (this.status == 'nomore') return; this.status = 'loading'; this.$modal.loading('加载中') - deviceApi.deviceRepairPage(this.params).then((res) => { + await deviceApi.deviceRepairPage(this.params).then((res) => { this.$modal.closeLoading() if (res.data.list.length > 0) { this.list = this.list.concat(res.data.list); @@ -94,12 +94,13 @@ cancle(item) { this.$modal.confirm('确定撤销报修吗?').then(() => { this.$modal.loading('加载中') - deviceApi.rejected(item.id).then((res) => { + deviceApi.rejected(item.id).then(async (res) => { this.$modal.closeLoading() this.params.pageNo = 1 this.list = [] this.status = 'loadmore' - this.getList() + await this.getList() + this.$modal.showLoading('撤销成功') }) }) diff --git a/pages/deviceReport/myDeviceReport.vue b/pages/deviceReport/myDeviceReport.vue index 3a0ce91..e1b0892 100644 --- a/pages/deviceReport/myDeviceReport.vue +++ b/pages/deviceReport/myDeviceReport.vue @@ -4,7 +4,7 @@ - + @@ -12,25 +12,26 @@ {{item.describes}} - 2023-12-12 08:00:00 + + {{`${$time.formatDate(item.createTime)}`}} 报修单号:{{item.number}} - 设备编号:{{item.deviceNumber}} + {{`${params.type=='DEVICE'?'设备' : '模具'}`}}编号:{{item.deviceNumber}} - 设备名称:{{item.name}} + {{`${params.type=='DEVICE'?'设备' : '模具'}`}}名称:{{item.name}} 所属厂区:{{item.factoryAreaName}} - + - + 点检工单 @@ -111,7 +111,7 @@ - + 维修工单 diff --git a/pages/mine/index.vue b/pages/mine/index.vue index bfa046a..f9667ee 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -36,12 +36,12 @@ 我的维修 - + 我的保养 - + 巡检点检 @@ -117,7 +117,13 @@ this.$tab.navigateTo('/pages/deviceReport/myDeviceReport') }, handleRepairOrder() { - this.$tab.navigateTo('/pages/repairOrder/myRepairOrder') + this.$tab.navigateTo('/pages/repairOrder/myOrder') + }, + handleUpkeepOrder() { + this.$tab.navigateTo('/pages/upkeepOrder/myOrder') + }, + handleSpotCheckOrder() { + this.$tab.navigateTo('/pages/spotCheckOrder/myOrder') }, handleLogout() { this.$modal.confirm('确定注销并退出系统吗?').then(() => { diff --git a/pages/overhaulOrder/detail.vue b/pages/overhaulOrder/detail.vue index 2528f84..03f7776 100644 --- a/pages/overhaulOrder/detail.vue +++ b/pages/overhaulOrder/detail.vue @@ -131,16 +131,10 @@ - - \ No newline at end of file diff --git a/pages/spareParts/index.vue b/pages/spareParts/index.vue index 1ca39dd..c9c716f 100644 --- a/pages/spareParts/index.vue +++ b/pages/spareParts/index.vue @@ -1,10 +1,11 @@ - + - + - {{item.title}} + {{item.name}} - - 2023-12-12 08:00:00 + + {{`${$time.formatDate(item.createTime)}`}} - - {{cur.label}}:{{item[cur.field]}} + + 申请单号:{{item.number}} - + + 申 请 人:{{item.applyName}} + + - - - - - - + + + + + + + + + 撤回 + @@ -38,56 +52,16 @@ \ No newline at end of file diff --git a/pages/sparePartsServiceWorkOrderList/addForm.vue b/pages/sparePartsServiceWorkOrderList/addForm.vue index e0eb165..cd15b50 100644 --- a/pages/sparePartsServiceWorkOrderList/addForm.vue +++ b/pages/sparePartsServiceWorkOrderList/addForm.vue @@ -1,182 +1,168 @@ @@ -258,4 +244,33 @@ } } } + + .right-button { + background: #409eff; + color: white; + padding: 0rpx 30rpx; + border-radius: 16rpx; + text-align: center; + font-size: 28rpx; + } + + .select { + display: flex; + align-items: center; + height: 72rpx; + width: 100%; + + .input { + flex: 1; + font-size: 28rpx; + color: #000000; + } + + .placeholder { + flex: 1; + font-size: 28rpx; + color: rgb(192, 196, 204); + + } + } \ No newline at end of file diff --git a/pages/sparePartsServiceWorkOrderList/index.vue b/pages/sparePartsServiceWorkOrderList/index.vue deleted file mode 100644 index 8fc548e..0000000 --- a/pages/sparePartsServiceWorkOrderList/index.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/sparePartsServiceWorkOrderList/screen.vue b/pages/sparePartsServiceWorkOrderList/screen.vue deleted file mode 100644 index 1f60eb1..0000000 --- a/pages/sparePartsServiceWorkOrderList/screen.vue +++ /dev/null @@ -1,211 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/spotCheckOrder/addServiceRecord.vue b/pages/spotCheckOrder/addServiceRecord.vue deleted file mode 100644 index 5494dd0..0000000 --- a/pages/spotCheckOrder/addServiceRecord.vue +++ /dev/null @@ -1,629 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/spotCheckOrder/detail.vue b/pages/spotCheckOrder/detail.vue deleted file mode 100644 index acfb3da..0000000 --- a/pages/spotCheckOrder/detail.vue +++ /dev/null @@ -1,487 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/spotCheckOrder/myRepairOrder.vue b/pages/spotCheckOrder/myOrder.vue similarity index 56% rename from pages/spotCheckOrder/myRepairOrder.vue rename to pages/spotCheckOrder/myOrder.vue index 13abc12..9bc3bee 100644 --- a/pages/spotCheckOrder/myRepairOrder.vue +++ b/pages/spotCheckOrder/myOrder.vue @@ -1,61 +1,58 @@ - - \ No newline at end of file