From 8a0884619851336c9370ba20456149a746877cd6 Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Wed, 5 Jun 2024 16:42:54 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E5=B7=A5=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 2 +- src/views/produce/data/add-or-updata.vue | 28 +++++----- src/views/produce/data/index.vue | 28 +++++----- src/views/produce/target/add-or-updata.vue | 52 +++++++++---------- src/views/produce/target/detail-or-updata.vue | 50 +++++++++--------- src/views/produce/target/index.vue | 9 ++-- src/views/produce/workOrder/add-or-updata.vue | 38 +++++++++----- 7 files changed, 111 insertions(+), 96 deletions(-) diff --git a/.env.dev b/.env.dev index 85829f4..7b5853c 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: zhp # @Date: 2024-04-28 13:42:51 - # @LastEditTime: 2024-06-04 08:56:35 + # @LastEditTime: 2024-06-05 16:07:26 # @LastEditors: DY # @Description: ### diff --git a/src/views/produce/data/add-or-updata.vue b/src/views/produce/data/add-or-updata.vue index 07bad79..0fa5f84 100644 --- a/src/views/produce/data/add-or-updata.vue +++ b/src/views/produce/data/add-or-updata.vue @@ -1,7 +1,7 @@ @@ -31,11 +31,11 @@ -

芯片产量

+

芯片产量(片)

{{ }}

-

芯片良率

+

芯片良率(%)

{{ dataForm.yieldRate }}

@@ -43,17 +43,17 @@

{{ dataForm.bom }}

-

芯片总功率

+

芯片总功率(MW)

{{ dataForm.totalPower }}

-

FTO投入量

+

FTO投入量(片)

{{ dataForm.chipInput }}

-

CSS稼动率

+

CSS稼动率(%)

{{ dataForm.marriageRate }}

@@ -61,17 +61,17 @@

{{ dataForm.oee }}

-

芯片平均功率

+

芯片平均功率(W)

{{ dataForm.averagePower }}

-

芯片人均产量

+

芯片人均产量(片/人)

{{ dataForm.annualAverageProduction }}

-

芯片产能利用率

+

芯片产能利用率(%)

{{ dataForm.capacityUtilizationRate }}

@@ -85,25 +85,25 @@ -

封装线OEE

+

封装线OEE(%)

-

标准组件良率

+

标准组件良率(%)

-

标准组件产量

+

标准组件产量(片)

-

标准组件总功率

+

标准组件总功率(MW)

{{ }}

-

封装产能利用率

+

封装产能利用率(%)

