This commit is contained in:
zty 2024-09-12 15:59:31 +08:00
commit 659226e6ad
11 changed files with 1551 additions and 700 deletions

View File

@ -16,14 +16,17 @@ VUE_APP_PJ = ''
# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api # VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
#测试环境 #测试环境
VUE_APP_API_BASEURL = http://10.50.211.228:2250/api # VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api #VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
VUE_APP_BASEURL = http://10.50.211.228:2250/ VUE_APP_BASEURL = http://10.50.211.228:2250/
# VUE_APP_BASEURL = http://10.50.211.228:2250
#VUE_APP_BASEURL = http://127.0.0.1:2226 #VUE_APP_BASEURL = http://127.0.0.1:2226
# #光子 # #光子
# VUE_APP_API_BASEURL = http://49.232.14.174:2250/api VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
# VUE_APP_BASEURL = http://49.232.14.174:2250 VUE_APP_BASEURL = http://49.232.14.174:2226
# 本地端口 # 本地端口
VUE_APP_PORT = 2800 VUE_APP_PORT = 2800

View File

@ -417,4 +417,18 @@ export default {
return await http.post("http://localhost:8080/prints/", data); return await http.post("http://localhost:8080/prints/", data);
}, },
}, },
ana:{
equipLastMlog:{
name: "设备状态列表",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/ana/equip_last_mlog/`, data);
},
},
put_prod:{
name: "统计值",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/ana/put_prod/`, data);
},
},
},
}; };

File diff suppressed because it is too large Load Diff

View File

