生产管理

This commit is contained in:
helloDy 2024-05-22 16:28:47 +08:00
parent 2061384d96
commit fe39f72045
9 changed files with 275 additions and 204 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: zhp # @Author: zhp
# @Date: 2024-04-28 13:42:51 # @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-05-20 14:56:40 # @LastEditTime: 2024-05-21 09:39:07
# @LastEditors: DY # @LastEditors: DY
# @Description: # @Description:
### ###
@ -12,8 +12,8 @@ ENV = 'development'
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 芋道管理系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.61:48080' # VUE_APP_BASE_API = 'http://192.168.1.61:48080'
# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
# #
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 08:54:59 * @Date: 2024-05-07 08:54:59
* @LastEditTime: 2024-05-20 14:56:56 * @LastEditTime: 2024-05-20 16:24:15
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -105,6 +105,24 @@ export function delTarget(id) {
}) })
} }
// 导入铜铟镓硒工厂
export function importToTarget(data) {
return request({
url: '/ip/prod-target/to-target-import-excel',
method: 'post',
data
})
}
// 导入碲化镉工厂
export function importDiTarget(data) {
return request({
url: '/ip/prod-target/di-target-import-excel',
method: 'post',
data
})
}
// export function cockpitDataMonitor(data) { // export function cockpitDataMonitor(data) {
// return request({ // return request({
// url: '/ip/prod-output/cockpitDataMonitor', // url: '/ip/prod-output/cockpitDataMonitor',

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-05-13 15:43:45 * @LastEditTime: 2024-05-20 18:02:10
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -111,7 +111,7 @@
<!-- <p class="text">{{ dataForm.productName }}</p> --> <!-- <p class="text">{{ dataForm.productName }}</p> -->
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件人均产量</p> <p class="title">标准组件平均功率</p>
<!-- <p class="text">{{ dataForm.productName }}</p> --> <!-- <p class="text">{{ dataForm.productName }}</p> -->
</el-col> </el-col>
</el-row> </el-row>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-05-16 14:15:46 * @LastEditTime: 2024-05-22 15:25:11
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -15,7 +15,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 0" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator=""
start-placeholder="开始日期" value-format="timestamp" @change="changeDayTime" end-placeholder="结束日期"> start-placeholder="开始日期" value-format="timestamp" @change="changeDayTime" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
@ -38,11 +38,11 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" value-format="timestamp" type="year" <el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year"
placeholder="开始时间"> placeholder="开始时间">
</el-date-picker> </el-date-picker>
~ ~
<el-date-picker size="small" clearable v-model="listQuery.end" value-format="timestamp" type="year" placeholder="结束时间" <el-date-picker size="small" clearable v-model="listQuery.end" format="yyyy-MM-dd" value-format="timestamp" type="year" placeholder="结束时间"
@change="getYear"> @change="getYear">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -132,7 +132,9 @@ export default {
// reportType: 2, // reportType: 2,
beginTime: undefined, beginTime: undefined,
endTime:undefined, endTime:undefined,
reportTime: [] reportTime: [],
start: undefined,
end: undefined
}, },
detailOrUpdateVisible:false, detailOrUpdateVisible:false,
date1: undefined, date1: undefined,
@ -283,19 +285,18 @@ export default {
}, },
], ],
tableData: [], tableData: [],
xAxis: []
// proLineList: [], // proLineList: [],
// all: {} // all: {}
}; };
}, },
computed: { computed: {
weekNum() { weekNum() {
return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1 return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
}, },
}, },
mounted() { mounted() {
this.getDict() this.getDataList()
// this.getCurrentYearFirst()
// this.getDataList()
}, },
methods: { methods: {
otherMethods(val) { otherMethods(val) {
@ -309,25 +310,27 @@ export default {
// }, // },
getYear(e) { getYear(e) {
if (this.listQuery.reportTime[1] - this.listQuery.reportTime[0] > 10*365*24*60*60*1000) { if (this.listQuery.end - this.listQuery.start > 10*365*24*60*60*1000) {
this.$message({ this.$message({
message: '年份起止时间不能超过十年', message: '年份起止时间不能超过十年',
type: 'warning' type: 'warning'
}); });
this.listQuery.reportTime = [] this.listQuery.reportTime = []
this.listQuery.start = undefined
this.listQuery.end = undefined
// console.log(); // console.log();
} else { } else {
this.listQuery.beginTime = this.listQuery.reportTime[0] this.listQuery.beginTime = this.listQuery.start
this.listQuery.endTime = this.listQuery.reportTime[1] this.listQuery.endTime = this.listQuery.end
} }
// console.log(e); // console.log(e);
}, },
onValueChange(picker, k) { // k onValueChange(picker, k) { // k
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1]) // console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
if (this.listQuery.reportTime[0] && this.listQuery.reportTime[1]) { if (this.listQuery.start && this.listQuery.end) {
console.log(this.listQuery.reportTime) console.log(this.listQuery.reportTime)
this.date1 = moment(this.listQuery.reportTime[0].getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
this.date2 = moment(this.listQuery.reportTime[1].getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000); const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
if (numDays > 168) { if (numDays > 168) {
console.log(numDays) console.log(numDays)
@ -336,8 +339,8 @@ export default {
type: 'warning' type: 'warning'
}); });
} else { } else {
this.listQuery.beginTime = this.listQuery.reportTime[0].getTime() - 24 * 60 * 60 * 1000 this.listQuery.beginTime = this.listQuery.start.getTime() - 24 * 60 * 60 * 1000
this.listQuery.endTime = this.listQuery.reportTime[1].getTime() + 5 * 24 * 60 * 60 * 1000 this.listQuery.endTime = this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000
} }
} }
}, },
@ -377,12 +380,11 @@ export default {
console.log(this.listQuery.reportTime[0]) console.log(this.listQuery.reportTime[0])
} }
}, },
async getDict() { // async getDict() {
this.$refs.lineChart.initChart()
// 线 // 线
// const res = await getCorePLList(); // const res = await getCorePLList();
// this.proLineList = res.data; // this.proLineList = res.data;
}, // },
// //
multipliedByHundred(str) { multipliedByHundred(str) {
console.log(str); console.log(str);
@ -411,32 +413,42 @@ export default {
console.log(res) console.log(res)
this.tableData = res.data.records this.tableData = res.data.records
this.tableData.forEach(item => { this.tableData.forEach(item => {
item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '' + item.reportDate[1] + '' + item.reportDate[2] + '日' : '--' item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--'
}) })
this.listQuery.total = res.data.total this.listQuery.total = res.data.total
this.buildChart(this.tableData)
}, },
add0(m) { buildChart(list) {
return m < 10 ? '0' + m : m const chartList = Object.groupBy(list, (item) => item.tableTime)
this.xAxis = []
this.seriesList = []
for (const keyIndex in chartList) {
// X
this.xAxis.push(keyIndex)
}
// y
for (const y of this.factoryList) {
// y: {name: , id: }
const seriesItem = {
name: y.name,
type: 'bar',
emphasis: {
focus: 'series'
}, },
format(shijianchuo) { data: Array(this.xAxis.length).fill(0)
//shijianchuoparseInt }
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss') for (const a in chartList) {
// console.log(time) for (const z of chartList[a]) {
// var y = time.getFullYear(); this.xAxis.forEach((item, index) => {
// var m = time.getMonth() + 1; if (z.factory === y.id && a === item) {
// var d = time.getDate(); seriesItem.data[index] = z.goodNumber
// var h = time.getHours(); }
// var mm = time.getMinutes(); })
// var s = time.getSeconds(); }
return time }
}, this.seriesList.push(seriesItem)
//yy-mm-dd hh:mm:ss }
timeFun(unixtimestamp) { this.$refs.lineChart.initChart(this.xAxis, this.seriesList)
var unixtimestamp = new Date(unixtimestamp);
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
}, },
buttonClick(val) { buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined; this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2022-01-21 14:43:06 * @Date: 2022-01-21 14:43:06
* @LastEditors: zhp * @LastEditors: DY
* @LastEditTime: 2024-04-17 10:03:39 * @LastEditTime: 2024-05-22 13:48:58
* @Description: * @Description:
--> -->
<template> <template>
@ -58,11 +58,11 @@ export default {
chart: null chart: null
} }
}, },
mounted() { // mounted() {
this.$nextTick(() => { // this.$nextTick(() => {
this.initChart() // this.initChart()
}) // })
}, // },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
@ -71,8 +71,7 @@ export default {
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart(xAxis, seriesList) {
console.log(1111)
this.chart = echarts.init(document.getElementById(this.id)) this.chart = echarts.init(document.getElementById(this.id))
console.log(this.$parent); console.log(this.$parent);
this.chart.setOption({ this.chart.setOption({
@ -85,7 +84,7 @@ export default {
}, },
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true }, grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
legend: { legend: {
data: ['工厂1', '工厂2'], // data: ['1', '2'],
right: '90px', right: '90px',
top: '0%', top: '0%',
icon: 'rect', icon: 'rect',
@ -107,7 +106,7 @@ export default {
{ {
type: 'category', type: 'category',
// prettier-ignore // prettier-ignore
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] data: xAxis
} }
], ],
yAxis: [ yAxis: [
@ -122,39 +121,8 @@ export default {
bottom: "1%", bottom: "1%",
containLabel: true containLabel: true
}, },
series: [ series: seriesList
{ }, true)
name: '工厂1',
type: 'bar',
itemStyle: {
normal: {
color: 'rgba(99, 189, 255, 1)', //线
lineStyle: {
color: 'rgba(99, 189, 255, 1)' //线
}
}
},
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
],
},
{
name: '工厂2',
type: 'bar',
itemStyle: {
normal: {
color: 'rgba(142, 240, 171, 1)', //线
lineStyle: {
color: 'rgba(142, 240, 171, 1)' //线
}
}
},
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
],
},
]
})
} }
} }
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-17 16:31:51 * @Date: 2024-04-17 16:31:51
* @LastEditTime: 2024-05-17 14:48:57 * @LastEditTime: 2024-05-20 18:09:09
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -75,14 +75,20 @@
</el-row> </el-row>
<el-row :gutter="24" style="padding: 0 32px;"> <el-row :gutter="24" style="padding: 0 32px;">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="FTO投入量" prop="ftoInput"> <el-form-item v-if="ftype === 0" label="FTO投入量" prop="ftoInput">
<el-input-number v-model="dataForm.ftoInput" :precision="0" controls-position="right" placeholder="请输入FTO投入量" style="width: 100%" /> <el-input-number v-model="dataForm.ftoInput" :precision="0" controls-position="right" placeholder="请输入FTO投入量" style="width: 100%" />
</el-form-item> </el-form-item>
<el-form-item v-else label="钼电极投入量" prop="molybdenumElectrodeInput">
<el-input-number v-model="dataForm.molybdenumElectrodeInput" :precision="0" controls-position="right" placeholder="请输入钼电极投入量" style="width: 100%" />
</el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="CSS稼动率" prop="chipCssMarriageRate"> <el-form-item v-if="ftype === 0" label="CSS稼动率" prop="chipCssMarriageRate">
<el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入CSS稼动率" style="width: 100%" /> <el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入CSS稼动率" style="width: 100%" />
</el-form-item> </el-form-item>
<el-form-item v-else label="PID6稼动率" prop="chipCssMarriageRate">
<el-input-number v-model="dataForm.chipCssMarriageRate" :precision="2" controls-position="right" placeholder="请输入PID6稼动率" style="width: 100%" />
</el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="芯片段OEE" prop="chipOee"> <el-form-item label="芯片段OEE" prop="chipOee">
@ -316,7 +322,8 @@ export default {
bipvChipUtilizationRate: undefined, bipvChipUtilizationRate: undefined,
bipvInsideMaterialCost: undefined, bipvInsideMaterialCost: undefined,
bipvOeeMaterialCost: undefined, bipvOeeMaterialCost: undefined,
bipvComprehensiveMaterialCost: undefined bipvComprehensiveMaterialCost: undefined,
molybdenumElectrodeInput: undefined
}, },
// materialList: [], // materialList: [],
dataRule: { dataRule: {
@ -330,7 +337,6 @@ export default {
}; };
}, },
mounted() { mounted() {
this.dataForm.factoryType = this.ftype
// this.getCurrentTime() // this.getCurrentTime()
}, },
methods: { methods: {
@ -388,6 +394,7 @@ export default {
}, },
init(id) { init(id) {
this.dataForm.id = id || undefined this.dataForm.id = id || undefined
this.dataForm.factoryType = this.ftype
this.visible = true this.visible = true
if (this.dataForm.id) { if (this.dataForm.id) {
getProduceTargetDetail(this.dataForm.id).then(res => { getProduceTargetDetail(this.dataForm.id).then(res => {

View File

@ -1,28 +1,28 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-04-17 16:40:01 * @LastEditTime: 2024-05-22 15:29:18
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer class="drawer" :visible.sync="visible" size="50%"> <el-drawer class="drawer" :visible.sync="visible" size="58%" @closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ '碲化镉工厂生产数据详情' }} {{ ftype === 0 ? '碲化镉工厂生产数据详情' : '铜铟镓硒工厂生产数据详情' }}
</small-title> </small-title>
<div class="detailBox"> <div class="detailBox">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<p class="title">工厂名称</p> <p class="title">工厂名称</p>
<p class="text">{{ }}</p> <p class="text">{{ factoryList[dataForm.factory] }}</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<p class="title">时间维度</p> <p class="title">时间维度</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.targetType === 0 ? '月' : '年' }}</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<p class="title">时间</p> <p class="title">时间</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.targetType === 1 ? dataForm.targetYear + '年' : dataForm.targetYear + '年' + dataForm.targetMonth + '月'}}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
@ -32,47 +32,47 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片产量</p> <p class="title">芯片产量</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.chipYield }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片良率</p> <p class="title">芯片良率</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.chipYieldRate }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片良率</p> <p class="title">芯片BOM</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.chipBom }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片总功率</p> <p class="title">芯片总功率</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.chipTotalPower }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">FTO投入量</p> <p class="title">{{ ftype === 0 ? 'FTO投入量' : '钼电极投入量' }}</p>
<p class="text">{{ }}</p> <p class="text">{{ ftype === 0 ? dataForm.ftoInput : dataForm.molybdenumElectrodeInput }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">CSS稼动率</p> <p class="title">{{ ftype === 0 ? 'CSS稼动率' : 'PID6稼动率' }}</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.chipCssMarriageRate }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片段OEE</p> <p class="title">芯片段OEE</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.chipOee }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片平均功率</p> <p class="title">芯片平均功率</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.chipAveragePower }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片人均产量</p> <p class="title">芯片人均产量</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.chipAnnualAverageProduction }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片产能利用率</p> <p class="title">芯片产能利用率</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.chipCapacityUtilizationRate }}</p>
</el-col> </el-col>
</el-row> </el-row>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
@ -81,37 +81,37 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">封装BOM</p> <p class="title">封装BOM</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.componentBom }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">封装线OEE</p> <p class="title">封装线OEE</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.componentOee }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件良率</p> <p class="title">标准组件良率</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.componentYieldRate }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件产量</p> <p class="title">标准组件产量</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.componentYield }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件总功率</p> <p class="title">标准组件总功率</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.componentTotalPower }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">封装产能利用率</p> <p class="title">封装产能利用率</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.componentCapacityUtilizationRate }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件人均产量</p> <p class="title">标准组件人均产量</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.componentAnnualAverageProduction }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">标准组件人均产量</p> <p class="title">标准组件平均功率</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col> </el-col>
</el-row> </el-row>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
@ -120,33 +120,33 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">产品产量</p> <p class="title">产品产量</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.bipvProductOutput }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">人均产量</p> <p class="title">人均产量</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.bipvAnnualAverageProduction }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片使用量</p> <p class="title">芯片使用量</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.bipvChipUsage }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">芯片使用量</p> <p class="title">芯片利用率</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.bipvChipUtilizationRate }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">内部材料成本</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.bipvInsideMaterialCost }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">OEM及委外材料成本</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.bipvOeeMaterialCost }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">综合材料成本</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.bipvComprehensiveMaterialCost }}</p>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -155,20 +155,24 @@
</template> </template>
<script> <script>
// import basicAdd from './basic-add'; import { getProduceTargetDetail } from '@/api/produceData';
// import {
// createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
// getTeamList, getDetList, getLineList
// } from "@/api/base/qualityScrapLog";
// import { getList, } from "@/api/base/qualityScrapType";
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { factoryList } from "@/utils/constants";
export default { export default {
components: { components: {
SmallTitle, SmallTitle,
}, },
props: {
ftype: {
type: Number,
default: 0
}
},
// mixins: [basicAdd], // mixins: [basicAdd],
data() { data() {
return { return {
factoryList,
urlOptions: { urlOptions: {
isGetCode: false, isGetCode: false,
// codeURL: getCode, // codeURL: getCode,
@ -223,8 +227,14 @@ export default {
// this.getCurrentTime() // this.getCurrentTime()
}, },
methods: { methods: {
init() { init(id) {
this.visible = true this.visible = true
console.log('打印', id)
if (id) {
getProduceTargetDetail(id).then(res => {
this.dataForm = res.data
})
}
}, },
// getCurrentTime() { // getCurrentTime() {
// // new Date().Format("yyyy-MM-dd HH:mm:ss") // // new Date().Format("yyyy-MM-dd HH:mm:ss")

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-05-17 17:54:54 * @LastEditTime: 2024-05-22 16:22:57
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -92,26 +92,38 @@
:total="listQuery.total" :total="listQuery.total"
@pagination="getDataList" @pagination="getDataList"
/> />
<detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @destroy="detailOrUpdateVisible = false" /> <detail-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :ftype="facType" @destroy="detailOrUpdateVisible = false" />
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :ftype="facType" @refreshDataList="getDataList" @destroy="addOrUpdateVisible = false" /> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :ftype="facType" @refreshDataList="getDataList" @destroy="addOrUpdateVisible = false" />
</div> </div>
<!-- 用户导入对话框 --> <!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" <el-upload ref="upload" :limit="1" accept=".xlsx, .xls"
:action="upload.url" :disabled="upload.isUploading" :headers="upload.headers"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> :action="upload.url"
:file-list="fileList"
:disabled="upload.isUploading"
:on-success="handleFileSuccess"
:on-progress="handleFileUploadProgress"
:auto-upload="false" drag>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip"> <div class="el-upload__tip text-center" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span> <span>仅允许导入xlsxlsx格式文件</span>
<!-- <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link> -->
</div> </div>
</el-upload> </el-upload>
<!-- <el-upload
ref="upload"
class="upload-demo"
action="#"
:limit="1"
:file-list="fileList"
:auto-upload="false"
:http-request="handleFileSuccess"> -->
<!-- <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传.xlsx, .xls文件且不超过500kb</div>
</el-upload> -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="upload.open = false"> </el-button>
@ -130,7 +142,7 @@
<script> <script>
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi';
import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget } from '@/api/produceData'; import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData';
// import inputTable from './inputTable.vue'; // import inputTable from './inputTable.vue';
import lineChart from './lineChart'; import lineChart from './lineChart';
import moment from 'moment' import moment from 'moment'
@ -153,6 +165,7 @@ export default {
dhgfactoryList, dhgfactoryList,
tyjxfactoryList, tyjxfactoryList,
currentMenu: '碲化镉工厂', currentMenu: '碲化镉工厂',
fileList: [],
start: undefined, start: undefined,
end: undefined, end: undefined,
listQuery: { listQuery: {
@ -182,7 +195,7 @@ export default {
// //
headers: getBaseHeader(), headers: getBaseHeader(),
// //
url: process.env.VUE_APP_BASE_API + '/ip/prod-target/di-target-import-excel' url: process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
}, },
tableBtn: [ tableBtn: [
{ {
@ -332,8 +345,8 @@ export default {
showOverflowtooltip: true showOverflowtooltip: true
}, },
{ {
prop: 'molybdenumElectrodeInput', prop: 'ftoInput',
label: '钼电极投入量(片)', label: 'FTO投入量(片)',
minWidth: 150, minWidth: 150,
showOverflowtooltip: true showOverflowtooltip: true
}, },
@ -405,26 +418,85 @@ export default {
// all: {} // all: {}
}; };
}, },
computed: { // computed: {
weekNum() { // weekNum() {
return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1 // return Math.round((this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 60 * 60 * 1000 * 7)) + 1
}, // },
// },
watch: {
facType(value) {
if (value === 0) {
this.$set(this.tableProps, 3, {
prop: 'ftoInput',
label: 'FTO投入量(片)',
minWidth: 150,
showOverflowtooltip: true
})
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
} else {
this.$set(this.tableProps, 3, {
prop: 'molybdenumElectrodeInput',
label: '钼电极投入量(片)',
minWidth: 150,
showOverflowtooltip: true
})
this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
}
console.log(112, this.tableProps)
}
}, },
mounted() { mounted() {
// this.getDict() // this.getDict()
// this.getCurrentYearFirst() // this.getCurrentYearFirst()
// this.getDataList() this.getDataList()
}, },
methods: { methods: {
handleImport() { handleImport() {
this.upload.title = "生产目标导入"; this.upload.title = "生产目标导入";
this.upload.open = true; this.upload.open = true;
this.fileList = []
}, },
// //
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true; this.upload.isUploading = true;
}, },
// //
// handleFileSuccess(param, type) {
// console.log('', param.file)
// const formData = new FormData()
// formData.append('multipartFile', param.file)
// console.log('', param)
// importDiTarget(formData).then(res => {
// console.log(res)
// if (res.code !== 0) {
// this.$modal.msgError(response.msg)
// return;
// }
// this.upload.open = false;
// this.upload.isUploading = false;
// this.$refs.upload.clearFiles();
// }).catch(() => {
// this.upload.open = false
// this.upload.isUploading = false
// })
// //
// // let data = response.data;
// // let text = '' + data.createUsernames.length;
// // for (const username of data.createUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// // }
// // text += '<br />' + data.updateUsernames.length;
// // for (const username of data.updateUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// // }
// // text += '<br />' + Object.keys(data.failureUsernames).length;
// // for (const username in data.failureUsernames) {
// // text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username + '' + data.failureUsernames[username];
// // }
// this.$message.success('');
// this.getDataList();
// },
//
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
if (response.code !== 0) { if (response.code !== 0) {
this.$modal.msgError(response.msg) this.$modal.msgError(response.msg)
@ -433,22 +505,8 @@ export default {
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
// this.$message.success('导入成功!')
// let data = response.data; this.getDataList()
// let text = '' + data.createUsernames.length;
// for (const username of data.createUsernames) {
// text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// }
// text += '<br />' + data.updateUsernames.length;
// for (const username of data.updateUsernames) {
// text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username;
// }
// text += '<br />' + Object.keys(data.failureUsernames).length;
// for (const username in data.failureUsernames) {
// text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + username + '' + data.failureUsernames[username];
// }
this.$message.success('导入成功!');
this.getDataList();
}, },
// //
submitFileForm() { submitFileForm() {
@ -463,6 +521,11 @@ export default {
changeFactory($event) { changeFactory($event) {
this.currentMenu = $event this.currentMenu = $event
this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1 this.facType = this.currentMenu === '碲化镉工厂' ? 0 : 1
// if (this.facType === 0) {
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/di-target-import-excel'
// } else {
// this.upload.url = process.env.VUE_APP_BASE_API + '/admin-api/ip/prod-target/to-target-import-excel'
// }
this.getDataList() this.getDataList()
}, },
handleClick(val) { handleClick(val) {

View File

@ -975,20 +975,13 @@
"resolved" "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz" "resolved" "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz"
"version" "0.8.0" "version" "0.8.0"
"@babel/runtime@^7.11.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4": "@babel/runtime@^7.11.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
"integrity" "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==" "integrity" "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ=="
"resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.1.tgz" "resolved" "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.1.tgz"
"version" "7.24.1" "version" "7.24.1"
dependencies: dependencies:
"regenerator-runtime" "^0.14.0" "regenerator-runtime" "^0.14.0"
"@babel/runtime@^7.5.5":
version "7.24.5"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c"
integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==
dependencies:
regenerator-runtime "^0.14.0"
"@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.24.0": "@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.24.0":
"integrity" "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==" "integrity" "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA=="
"resolved" "https://registry.npmmirror.com/@babel/template/-/template-7.24.0.tgz" "resolved" "https://registry.npmmirror.com/@babel/template/-/template-7.24.0.tgz"
@ -1082,16 +1075,16 @@
"wrap-ansi-cjs" "npm:wrap-ansi@^7.0.0" "wrap-ansi-cjs" "npm:wrap-ansi@^7.0.0"
"@jiaminghi/bezier-curve@*": "@jiaminghi/bezier-curve@*":
version "0.0.9" "integrity" "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw=="
resolved "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz#5196aca93c8b061a612b4c3eabcedf9490cef6ee" "resolved" "https://registry.npmmirror.com/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz"
integrity sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw== "version" "0.0.9"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.5.5"
"@jiaminghi/c-render@^0.4.3": "@jiaminghi/c-render@^0.4.3":
version "0.4.3" "integrity" "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q=="
resolved "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz#982ebd8f71b443bb9507834227834973ebd9b6d8" "resolved" "https://registry.npmmirror.com/@jiaminghi/c-render/-/c-render-0.4.3.tgz"
integrity sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q== "version" "0.4.3"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.5.5"
"@jiaminghi/bezier-curve" "*" "@jiaminghi/bezier-curve" "*"
@ -1099,30 +1092,30 @@
"@jiaminghi/transition" "*" "@jiaminghi/transition" "*"
"@jiaminghi/charts@*": "@jiaminghi/charts@*":
version "0.2.18" "integrity" "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA=="
resolved "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz#63ded95200789fc1a1fd04b7fd9e56f58d22d90f" "resolved" "https://registry.npmmirror.com/@jiaminghi/charts/-/charts-0.2.18.tgz"
integrity sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA== "version" "0.2.18"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.5.5"
"@jiaminghi/c-render" "^0.4.3" "@jiaminghi/c-render" "^0.4.3"
"@jiaminghi/color@*": "@jiaminghi/color@*":
version "1.1.3" "integrity" "sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg=="
resolved "https://registry.npmmirror.com/@jiaminghi/color/-/color-1.1.3.tgz#a2336750d1266155ffe80375c58c26fdec495611" "resolved" "https://registry.npmmirror.com/@jiaminghi/color/-/color-1.1.3.tgz"
integrity sha512-ZY3hdorgODk4OSTbxyXBPxAxHPIVf9rPlKJyK1C1db46a50J0reFKpAvfZG8zMG3lvM60IR7Qawgcu4ZDO3+Hg== "version" "1.1.3"
"@jiaminghi/data-view@^2.10.0": "@jiaminghi/data-view@^2.10.0":
version "2.10.0" "integrity" "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA=="
resolved "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz#2146d8fc71b9f24be808238ca050ddb7a4c8949f" "resolved" "https://registry.npmmirror.com/@jiaminghi/data-view/-/data-view-2.10.0.tgz"
integrity sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA== "version" "2.10.0"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.5.5"
"@jiaminghi/charts" "*" "@jiaminghi/charts" "*"
"@jiaminghi/transition@*": "@jiaminghi/transition@*":
version "1.1.11" "integrity" "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg=="
resolved "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz#576d8af092434b34201eba5eaecc79dd33c8ad8c" "resolved" "https://registry.npmmirror.com/@jiaminghi/transition/-/transition-1.1.11.tgz"
integrity sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg== "version" "1.1.11"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.5.5"