diff --git a/src/views/produce/data/index.vue b/src/views/produce/data/index.vue index 0727797..b35a05e 100644 --- a/src/views/produce/data/index.vue +++ b/src/views/produce/data/index.vue @@ -1,7 +1,7 @@ @@ -197,7 +197,7 @@ export default { ], tableProps: [ { - prop: 'tableTime', + prop: 'groupTime', label: '日期', minWidth: 100, showOverflowtooltip: true @@ -229,7 +229,7 @@ export default { { prop: 'yieldRate', label: '良品率%', - filter: (val) => val + '%' + filter: (val) => (val * 100) + '%' }, ], tableData: [], @@ -334,17 +334,17 @@ export default { } }, async getDataList() { - // const res = await getProduceDataPage(this.listQuery) - // console.log(res) - // if (res.code === 0) { - // this.tableData = res.data.records - // this.listQuery.total = res.data.total - // if (this.listQuery.total > 0) { - // this.tableData.forEach(item => { - // item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--' - // }) - // } - // } + const res = await getProduceDataPage(this.listQuery) + console.log(res) + if (res.code === 0) { + this.tableData = res.data.records + this.listQuery.total = res.data.total + // if (this.listQuery.total > 0) { + // this.tableData.forEach(item => { + // item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--' + // }) + // } + } // 图表 await prodOutputDataList({ diff --git a/src/views/produce/target/add-or-updata.vue b/src/views/produce/target/add-or-updata.vue index 7ed4835..22b01c2 100644 --- a/src/views/produce/target/add-or-updata.vue +++ b/src/views/produce/target/add-or-updata.vue @@ -1,7 +1,7 @@ @@ -63,12 +63,12 @@ - + - + @@ -78,47 +78,47 @@ - +
- + - + - + - + - + - + - + - + @@ -134,39 +134,39 @@ - + - + - + - + - + - + - + @@ -178,39 +178,39 @@ - + - + - + - + - + - + - + diff --git a/src/views/produce/target/detail-or-updata.vue b/src/views/produce/target/detail-or-updata.vue index f631c5c..954b98b 100644 --- a/src/views/produce/target/detail-or-updata.vue +++ b/src/views/produce/target/detail-or-updata.vue @@ -1,7 +1,7 @@ @@ -31,11 +31,11 @@ -

芯片产量

+

芯片产量(片)

{{ dataForm.chipYield }}

-

芯片良率

+

芯片良率(%)

{{ dataForm.chipYieldRate }}

@@ -43,35 +43,35 @@

{{ dataForm.chipBom }}

-

芯片总功率

+

芯片总功率(MW)

{{ dataForm.chipTotalPower }}

-

{{ ftype === 0 ? 'FTO投入量' : '钼电极投入量' }}

-

{{ ftype === 0 ? dataForm.ftoInput : dataForm.molybdenumElectrodeInput }}

+

{{ ['FTO投入量(片)', '钼电极投入量(片)'][ftype] }}

+

{{ [dataForm.ftoInput, dataForm.molybdenumElectrodeInput][ftype] }}

-

{{ ftype === 0 ? 'CSS稼动率' : 'PID6稼动率' }}

+

{{ ['CSS稼动率(%)', 'PID6稼动率(%)'][ftype] }}

{{ dataForm.chipCssMarriageRate }}

-

芯片段OEE

+

芯片段OEE(%)

{{ dataForm.chipOee }}

-

芯片平均功率

+

芯片平均功率(W)

{{ dataForm.chipAveragePower }}

-

芯片人均产量

+

芯片人均产量(片/人)

{{ dataForm.chipAnnualAverageProduction }}

-

芯片产能利用率

+

芯片产能利用率(%)

{{ dataForm.chipCapacityUtilizationRate }}

@@ -84,33 +84,33 @@

{{ dataForm.componentBom }}

-

封装线OEE

+

封装线OEE(%)

{{ dataForm.componentOee }}

-

标准组件良率

+

标准组件良率(%)

{{ dataForm.componentYieldRate }}

-

标准组件产量

+

标准组件产量(片)

{{ dataForm.componentYield }}

-

标准组件总功率

+

标准组件总功率(MW)

{{ dataForm.componentTotalPower }}

-

封装产能利用率

+

封装产能利用率(%)

{{ dataForm.componentCapacityUtilizationRate }}

-

标准组件人均产量

+

标准组件人均产量(片/人)

{{ dataForm.componentAnnualAverageProduction }}

-

标准组件平均功率

+

标准组件平均功率(W)

{{ dataForm.componentAveragePower }}

@@ -119,33 +119,33 @@ -

产品产量

+

产品产量(㎡)

{{ dataForm.bipvProductOutput }}

-

人均产量

+

人均产量(㎡/人)

{{ dataForm.bipvAnnualAverageProduction }}

-

芯片使用量

+

芯片使用量(片)

{{ dataForm.bipvChipUsage }}

-

芯片利用率

+

芯片利用率(%)

{{ dataForm.bipvChipUtilizationRate }}

-

内部材料成本

+

内部材料成本(元/㎡)

{{ dataForm.bipvInsideMaterialCost }}

-

OEM及委外材料成本

+

OEM及委外材料成本(元/㎡)

{{ dataForm.bipvOeeMaterialCost }}

-

综合材料成本

+

综合材料成本(元/㎡)

{{ dataForm.bipvComprehensiveMaterialCost }}

diff --git a/src/views/produce/target/index.vue b/src/views/produce/target/index.vue index a9984f9..876ef83 100644 --- a/src/views/produce/target/index.vue +++ b/src/views/produce/target/index.vue @@ -1,7 +1,7 @@ @@ -30,7 +30,7 @@ - @@ -565,8 +565,9 @@ export default { }, changeTime() { if (this.listQuery.reportTime) { - const numDays = Number(this.listQuery.reportTime[1]) - Number(this.listQuery.reportTime[0]) - if (numDays > 24) { + const years = Number(this.listQuery.reportTime[1].slice(0, 4)) - Number(this.listQuery.reportTime[0].slice(0, 4)) + const months = Number(this.listQuery.reportTime[1].slice(4)) - Number(this.listQuery.reportTime[0].slice(4)) + if (years * 12 + months > 24) { this.$message({ message: '时间范围不能超过24个月', type: 'warning' diff --git a/src/views/produce/workOrder/add-or-updata.vue b/src/views/produce/workOrder/add-or-updata.vue index a24652e..6163dba 100644 --- a/src/views/produce/workOrder/add-or-updata.vue +++ b/src/views/produce/workOrder/add-or-updata.vue @@ -1,7 +1,7 @@ @@ -94,7 +94,7 @@ // import basicAdd from './basic-add'; import * as echarts from 'echarts' import resize from '@/mixins/resize' -import { getWorkOrderDetail, getEqNum, getDailyTrend } from '@/api/produceData/order'; +import { getWorkOrderDetail } from '@/api/produceData/order'; import SmallTitle from './SmallTitle'; import jsPDF from 'jspdf'; import html2canvas from 'html2canvas'; @@ -167,19 +167,33 @@ export default { }) if (id) { getWorkOrderDetail(id).then(res => { - this.dataForm = res.data - this.buildChart(this.dataForm) - if (this.dataForm.orderStatus === 1) { - this.trend() - } - }) - getEqNum(id).then(response => { - if (response.code === 0) { - const xAxisList = Object.keys(response.data) - const yAxisList = Object.values(response.data) + if (res.code === 0) { + this.dataForm = res.data.prodWorkOrderDO + this.buildChart(this.dataForm) + // 在制品 + const xAxisList = Object.keys(res.data.inProcessDis) + const yAxisList = Object.values(res.data.inProcessDis) this.initEqLineChart(xAxisList, yAxisList) + // 趋势图 + const seriesList = [] + const dateList = [] + res.data.his.forEach(element => { + seriesList.push(element.actualProduction) + dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2]) + }) + this.initLineChart(dateList, seriesList) } + // if (this.dataForm.orderStatus === 1) { + // this.trend() + // } }) + // getEqNum(id).then(response => { + // if (response.code === 0) { + // const xAxisList = Object.keys(response.data) + // const yAxisList = Object.values(response.data) + // this.initEqLineChart(xAxisList, yAxisList) + // } + // }) } }, -- 2.45.2