Compare commits

...

26 Commits

Author SHA1 Message Date
helloDy
6adac714f0 time 2024-04-26 10:36:29 +08:00
helloDy
0349f3cde0 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-04-26 10:16:38 +08:00
helloDy
4cafa78908 原片追溯,报表日期 2024-04-26 10:16:07 +08:00
61ef172534 Merge pull request 'projects/mesxc-zhp' (#373) from projects/mesxc-zhp into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #373
2024-04-26 10:15:45 +08:00
‘937886381’
19d913a49e Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-26 09:58:48 +08:00
‘937886381’
70c3fd44d6 修改bug 2024-04-26 09:58:14 +08:00
78d6f0bb23 Merge pull request 'projects/mesxc-zhp' (#372) from projects/mesxc-zhp into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #372
2024-04-26 09:54:08 +08:00
‘937886381’
cf51eff0b7 修改bug 2024-04-26 09:52:37 +08:00
‘937886381’
539dddf217 修改bug 2024-04-26 09:51:31 +08:00
‘937886381’
317d01934b Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-26 09:28:46 +08:00
‘937886381’
cdfe5c9c1b 修改bug 2024-04-26 09:28:24 +08:00
c1ea5157a5 Merge pull request 'projects/mesxc-zjl' (#371) from projects/mesxc-zjl into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #371
2024-04-26 08:56:39 +08:00
41ceefc20e Merge branch 'projects/mesxc-test' into projects/mesxc-zjl 2024-04-26 08:51:25 +08:00
54425859b5 报表 2024-04-26 08:50:32 +08:00
a2a4f8dccd Merge pull request 'projects/mesxc-zhp' (#370) from projects/mesxc-zhp into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #370
2024-04-26 08:49:53 +08:00
‘937886381’
fd3b054108 修改bug 2024-04-26 08:42:24 +08:00
‘937886381’
dacae0cbd8 修改bug 2024-04-26 08:32:32 +08:00
‘937886381’
be83c8196e 修改bug 2024-04-25 18:50:58 +08:00
‘937886381’
ef3f5d3fe7 修改bug 2024-04-25 17:14:16 +08:00
‘937886381’
ec550f22ec 修改bug 2024-04-25 17:08:59 +08:00
‘937886381’
60633ac581 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-25 17:03:24 +08:00
‘937886381’
9351b82d11 修改bug 2024-04-25 17:02:52 +08:00
5e4227ba25 Merge pull request 'projects/mesxc-zjl' (#369) from projects/mesxc-zjl into projects/mesxc-test
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #369
2024-04-25 14:50:30 +08:00
82f63dc4ff Merge branch 'projects/mesxc-test' into projects/mesxc-zjl 2024-04-25 14:49:08 +08:00
9a29185410 1 2024-04-25 14:46:32 +08:00
43e824f958 Merge pull request 'projects/mesxc-dy' (#368) from projects/mesxc-dy into projects/mesxc-test
Some checks are pending
continuous-integration/drone/push Build is running
Reviewed-on: #368
2024-04-25 14:45:40 +08:00
16 changed files with 461 additions and 286 deletions

View File

@ -50,7 +50,7 @@
"benz-amr-recorder": "^1.1.5", "benz-amr-recorder": "^1.1.5",
"bpmn-js-token-simulation": "0.10.0", "bpmn-js-token-simulation": "0.10.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"code-brick-zj": "^1.0.5", "code-brick-zj": "^1.1.0",
"core-js": "^3.26.0", "core-js": "^3.26.0",
"crypto-js": "^4.0.0", "crypto-js": "^4.0.0",
"diagram-js": "^12.3.0", "diagram-js": "^12.3.0",

View File

@ -1,8 +1,8 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-10-31 10:55:20 * @Date: 2023-10-31 10:55:20
* @LastEditTime: 2023-12-06 14:09:14 * @LastEditTime: 2024-04-25 15:28:44
* @LastEditors: zhp * @LastEditors: DY
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -34,11 +34,11 @@ export function exportEnergyPlcExcel(query) {
}) })
} }
export function getOriginalGlassRetrace(query) { export function getOriginalGlassRetrace(data) {
return request({ return request({
url: '/base/original-glass-statistics/originalGlassRetrace', url: '/base/original-glass-statistics/originalGlassRetrace',
method: 'get', method: 'post',
params: query, data
}) })
} }

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-25 09:02:38 * @LastEditTime: 2024-04-26 09:57:41
* @Description: * @Description:
--> -->
<template> <template>
@ -42,20 +42,21 @@
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;"> <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
<!-- <el-col :span="12"> --> <!-- <el-col :span="12"> -->
<!-- <div style="height: 34px;"> --> <!-- <div style="height: 34px;"> -->
<span style="display: inline-block;width: 400px;height: 10px;"> <span style="display: inline-block;width: 400px">
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span> <span v-if="op.name" class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name
<el-divider class="split" v-if="op.name" direction="vertical"></el-divider> }}</span>
<el-divider v-if="op.specifications" class="split" direction="vertical"></el-divider>
<!-- <span v-if="op.size" class="split"></span> --> <!-- <span v-if="op.size" class="split"></span> -->
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{ <span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
op.specifications }}</span> op.specifications }}</span>
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider> <el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{ <span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
op.planQuantity }}</span> op.planQuantity }}</span>
<span v-if="op.planQuantity" class="orderFinishTwo" <span v-if="op.planQuantity" class="orderFinishTwo"
style="font-size: 14px;opacity: calc(.6);"></span> style="font-size: 14px;opacity: calc(.6);"></span>
</span> </span>
<!-- <span style="overflow: hidden;"> --> <!-- <span style="overflow: hidden;"> -->
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{ <span class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
op.actualQuantity op.actualQuantity
}}</span> }}</span>
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px"></span> <span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px"></span>
@ -298,11 +299,11 @@ export default {
// equipmentList:[], // equipmentList:[],
EnergyMonitoringList: [], EnergyMonitoringList: [],
eqConfig: { eqConfig: {
header: ['序号', '设备名称', '产线名', '设备状态'], header: ['序号', '产线名', '设备名称', '设备状态'],
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [70, 130, 240, 120], columnWidth: [70, 150, 200, 120],
align: ['center'], align: ['center'],
data: [], data: [],
// index:true, // index:true,
@ -387,7 +388,7 @@ export default {
progressRate: 0.933333, progressRate: 0.933333,
specifications: '1100*5554*22', specifications: '1100*5554*22',
plan: 111111111111, plan: 111111111111,
actualQuantity:10000001111, actualQuantity:1000000111111,
}, },
{ {
id: '2', id: '2',
@ -459,11 +460,11 @@ export default {
if (ele.progressRate && ele.progressRate != 1) { if (ele.progressRate && ele.progressRate != 1) {
return { return {
id: ele.id, id: ele.id,
name: ele.name, name: this.getStr(String(ele.name), 8),
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications :'', specifications: ele.specifications ? '规格' + ele.specifications : '',
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan)) : '', planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan), 6) : '',
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity)) : '', actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
}; };
} }
}); });
@ -483,10 +484,9 @@ export default {
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`, </span>`,
// formatDate(item.planStartTime) || '', // formatDate(item.planStartTime) || '',
` `<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,`
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''} <span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
]); ]);
this.eqConfig.data = eqArr; this.eqConfig.data = eqArr;
@ -566,10 +566,10 @@ export default {
// removeEventListener('resize', resizeFun) // removeEventListener('resize', resizeFun)
// }, // },
methods: { methods: {
getStr(str) { getStr(str,num) {
// //
if (str.length > 6) { //10... if (str.length > num) { //10...
str = str.substr(0, 6) + "..." //10... str = str.substr(0, num) + "..." //10...
return str return str
} else { } else {
return str return str
@ -744,11 +744,11 @@ export default {
if (ele.progressRate && ele.progressRate != 1) { if (ele.progressRate && ele.progressRate != 1) {
return { return {
id: ele.id, id: ele.id,
name: ele.name, name: this.getStr(String(ele.name), 8),
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications :null, specifications: ele.specifications ? '规格' + ele.specifications : '',
planQuantity: ele.planQuantity ? '计划' + ele.planQuantity + '片' : null, planQuantity: ele.planQuantity ? '计划' + this.getStr(String(ele.planQuantity),6) : '',
actualQuantity: ele.actualQuantity ? ele.actualQuantity + '片' : null, actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
}; };
} }
}); });
@ -757,11 +757,11 @@ export default {
let eqArr = this.SJGWsData.detData.map((item, index) => [ let eqArr = this.SJGWsData.detData.map((item, index) => [
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''
}</span>`,
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''} `<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`, </span>`,
`<span style="color:rgba(255,255,255,0.5)">${
item.lineName || ''
}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'' :'' || ''}</span>`, // `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'' :'' || ''}</span>`,
]); ]);

View File

@ -32,11 +32,11 @@ export default {
return { return {
timestr: '', timestr: '',
config: { config: {
header: ['序号', '设备名称', '产线名', '设备状态'], header: ['序号', '产线名', '设备名称', '设备状态'],
headerBGC: 'rgba(32, 55, 96, 0.8)', headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)', oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)', evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60, 280, 120], columnWidth: [60, 120, 280],
align: ['center'], align: ['center'],
data: [], data: [],
// data: [ // data: [
@ -63,8 +63,8 @@ export default {
handler(newVal, oldVal) { handler(newVal, oldVal) {
let outArr = this.sjgEquipment.map((item, index) => [ let outArr = this.sjgEquipment.map((item, index) => [
index + 1, index + 1,
`<span title=${item.name || ''}>${item.name || ''}</span>`,
`<span title=${item.lineName || ''}>${item.lineName || ''}</span>`, `<span title=${item.lineName || ''}>${item.lineName || ''}</span>`,
`<span title=${item.name || ''}>${item.name || ''}</span>`,
`<span><div style="${ `<span><div style="${
item.status == '运行' item.status == '运行'
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '

View File

@ -86,16 +86,19 @@ import moment from 'moment';
// import DialogForm from './dialogForm.vue'; // import DialogForm from './dialogForm.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { getCorePLList } from '@/api/base/coreProductionLine';
import { parseTime } from '@/utils/ruoyi';
// import basicPageMixin from '@/mixins/lb/basicPageMixin'; // import basicPageMixin from '@/mixins/lb/basicPageMixin';
export default { export default {
name: 'statisticalData', name: 'QualityIsra',
// components: { // components: {
// DialogForm, // DialogForm,
// }, // },
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
data() { data() {
return { return {
isFold: false,
list: [], list: [],
dynamicProps: [], dynamicProps: [],
activeName: 'day', activeName: 'day',
@ -106,6 +109,16 @@ export default {
weekListUrl: '/base/quality-isra-statistics/weekList', weekListUrl: '/base/quality-isra-statistics/weekList',
monthListUrl: '/base/quality-isra-statistics/monthList', monthListUrl: '/base/quality-isra-statistics/monthList',
searchBarFormConfig: [ searchBarFormConfig: [
{
type: 'select',
label: '是否报废',
placeholder: '请选择是否报废',
param: 'checkDiscard',
selectOptions: [
{ name: '否', id: 0 },
{ name: '是', id: 1 }
],
},
{ {
type: 'select', type: 'select',
label: '缺陷类型', label: '缺陷类型',
@ -114,6 +127,17 @@ export default {
selectOptions: [], selectOptions: [],
labelField: 'name', labelField: 'name',
valueField: 'name', valueField: 'name',
defaultSelect: [],
filterable: true
},
{
type: 'select',
label: '产线',
selectOptions: [],
labelField: 'name',
valueField: 'name',
param: 'lineName',
filterable: true,
defaultSelect: [] defaultSelect: []
}, },
{ {
@ -139,8 +163,9 @@ export default {
], ],
// //
queryParams: { queryParams: {
checkDiscard: undefined,
checkType:undefined, checkType:undefined,
// productionId: undefined, lineName: undefined,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
// productionLineId: null, // productionLineId: null,
@ -149,6 +174,7 @@ export default {
}, },
created() { created() {
// this.getProductLineList(); // this.getProductLineList();
// this.isFold = this.searchBarWidth('QualityIsraBox', 1198);
}, },
computed: { computed: {
tableProps() { tableProps() {
@ -168,29 +194,20 @@ export default {
}, },
}, },
mounted() { mounted() {
// if (this.$route.query.woIdString) { if (this.$route.query.lineName) {
// console.log(this.$route.query.woIdString) // console.log('线', this.$route.query.lineName)
// this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',') this.queryParams.lineName = this.$route.query.lineName
// // this.queryParams.workOrderIdList = [this.$route.query.woIdString] this.searchBarFormConfig[2].defaultSelect = this.$route.query.lineName
// // let arr =[] }
// this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',') if (this.$route.query.originalGlassOutputTime) {
// console.log(this.searchBarFormConfig[0].defaultSelect); console.log('你好', this.$route.query.originalGlassOutputTime)
// } this.queryParams.startTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
// if (this.$route.params.startTime && this.$route.params.endTime) { this.queryParams.endTime = parseTime(new Date(Number(this.$route.query.originalGlassOutputTime)))
// this.searchBarFormConfig[0].defaultSelect = [ this.searchBarFormConfig[3].defaultSelect = [
// this.$route.params.startTime, this.queryParams.startTime,
// this.$route.params.endTime, this.queryParams.endTime,
// ]; ];
// this.queryParams.param = {}; }
// this.$set(
// this.queryParams.param,
// 'startTime',
// this.$route.params.startTime
// );
// this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
// } else {
// this.searchBarFormConfig[0].defaultSelect = [];
// }
this.getList() this.getList()
this.getData() this.getData()
this.getDict() this.getDict()
@ -393,8 +410,12 @@ export default {
pageNo:1 pageNo:1
} }
}); });
console.log(res) // console.log(res)
this.searchBarFormConfig[0].selectOptions = res.data.list this.searchBarFormConfig[1].selectOptions = res.data.list
await getCorePLList().then((res) => {
// console.log(res);
this.searchBarFormConfig[2].selectOptions = res.data;
})
// this.searchBarFormConfig[1].selectOptions = res.data.map((item) => { // this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
// return { // return {
// name: item.name, // name: item.name,
@ -425,7 +446,7 @@ export default {
}, },
/** 查询列表 */ /** 查询列表 */
async getDataList() { async getDataList() {
console.log(this.queryParams); console.log('查询条件', this.queryParams);
this.loading = true; this.loading = true;
// //
const { const {
@ -467,7 +488,10 @@ export default {
}, },
/** 取消按钮 */ /** 取消按钮 */
handleSearchBarBtnClick(val) { handleSearchBarBtnClick(val) {
console.log('11111', val)
if (val.btnName === 'search') { if (val.btnName === 'search') {
this.queryParams.checkDiscard = (val?.checkDiscard === 0 || val?.checkDiscard === 1) ? val?.checkDiscard : undefined
this.queryParams.lineName = val.lineName ? val.lineName : undefined
this.queryParams.checkType = val.checkType ? val.checkType : undefined this.queryParams.checkType = val.checkType ? val.checkType : undefined
// this.queryParams.productionId = val.productionId ? val.productionId : undefined // this.queryParams.productionId = val.productionId ? val.productionId : undefined
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2024-04-25 14:42:53 * @LastEditTime: 2024-04-26 09:58:51
* @Description: * @Description:
--> -->
<template> <template>
@ -23,18 +23,16 @@
</el-form-item> </el-form-item>
<el-form-item label="包装全检时间及产线" prop="val"> <el-form-item label="包装全检时间及产线" prop="val">
<el-date-picker <el-date-picker
v-model="listQuery.timeVal" v-model="listQuery.packTime"
value-format="timestamp" value-format="timestamp"
type="datetimerange" type="datetime"
size="small" size="small"
clearable clearable
start-placeholder="包装全检开始时间" placeholder="包装全检时间"
end-placeholder="包装全检结束时间"
range-separator="-"
@change="countTimes('timestamp3')" @change="countTimes('timestamp3')"
/> />
<el-select v-model="listQuery.lineName" size="small" clearable filterable placeholder="产线" @change="countTimes('timestamp3')" style="margin-left: 5px"> <el-select v-model="listQuery.lineName" size="small" clearable filterable placeholder="产线" @change="countTimes('timestamp3')" style="margin-left: 5px">
<el-option label="区域一" value="shanghai"></el-option> <el-option v-for="(item, index) in lineOptions" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -51,8 +49,8 @@
:table-data="list"> --> :table-data="list"> -->
<base-table :max-height="tableH" :table-props="tableProps" <base-table :max-height="tableH" :table-props="tableProps"
:table-data="list"> :table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="220" label="缺陷操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" />
</base-table> </base-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getList" /> --> @pagination="getList" /> -->
@ -64,56 +62,76 @@
// import AddOrUpdate from './add-or-updata'; // import AddOrUpdate from './add-or-updata';
// import unitDict from './unitDict'; // import unitDict from './unitDict';
// import basicPage from '../mixins/basic-page'; // import basicPage from '../mixins/basic-page';
import { publicFormatter } from '@/utils/dict'; // import { publicFormatter } from '@/utils/dict';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { getCorePLList } from '@/api/base/coreProductionLine';
import { import { getOriginalGlassRetrace } from '@/api/quality/rawMaterialTraceability';
getOriginalGlassRetrace,
getWorkOrderList,
// exportEnergyPlcExcel
} from '@/api/quality/rawMaterialTraceability';
const tableProps = [ const tableProps = [
{ {
prop: 'certificateNumber', prop: 'certificateNumber',
label: '合格证号', label: '合格证号',
minWidth: 120,
showOverflowtooltip: true,
filter: (val) => val ? val : '--'
}, },
{ {
prop: 'boxNumber', prop: 'boxNumber',
label: '箱号', label: '箱号',
minWidth: 150,
showOverflowtooltip: true,
filter: (val) => val ? val : '--'
}, },
{ {
prop: 'packagingCode', prop: 'packagingCode',
label: '成品周转编号', label: '成品周转编号',
minWidth: 180,
showOverflowtooltip: true,
filter: (val) => val ? val : '--'
}, },
{ {
prop: 'deepProcessingLineName', prop: 'deepProcessingLineName',
label: '深加工产线', label: '深加工产线',
minWidth: 120,
showOverflowtooltip: true,
filter: (val) => val ? val : '--'
}, },
{ {
prop: 'deepProcessingInputTime', prop: 'deepProcessingInputTime',
label: '深加工上片时间', label: '深加工上片时间',
filter: parseTime // filter: (val) => parseTime(val) ? parseTime(val) : '--',
filter: parseTime,
minWidth: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'deepProcessingOutputTime', prop: 'deepProcessingOutputTime',
label: '深加工下片时间', label: '深加工下片时间',
filter: parseTime filter: parseTime,
minWidth: 180,
showOverflowtooltip: true
}, },
{ {
prop: 'glassCode', prop: 'glassCode',
label: '原片周转编码', label: '原片周转编码',
minWidth: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'originalGlassLineName', prop: 'originalGlassLineName',
label: '原片产线', label: '原片产线',
minWidth: 150,
showOverflowtooltip: true
}, },
{ {
prop: 'originalGlassOutputTime', prop: 'originalGlassOutputTime',
label: '原片下片时间', label: '原片下片时间',
filter: parseTime filter: parseTime,
}, minWidth: 180,
showOverflowtooltip: true
}
// { // {
// prop: 'scrapDetail', // prop: 'scrapDetail',
// label: '', // label: '',
@ -126,29 +144,25 @@ export default {
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
data() { data() {
return { return {
// urlOptions: { lineOptions: [],
// getDataListURL: getMaterialUseLogPage,
// // deleteURL: deletePackingType,
// // exportURL: exportPackingExcel,
// },
tableProps, tableProps,
// tableBtn: [ tableBtn: [
// // this.$auth.hasPermi(`base:packaging-print-log:update`) // this.$auth.hasPermi(`base:packaging-print-log:update`)
// // ? // ?
// { {
// type: 'edit', type: 'detail0',
// btnName: '', btnName: '成品缺陷详情',
// }, },
// // : undefined, // : undefined,
// // this.$auth.hasPermi(`base:packaging-print-log:delete`) // this.$auth.hasPermi(`base:packaging-print-log:delete`)
// // ? // ?
// { {
// type: 'delete', type: 'detail1',
// btnName: '', btnName: '原片缺陷详情',
// } }
// // : undefined, // : undefined,
// ].filter((v) => v), ].filter((v) => v),
list: [], list: [],
listQuery: { listQuery: {
// pageSize: 10, // pageSize: 10,
@ -156,13 +170,12 @@ export default {
// total: 0, // total: 0,
certificateNumber: undefined, certificateNumber: undefined,
packagingCode: undefined, packagingCode: undefined,
timeVal:undefined, packTime: null,
lineName: undefined, lineName: null,
glassCode: undefined glassCode: undefined
}, },
count: 0,
useTime: false, useTime: false,
countArray: [], countArray: [false, false, false, false],
// tableH: this.tableHeight(260), // tableH: this.tableHeight(260),
formConfig: [ formConfig: [
// { // {
@ -260,81 +273,85 @@ export default {
// window.addEventListener('resize', () => { // window.addEventListener('resize', () => {
// this.tableH = this.tableHeight(260) // this.tableH = this.tableHeight(260)
// }) // })
this.count = 0 countArray: [false, false, false, false],
this.useTime = false this.useTime = false
// this.getList() // this.getList()
this.getDict() this.getDict()
}, },
methods: { methods: {
handleClick(raw) {
if (raw.type === 'detail1') {
//
this.$router.push({
path: '/quality/base/quality-isra',
query: {
// deepProcessingLineId: raw.data.deepProcessingLineId,
lineName: raw.data.deepProcessingLineName,
originalGlassOutputTime: raw.data.originalGlassOutputTime
},
});
} else {
//
this.$router.push({
path: '/quality/base/quality-inspection-data/detection-information/statistical-data',
query: {
startTime: raw.data.deepProcessingInputTime,
endTime: raw.data.deepProcessingOutputTime
},
});
}
},
countTimes(val) { countTimes(val) {
if (val === 1) { if (val === 1) {
let temp = this.listQuery?.certificateNumber !== '' this.countArray[0] = this.listQuery.certificateNumber !== '' && this.listQuery.certificateNumber !== undefined
this.countArray[0] = temp }
console.log('你好', this.countArray) if (val === 2) {
this.countArray[1] = this.listQuery?.packagingCode !== '' && this.listQuery?.packagingCode !== undefined
}
if (val === 3) {
this.countArray[2] = this.listQuery?.glassCode !== '' && this.listQuery?.glassCode !== undefined
} }
if (val && val !== '') {
if (val === 'timestamp3') { if (val === 'timestamp3') {
if (this.listQuery.timeVal.length > 0 || this.listQuery?.lineName !== '') { if ((this.listQuery.packTime !== '' && this.listQuery.packTime !== null) || (this.listQuery?.lineName !== '' && this.listQuery.lineName !== null)) {
this.useTime = true this.useTime = true
this.countArray[3] = true
} else { } else {
this.useTime = false this.useTime = false
this.countArray[3] = true
} }
} else {
this.count ++
}
} else {
this.count --
} }
}, },
getList() { getList() {
// console.log('nihc ', this.count, this.listQuery) let trueArray = this.countArray.filter(val => val === true)
// if (this.count > 1) { if (trueArray.length !== 1) {
// this.$message.error('') this.$message.error('请选择一个条件进行查询!')
// } else { } else {
// if (this.useTime === true) { if (this.useTime === true) {
// if (this.listQuery.timeVal.length > 0 && this.listQuery?.lineName !== '') { if (this.listQuery.packTime !== null && this.listQuery.packTime !== '' && this.listQuery.lineName !== null && this.listQuery.lineName !== '') {
// getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
// console.log(res);
// this.list = res.data || []
// console.log(this.list);
// // this.listQuery.total = res.data.total || 0
// })
// } else {
// this.$message.error('线')
// }
// } else {
getOriginalGlassRetrace({ ...this.listQuery }).then(res => { getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
console.log(res); console.log(res);
this.list = res.data || [] this.list = res.data || []
console.log(this.list); console.log(this.list);
// this.listQuery.total = res.data.total || 0 // this.listQuery.total = res.data.total || 0
}) })
// } } else {
// } this.$message.error('选择包装全检时,时间和产线均为必填!')
}
} else {
getOriginalGlassRetrace({ ...this.listQuery }).then(res => {
console.log(res);
this.list = res.data || []
console.log(this.list);
})
}
}
}, },
getDict() { getDict() {
// // 线
// getCustomerList().then((response) => { getCorePLList().then((res) => {
// console.log(response); console.log(res);
// this.customerList = response.data this.lineOptions = res.data;
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((response) => {
// console.log(response);
this.formConfig[0].selectOptions = response.data.map((item) => {
return {
name: item.name,
id: item.id
}
})
console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
}) })
}, },
// handleExport() { // handleExport() {

View File

@ -60,26 +60,26 @@ export default {
list: [], list: [],
dynamicProps:[], dynamicProps:[],
searchBarFormConfig: [ searchBarFormConfig: [
{ // {
type: 'select', // type: 'select',
label: '工单名称', // label: '',
placeholder: '请选择工单名称', // placeholder: '',
param: 'workOrderIdList', // param: 'workOrderIdList',
selectOptions: [], // selectOptions: [],
multiple: true, // multiple: true,
labelField: 'name', // labelField: 'name',
valueField: 'id', // valueField: 'id',
defaultSelect: [], // defaultSelect: [],
filterable: true // filterable: true
}, // },
{ // {
type: 'select', // type: 'select',
label: '产品', // label: '',
placeholder: '请选择产品', // placeholder: '',
param: 'productionId', // param: 'productionId',
selectOptions: [], // selectOptions: [],
filterable: true // filterable: true
}, // },
// { // {
// type: 'input', // type: 'input',
// label: '', // label: '',
@ -193,8 +193,8 @@ export default {
// }, // },
// //
queryParams: { queryParams: {
workOrderIdList:undefined, // workOrderIdList:undefined,
productionId: undefined, // productionId: undefined,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
// productionLineId: null, // productionLineId: null,
@ -207,16 +207,16 @@ export default {
computed: { computed: {
tableProps() { tableProps() {
return [ return [
{ // {
// width: 128, // // width: 128,
prop: 'workOrderName', // prop: 'workOrderName',
label: '工单名称', // label: '',
}, // },
{ // {
// width: 128, // // width: 128,
prop: 'productionName', // prop: 'productionName',
label: '产品', // label: '',
}, // },
{ {
// width: 160, // width: 160,
prop: 'inspectionContent', prop: 'inspectionContent',
@ -259,17 +259,17 @@ export default {
}, },
}, },
mounted() { mounted() {
if (this.$route.query.woIdString) { // if (this.$route.query.woIdString) {
console.log(this.$route.query.woIdString) // console.log(this.$route.query.woIdString)
this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',') // this.queryParams.workOrderIdList = this.$route.query.woIdString.split(',')
// this.queryParams.workOrderIdList = [this.$route.query.woIdString] // // this.queryParams.workOrderIdList = [this.$route.query.woIdString]
// let arr =[] // // let arr =[]
this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',') // this.searchBarFormConfig[0].defaultSelect = this.$route.query.woIdString.split(',')
console.log(this.searchBarFormConfig[0].defaultSelect); // console.log(this.searchBarFormConfig[0].defaultSelect);
} // }
if (this.$route.query.startTime && this.$route.query.endTime) { if (this.$route.query.startTime && this.$route.query.endTime) {
// console.log(this.$route.query.startTime); // console.log(this.$route.query.startTime);
this.searchBarFormConfig[2].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),] this.searchBarFormConfig[0].defaultSelect = [moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss'), moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss'),]
this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss') this.queryParams.startTime = moment(Number(this.$route.query.startTime)).format('yyyy-MM-DD HH:mm:ss')
this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss') this.queryParams.endTime = moment(Number(this.$route.query.endTime)).format('yyyy-MM-DD HH:mm:ss')
} }
@ -370,8 +370,8 @@ export default {
/** 取消按钮 */ /** 取消按钮 */
handleSearchBarBtnClick(val) { handleSearchBarBtnClick(val) {
if (val.btnName === 'search') { if (val.btnName === 'search') {
this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined // this.queryParams.workOrderIdList = val.workOrderIdList ? val.workOrderIdList : undefined
this.queryParams.productionId = val.productionId ? val.productionId : undefined // this.queryParams.productionId = val.productionId ? val.productionId : undefined
this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined this.queryParams.startTime = val.checkTime ? val.checkTime[0] : undefined
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
this.getList() this.getList()

View File

@ -75,7 +75,7 @@ export default {
selectOptions: [ selectOptions: [
{ id: '1', name: '当前班次' }, { id: '1', name: '当前班次' },
{ id: '2', name: '近24小时' }, { id: '2', name: '近24小时' },
{ id: '3', name: '日报' }, { id: '3', name: '昨日日报' },
], ],
defaultSelect: '1', defaultSelect: '1',
param: 'timeType', param: 'timeType',
@ -112,7 +112,7 @@ export default {
selectOptions: [ selectOptions: [
{ id: '1', name: '当前班次' }, { id: '1', name: '当前班次' },
{ id: '2', name: '近24小时' }, { id: '2', name: '近24小时' },
{ id: '3', name: '日报' }, { id: '3', name: '昨日日报' },
], ],
param: 'timeType', param: 'timeType',
clearable: false, clearable: false,
@ -196,6 +196,7 @@ export default {
this.tableProp = []; this.tableProp = [];
let timeArr = this.uniqueTime(data, 'timeStr'); let timeArr = this.uniqueTime(data, 'timeStr');
let arr = []; let arr = [];
let arr1 = [];
timeArr.map((item) => { timeArr.map((item) => {
let obj = {}; let obj = {};
obj.prop = item.timeStr; obj.prop = item.timeStr;
@ -203,7 +204,17 @@ export default {
obj.minWidth = 140; obj.minWidth = 140;
arr.push(obj); arr.push(obj);
}); });
this.tableProp = this.tableProp1.concat(arr); // let obj1 = {};
obj1.children = arr.length > 0 ? arr : [{ label: '合计' }];
obj1.label =
'24小时原片工段产量表(' +
moment(this.queryParams.startTime).format('YYYY-MM-DD HH:mm:ss') +
'-' +
moment(this.queryParams.endTime).format('YYYY-MM-DD HH:mm:ss') +
')';
arr1.push(obj1);
this.tableProp = this.tableProp1.concat(arr1); //
console.log(this.tableProp);
this.transferData(data); this.transferData(data);
}); });
}, },
@ -286,7 +297,6 @@ export default {
transferData(data) { transferData(data) {
let tempData = []; let tempData = [];
let lineNum = 0; //线 let lineNum = 0; //线
let sumArr = [];
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (i === 0) { if (i === 0) {
this.procedureName.map((item) => { this.procedureName.map((item) => {
@ -298,9 +308,6 @@ export default {
tempData.push(obj); tempData.push(obj);
}); });
lineNum++; lineNum++;
} else {
if (data[i].timeStr === '总计') {
sumArr.push(data[i]);
} else { } else {
if (data[i].lineName === data[i - 1].lineName) { if (data[i].lineName === data[i - 1].lineName) {
//线, //线,
@ -324,12 +331,6 @@ export default {
} }
} }
} }
}
for (let j = 0; j < tempData.length; j++) {
sumArr.map((item) => {
tempData[j]['总计'] = item[tempData[j].eName];
});
}
this.tableData = tempData; this.tableData = tempData;
this.$nextTick(() => { this.$nextTick(() => {
@ -395,7 +396,17 @@ export default {
arr.push(obj); arr.push(obj);
}); });
arr.push({ prop: 'sum', label: '合计' }); arr.push({ prop: 'sum', label: '合计' });
this.tableProp2 = this.tableProp1.concat(arr); // let arr1 = [];
let obj1 = {};
obj1.children = arr;
obj1.label =
'24小时深加工工段产量表(' +
moment(this.queryParams2.startTime).format('YYYY-MM-DD HH:mm:ss') +
'-' +
moment(this.queryParams2.endTime).format('YYYY-MM-DD HH:mm:ss') +
')';
arr1.push(obj1);
this.tableProp2 = this.tableProp1.concat(arr1); //
this.getSpanArr(this.tableData2); this.getSpanArr(this.tableData2);
this.$nextTick(() => { this.$nextTick(() => {
this.reTable2(); this.reTable2();

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2024-04-22 15:49:56 * @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 14:30:44 * @LastEditTime: 2024-04-26 10:32:29
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -43,12 +43,16 @@
</el-button> </el-button>
</el-form> </el-form>
<base-table <base-table
ref="productionDataMonthTable11"
id="productionDataMonthTable1"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData"
:span-method="objectSpanMethod1" :span-method="objectSpanMethod1"
@emitFun="handleEmitFun" @emitFun="handleEmitFun"
:max-height="tableH" /> :max-height="tableH" />
<base-table <base-table
ref="productionDataMonthTable22"
id="productionDataMonthTable2"
:table-props="tableProps1" :table-props="tableProps1"
:table-data="tableData1" :table-data="tableData1"
:span-method="objectSpanMethod1" :span-method="objectSpanMethod1"
@ -94,26 +98,47 @@ export default {
now.setHours(0, 0, 0, 0) now.setHours(0, 0, 0, 0)
now.setDate(1) now.setDate(1)
let startOfMonth = now.getTime() let startOfMonth = now.getTime()
// let firstDayOfMonth = new Date(startOfMonth)
this.listQuery.time = startOfMonth this.listQuery.time = startOfMonth
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods: { methods: {
getTime1() {
const firstDayOfMonth = new Date(this.listQuery.time)
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
// console.log('', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
this.$set(this.tableProps[2], 'label', '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
this.$set(this.tableProps1[2], 'label', '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
// this.tableProps[2].label = '(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
// this.tableProps1[2].label = '(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
console.log(this.tableProps, this.tableProps1)
},
async getList() { async getList() {
const firstDayOfMonth = new Date(this.listQuery.time)
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
this.tableData = []; this.tableData = [];
this.tableProps = [ this.tableProps = [
{ {
prop: 'lineName', prop: 'lineName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true
}, },
{ {
prop: 'paramsName', prop: 'paramsName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true
}, },
{
prop: 'xc',
label: '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
// align: 'center',
children: []
}
]; ];
this.tableData1 = []; this.tableData1 = [];
this.tableProps1 = [ this.tableProps1 = [
@ -121,18 +146,28 @@ export default {
prop: 'lineName', prop: 'lineName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true
}, },
{ {
prop: 'paramsName', prop: 'paramsName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true,
}, },
{
prop: 'xc1',
label: '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
// align: 'center',
children: []
}
]; ];
await productionMonthY(this.listQuery).then((res) => { await productionMonthY(this.listQuery).then((res) => {
this.resData = res.data; this.resData = res.data;
// //
Object.keys(this.resData).forEach((item) => { Object.keys(this.resData).forEach((item) => {
this.tableProps.push({ this.tableProps[2].children.push({
prop: item, prop: item,
label: item, label: item,
'show-overflow-tooltip': true, 'show-overflow-tooltip': true,
@ -144,7 +179,7 @@ export default {
this.resData1 = res.data; this.resData1 = res.data;
// //
Object.keys(this.resData1).forEach((item) => { Object.keys(this.resData1).forEach((item) => {
this.tableProps1.push({ this.tableProps1[2].children.push({
prop: item, prop: item,
label: item, label: item,
'show-overflow-tooltip': true, 'show-overflow-tooltip': true,
@ -152,6 +187,7 @@ export default {
}); });
this.buildTableData1(this.resData1); this.buildTableData1(this.resData1);
}); });
// this.getTime1()
}, },
// 2 // 2
buildTableData1(data) { buildTableData1(data) {
@ -187,6 +223,9 @@ export default {
} }
this.tableData1 = tempData; this.tableData1 = tempData;
this.getSpanArr1(this.tableData1); this.getSpanArr1(this.tableData1);
this.$nextTick(() => {
this.reTable1();
});
}, },
// //
buildTableData(data) { buildTableData(data) {
@ -222,6 +261,15 @@ export default {
} }
this.tableData = tempData; this.tableData = tempData;
this.getSpanArr(this.tableData); this.getSpanArr(this.tableData);
this.$nextTick(() => {
this.reTable();
});
},
reTable() {
this.$refs.productionDataMonthTable11.doLayout('productionDataMonthTable1');
},
reTable1() {
this.$refs.productionDataMonthTable22.doLayout('productionDataMonthTable2');
}, },
getSpanArr1(data) { getSpanArr1(data) {
this.span2 = []; this.span2 = [];

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: Do not edit * @Author: Do not edit
* @Date: 2024-04-22 15:49:56 * @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 11:14:34 * @LastEditTime: 2024-04-26 10:34:12
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -43,12 +43,16 @@
</el-button> </el-button>
</el-form> </el-form>
<base-table <base-table
ref="productionDataYearTable11"
id="productionDataYearTable1"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData"
:span-method="objectSpanMethod1" :span-method="objectSpanMethod1"
@emitFun="handleEmitFun" @emitFun="handleEmitFun"
:max-height="tableH" /> :max-height="tableH" />
<base-table <base-table
ref="productionDataYearTable22"
id="productionDataYearTable2"
:table-props="tableProps1" :table-props="tableProps1"
:table-data="tableData1" :table-data="tableData1"
:span-method="objectSpanMethod1" :span-method="objectSpanMethod1"
@ -103,19 +107,39 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getTime() {
const firstDayOfYear = new Date(this.listQuery.time)
const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
// console.log('', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
this.tableProps[0].label = '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
this.tableProps1[0].label = '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
},
async getList() { async getList() {
// this.getTime()
const firstDayOfYear = new Date(this.listQuery.time)
const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
this.tableData = []; this.tableData = [];
this.tableProps = [ this.tableProps = [
{ {
prop: 'lineName', prop: 'lineName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true
}, },
{ {
prop: 'paramsName', prop: 'paramsName',
label: '', label: '',
fixed: true, fixed: true,
width: 120,
'show-overflow-tooltip': true
}, },
{
prop: 'xc',
label: '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
// align: 'center',
children: []
}
]; ];
this.tableData1 = []; this.tableData1 = [];
this.tableProps1 = [ this.tableProps1 = [
@ -123,18 +147,26 @@ export default {
prop: 'lineName', prop: 'lineName',
label: '', label: '',
fixed: true, fixed: true,
'show-overflow-tooltip': true
}, },
{ {
prop: 'paramsName', prop: 'paramsName',
label: '', label: '',
fixed: true, fixed: true,
'show-overflow-tooltip': true
}, },
{
prop: 'xc1',
label: '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
// align: 'center',
children: []
}
]; ];
await productionYearY(this.listQuery).then((res) => { await productionYearY(this.listQuery).then((res) => {
this.resData = res.data; this.resData = res.data;
// //
Object.keys(this.resData).forEach((item) => { Object.keys(this.resData).forEach((item) => {
this.tableProps.push({ this.tableProps[2].children.push({
prop: item, prop: item,
label: item, label: item,
'show-overflow-tooltip': true, 'show-overflow-tooltip': true,
@ -146,7 +178,7 @@ export default {
this.resData1 = res.data; this.resData1 = res.data;
// //
Object.keys(this.resData1).forEach((item) => { Object.keys(this.resData1).forEach((item) => {
this.tableProps1.push({ this.tableProps1[2].children.push({
prop: item, prop: item,
label: item, label: item,
'show-overflow-tooltip': true, 'show-overflow-tooltip': true,
@ -189,6 +221,9 @@ export default {
} }
this.tableData1 = tempData; this.tableData1 = tempData;
this.getSpanArr1(this.tableData1); this.getSpanArr1(this.tableData1);
this.$nextTick(() => {
this.reTable1();
});
}, },
// //
buildTableData(data) { buildTableData(data) {
@ -224,6 +259,15 @@ export default {
} }
this.tableData = tempData; this.tableData = tempData;
this.getSpanArr(this.tableData); this.getSpanArr(this.tableData);
this.$nextTick(() => {
this.reTable();
});
},
reTable() {
this.$refs.productionDataYearTable11.doLayout('productionDataYearTable1');
},
reTable1() {
this.$refs.productionDataYearTable22.doLayout('productionDataYearTable2');
}, },
getSpanArr1(data) { getSpanArr1(data) {
this.span2 = []; this.span2 = [];

View File

@ -170,8 +170,8 @@ export default {
mounted() { mounted() {
// this.formConfig[1].defaultSelect[] // this.formConfig[1].defaultSelect[]
this.listQuery.startTime = Date.now() this.listQuery.startTime = Date.now()
this.time = moment(new Date(Date.now())).format('YYYY-MM-DD') this.time = moment(new Date((Date.now())).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(Date.now() + 24*60*60*1000).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss')
this.listQuery.endTime = Date.now() + 24 * 60 * 60 * 1000 this.listQuery.endTime = Date.now()
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000 // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList() this.getDataList()
// this.getSpanArr(this.tableData) // this.getSpanArr(this.tableData)
@ -308,7 +308,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入' putType: '原料投入(kg)'
}, },
{ {
classType: 1, classType: 1,
@ -374,7 +374,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入', putType: '原料投入(kg)',
}, },
{ {
classType: 2, classType: 2,
@ -440,7 +440,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入', putType: '原料投入(kg)',
}, },
{ {
classType: 3, classType: 3,
@ -535,9 +535,9 @@ export default {
// Date.now() - 24 * 60 * 60 - 1000 // Date.now() - 24 * 60 * 60 - 1000
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.startTime = val.checkTime ? val.checkTime : undefined; this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime).setHours(8, 0, 0, 0)).getTime() : undefined;
this.time = moment(new Date(this.listQuery.startTime)).format('YYYY-MM-DD') this.time = moment(new Date((val.checkTime)).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).format('YYYY-MM-DD HH:mm:ss')
this.listQuery.endTime = val.checkTime ? val.checkTime + 24 * 60 * 60 * 1000 : undefined; this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).getTime() : undefined;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -551,6 +551,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable{
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:51 * @LastEditTime: 2024-04-25 17:13:14
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -493,6 +493,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 14:08:46 * @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-25 13:30:11 * @LastEditTime: 2024-04-26 09:10:53
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -13,7 +13,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="产线" prop="productionLineId"> <el-form-item label="产线" prop="productionLineId">
<el-select v-model="listQuery.productionLineId" placeholder="请选择"> <el-select v-model="listQuery.productionLineId" placeholder="请选择" clearable>
<el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -413,6 +413,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -25,7 +25,7 @@ const tableProp1 = [
{ {
prop: 'lineName', prop: 'lineName',
label: '生产线', label: '生产线',
width: 110, width: 90,
fixed: true, fixed: true,
}, },
{ {
@ -71,6 +71,7 @@ export default {
label: '产线', label: '产线',
selectOptions: [], selectOptions: [],
param: 'lineId', param: 'lineId',
multiple: true,
}, },
{ {
type: 'button', type: 'button',
@ -92,7 +93,7 @@ export default {
queryParams: { queryParams: {
startTime: '', startTime: '',
endTime: '', endTime: '',
lineId: '', lineId: [],
}, },
tableProp1, tableProp1,
tableProp: [], tableProp: [],
@ -108,8 +109,9 @@ export default {
let start = moment().format('yyyy-MM-DD'); let start = moment().format('yyyy-MM-DD');
let end = moment().format('yyyy-MM-DD'); let end = moment().format('yyyy-MM-DD');
this.formConfig[0].defaultSelect = [start, end]; this.formConfig[0].defaultSelect = [start, end];
this.queryParams.startTime = moment(start + ' 00:00:00').valueOf(); this.queryParams.startTime =
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf(); moment(start + ' 00:00:00').valueOf() + 25200000;
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
this.getList(); this.getList();
}, },
methods: { methods: {
@ -238,12 +240,10 @@ export default {
buttonClick(val) { buttonClick(val) {
if (val.btnName === 'search') { if (val.btnName === 'search') {
if (val.timeVal && val.timeVal.length > 0) { if (val.timeVal && val.timeVal.length > 0) {
this.queryParams.startTime = moment( this.queryParams.startTime =
val.timeVal[0] + ' 00:00:00' moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000;
).valueOf(); this.queryParams.endTime =
this.queryParams.endTime = moment( moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
val.timeVal[1] + ' 23:59:59'
).valueOf();
} }
this.queryParams.lineId = val.lineId; this.queryParams.lineId = val.lineId;
this.getList(); this.getList();

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:36 * @LastEditTime: 2024-04-26 09:42:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -56,7 +56,7 @@ const tableProps = [
}, },
{ {
prop: 'equipmentName', prop: 'equipmentName',
label: '', label: '机械手名称',
width: '200' width: '200'
}, },
{ {
@ -395,6 +395,11 @@ export default {
}; };
</script> </script>
<style> <style>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
.baseTable .el-table__body tr.current-row>td.el-table__cell { .baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,14 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 15:07:53 * @Date: 2024-04-18 15:07:53
* @LastEditTime: 2024-04-25 13:41:27 * @LastEditTime: 2024-04-26 09:41:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-table :header-cell-style="{ <el-table :max-height="tableH" :header-cell-style="{
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod"> }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
@ -40,6 +40,8 @@ import {
} from '@/api/report/qcReport'; } from '@/api/report/qcReport';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
// import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
// import { getList, } from "@/api/base/qualityScrapType"; // import { getList, } from "@/api/base/qualityScrapType";
const tableProps = [ const tableProps = [
// { // {
@ -54,7 +56,7 @@ const tableProps = [
}, },
{ {
prop: 'dataType', prop: 'dataType',
label: '', label: '类别',
width: '150', width: '150',
}, },
{ {
@ -67,11 +69,16 @@ const tableProps = [
}, },
{ {
prop: 'area', prop: 'area',
label: '面积' label: '面积(㎡)'
}, },
{ {
prop: 'rate', prop: 'rate',
label: '占比%', label: '占比(%)',
// filter: (val) => val == false ? '' : '',
},
{
prop: 'rateSum',
label: '综合成品率(%)',
// filter: (val) => val == false ? '' : '', // filter: (val) => val == false ? '' : '',
}, },
// { // {
@ -129,7 +136,7 @@ export default {
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'checkTime', param: 'checkTime',
defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime(), new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000], defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()],
width: 350 width: 350
}, },
{ {
@ -167,8 +174,8 @@ export default {
created() { }, created() { },
mounted() { mounted() {
// this.formConfig[1].defaultSelect[] // this.formConfig[1].defaultSelect[]
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000 this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000 // this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList() this.getDataList()
this.getDict() this.getDict()
@ -286,14 +293,15 @@ export default {
// }) // })
this.tableData = response.data.map((ele) => { this.tableData = response.data.map((ele) => {
return { return {
dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : '废版', dataType: ele.dataType == 1 ? '成品' : ele.dataType == 2 ? '取样' : ele.dataType == 4 ? '合计' : ele.dataType == 3 ? '废版' : '',
code: ele.code, code: ele.code,
putNum: ele.putNum, putNum: ele.putNum,
lineName: ele.lineName, lineName: ele.lineName,
type: ele.type, type: ele.type == '合计' ? '' : ele.type,
pieces: ele.pieces, pieces: ele.pieces,
area: ele.area, area: ele.area,
rate: (ele.rate * 100).toFixed(2) rate: ele.lineName != '总计' && ele.rate ? (ele.rate * 100).toFixed(2) : '',
rateSum: ele.lineName === '总计' ? (ele.rate * 100).toFixed(2) : ''
// useNum: ele.useNum, // useNum: ele.useNum,
// num: ele.num, // num: ele.num,
// size: typeof (ele.size) // size: typeof (ele.size)
@ -357,8 +365,10 @@ export default {
// this.listQuery.materialId = val.materialId ? val.materialId : undefined; // this.listQuery.materialId = val.materialId ? val.materialId : undefined;
// this.listQuery.startTime = '1706144404000'; // this.listQuery.startTime = '1706144404000';
// this.listQuery.endTime = '1706230804000'; // this.listQuery.endTime = '1706230804000';
this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() : undefined; // this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000 : undefined; // this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000 : undefined;
this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() : undefined;
this.listQuery.lineId = val.lineId ? val.lineId : undefined this.listQuery.lineId = val.lineId ? val.lineId : undefined
this.getDataList(); this.getDataList();
break; break;
@ -387,6 +397,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }