1.添加原材料入库相关代码
2.修改质量统计页面样式
This commit is contained in:
@@ -2,40 +2,45 @@
|
||||
<div class="app-container">
|
||||
<!-- 搜索部分 -->
|
||||
<div>
|
||||
<el-form :model="search" inline>
|
||||
<el-form :model="search" inline size="mini" label-width="80px">
|
||||
<el-form-item label="开始日期">
|
||||
<el-date-picker v-model="search.starttime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions">
|
||||
<el-date-picker :style="{width:inputWidth}" v-model="search.starttime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期">
|
||||
<el-date-picker v-model="search.endtime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions">
|
||||
<el-date-picker :style="{width:inputWidth}" v-model="search.endtime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号">
|
||||
<el-input v-model="search.workorderid" placeholder="输入工单号"></el-input>
|
||||
<el-input v-model="search.workorderid" placeholder="输入工单号" :style="{width:inputWidth}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号">
|
||||
<el-input v-model="search.partnumber" placeholder="输入零件号"></el-input>
|
||||
<el-input v-model="search.partnumber" placeholder="输入零件号" :style="{width:inputWidth}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品描述">
|
||||
<el-input v-model="search.product_description" placeholder="输入产品描述"></el-input>
|
||||
<el-input v-model="search.product_description" placeholder="输入产品描述" :style="{width:inputWidth}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组">
|
||||
<el-select v-model="search.team" placeholder="输入班组">
|
||||
<el-select v-model="search.team" placeholder="输入班组" :style="{width:inputWidth}">
|
||||
<el-option label="A班" value="A"> </el-option>
|
||||
<el-option label="B班" value="B"> </el-option>
|
||||
<el-option label="" value=""> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表类型">
|
||||
<el-select v-model="search.reportType" placeholder="请选择">
|
||||
<el-select v-model="search.reportType" placeholder="请选择" :style="{width:inputWidth}">
|
||||
<el-option v-for="item in reportType_options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
||||
<el-button type="warning">EXCEL导出</el-button>
|
||||
<el-form-item label=" ">
|
||||
<el-button size="mini" type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
||||
<el-button size="mini" type="warning" @click="exportDataEvent">EXCEL导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="width: 100%;display: flex;justify-content: flex-end;">
|
||||
<pagination :pageSizes="[6,60,120,300]" :total="pagination.total" :page.sync="pagination.pageNum" :limit.sync="pagination.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<div style="font-size: 20px;text-align: center; margin 0 auto">{{ reportType_options[search.reportType].label }}</div>
|
||||
</div>
|
||||
@@ -47,75 +52,140 @@
|
||||
:header-cell-style="headerCellStyle"
|
||||
ref="xTable"
|
||||
:column-config="{ resizable: true }"
|
||||
:row-config="{ isHover: true }"
|
||||
v-loading="loading"
|
||||
:row-config="{ isHover: true,isCurrent:true,height:20 }"
|
||||
:loading="loading"
|
||||
:data="QualityStatisticsTable"
|
||||
:merge-cells="mergeCells"
|
||||
:cell-style="cellStyle"
|
||||
size="mini"
|
||||
align="center"
|
||||
max-height="800px"
|
||||
:export-config="{}"
|
||||
>
|
||||
<vxe-colgroup title="订单信息" align="center">
|
||||
<vxe-column field="workorderId" title="工单号"></vxe-column>
|
||||
<vxe-column field="finishedPartNumber" title="零件号"></vxe-column>
|
||||
<vxe-column field="productDescription" title="描述"></vxe-column>
|
||||
<vxe-column field="requireNumber" title="生产投入数"></vxe-column>
|
||||
<vxe-colgroup title="订单信息" align="center" fixed="left">
|
||||
<vxe-column field="workorderId" title="工单号" width="120px"></vxe-column>
|
||||
<vxe-column field="finishedPartNumber" title="零件号" min-width="80px" :show-overflow="false"></vxe-column>
|
||||
<vxe-column field="productDescription" title="描述" min-width="100px" :show-overflow="false"></vxe-column>
|
||||
<vxe-column field="requireNumber" title="生 产 投 入 数" min-width="60px"></vxe-column>
|
||||
<vxe-column field="team" title="班次"></vxe-column>
|
||||
<vxe-column field="qualifiedNumber" title="合格数"></vxe-column>
|
||||
<vxe-column title="合格率">
|
||||
<template #default="{ row }"> {{ row.qualifiedRate }}% </template>
|
||||
<vxe-column field="qualifiedNumber" title="合 格 数" min-width="60px"></vxe-column>
|
||||
<vxe-column title="合格率" min-width="70px">
|
||||
<template #default="{ row }"> {{ offsetRate(row.qualifiedRate) }}% </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paoguangTotal" title="抛光总数"></vxe-column>
|
||||
<vxe-column field="damoTotal" title="打磨总数"></vxe-column>
|
||||
<vxe-column field="baofeiTotal" title="报废总数"></vxe-column>
|
||||
<vxe-column field="startTime" title="开始时间"></vxe-column>
|
||||
<vxe-column field="endTime" title="结束时间"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="80"></vxe-column>
|
||||
<vxe-column field="paoguangTotal" title="抛光总数" min-width="60px"></vxe-column>
|
||||
<vxe-column field="damoTotal" title="打磨总数" min-width="60px"></vxe-column>
|
||||
<vxe-column field="baofeiTotal" title="报废总数" min-width="60px"></vxe-column>
|
||||
<vxe-column field="startTime" title="开始时间" min-width="120px" :show-overflow="false"></vxe-column>
|
||||
<vxe-column field="endTime" title="结束时间" min-width="120px" :show-overflow="false"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="60px"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-colgroup title="油漆" align="center">
|
||||
<vxe-column field="paintSuokong" title="缩孔"></vxe-column>
|
||||
<vxe-column field="paintZhengkong" title="针孔"></vxe-column>
|
||||
<vxe-column field="paintShiguang" title="失光"></vxe-column>
|
||||
<vxe-column field="paintSecha" title="色差"></vxe-column>
|
||||
<vxe-column field="paintDianzi" title="点子"></vxe-column>
|
||||
<vxe-column field="paintOther" title="其他"></vxe-column>
|
||||
<vxe-column field="paintSuokong" title="缩 孔" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintSuokong) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paintZhengkong" title="针 孔" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintZhengkong) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paintShiguang" title="失 光" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintShiguang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paintSecha" title="色 差" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintSecha) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paintDianzi" title="点 子" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintDianzi) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="paintOther" title="其 他" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.paintOther) }}</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-colgroup title="设备" align="center">
|
||||
<vxe-column field="deviceShuiban" title="水斑"></vxe-column>
|
||||
<vxe-column field="deviceZandian" title="脏点"></vxe-column>
|
||||
<vxe-column field="deviceBianxing" title="变形"></vxe-column>
|
||||
<vxe-column field="deviceYouzhu" title="油珠"></vxe-column>
|
||||
<vxe-column field="deviceTuoluo" title="脱落"></vxe-column>
|
||||
<vxe-column field="deviceZhuangshang" title="撞伤"></vxe-column>
|
||||
<vxe-column field="deviceOther" title="其他"></vxe-column>
|
||||
<vxe-column field="deviceShuiban" title="水 斑" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceShuiban) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceZandian" title="脏 点" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceZandian) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceBianxing" title="变 形" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceBianxing) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceYouzhu" title="油 珠" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceYouzhu) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceTuoluo" title="脱 落" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceTuoluo) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceZhuangshang" title="撞 伤" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceZhuangshang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="deviceOther" title="其 他" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.deviceOther) }}</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-colgroup title="毛坯" align="center">
|
||||
<vxe-column field="blankMaoci" title="毛刺"></vxe-column>
|
||||
<vxe-column field="blankSuoyin" title="缩印"></vxe-column>
|
||||
<vxe-column field="blankCanshuang" title="擦伤"></vxe-column>
|
||||
<vxe-column field="blankShaying" title="砂印"></vxe-column>
|
||||
<vxe-column field="blankZangdian" title="脏点"></vxe-column>
|
||||
<vxe-column field="blankDamo" title="打磨"></vxe-column>
|
||||
<vxe-column field="blankMaoci" title="毛 刺" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankMaoci) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="blankSuoyin" title="缩 印" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankSuoyin) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="blankCanshuang" title="擦 伤" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankCanshuang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="blankShaying" title="砂 印" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankShaying) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="blankZangdian" title="脏 点" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankZangdian) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="blankDamo" title="打 磨" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.blankDamo) }}</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-colgroup title="程序" align="center">
|
||||
<vxe-column field="programLiuguang" title="流挂"></vxe-column>
|
||||
<vxe-column field="programSeqiqueqi" title="色漆缺漆"></vxe-column>
|
||||
<vxe-column field="programQingqiqueqi" title="清漆缺漆"></vxe-column>
|
||||
<vxe-column field="programJupi" title="桔皮"></vxe-column>
|
||||
<vxe-column field="programOther" title="其他"></vxe-column>
|
||||
<vxe-column field="programLiuguang" title="流 挂" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.programLiuguang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="programSeqiqueqi" title="色 漆 缺 漆" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.programSeqiqueqi) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="programQingqiqueqi" title="清 漆 缺 漆" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.programQingqiqueqi) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="programJupi" title="桔 皮" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.programJupi) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="programOther" title="其 他" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.programOther) }}</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-colgroup title="班组操作" align="center">
|
||||
<vxe-column field="teamTuoluocanshuang" title="脱落擦伤"></vxe-column>
|
||||
<vxe-column field="teamQingqiqikuai" title="清漆漆块"></vxe-column>
|
||||
<vxe-column field="teamSeqiqikuai" title="色漆漆块"></vxe-column>
|
||||
<vxe-column field="teamFahua" title="发花"></vxe-column>
|
||||
<vxe-column field="teamLiangbang" title="亮斑"></vxe-column>
|
||||
<vxe-column field="teamPenglou" title="喷漏"></vxe-column>
|
||||
<vxe-column field="teamTuoluocanshuang" title="脱 落 擦 伤" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamTuoluocanshuang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="teamQingqiqikuai" title="清 漆 漆 块" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamQingqiqikuai) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="teamSeqiqikuai" title="色 漆 漆 块" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamSeqiqikuai) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="teamFahua" title="发 花" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamFahua) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="teamLiangbang" title="亮 斑" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamLiangbang) }}</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="teamPenglou" title="喷 漏" min-width="60px">
|
||||
<template #default="{ row }"> {{ offsetValue(row.teamPenglou) }}</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<pagination :total="pagination.total" :page.sync="pagination.pageNum" :limit.sync="pagination.pageSize" @pagination="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -130,6 +200,7 @@ export default {
|
||||
name: 'qualityStatistics',
|
||||
data() {
|
||||
return {
|
||||
inputWidth:'180px',
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
@@ -174,9 +245,9 @@ export default {
|
||||
pagination: {
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 60,
|
||||
},
|
||||
loading: true,
|
||||
loading: false,
|
||||
QualityStatisticsTable: [],
|
||||
mergeCells: [
|
||||
// { row: 0, col: 0, rowspan: 3, colspan: 0 },
|
||||
@@ -220,6 +291,10 @@ export default {
|
||||
|
||||
//todo 获取统计数据
|
||||
getList() {
|
||||
this.loading = true;
|
||||
setTimeout(()=>{
|
||||
this.loading = false;
|
||||
},30000)
|
||||
let query = { ...this.search, ...this.pagination }
|
||||
delete query['reportType']
|
||||
delete query['total']
|
||||
@@ -228,40 +303,40 @@ export default {
|
||||
case 0:
|
||||
GetQualityStatisticsTable_first(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false
|
||||
this.QualityStatisticsTable = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
this.pagination.total = parseInt(res.data.item2/3)
|
||||
this.mergeTable(3)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
break
|
||||
case 1:
|
||||
GetQualityStatisticsTable_again(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false
|
||||
this.QualityStatisticsTable = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
this.pagination.total = parseInt(res.data.item2/2)
|
||||
this.mergeTable(2)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
GetQualityStatisticsTable_final(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false
|
||||
this.QualityStatisticsTable = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
this.pagination.total = parseInt(res.data.item2/2)
|
||||
this.mergeTable(2)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
GetQualityStatisticsTable_total(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false
|
||||
this.QualityStatisticsTable = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
this.pagination.total = parseInt(res.data.item2/2)
|
||||
this.mergeTable(2)
|
||||
this.loading = false;
|
||||
}
|
||||
})
|
||||
break
|
||||
@@ -273,15 +348,41 @@ export default {
|
||||
return {
|
||||
backgroundColor: '#2D3D51',
|
||||
color: '#ffffff',
|
||||
border:'1px solid #161823',
|
||||
fontSize:'18px'
|
||||
}
|
||||
},
|
||||
|
||||
cellStyle() {
|
||||
return {
|
||||
border:'1px solid #161823',
|
||||
fontSize:'16px',
|
||||
fontWeight:'700'
|
||||
}
|
||||
},
|
||||
|
||||
//todo 导出excel
|
||||
exportDataEvent() {
|
||||
this.$refs.xTable1.exportData({ type: 'csv' })
|
||||
this.$refs.xTable.openExport()
|
||||
},
|
||||
|
||||
// 合格率去除小数
|
||||
offsetRate(num){
|
||||
if(num === null){
|
||||
return "";
|
||||
}
|
||||
return parseInt(num);
|
||||
},
|
||||
// 数据去除0
|
||||
offsetValue(num){
|
||||
if(num === 0||num === '0'){
|
||||
return "";
|
||||
}
|
||||
return num;
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user