From c3a182e723340cf02f9ff070426b8f62976386fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 18 Apr 2024 10:39:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/api/board/index.js | 2 +- hw-ui/src/views/board/firstFloor/index.vue | 390 ++++++--------------- 2 files changed, 99 insertions(+), 293 deletions(-) diff --git a/hw-ui/src/api/board/index.js b/hw-ui/src/api/board/index.js index 55c0b079..8755f950 100644 --- a/hw-ui/src/api/board/index.js +++ b/hw-ui/src/api/board/index.js @@ -234,7 +234,7 @@ export function assignTask(data) { // 查询物料安装情况 export function selectMaterialInstallationCircumstance(query) { return request({ - url: '/api/selectMaterialInstallationCircumstance', + url: '/mes/api/selectMaterialInstallationCircumstance', method: 'get', params: query }) diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue index af52d54f..65a7068e 100644 --- a/hw-ui/src/views/board/firstFloor/index.vue +++ b/hw-ui/src/views/board/firstFloor/index.vue @@ -89,7 +89,6 @@ -
@@ -105,7 +104,7 @@
- - - - - - - - - -
@@ -192,11 +149,14 @@
- +
- +
@@ -295,7 +255,7 @@
- - - - - - - - - -
- +
- +
@@ -648,6 +566,7 @@ export default { }, data() { return { + info: {}, fileList: [], SOPModel: false, pictureDetailModel: false, @@ -665,6 +584,7 @@ export default { totalNum3: 0, nowNum4: 1, totalNum4: 0, + materialBomId:null, planId: null, nowMaterial: null, vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100, @@ -674,6 +594,8 @@ export default { dialogVisible: false, tableData: [], tableData1: [], + tableData2: [], + tableData3: [], productInstockVisible: false, productInstockForm: { @@ -712,185 +634,25 @@ export default { } }, mounted() { - setInterval(() => { - this.$notify.info({ - title: '通知', - message: '通知公告', - position: 'bottom-right', - duration: 0 - }); - }, 60 * 1000) + // setInterval(() => { + // this.$notify.info({ + // title: '通知', + // message: '通知公告', + // position: 'bottom-right', + // duration: 0 + // }); + // }, 60 * 1000) getProductPlans({pageNum: 1, pageSize: 5}).then(e => { this.tableData = e.rows this.totalNum1 = Math.ceil(e.total / 5) this.nowMaterial = e.rows?.[0]?.materialName + this.materialBomId = e.rows?.[0]?.materialBomId getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => { this.tableData1 = res.rows - this.totalNum2 = Math.ceil(res.total / 5) + this.totalNum3 = Math.ceil(res.total / 5) + this.$refs.table.setCurrentRow(res.rows[0]); }) }) - this.$refs.chart2.setData({ - tooltip: { - trigger: 'axis', - axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - } - }, - grid: { - left: '0', - right: '4%', - bottom: '0', - top: 20, - containLabel: true - }, - xAxis: { - type: 'category', - data: [1, 2, 3, 4, 5, 6], - axisLine: { - lineStyle: { - color: 'white' - } - }, - axisLabel: { - // interval: 0, - // rotate: 40, - textStyle: { - fontFamily: 'Microsoft YaHei' - } - } - }, - - yAxis: { - type: 'value', - axisLine: { - show: false, - lineStyle: { - color: 'white' - } - }, - splitLine: { - show: false - }, - axisLabel: {} - }, - series: [ - { - name: '数量', - label: { - normal: { - show: true, - position: 'top', - textStyle: { - color: '#a8aab0', - fontStyle: 'normal', - fontFamily: '微软雅黑', - fontSize: 0.75 * vw - } - } - }, - type: 'bar', - barWidth: '30%', - barMaxWidth: 50, - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: '#39ffff' - }, - { - offset: 1, - color: '#5affa6' - } - ]) - } - }, - data: [1, 2, 3, 4, 5, 6] - } - ] - }) - this.$refs.chart4.setData({ - tooltip: { - trigger: 'axis', - axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - } - }, - grid: { - left: '0', - right: '4%', - bottom: '0', - top: 20, - containLabel: true - }, - xAxis: { - type: 'category', - data: [1, 2, 3, 4, 5, 6], - axisLine: { - lineStyle: { - color: 'white' - } - }, - axisLabel: { - // interval: 0, - // rotate: 40, - textStyle: { - fontFamily: 'Microsoft YaHei' - } - } - }, - - yAxis: { - type: 'value', - axisLine: { - show: false, - lineStyle: { - color: 'white' - } - }, - splitLine: { - show: false - }, - axisLabel: {} - }, - series: [ - { - name: '数量', - label: { - normal: { - show: true, - position: 'top', - textStyle: { - color: '#a8aab0', - fontStyle: 'normal', - fontFamily: '微软雅黑', - fontSize: 0.75 * vw - } - } - }, - type: 'bar', - barWidth: '30%', - barMaxWidth: 50, - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: '#39ffff' - }, - { - offset: 1, - color: '#5affa6' - } - ]) - } - }, - data: [1, 2, 3, 4, 5, 6] - } - ] - }) }, methods: { @@ -922,16 +684,26 @@ export default { }, next2() { this.nowNum2 += 1 - getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => { - this.tableData1 = res.rows - this.totalNum2 = Math.ceil(res.total / 5) + selectMaterialInstallationCircumstance({ + installType: 1, + planDetailId: this.info.planDetailId, + pageNum: this.nowNum2, + pageSize: 5 + }).then(v => { + this.tableData2 = v.rows + this.totalNum2 = Math.ceil(v.total / 5) }) }, pre2() { this.nowNum2 -= 1 - getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => { - this.tableData1 = res.rows - this.totalNum2 = Math.ceil(res.total / 5) + selectMaterialInstallationCircumstance({ + installType: 1, + planDetailId: this.info.planDetailId, + pageNum: this.nowNum2, + pageSize: 5 + }).then(v => { + this.tableData2 = v.rows + this.totalNum2 = Math.ceil(v.total / 5) }) }, next3() { @@ -950,16 +722,28 @@ export default { }, next4() { this.nowNum4 += 1 - getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => { - this.tableData1 = res.rows - this.totalNum4 = Math.ceil(res.total / 5) + selectMaterialInstallationCircumstance({ + installType: 2, + materialBomId: this.materialBomId, + planDetailId: this.info.planDetailId, + pageNum: this.nowNum4, + pageSize: 5 + }).then(v => { + this.tableData3 = v.rows + this.totalNum4 = Math.ceil(v.total / 5) }) }, pre4() { this.nowNum4 -= 1 - getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => { - this.tableData1 = res.rows - this.totalNum4 = Math.ceil(res.total / 5) + selectMaterialInstallationCircumstance({ + installType: 2, + materialBomId: this.materialBomId, + planDetailId: this.info.planDetailId, + pageNum: this.nowNum4, + pageSize: 5 + }).then(v => { + this.tableData3 = v.rows + this.totalNum4 = Math.ceil(v.total / 5) }) }, // 开始/继续计划 @@ -1016,8 +800,9 @@ export default { // 生成/获取明细 async getDetail(e) { this.planId = e.row.planId + this.materialBomId = e.row.materialBomId this.nowMaterial = e.row.materialName - this.nowNum2 = 1 + this.nowNum3 = 1 await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => { if (res.rows.length === 0) { this.$confirm('是否生成计划明细', '确认', { @@ -1028,9 +813,10 @@ export default { insertProductPlanDetails({ "planId": e.row.planId, }).then(val => { - getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: e.row.planId}).then(res => { + getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: e.row.planId}).then(res => { this.tableData1 = res.rows - this.totalNum2 = Math.ceil(res.total / 5) + this.totalNum3 = Math.ceil(res.total / 5) + this.$refs.table.setCurrentRow(res.rows[0]); }) this.$message({ type: 'info', @@ -1046,17 +832,36 @@ export default { }) } else { this.tableData1 = res.rows - this.totalNum2 = Math.ceil(res.total / 5) + this.$refs.table.setCurrentRow(res.rows[0]); + this.totalNum3 = Math.ceil(res.total / 5) } }) + }, + async getMaterialInstall(e){ + this.info = e + this.nowNum2 = 1 + this.nowNum4 = 1 const table1 = await selectMaterialInstallationCircumstance({ - installType:1, - planDetailId:e.row.planDetailId, - materialBomId:e.row.materialBomId + installType: 1, + planDetailId: e.planDetailId, + pageNum: this.nowNum2, + pageSize: 5 }) - console.log(table1) + const table2 = await selectMaterialInstallationCircumstance({ + installType: 2, + materialBomId: this.materialBomId, + planDetailId: e.planDetailId, + pageNum: this.nowNum4, + pageSize: 5 + }) + this.tableData2 = table1.rows + this.tableData3 = table2.rows + this.totalNum2 = Math.ceil(table1.total / 5) + this.totalNum4 = Math.ceil(table2.total / 5) }, + + // 领料页面 getMaterials(val) { this.searchMaterialValue = '' @@ -1079,8 +884,6 @@ export default { }) }, - - // 申请领料 receiveMaterial() { applyRawOutstock(this.form).then(e => { @@ -1341,6 +1144,9 @@ export default { /deep/ .el-table .cell { color: #fff } + /deep/ .current-row .cell { + color: #000 + } /deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { background-color: #fff0;