update -报表页面

master
yinq 5 months ago
parent 9356a6ec60
commit be5d2051d7

@ -11,8 +11,13 @@
</el-date-picker>
</el-form-item>
<el-form-item label="产线" prop="productionLine">
<el-select v-model="form.productionLine" placeholder="选择产线">
<el-option :key="i.value" :label="i.label" :value="i.value" v-for="i in option"></el-option>
<el-select v-model="form.productionLine" placeholder="请选择产线" clearable>
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
@ -84,22 +89,18 @@ export default {
year: new Date().getFullYear().toString(),
productionLine: 'CX_02'
},
option: [
{
value: 'CX_01',
label: '一号线'
},
{
value: 'CX_02',
label: '二号线'
},
],
tableTimeHead: [],
tableHead: ['今年1月', '去年1月', '今年2月', '去年2月', '今年3月', '去年3月', '今年4月', '去年4月', '今年5月', '去年5月', '今年6月', '去年6月', '今年7月', '去年7月', '今年8月', '去年8月', '今年9月', '去年9月', '今年10月', '去年10月', '今年11月', '去年11月', '今年12月', '去年12月',]
tableHead: ['今年1月', '去年1月', '今年2月', '去年2月', '今年3月', '去年3月', '今年4月', '去年4月', '今年5月', '去年5月', '今年6月', '去年6月', '今年7月', '去年7月', '今年8月', '去年8月', '今年9月', '去年9月', '今年10月', '去年10月', '今年11月', '去年11月', '今年12月', '去年12月',],
// 线
productLineList: []
}
},
created() {
this.form.year = new Date().getFullYear().toString()
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
this.onSubmit();
})
},
methods: {
onSubmit() {

@ -108,7 +108,7 @@
<dict-tag :options="dict.type.circulation_flag" :value="scope.row.productionUserFlag"/>
</template>
</el-table-column>
<el-table-column label="班组" align="center" prop="teamCode" v-if="columns[3].visible"/>
<el-table-column label="班组" align="center" prop="teamName" v-if="columns[3].visible"/>
<el-table-column label="申请原因" align="center" prop="applyReason" v-if="columns[4].visible"/>
<el-table-column label="申请时间" align="center" prop="applyTime" width="180" v-if="columns[5].visible">
<template slot-scope="scope">

@ -1,25 +1,36 @@
<template>
<div class="app-container">
<el-form :inline="true" :model="form" ref="form">
<el-form-item label="工厂" prop="factory">
<el-select v-model="form.factory" placeholder="选择工厂">
<el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>
<el-form-item label="工厂名称">
<el-select v-model="form.FACTORY_CODE" placeholder="请选择工厂名称">
<el-option
v-for="item in factoryList"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产线" prop="productionLine">
<el-select v-model="form.productionLine" placeholder="选择产线">
<el-option :label="i.label" :value="i.value" v-for="i in option1"></el-option>
<el-select v-model="form.productionLine" placeholder="请选择产线" clearable>
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="下线时间" prop="date">
<el-form-item label="下线日期" >
<el-date-picker
v-model="form.date"
type="daterange"
format="yyyy-mm-dd"
value-format="yyyy-mm-dd"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
@ -29,19 +40,23 @@
</el-form>
<el-table
:data="tableData"
style="width: 100%">
style="width: 100%"
>
<el-table-column
type="index"
label="序号"
width="180">
width="180"
>
</el-table-column>
<el-table-column
prop="material_MODEL"
label="产品型号">
label="产品型号"
>
</el-table-column>
<el-table-column
prop="q_SUM"
label="问题数量">
label="问题数量"
>
</el-table-column>
</el-table>
<pagination
@ -59,50 +74,52 @@
</template>
<script>
import Chart from "@/components/board/Chart";
import Chart from '@/components/board/Chart'
import { highFaultList } from '@//api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
import { findFactoryList } from '@//api/base/factory'
export default {
name: 'ProductOffLine',
components:{
Chart,
components: {
Chart
},
data() {
return {
total:0,
total: 0,
form: {
pageNum:1,
pageSize:10,
factory:'1301',
productionLine:'CX_02',
date:[]
pageNum: 1,
pageSize: 10,
FACTORY_CODE: '1301',
productionLine: 'CX_02',
date: []
},
option: [
{
value: '1301',
label: '工厂一'
}
],
option1: [
{
value: 'CX_01',
label: '产线一'
},
{
value: 'CX_02',
label: '产线二'
},
],
tableData: []
tableData: [],
//
factoryList: [],
// 线
productLineList: []
}
},
mounted() {
this.getList()
created() {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.form.date[0] = nowDate
this.form.date[1] = nowDate
findFactoryList().then(response => {
this.factoryList = response.data
})
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
this.getList()
})
},
methods: {
getList(){
highFaultList({ beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1]
, FACTORY_CODE: this.form.factory , PRODUCT_LINE_CODE: this.form.productionLine}).then(response => {
getList() {
highFaultList({
beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1]
, FACTORY_CODE: this.form.factory, PRODUCT_LINE_CODE: this.form.productionLine
}).then(response => {
//
console.log(response)
this.total = response?.total || 0
@ -123,31 +140,31 @@ export default {
},
xAxis: {
type: 'value',
position:'top',
position: 'top',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: response.data.map(v=>v.material_MODEL).reverse()
data: response.data.map(v => v.material_MODEL).reverse()
},
series: [
{
name: '数量',
type: 'bar',
data: response.data.map(v=>v.q_SUM).reverse()
},
data: response.data.map(v => v.q_SUM).reverse()
}
]
})
});
})
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.$refs[formName].resetFields()
}
}
}
</script>
<style lang="less" scoped>
/deep/ .el-table .cell{
/deep/ .el-table .cell {
text-align: center !important;
}
</style>

@ -56,6 +56,7 @@
<script>
import Chart from "@/components/board/Chart";
import {highFaultList, weldLeakRateList} from '@//api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
export default {
name: 'ProductOffLine',
@ -89,8 +90,10 @@ export default {
}
,
mounted() {
}
,
},
created() {
this.getList();
},
methods: {
getList() {
weldLeakRateList({year: this.form.year,}).then(response => {

Loading…
Cancel
Save