From 20135fc03175259e6e11c2e7edf04ad91e4f1247 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 26 May 2023 19:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E4=BA=92=20=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 2 +- src/components/alert.vue | 2 +- src/config/getData2.js | 5 + src/pages/modules/workorder/index.vue | 78 ++++++++++++--- .../workorder/work-order-assignment.vue | 96 ++++++++++++++++--- .../modules/workorder/work-order-query.vue | 10 +- .../modules/workorder/work-report-query.vue | 14 +-- src/style/layout.styl | 55 ++++++++++- src/style/mixin.styl | 3 +- 9 files changed, 223 insertions(+), 42 deletions(-) diff --git a/config/index.js b/config/index.js index 50c0140..9f211a9 100644 --- a/config/index.js +++ b/config/index.js @@ -13,7 +13,7 @@ module.exports = { proxyTable: {}, // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST + host: '0.0.0.0', // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, diff --git a/src/components/alert.vue b/src/components/alert.vue index 4cc8568..bf7a9a4 100644 --- a/src/components/alert.vue +++ b/src/components/alert.vue @@ -111,6 +111,6 @@ export default { width 100% height .5rem line-height .5rem - color #e74f1a + color #fff background-color #2778f3 diff --git a/src/config/getData2.js b/src/config/getData2.js index c887fa2..33a8f59 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -17,6 +17,11 @@ export const getTable = (code, val, d1, d2) => post('api/produceshiftorder/getOr realproducestart_date: d1, realproduceend_date: d2 }) +// export const getTable = (code, val, d1, d2) => { +// let res = {'totalElements': 2, 'content': [{'material_weight': 0.000000, 'down_id': '1', 'down_time': '2023-05-26 10:32:16.706', 'plan_qty': 111, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 10:37:00', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 11:07:20', 'workorder_status': '5', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661923147433250817', 'create_time': '2023-05-26 10:32:10', 'workorder_code': '230526007', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}, {'material_weight': 1.000000, 'down_id': '1', 'down_time': '2023-05-26 14:06:24.182', 'plan_qty': 1234, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 14:11:28', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 14:52:54', 'workorder_status': '5', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661976821887012864', 'create_time': '2023-05-26 14:05:27', 'workorder_code': '230526010', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}], 'code': 200, 'msg': '查询成功'} + +// return res +// } // 3.设备开工 export const openStart = (id, code) => post('api/produceshiftorder/openStart', { diff --git a/src/pages/modules/workorder/index.vue b/src/pages/modules/workorder/index.vue index c4a263c..e823042 100644 --- a/src/pages/modules/workorder/index.vue +++ b/src/pages/modules/workorder/index.vue @@ -1,17 +1,34 @@ @@ -82,7 +109,24 @@ export default { disabled3: false, dataList: [], pkId: '', - pkObj: {} + pkObj: {}, + title: '', + type: '', + reportQty: '', + nokQty: '', + repareQty: '' + } + }, + watch: { + type (val) { + switch (val) { + case '1': + this.title = '请输入数量' + break + case '2': + this.title = '提示' + break + } } }, created () { @@ -127,6 +171,7 @@ export default { }, // 报工 async _saveReport () { + this.$refs.child.disabled = true this.disabled2 = true if (!this.pkId) { this.toast('请选择一行') @@ -134,22 +179,36 @@ export default { return } try { - let res = await saveReport(this.pkId, this.pkObj.report_qty, this.pkObj.nok_qty, this.pkObj.repare_qty) + let res = await saveReport(this.pkId, this.reportQty, this.nokQty, this.repareQty) this.toast(res.message) this.disabled2 = false this.pkId = '' this.pkObj = {} + this.$refs.child.active = false + this.$refs.child.disabled = false this.getDatas() } catch (e) { this.disabled2 = false + this.$refs.child.active = false + this.$refs.child.disabled = false } }, - showDialog () { + showDialog (type) { + this.type = type if (!this.pkId) { this.toast('请选择一行') return } this.$refs.child.active = true + switch (type) { + case '1': + this.reportQty = '' + this.nokQty = '' + this.repareQty = '' + break + case '2': + break + } }, // 完工 async _tofinish () { @@ -159,6 +218,8 @@ export default { let res = await tofinish(this.pkObj) this.toast(res.message) this.disabled3 = false + this.pkId = '' + this.pkObj = {} this.$refs.child.active = false this.$refs.child.disabled = false this.getDatas() @@ -168,8 +229,15 @@ export default { this.$refs.child.disabled = false } }, - toSureDialog () { - this._tofinish() + toSureDialog (type) { + switch (type) { + case '1': + this._saveReport() + break + case '2': + this._tofinish() + break + } }, toRadio (e) { this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id diff --git a/src/pages/modules/workorder/work-order-query.vue b/src/pages/modules/workorder/work-order-query.vue index de20064..42ea506 100644 --- a/src/pages/modules/workorder/work-order-query.vue +++ b/src/pages/modules/workorder/work-order-query.vue @@ -17,7 +17,7 @@
设备
- + 工单日期 工单号 - 设备 - 状态 + 设备 + 状态 物料名称 - 工序 + 物料规格 + 工序 工单数量 实际数量 报废数量 @@ -61,6 +62,7 @@ {{e.device_code}} {{['创建','下发','生产中','暂停', '完成'][Number(e.workorder_status) - 1]}} {{ e.material_name }} + {{e.material_spec}} {{e.workprocedure_name}} {{e.plan_qty}} {{ e.real_qty }} diff --git a/src/pages/modules/workorder/work-report-query.vue b/src/pages/modules/workorder/work-report-query.vue index c38bb67..1f0f4e7 100644 --- a/src/pages/modules/workorder/work-report-query.vue +++ b/src/pages/modules/workorder/work-report-query.vue @@ -17,7 +17,7 @@
设备
- + 工单号 设备 顺序号 - 班次 + 班次 物料名称 + 物料规格 开始时间 结束时间 电气数量 - 上报合格数 - 上报报废数 - 上报报修数 + 上报合格数 + 上报报废数 + 上报报修数 操作工 状态 @@ -68,6 +69,7 @@ {{e.seq_number}} {{e.shift_type_scode}} {{e.material_name}} + {{e.material_spec}} {{e.operatetime_start}} {{e.operatetime_end}} {{ e.dq_report_qty }} @@ -128,7 +130,7 @@ export default { workorder: '', disabled1: false, disabled2: false, - dataList: [{macoperate_id: '1'}], + dataList: [], pkId: '', pkObj: {}, reportQty: '', diff --git a/src/style/layout.styl b/src/style/layout.styl index 42e73f4..e9a9432 100644 --- a/src/style/layout.styl +++ b/src/style/layout.styl @@ -129,8 +129,8 @@ font-size: 14px; border-radius: 4px; .button--primary - background-color #008f8f - border-color #008f8f + background-color #409EFF + border-color #409EFF .button--defalut color #fff border 1px solid #c9c9c9 @@ -365,4 +365,53 @@ input::-webkit-input-placeholder outline: none; padding: 0 15px; transition: border-color .2s cubic-bezier(.645,.045,.355,1); - width: 100%; \ No newline at end of file + width: 100%; + +.overall_orange + background linear-gradient(#ff7a31 0%,#ff6b00 20%,#ff5200 100%) + .body-container + border-color $orange !important + .tabs li a + border-color #ffbb31 !important + .tabs li .router-link-active + background linear-gradient(#f5e24a 0%,#ffbb31 100%) !important + .button--primary + background-color #fff + border-color $red + color $red + .button--defalut + color: #fff; + border-color #c9c9c9 + background-color: #c9c9c9; + .selected_icon + background-color: #fff; + color: $red + .filter-table + border-color #fff + th, td + border-color #fff +.overall_lightgreen + background linear-gradient(#00d9a1 0%,#00c0a5 30%,#115fae 100%) + .body-container + border-color $lightgreen !important + .tabs li a + border-color #008f8f !important + .tabs li .router-link-active + background linear-gradient(#b7e15d 0%,#008f8f 100%) !important + .button--primary + background-color #008f8f + border-color #008f8f + color #fff + .button--defalut + color: #fff; + border-color #c9c9c9; + background-color: #c9c9c9; + .selected_icon + background-color: #fff; + color: #008f8f + .filter-table + border-color #fff + th, td + border-color #fff +.overall_blue + background linear-gradient(#031f6d 0%,#011a60 20%,#060346 100%) \ No newline at end of file diff --git a/src/style/mixin.styl b/src/style/mixin.styl index 99fbda5..8f996b9 100644 --- a/src/style/mixin.styl +++ b/src/style/mixin.styl @@ -9,7 +9,8 @@ $gray = #c9c9c9 $gray1 = #8B90A6 $gray2 = #DFE1E6 $fc1 = #323232 - +$orange = #ffa530 +$lightgreen = #b7e15d //宽高