@ -94,6 +94,14 @@
width="150px" width="150px"
> >
<template #default="scope"> <template #default="scope">
<el-button
link
type="primary"
@click="table_edit(scope.row)"
v-if="scope.row.state == 10&&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
>
编辑
</el-button>
<el-button <el-button
link link
type="primary" type="primary"
@ -106,11 +114,7 @@
type="primary" type="primary"
@click="table_submit(scope.row)" @click="table_submit(scope.row)"
v-auth="'mio.submit'" v-auth="'mio.submit'"
v-if=" v-if="scope.row.state == 10 &&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
scope.row.state == 10 &&
(scope.row.type == 'other_in' ||
scope.row.type == 'other_out')
"
> >
提交 提交
</el-button> </el-button>
@ -211,9 +215,10 @@ export default {
table_edit(row) { table_edit(row) {
this.dialog.save = true; this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open("edit", type).setData(row); this.$refs.saveDialog.open("edit", row.type).setData(row);
}); });
}, },
// //
table_detail(row) { table_detail(row) {
this.type = row.type; this.type = row.type;

View File

@ -106,6 +106,25 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班次">
<el-select
v-model="form.shift"
placeholder="班次"
clearable
filterable
style="width: 100%;"
>
<el-option
v-for="item in shiftOtions"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-divider style="margin-top:0"></el-divider> <el-divider style="margin-top:0"></el-divider>
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'"> <el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
@ -458,12 +477,14 @@ export default {
isSaveing: false, isSaveing: false,
options: [], options: [],
userList:[], userList:[],
shiftOtions:[],
selectionFilters: [], selectionFilters: [],
setFiltersVisible: false, setFiltersVisible: false,
}; };
}, },
mounted() { mounted() {
this.getUsers(); this.getUsers();
this.getShift();
}, },
methods: { methods: {
// //
@ -473,6 +494,12 @@ export default {
this.getMaterialBatch(); this.getMaterialBatch();
return this; return this;
}, },
getShift(){
let that = this;
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
that.shiftOtions = res;
});
},
getUsers(){ getUsers(){
let that = this; let that = this;
let userList = []; let userList = [];

View File

@ -31,12 +31,12 @@
<!-- 0 --> <!-- 0 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart0"></div> <div id="bachart0"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(0)" @click="handleExport(0)"
@ -52,6 +52,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -63,11 +65,22 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="前道不良" prop="加工前不良">
</el-table-column>
<el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -78,12 +91,12 @@
<!-- 1 --> <!-- 1 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart1"></div> <div id="bachart1"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(1)" @click="handleExport(1)"
@ -99,6 +112,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -110,11 +125,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -125,12 +149,12 @@
<!-- 2 --> <!-- 2 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart2"></div> <div id="bachart2"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(2)" @click="handleExport(2)"
@ -146,6 +170,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -157,11 +183,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -172,12 +207,12 @@
<!-- 3 --> <!-- 3 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart3"></div> <div id="bachart3"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(3)" @click="handleExport(3)"
@ -193,6 +228,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -204,11 +241,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -219,12 +265,12 @@
<!-- 4 --> <!-- 4 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart4"></div> <div id="bachart4"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(4)" @click="handleExport(4)"
@ -240,6 +286,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -251,11 +299,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -266,12 +323,12 @@
<!-- 5 --> <!-- 5 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart5"></div> <div id="bachart5"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(5)" @click="handleExport(5)"
@ -287,6 +344,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -298,11 +357,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -313,12 +381,12 @@
<!-- 6 --> <!-- 6 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart6"></div> <div id="bachart6"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(6)" @click="handleExport(6)"
@ -334,6 +402,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -345,11 +415,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -360,12 +439,12 @@
<!-- 7 --> <!-- 7 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart7"></div> <div id="bachart7"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(7)" @click="handleExport(7)"
@ -381,6 +460,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -392,11 +473,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -407,12 +497,12 @@
<!-- 8 --> <!-- 8 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart8"></div> <div id="bachart8"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(8)" @click="handleExport(8)"
@ -428,6 +518,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -439,11 +531,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -454,12 +555,12 @@
<!-- 9 --> <!-- 9 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart9"></div> <div id="bachart9"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(9)" @click="handleExport(9)"
@ -475,6 +576,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -486,11 +589,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -501,12 +613,12 @@
<!-- 10 --> <!-- 10 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart10"></div> <div id="bachart10"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(10)" @click="handleExport(10)"
@ -522,6 +634,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -533,11 +647,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -548,12 +671,12 @@
<!-- 11 --> <!-- 11 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart11"></div> <div id="bachart11"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(11)" @click="handleExport(11)"
@ -569,6 +692,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -580,11 +705,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -595,12 +729,12 @@
<!-- 12 --> <!-- 12 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart12"></div> <div id="bachart12"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(12)" @click="handleExport(12)"
@ -616,6 +750,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -627,11 +763,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -642,12 +787,12 @@
<!-- 13 --> <!-- 13 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart13"></div> <div id="bachart13"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(13)" @click="handleExport(13)"
@ -663,6 +808,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -674,11 +821,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -689,12 +845,12 @@
<!-- 14 --> <!-- 14 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart14"></div> <div id="bachart14"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(14)" @click="handleExport(14)"
@ -710,6 +866,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -721,11 +879,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -736,12 +903,12 @@
<!-- 15 --> <!-- 15 -->
<el-card shadow="never" style="margin-bottom: 8px"> <el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :lg="12"> <el-col :lg="10">
<el-card shadow="never"> <el-card shadow="never">
<div id="bachart15"></div> <div id="bachart15"></div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :lg="12"> <el-col :lg="14">
<el-card shadow="never" style="position: relative"> <el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport(15)" @click="handleExport(15)"
@ -757,6 +924,8 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名" min-width="100"> <el-table-column label="物料名" prop="物料名" min-width="100">
</el-table-column> </el-table-column>
<el-table-column label="设备名称" prop="设备名称" min-width="100">
</el-table-column>
<el-table-column label="日期"> <el-table-column label="日期">
<template #default="scope"> <template #default="scope">
{{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }} {{ scope.row. }}-{{ scope.row. }}-{{ scope.row. }}
@ -768,11 +937,20 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" prop="合格数"> <el-table-column label="合格数" prop="合格数">
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="不合格数"> <el-table-column label="不合格数" align="center">
<el-table-column label="线痕" prop="线痕"></el-table-column>
<el-table-column label="破损" prop="破损"></el-table-column>
<el-table-column label="麻点" prop="麻点"></el-table-column>
<el-table-column label="气泡" prop="气泡"></el-table-column>
<el-table-column label="水纹" prop="水纹"></el-table-column>
<el-table-column label="崩边" prop="崩边"></el-table-column>
<el-table-column label="划伤" prop="划伤"></el-table-column>
<el-table-column label="其他" prop="其他"></el-table-column>
<el-table-column label="合计" prop="不合格数"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="合格率" prop="合格率"> <el-table-column label="合格率" prop="合格率">
<template #default="scope"> <template #default="scope">
{{ Math.round(scope.row.合格率) }}% {{ (scope.row.合格率).toFixed(2) }}%
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -780,7 +958,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
@ -923,6 +1100,7 @@ export default {
let option = deepCopy(that.basicOption); let option = deepCopy(that.basicOption);
let query = deepCopy(that.query); let query = deepCopy(that.query);
query.mgroup_name = mgroup_name; query.mgroup_name = mgroup_name;
option.title.text = mgroup_name+"合格数统计";
let obj = {}; let obj = {};
obj.query = query; obj.query = query;
that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => { that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => {
@ -934,7 +1112,6 @@ export default {
tableData.forEach((ite) => { tableData.forEach((ite) => {
if (nameList.indexOf(ite.物料名) > -1) {} else { if (nameList.indexOf(ite.物料名) > -1) {} else {
nameList.push(ite.物料名); nameList.push(ite.物料名);
dataList.push([]) dataList.push([])
datas.push([0,0,0,0,0,0,0]); datas.push([0,0,0,0,0,0,0]);
let obj = { let obj = {
@ -947,24 +1124,20 @@ export default {
option.series.push(obj) option.series.push(obj)
} }
}); });
console.log('nameList',nameList);
that.nameList = nameList; that.nameList = nameList;
tableData.forEach((item) => { tableData.forEach((item) => {
let indexX = nameList.indexOf(item.物料名); let indexX = nameList.indexOf(item.物料名);
dataList[indexX].push(item); dataList[indexX].push(item);
}); });
console.log('dataList',dataList)
for(let i = 0;i<dataList.length;i++){ for(let i = 0;i<dataList.length;i++){
for(let j = 0;j<dataList[i].length;j++){ for(let j = 0;j<dataList[i].length;j++){
let index = that.weekDateList.indexOf(dataList[i][j].); let index = that.weekDateList.indexOf(dataList[i][j].);
datas[i][index] = dataList[i][j].合格数; //datas datas[i][index] = dataList[i][j].合格数; //datas
} }
} }
console.log('datas',datas);
for(let n=0;n<nameList.length;n++){ for(let n=0;n<nameList.length;n++){
option.series[n].data = datas[n]; option.series[n].data = datas[n];
} }
console.log('option',option);
let chartId = 'bachart'+mgroup_index; let chartId = 'bachart'+mgroup_index;
that.setChart(chartId, option); that.setChart(chartId, option);
} else { } else {

View File

@ -2,7 +2,7 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="right-panel"> <div class="right-panel">
<el-select v-model="mgroupId" <!-- <el-select v-model="mgroupId"
placeholder="请选择工段" placeholder="请选择工段"
@change="mgroupChange"> @change="mgroupChange">
<el-option <el-option
@ -12,7 +12,7 @@
:value="item.id" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select> -->
<el-date-picker <el-date-picker
v-model="searchDate" v-model="searchDate"
type="month" type="month"
@ -29,31 +29,25 @@
</div> </div>
</el-header> </el-header>
<el-main id="elMain"> <el-main id="elMain">
<el-row :gutter="10" id="elCol"> <!-- 0 -->
<el-col :lg="10"> <el-card shadow="never" style="margin-bottom: 8px">
<el-card shadow="never"> <el-row :gutter="10">
<scEcharts height="500px" :option="option"></scEcharts> <el-col :lg="12">
</el-card> <el-card shadow="never">
</el-col> <div id="linechart0"></div>
<el-col :lg="14"> </el-card>
<el-card shadow="never" style="position: relative"> </el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button <el-button
@click="handleExport('7')" @click="handleExport(0)"
class="tables" class="tables"
type="primary" type="primary"
>导出</el-button >导出</el-button
> >
<el-table <el-table :data="tableData0" id="exportDiv0" :height="300">
:data="tableData1"
id="exportDiv7"
height="500px"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column <el-table-column label="任务编号" prop="number" min-width="100px">
label="任务编号"
prop="number"
min-width="100px"
>
</el-table-column> </el-table-column>
<el-table-column label="计划数" prop="count"> <el-table-column label="计划数" prop="count">
</el-table-column> </el-table-column>
@ -63,13 +57,490 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</el-card>
<!-- 1 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart1"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(1)"
class="tables"
type="primary"
>导出</el-button
>
<el-table
:data="tableData1"
id="exportDiv1"
:height="300"
>
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 2 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart2"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(2)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData2" id="exportDiv2" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 3 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart3"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(3)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData3" id="exportDiv3" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 4 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart4"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(4)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData4" id="exportDiv4" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 5 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart5"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(5)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData5" id="exportDiv5" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 6 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart6"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(6)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData6" id="exportDiv6" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 7 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart7"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(7)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData7" id="exportDiv7" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 8 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart8"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(8)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData8" id="exportDiv8" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 9 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart9"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(9)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData9" id="exportDiv9" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 10 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart10"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(10)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData10" id="exportDiv10" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 11 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart11"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(11)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData11" id="exportDiv11" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 12 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart12"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(12)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData12" id="exportDiv12" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 13 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart13"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(13)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData13" id="exportDiv13" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 14 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart14"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(14)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData14" id="exportDiv14" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<!-- 15 -->
<el-card shadow="never" style="margin-bottom: 8px">
<el-row :gutter="10">
<el-col :lg="12">
<el-card shadow="never">
<div id="linechart15"></div>
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never" style="position: relative">
<el-button
@click="handleExport(15)"
class="tables"
type="primary"
>导出</el-button
>
<el-table :data="tableData15" id="exportDiv15" :height="300">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" min-width="100px">
</el-table-column>
<el-table-column label="计划数" prop="count">
</el-table-column>
<el-table-column label="完成数" prop="count_ok">
</el-table-column>
<el-table-column label="完成率" prop="rate">
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
import * as echarts from "echarts";
import T from "@/components/scEcharts/echarts-theme-T.js";
echarts.registerTheme("T", T);
import scEcharts from "@/components/scEcharts"; import scEcharts from "@/components/scEcharts";
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
const ondDayTime = 86400000;
export default { export default {
name: "chart", name: "chart",
components: { components: {
@ -90,8 +561,7 @@ export default {
currentDate: "", currentDate: "",
searchDate:'', searchDate:'',
options:[], options:[],
tableData1: [], basicOption: {
option: {
title: { title: {
text: "", text: "",
}, },
@ -104,7 +574,7 @@ export default {
}, },
color: ["rgb(64,158,255)", "orange"], color: ["rgb(64,158,255)", "orange"],
series: { series: {
name: "7车间完成率", name: "任务进度",
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["40%", "70%"],
center: ["50%", "60%"], center: ["50%", "60%"],
@ -114,68 +584,121 @@ export default {
formatter: "{b} : {c} ({d}%)", formatter: "{b} : {c} ({d}%)",
}, },
data: [ data: [
{ value: 0, name: "已完成" }, { value: 0, name: "合格数" },
{ value: 0, name: "未完成" }, { value: 0, name: "未完成" },
], ],
}, },
}, },
tableData0: [],
tableData1: [],
tableData2: [],
tableData3: [],
tableData4: [],
tableData5: [],
tableData6: [],
tableData7: [],
tableData8: [],
tableData9: [],
tableData10: [],
tableData11: [],
tableData12: [],
tableData13: [],
tableData14: [],
tableData15: [],
}; };
}, },
mounted() { mounted() {
let that = this; let that = this;
let date = new Date(); let nowDate = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
month = month < 10 ? "0" + month : month;
that.currentDate = that.searchDate = year + "-" + month;
let days = new Date(year, month, 0).getDate();
let start_date = year + "-" + month + "-01";
let end_date = year + "-" + month + "-"+days;
that.start_date = that.query.querys[0][0].value = start_date;
that.end_date = that.query.querys[1][0].value = end_date;
let height = document.getElementById("elCol").clientHeight;
let chartheight = height+'px';
that.tableHeight = height-20;
that.getMgroup(); that.getMgroup();
}, },
methods: { methods: {
getWeekDate(dates){
let that = this;
dates = new Date(dates);
let week =dates.getDay(); //week
let weekFirst = 0, weekLast = 0;
if (week == 0) {
weekFirst = 6;
weekLast = 0; //
} else {
weekFirst = week - 1;
weekLast = 7 - week;
}
let first = new Date(dates.getTime() - weekFirst * ondDayTime); //
let last = new Date(new Date(dates.getTime() + weekLast * ondDayTime)); //
let dateArr = [];
for (let i = 0; i < 7; i++) {
let itemDate = new Date(first.getTime() + i * ondDayTime);
let item = itemDate.getDate();
dateArr.push(item);
}
that.weekDateList = dateArr;
that.query.start_date = that.query.querys[0][0].value = first.toISOString().split('T')[0];
that.query.end_date = that.query.querys[1][0].value = last.toISOString().split('T')[0];
that.options.forEach((item,index)=>{
that.getData(item.id,item.name,index);
})
},
getMgroup(){ getMgroup(){
let that = this; let that = this;
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
that.options = res; that.options = res;
let nowDate = new Date();
that.getWeekDate(nowDate);
}); });
}, },
getData() { setChart(name, option = null) {
// name , optionoption
var myChart = echarts.getInstanceByDom(
document.getElementById(name)
);
if (myChart == undefined) {
myChart = echarts.init(document.getElementById(name), "T");
}
if (option == null) {
option = Object.assign({}, this.basicOption);
}
setTimeout(() => {
try {
myChart.setOption(option);
} catch (error) {}
}, 500);
},
getData(mgroup_id,mgroup_name,mgroup_index) {
let that = this; let that = this;
that.tableData1 = []; that.tableData1 = [];
that.option.series.data[0].value = 0; let option = deepCopy(that.basicOption);
that.option.series.data[1].value = 0; option.title.text = mgroup_name+"任务进度";
option.series.data[0].value = 0;
option.series.data[1].value = 0;
that.query.querys[0][1].value = mgroup_id;
that.query.querys[1][1].value = mgroup_id;
that.$API.pm.mtask.cquery.req(that.query).then((res) => { that.$API.pm.mtask.cquery.req(that.query).then((res) => {
let data = []; let names = 'tableData'+mgroup_index;
let count_ok1 = 0; that[names] = res;
let count_notok1 = 0; console.log('names',names);
console.log('that[names]',that[names]);
let count_jh = 0,count_ok = 0,count_diff = 0;
if (res.length > 0) { if (res.length > 0) {
res.forEach((item) => { res.forEach((item) => {
let obj = item; count_jh+=item.count;
obj.rate = Math.round((item.count_ok / item.count) * 100).toFixed(2) + "%"; count_ok+=item.count_ok;
if (item.count_ok >= item.count) {
count_ok1++;
} else {
count_notok1++;
}
data.push(obj);
}); });
that.tableData1 = data; count_diff = count_jh - count_ok;
option.series.data[0].value = count_ok;
option.series.data[1].value = count_diff;
let chartId = 'linechart'+mgroup_index;
that.setChart(chartId, option);
}else{
let chartId = 'linechart'+mgroup_index;
that.setChart(chartId, option);
} }
that.option.series.data[0].value = count_ok1;
that.option.series.data[1].value = count_notok1;
}); });
}, },
mgroupChange(){
let that = this;
that.query.querys[0][1].value = that.mgroupId;
that.query.querys[1][1].value = that.mgroupId;
},
handleQuery(){ handleQuery(){
let that = this; let that = this;
if(this.searchDate!==''&&this.searchDate!==null){ if(this.searchDate!==''&&this.searchDate!==null){
@ -191,7 +714,9 @@ export default {
that.query.querys[0][0].value = that.start_date; that.query.querys[0][0].value = that.start_date;
that.query.querys[1][0].value = that.end_date; that.query.querys[1][0].value = that.end_date;
} }
that.getData(); that.options.forEach((item,index)=>{
that.getData(item.id,item.name,index);
})
}, },
handleExport(val) { handleExport(val) {
this.exportLoading = true; this.exportLoading = true;
@ -205,8 +730,12 @@ export default {
</script> </script>
<style scoped> <style scoped>
#elCol{ #linechart1,#linechart2,#linechart3,#linechart4,
height:100%; #linechart5,#linechart6,#linechart7,#linechart8,
#linechart9,#linechart10,#linechart11,#linechart12,
#linechart13,#linechart14,#linechart15,#linechart0{
width: 100%;
height: 300px;
} }
.tables { .tables {
position: absolute; position: absolute;

View File

@ -75,21 +75,19 @@
<el-table-column type="expand"> <el-table-column type="expand">
<template #default="props"> <template #default="props">
<div style="padding-left: 50px"> <div style="padding-left: 50px">
<el-descriptions :column="2"> <template v-for="item in props.row.handoverb" :key="item.id">
<template v-for="item in props.row.handoverb" :key="item.id"> <el-descriptions :column="3">
<el-descriptions :column="3"> <el-descriptions-item label="批次">
<el-descriptions-item label="批次"> {{item.batch}}
{{props.row.batch}} </el-descriptions-item>
</el-descriptions-item> <el-descriptions-item label="数量">
<el-descriptions-item label="数量"> {{item.count}}
{{props.row.count}} </el-descriptions-item>
</el-descriptions-item> <el-descriptions-item label="不合格标记" v-if="item.notok_sign_name!==null">
<el-descriptions-item label="不合格标记" v-if="props.row.notok_sign_name!==null"> {{item.notok_sign_name}}
{{props.row.notok_sign_name}} </el-descriptions-item>
</el-descriptions-item> </el-descriptions>
</el-descriptions> </template>
</template>
</el-descriptions>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -105,18 +103,13 @@
</el-table-column> </el-table-column>
<el-table-column label="数量" prop="count" width="80"></el-table-column> <el-table-column label="数量" prop="count" width="80"></el-table-column>
<el-table-column label="交接类型" prop="type" width="100"> <el-table-column label="交接类型" prop="type" width="100">
<template #default="scope"> <template #default="scope" v-if="mgroupName=='size'||mgroupName=='facade'">
<el-text <el-text v-if="scope.row.send_dept == deptId" type="primary">交送</el-text>
v-if="scope.row.send_mgroup == mgroupId" <el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
type="primary" </template>
>交送</el-text <template #default="scope" v-else>
> <el-text v-if="scope.row.send_mgroup == mgroupId" type="primary">交送</el-text>
<span style="width: 4px;"></span> <el-text v-if="scope.row.recive_mgroup == mgroupId" type="success">接收</el-text>
<el-text
v-if="scope.row.recive_mgroup == mgroupId"
type="success"
>接收</el-text
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交接类别" prop="type" width="80"> <el-table-column label="交接类别" prop="type" width="80">
@ -127,9 +120,12 @@
<el-tag v-if="scope.row.type == 20" type="warning" <el-tag v-if="scope.row.type == 20" type="warning"
>返工</el-tag >返工</el-tag
> >
<el-tag v-if="scope.row.type == 30" type="warning" <el-tag v-if="scope.row.type == 30" type="primary"
>检验</el-tag >检验</el-tag
> >
<el-tag v-if="scope.row.type == 40" type="danger"
>报废</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -167,20 +163,14 @@
size="small" size="small"
@click="table_receive(scope.row)" @click="table_receive(scope.row)"
type="success" type="success"
v-if=" v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null"
scope.row.recive_mgroup == mgroupId && >接收</el-button>
scope.row.submit_time == null
"
>接收</el-button
>
<el-button <el-button
link link
size="small" size="small"
@click="table_show(scope.row)" @click="table_show(scope.row)"
type="success" type="success"
v-if="scope.row.recive_mgroup == mgroupId &&scope.row.submit_time == null" >查看</el-button>
>查看</el-button
>
<el-button <el-button
link link
size="small" size="small"
@ -275,8 +265,10 @@ export default {
selection: [], selection: [],
handoverItem: {}, handoverItem: {},
values: "交送", values: "交送",
deptId:'',
mtask: "", mtask: "",
mlogId: "", mlogId: "",
mgroupId: "",
processId: "", processId: "",
processCate: "", processCate: "",
printer_name: "", printer_name: "",
@ -285,12 +277,27 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
console.log('that.mgroupName',that.mgroupName);
if(that.mgroupName=="size"){// if(that.mgroupName=="size"){//
that.params.material__process__name="一次超洗"; // that.params.material__process__name="";
that.apiObj = that.$API.wpm.handover.list; that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
if(res.length>0){
that.deptId = res[0].id;
that.params.dept=res[0].id;
console.log('that.deptId',that.deptId);
}
that.apiObj = that.$API.wpm.handover.list;
})
}else if(that.mgroupName=="facade"){// }else if(that.mgroupName=="facade"){//
that.params.material__process__name="二次超洗"; // that.params.material__process__name="";
that.apiObj = that.$API.wpm.handover.list; that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
if(res.length>0){
that.deptId = res[0].id;
that.params.dept=res[0].id;
console.log('that.deptId',that.deptId);
}
that.apiObj = that.$API.wpm.handover.list;
})
}else{// }else{//
that.printer_name = localStorage.getItem("printer_name"); that.printer_name = localStorage.getItem("printer_name");
that.$API.mtm.mgroup.list that.$API.mtm.mgroup.list
@ -393,14 +400,26 @@ export default {
searchTypeQuery() { searchTypeQuery() {
let that = this; let that = this;
if (that.searchType == "send") { if (that.searchType == "send") {
that.query.send_mgroup = that.mgroupId; if(that.mgroupName=="size"||that.mgroupName=="facade"){
that.query.recive_mgroup = ""; that.query.send_dept = that.deptId;
that.query.recive_dept = "";
}else{
that.query.send_mgroup = that.mgroupId;
that.query.recive_mgroup = "";
}
} else if (that.searchType == "recive") { } else if (that.searchType == "recive") {
that.query.recive_mgroup = that.mgroupId; if(that.mgroupName=="size"||that.mgroupName=="facade"){
that.query.send_mgroup = ""; that.query.send_dept = "";
that.query.recive_dept =that.deptId;
}else{
that.query.recive_mgroup = that.mgroupId;
that.query.send_mgroup = "";
}
} else { } else {
that.query.send_mgroup = ""; that.query.send_mgroup = "";
that.query.recive_mgroup = ""; that.query.recive_mgroup = "";
that.query.recive_dept = "";
that.query.send_dept = "";
} }
console.log(that.query); console.log(that.query);
this.$refs.table.queryData(that.query); this.$refs.table.queryData(that.query);

View File

@ -62,7 +62,7 @@
<el-form-item label="接收部门" prop="recive_dept"> <el-form-item label="接收部门" prop="recive_dept">
<el-select <el-select
v-model="form.recive_dept" v-model="form.recive_dept"
placeholder="接收工段" placeholder="接收部门"
clearable clearable
style="width: 100%" style="width: 100%"
@change="getUserList3" @change="getUserList3"
@ -281,7 +281,6 @@ export default {
let day = date.getDate(); let day = date.getDate();
that.form.handle_date = year + "-" + month + "-" + day; that.form.handle_date = year + "-" + month + "-" + day;
that.form.send_mgroup = that.mgroupId; that.form.send_mgroup = that.mgroupId;
console.log('mgroupName',that.mgroupName)
if(that.mgroupName=="size"||that.mgroupName=="facade"){// if(that.mgroupName=="size"||that.mgroupName=="facade"){//
that.$API.system.user.list that.$API.system.user.list
.req({ page: 0, posts__code__contains: "check" }) .req({ page: 0, posts__code__contains: "check" })
@ -292,7 +291,7 @@ export default {
that.deptID = that.$TOOL.data.get('gx_deptID'); that.deptID = that.$TOOL.data.get('gx_deptID');
that.getUserList(); that.getUserList();
} }
if(that.type==40){ if(that.type==20||that.type==40){
that.getMaterialNotok(); that.getMaterialNotok();
}else{ }else{
that.getMaterial(); that.getMaterial();
@ -321,18 +320,45 @@ export default {
getMaterial() { getMaterial() {
let that = this; let that = this;
var req = { var req = {
mgroupx: that.mgroupId,
page: 0, page: 0,
notok_sign__isnull : 1, notok_sign__isnull : 1,
count_xtest__isnull:1 count_xtest__isnull:1
}; };
if(that.mgroupName=="size"){ if(that.mgroupName=="size"){
req.material__process__name="一次超洗"; that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
}else if(that.mgroupName=="facade"){ if(res.length>0){
req.material__process__name="二次超洗"; req.belong_dept=res[0].id;
} this.$API.wpm.wmaterial.list.req(req).then((res) => {
let arr = [];
res.forEach(item=>{
let obj = {};
Object.assign(obj,item);
obj.label = item.batch;
arr.push(obj);
})
that.materialOptions = arr;
});
}
})
}else if(that.mgroupName=="facade"){
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
if(res.length>0){
req.belong_dept=res[0].id;
this.$API.wpm.wmaterial.list.req(req).then((res) => {
let arr = [];
res.forEach(item=>{
let obj = {};
Object.assign(obj,item);
obj.label = item.batch;
arr.push(obj);
})
that.materialOptions = arr;
});
}
})
}else{
req.mgroupx = that.mgroupId;
this.$API.wpm.wmaterial.list.req(req).then((res) => { this.$API.wpm.wmaterial.list.req(req).then((res) => {
// that.materialOptions = res;
let arr = []; let arr = [];
res.forEach(item=>{ res.forEach(item=>{
let obj = {}; let obj = {};
@ -342,6 +368,8 @@ export default {
}) })
that.materialOptions = arr; that.materialOptions = arr;
}); });
}
}, },
// //
getMaterialNotok() { getMaterialNotok() {

View File

@ -34,7 +34,6 @@
ref="table" ref="table"
:apiObj="apiObj" :apiObj="apiObj"
row-key="id" row-key="id"
hidePagination
:params="params" :params="params"
:query="query" :query="query"
> >
@ -182,6 +181,7 @@ export default {
apiObj: null, apiObj: null,
params: { params: {
mgroupx: "", mgroupx: "",
belong_dept:''
}, },
query: {}, query: {},
dialog: { dialog: {
@ -202,11 +202,21 @@ export default {
mounted() { mounted() {
let that = this; let that = this;
if(that.mgroupName=="size"){ if(that.mgroupName=="size"){
that.params.material__process__name = "一次超洗"; // that.params.material__process__name = "";
that.apiObj = that.$API.wpm.wmaterial.list; that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
if(res.length>0){
that.params.belong_dept=res[0].id;
}
that.apiObj = that.$API.wpm.wmaterial.list;
})
}else if(that.mgroupName=="facade"){ }else if(that.mgroupName=="facade"){
that.params.material__process__name = "二次超洗"; // that.params.material__process__name = "";
that.apiObj = that.$API.wpm.wmaterial.list; that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
if(res.length>0){
that.params.belong_dept=res[0].id;
}
that.apiObj = that.$API.wpm.wmaterial.list;
})
}else{ }else{
that.$API.mtm.mgroup.list that.$API.mtm.mgroup.list
.req({ page: 0, search: that.mgroupName }) .req({ page: 0, search: that.mgroupName })
@ -218,6 +228,7 @@ export default {
that.mgroupId = res[0].id; that.mgroupId = res[0].id;
that.$TOOL.data.set('gx_deptID',res[0].belong_dept) that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
that.params.mgroupx = res[0].id; that.params.mgroupx = res[0].id;
that.params.belong_dept = res[0].belong_dept;
that.apiObj = that.$API.wpm.wmaterial.list; that.apiObj = that.$API.wpm.wmaterial.list;
}); });
} }

View File

@ -137,7 +137,6 @@
<el-input-number <el-input-number
v-model="form.reminder_interval_list[0]" v-model="form.reminder_interval_list[0]"
:min="0" :min="0"
:disabled="mode == 'edit'"
controls-position="right" controls-position="right"
/>(min) />(min)
</el-form-item> </el-form-item>
@ -147,7 +146,6 @@
<el-input-number <el-input-number
v-model="form.reminder_interval_list[1]" v-model="form.reminder_interval_list[1]"
:min="0" :min="0"
:disabled="mode == 'edit'"
controls-position="right" controls-position="right"
/>(min) />(min)
</el-form-item> </el-form-item>