Compare commits

..

No commits in common. "de831b339f66e5b35935cc5fdcc043fc6a3f3807" and "b8d26c87d8458f579f0a70ccf2ab22fa360c5552" have entirely different histories.

15 changed files with 580 additions and 546 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: zhp
# @Date: 2024-04-12 14:30:48
# @LastEditTime: 2024-04-25 10:07:02
# @LastEditors: zhp
# @LastEditTime: 2024-04-23 17:25:25
# @LastEditors: DY
# @Description:
###
# 开发环境配置
@ -13,7 +13,8 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://xcac.mes.picaiba.com/'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-04-25 09:03:50
* @LastEditTime: 2024-04-22 09:42:45
* @LastEditors: zhp
* @Description:
-->
@ -628,7 +628,7 @@ export default {
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>`
])
this.cutConfig.data = cutArr
// this.$nextTick(() => {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-04-24 15:48:32
* @LastEditTime: 2024-04-17 15:48:21
* @LastEditors: zhp
* @Description:
-->
@ -113,7 +113,7 @@ export default {
color:this.colors,
title:{
text: num,
subtext: '总数/',
subtext: '总数/',
top: '32%',
left: '49%',
textAlign: 'center',

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-04-25 09:02:38
* @LastEditTime: 2024-04-24 14:48:00
* @Description:
-->
<template>
@ -42,26 +42,21 @@
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
<!-- <el-col :span="12"> -->
<!-- <div style="height: 34px;"> -->
<span style="display: inline-block;width: 400px;height: 10px;">
<span style="display: inline-block;width: 330px;">
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
<el-divider class="split" v-if="op.name" direction="vertical"></el-divider>
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
<!-- <span v-if="op.size" class="split"></span> -->
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
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);">{{
op.planQuantity }}</span>
<span v-if="op.planQuantity" class="orderFinishTwo"
style="font-size: 14px;opacity: calc(.6);"></span>
</span>
<!-- <span style="overflow: hidden;"> -->
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
op.actualQuantity
}}</span>
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px"></span>
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
direction="vertical"></el-divider>
<!-- </span> -->
<!-- </div> -->
<el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
@ -115,79 +110,78 @@ const qualityYearList = [
{
name: '翻转机',
code: 'EQ20240110112358000235',
status: '运行',
status: '正常',
error: true,
},
{
name: '烘干炉',
code: 'EQ20240110112537000241',
status: '停机',
status: '计划停机',
error: true,
},
{
name: '清洗机',
code: ' EQ20240110112310000232',
status: '故障',
status: '正常',
error: true,
},
{
name: '钢化清洗机',
code: 'EQ20240110111700000208',
status: '故障',
status: '正常',
error: true,
},
{
name: '固化机',
code: 'EQ20240110111700000201',
status: '停机',
status: '正常',
error: false,
},
{
name: '磨边清洗机',
code: ' EQ20240110111700000208',
status: '停机',
status: '正常',
error: true,
},
{
name: '预热机',
code: 'EQ20240110111700000205',
status: '运行',
status: '故障',
error: false,
},
{
name: '下片机',
code: 'EQ20240115151435000279',
status: '故障',
error: true,
},
{
name: '冷却机',
code: 'EQ20240110111700000203',
status: '运行',
status: '正常',
error: false,
},
{
name: 'A储片机106',
code: 'EQ20240110111700000202',
status: '停机',
status: '正常',
error: true,
},
{
name: '二次清洗机',
code: 'EQ20240110111700000209',
status: '停机',
status: '正常',
error: true,
},
{
name: '二次磨边机',
code: ' EQ20240110110927000181',
status: '停机',
status: '正常',
error: false,
},
{
name: '测试设备',
code: 'EQ20240110111700000201',
status: '运行',
status: '正常',
error: true,
},
];
@ -298,11 +292,11 @@ export default {
// equipmentList:[],
EnergyMonitoringList: [],
eqConfig: {
header: ['序号', '设备名称', '产线名', '设备状态'],
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [70, 130, 240, 120],
columnWidth: [70, 100, 200, 90, 90],
align: ['center'],
data: [],
// index:true,
@ -383,11 +377,11 @@ export default {
let detData = [
{
id: '1',
name: '镀釉光伏玻璃GW',
name: '测试工单',
progressRate: 0.933333,
specifications: '1100*5554*22',
plan: 111111111111,
actualQuantity:10000001111,
plan: 11111,
actualQuantity:111,
},
{
id: '2',
@ -461,9 +455,9 @@ export default {
id: ele.id,
name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications :'',
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan)) : '',
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity)) : '',
specifications: ele.specifications ? '规格' + ele.specifications :null,
planQuantity: ele.plan ? '计划' + ele.plan + '片' : null,
actualQuantity: ele.actualQuantity + '片',
};
}
});
@ -486,8 +480,9 @@ export default {
`
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</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)">${item.code || ''}</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 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;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: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.error == true ? '是' : '否' || ''}</span>`,
]);
this.eqConfig.data = eqArr;
let data = [
@ -566,15 +561,6 @@ export default {
// removeEventListener('resize', resizeFun)
// },
methods: {
getStr(str) {
//
if (str.length > 6) { //10...
str = str.substr(0, 6) + "..." //10...
return str
} else {
return str
}
},
getData() {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
@ -760,10 +746,10 @@ export default {
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${
item.lineName || ''
item.code || ''
}</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.status == '正常' ? '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 #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:10px 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>`,
]);
this.eqConfig.data = eqArr;
// this.$nextTick(() => {
@ -985,7 +971,7 @@ export default {
.now-secondary-title {
display: inline-block;
width: 110px;
width: 70px;
margin: 0;
font-size: 14px;
line-height: 2em;
@ -1004,27 +990,16 @@ export default {
width: 60px;
margin: 0;
font-size: 14px;
text-align: right;
color: rgba(0, 255, 247, 1);
}
.orderFinishTwo{
display: inline-block;
width: 15px;
margin: 0;
font-size: 14px;
line-height: 2em;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
text-align: right;
color: rgba(0, 255, 247, 1);
}
.orderPlan {
display: inline-block;
// width: 80px;
width: 100px;
margin: 0;
font-size: 14px;
// line-height: 2em;
line-height: 2em;
color: #fff;
text-align: left;
}

View File

@ -32,11 +32,11 @@ export default {
return {
timestr: '',
config: {
header: ['序号', '设备名称', '产线名', '设备状态'],
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60, 280, 120],
columnWidth: [60, 150, 190],
align: ['center'],
data: [],
// data: [
@ -64,7 +64,7 @@ export default {
let outArr = this.sjgEquipment.map((item, index) => [
index + 1,
`<span title=${item.name || ''}>${item.name || ''}</span>`,
`<span title=${item.lineName || ''}>${item.lineName || ''}</span>`,
`<span title=${item.code || ''}>${item.code || ''}</span>`,
`<span><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 '
@ -72,11 +72,11 @@ export default {
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
}"></div> ${item.status || ''}</span>`,
// `<span"><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: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.error == true ? '' : '' || ''}</span>`,
`<span"><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: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.error == true ? '是' : '否' || ''}</span>`,
]);
this.config.data = outArr;
this.$refs['eqScrollBoard'].updateRows(outArr);

View File

@ -80,7 +80,7 @@
</span>
</ShadowRect>
<!-- <ShadowRect>
<ShadowRect>
<span
style="
font-size: 20px;
@ -99,7 +99,7 @@
: ''
}}mg/
</span>
</ShadowRect> -->
</ShadowRect>
</div>
<KilnLine :horizontal="true" />
<div
@ -130,9 +130,8 @@
align-items: center;
justify-content: space-between;
">
<!-- :options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" -->
<SelectorBtnGroup
:options="['氧气含量', '二氧化硫', '氮氧化物']"
:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']"
@emitFun="toggleType"
:active="chartType" />
<SelectorBtnGroup

View File

@ -1,61 +1,20 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: DY
* @LastEditTime: 2024-04-25 14:42:53
* @LastEditors: zhp
* @LastEditTime: 2024-04-07 16:25:19
* @Description:
-->
<template>
<div class="app-container">
<!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
<el-form
:inline="true"
:model="listQuery"
class="blueTip">
<el-form-item label="合格证号" prop="certificateNumber">
<el-input size="small" v-model="listQuery.certificateNumber" clearable placeholder="合格证号" @blur="countTimes(1)" @clear="countArray[0] = false"></el-input>
</el-form-item>
<el-form-item label="成品周转编号" prop="packagingCode">
<el-input size="small" v-model="listQuery.packagingCode" clearable placeholder="成品周转编号" @blur="countTimes(2)" @clear="countArray[1] = false"></el-input>
</el-form-item>
<el-form-item label="原片周转编号" prop="glassCode">
<el-input size="small" v-model="listQuery.glassCode" clearable placeholder="原片周转编号" @blur="countTimes(3)" @clear="countArray[2] = false"></el-input>
</el-form-item>
<el-form-item label="包装全检时间及产线" prop="val">
<el-date-picker
v-model="listQuery.timeVal"
value-format="timestamp"
type="datetimerange"
size="small"
clearable
start-placeholder="包装全检开始时间"
end-placeholder="包装全检结束时间"
range-separator="-"
@change="countTimes('timestamp3')"
/>
<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-select>
</el-form-item>
<el-form-item>
<el-button
v-if="this.$auth.hasPermi('monitoring:rawMaterial-traceability:query')"
type="primary"
size="small"
@click="getList">
查询
</el-button>
</el-form-item>
</el-form>
<!-- <base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="list"> -->
<base-table :max-height="tableH" :table-props="tableProps"
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> -->
</base-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getList" /> -->
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getList" />
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" /> -->
</div>
</template>
@ -75,17 +34,35 @@ import {
} from '@/api/quality/rawMaterialTraceability';
const tableProps = [
{
prop: 'certificateNumber',
label: '合格证号',
prop: 'orderName',
label: '订单名称',
},
{
prop: 'boxNumber',
label: '箱号',
prop: 'workOrderName',
label: '工单名称',
},
{
prop: 'palletNumber',
label: '托号',
},
{
prop: 'transportQuantity',
label: '该托片数',
},
{
prop: 'packagingCode',
label: '成品周转编号',
label: '包装条码',
},
{
prop: 'originalGlassLineName',
label: '原片产线',
},
{
prop: 'originalGlassOutputTime',
label: '原片下片时间',
filter: parseTime
},
{
prop: 'deepProcessingLineName',
@ -97,23 +74,10 @@ const tableProps = [
filter: parseTime
},
{
prop: 'deepProcessingOutputTime',
prop: 'productionOutputTime',
label: '深加工下片时间',
filter: parseTime
},
{
prop: 'glassCode',
label: '原片周转编码',
},
{
prop: 'originalGlassLineName',
label: '原片产线',
},
{
prop: 'originalGlassOutputTime',
label: '原片下片时间',
filter: parseTime
},
// {
// prop: 'scrapDetail',
// label: '',
@ -151,70 +115,37 @@ export default {
// ].filter((v) => v),
list: [],
listQuery: {
// pageSize: 10,
// pageNo: 1,
// total: 0,
certificateNumber: undefined,
packagingCode: undefined,
timeVal:undefined,
lineName: undefined,
glassCode: undefined
pageSize: 10,
pageNo: 1,
total: 0,
workOrderId: undefined,
startTime: undefined,
endTime:undefined,
},
count: 0,
useTime: false,
countArray: [],
// tableH: this.tableHeight(260),
formConfig: [
// {
// type: 'select',
// label: '',
// selectOptions: [],
// labelField: 'name',
// valueField: 'name',
// param: 'workOrderName',
// filterable: true
// },
{
type: 'input',
label: '合格证号',
placeholder: '合格证号',
param: 'certificateNumber',
},
{
type: 'input',
label: '成品周转编号',
placeholder: '成品周转编号',
param: 'packagingCode'
},
{
type: 'datePicker',
label: '包装全检时间及产线',
dateType: 'datetimerange',
format: 'timestamp',
valueFormat: "timestamp",
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect: [],
width: 250
},
{
type: 'select',
label: '',
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'name',
param: 'lineName',
param: 'workOrderName',
filterable: true
},
{
type: 'input',
label: '原片周转编号',
placeholder: '原片周转编号',
param: 'glassCode'
},
// {
// type: 'datePicker',
// label: '',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: "yyyy-MM-dd",
// rangeSeparator: '-',
// startPlaceholder: '',
// endPlaceholder: '',
// param: 'timeVal',
// defaultSelect: [],
// width: 250
// },
{
type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '',
@ -260,58 +191,17 @@ export default {
// window.addEventListener('resize', () => {
// this.tableH = this.tableHeight(260)
// })
this.count = 0
this.useTime = false
// this.getList()
this.getList()
this.getDict()
},
methods: {
countTimes(val) {
if (val === 1) {
let temp = this.listQuery?.certificateNumber !== ''
this.countArray[0] = temp
console.log('你好', this.countArray)
}
if (val && val !== '') {
if (val === 'timestamp3') {
if (this.listQuery.timeVal.length > 0 || this.listQuery?.lineName !== '') {
this.useTime = true
} else {
this.useTime = false
}
} else {
this.count ++
}
} else {
this.count --
}
},
getList() {
// console.log('nihc ', this.count, this.listQuery)
// if (this.count > 1) {
// this.$message.error('')
// } else {
// if (this.useTime === true) {
// if (this.listQuery.timeVal.length > 0 && 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 => {
console.log(res);
this.list = res.data || []
console.log(this.list);
// this.listQuery.total = res.data.total || 0
})
// }
// }
},
getDict() {
//
@ -353,7 +243,7 @@ export default {
buttonClick(val) {
console.log(val)
if (val.btnName === 'search') {
this.listQuery.certificateNumber = val.certificateNumber ? val.certificateNumber :undefined
this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined
// this.queryParams.status = val.status
// if (val.timeVal && val.timeVal.length != 0 ) {
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
@ -382,17 +272,3 @@ export default {
},
};
</script>
<style scoped>
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0b58ff;
border-radius: 1px;
margin-right: 8px;
margin-top: 8px;
margin-left: 16px;
}
</style>

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 14:30:44
* @LastEditTime: 2024-04-25 09:53:41
* @LastEditors: DY
* @Description:
-->
@ -12,11 +12,11 @@
:model="listQuery"
class="blueTip">
<el-form-item
label="月"
label="月"
prop="reportTime">
<el-date-picker
v-model="listQuery.time"
value-format="timestamp"
value-format="yyyy-MM-dd HH:mm:ss"
type="month"
size="small"
placeholder="选择月"></el-date-picker>
@ -94,8 +94,8 @@ export default {
now.setHours(0, 0, 0, 0)
now.setDate(1)
let startOfMonth = now.getTime()
// let firstDayOfMonth = new Date(startOfMonth)
this.listQuery.time = startOfMonth
let firstDayOfMonth = new Date(startOfMonth)
this.listQuery.time = parseTime(firstDayOfMonth)
},
mounted() {
this.getList();

View File

@ -1,14 +1,14 @@
<!--
* @Author: Do not edit
* @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 14:31:53
* @LastEditTime: 2024-04-24 15:28:44
* @LastEditors: DY
* @Description:
-->
<template>
<div class="weekly">
<el-form :inline="true" :model="listQuery" class="blueTip">
<el-form-item label="周" prop="reportTime">
<el-form-item>
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px" placeholder="选择周">

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 11:14:34
* @LastEditTime: 2024-04-25 09:54:39
* @LastEditors: DY
* @Description:
-->
@ -12,11 +12,11 @@
:model="listQuery"
class="blueTip">
<el-form-item
label="年份"
label=""
prop="reportTime">
<el-date-picker
v-model="listQuery.time"
value-format="timestamp"
value-format="yyyy-MM-dd HH:mm:ss"
type="year"
size="small"
placeholder="选择年"></el-date-picker>
@ -93,11 +93,9 @@ export default {
let now = new Date()
now.setHours(0, 0, 0, 0)
now.setDate(1)
now.setMonth(0)
let startOfMonth = now.getTime()
// let firstDayOfMonth = new Date(startOfMonth)
// console.log('', parseTime(firstDayOfMonth))
this.listQuery.time = startOfMonth
let firstDayOfMonth = new Date(startOfMonth)
this.listQuery.time = parseTime(firstDayOfMonth)
},
mounted() {
this.getList();

View File

@ -1,3 +1,10 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-24 13:52:45
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
@ -17,11 +24,8 @@
</el-table-column>
</el-table> -->
<el-table id="exportTable" :header-cell-style="{
background: '#F2F4F9',
color: '#606266'
}" class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
<el-table-column align="center" prop="" :label=" '配料日报' + time " width="120">
<el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
<el-table-column align="center" prop="" label="配料日报" width="120">
<el-table-column label="原料样式" align="right" width="150">
<el-table-column prop="className" label="时间" width="120">
</el-table-column>
@ -32,7 +36,7 @@
<el-table-column prop="activityName"></el-table-column>
<el-table-column prop="message"></el-table-column>
</el-table-column> -->
<el-table-column align="center" style="text-align: center;" v-for="(item, index) in codeList " :prop="item"
<el-table-column align="center" style="text-align: center;" v-for="(item,index) in codeList " :prop="item"
:label="item">
<!-- <template slot-scope="scope">
<el-col :span="12">
@ -73,7 +77,6 @@ import {
} from '@/api/report/qcReport';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import FileSaver from 'file-saver'
import moment from 'moment'
// import { getList, } from "@/api/base/qualityScrapType";
const headers = [
// {
@ -119,7 +122,7 @@ const headers = [
];
export default {
mixins: [tableHeightMixin],
mixins: [ tableHeightMixin],
data() {
return {
urlOptions: {
@ -127,33 +130,34 @@ export default {
// deleteURL: deleteQualityHotMaterial,
// exportURL: exportFactoryExcel,
},
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11','sj14'],
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
tableData: [],
listQuery: {
startTime: undefined,
endTime: undefined
endTime:undefined
},
time: '',
formConfig: [
{
type: 'datePicker',
label: '时间',
dateType: 'date',
format: 'yyyy-MM-dd',
label: '时间',
dateType: 'daterange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: "timestamp",
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'checkTime',
defaultSelect: Date.now(),
width: 150
defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 350
},
{
type: 'button',
type:'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'button',
type:'button',
btnName: '导出',
name: 'export',
color: 'primary',
@ -169,29 +173,14 @@ export default {
},
mounted() {
// this.formConfig[1].defaultSelect[]
this.listQuery.startTime = Date.now()
this.time = moment(new Date(Date.now())).format('YYYY-MM-DD')
this.listQuery.endTime = Date.now() + 24 * 60 * 60 * 1000
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList()
// this.getSpanArr(this.tableData)
// this.getDict();
},
methods: {
timestampToTime(date) {
// 10*1000131000
// var date = new Date(timestamp * 1000);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = date.getHours() + ":";
var m = date.getMinutes() + ":";
var s = date.getSeconds();
return Y + M + D + h + m + s;
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0;
this.tableData.map((item, index) => {
@ -217,7 +206,7 @@ export default {
colspan: _col
}
}
if (columnIndex === 1) {
if (columnIndex === 1 ) {
if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
return {
rowspan: 2,
@ -226,14 +215,14 @@ export default {
}
}
if (columnIndex === 1) {
if (rowIndex % 2 == 1) {
if (rowIndex %2 == 1) {
return {
rowspan: 1,
colspan: 2
}
}
}
if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 ) {
if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) {
if (rowIndex % 2 == 0) {
return {
rowspan: 2,
@ -266,7 +255,7 @@ export default {
// Blob
new Blob([wbout], { type: "application/octet-stream" }),
//
"配料日报.xlsx"
"切割堆垛日报表.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
@ -296,7 +285,7 @@ export default {
let arr = [
{
classType: 1,
className: '白班(8:00-20:00)',
className:'白班(8:00-20:00)',
'sj1': null,
'sj2': null,
'sj3': null,
@ -306,9 +295,10 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '原料投入'
putType: '投入数量'
},
{
classType: 1,
@ -322,7 +312,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
putType: ''
@ -339,7 +330,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '投入次数'
},
@ -355,7 +347,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
putType: ''
@ -372,9 +365,10 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '原料投入',
putType: '投入数量',
},
{
classType: 2,
@ -388,13 +382,14 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
putType: ''
},
{
classType: 2,
classType:2,
className: '夜班(20:00-8:00)',
'sj1': null,
'sj2': null,
@ -405,7 +400,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '投入次数',
},
@ -421,7 +417,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
putType: ''
@ -438,9 +435,10 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '原料投入',
putType: '投入数量',
},
{
classType: 3,
@ -454,9 +452,10 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
'sj1+sj2':null,
putType: ''
},
{
@ -471,7 +470,8 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
putType: '投入次数',
},
@ -487,40 +487,41 @@ export default {
'sj8': null,
'sj10': null,
'sj11': null,
'sj12': null,
'sj13': null,
'sj14': null,
'sj1+sj2': null,
putType: ''
},
]
res.data.forEach((ele) => {
if (ele.classType === 1 && ele.code == 'sj1+sj2') {
arr[1]['putType'] = ele.useNum
arr[3]['putType'] = ele.putNum
if(ele.classType === 1 && ele.code == 'sj1+sj2') {
arr[1]['putType'] = ele.putNum
arr[3]['putType'] = ele.useNum
// arr[1]['sj2'] = ele.putNum
// arr[3]['sj2'] = ele.useNum
} else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
arr[5]['putType'] = ele.useNum
arr[7]['putType'] = ele.putNum
arr[5]['putType'] = ele.putNum
arr[7]['putType'] = ele.useNum
// arr[5]['sj2'] = ele.putNum
// arr[7]['sj2'] = ele.useNum
} else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
arr[9]['putType'] = ele.useNum
arr[11]['putType'] = ele.putNum
arr[9]['putType'] = ele.putNum
arr[11]['putType'] = ele.useNum
// arr[9]['sj2'] = ele.putNum
// arr[11]['sj2'] = ele.useNum
}
this.codeList.forEach((item) => {
if (ele.classType === 1 && ele.code == item) {
// console.log(arr[0][item])
arr[0][item] = ele.useNum
arr[2][item] = ele.putNum
arr[0][item] = ele.putNum
arr[2][item] = ele.useNum
} else if (ele.classType === 2 && ele.code == item) {
arr[4][item] = ele.useNum
arr[6][item] = ele.putNum
arr[4][item] = ele.putNum
arr[6][item] = ele.useNum
} else if (ele.classType === 3 && ele.code == item) {
arr[8][item] = ele.useNum
arr[10][item] = ele.putNum
arr[8][item] = ele.putNum
arr[10][item] = ele.useNum
}
})
})
@ -531,13 +532,10 @@ export default {
});
},
buttonClick(val) {
console.log(val.checkTime)
// Date.now() - 24 * 60 * 60 - 1000
switch (val.btnName) {
case 'search':
this.listQuery.startTime = val.checkTime ? val.checkTime : undefined;
this.time = moment(new Date(this.listQuery.startTime)).format('YYYY-MM-DD')
this.listQuery.endTime = val.checkTime ? val.checkTime + 24 * 60 * 60 * 1000 : undefined;
this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
this.getDataList();
break;
case 'export':
@ -559,7 +557,6 @@ export default {
padding: 0;
height: 35px;
}
::v-deep.el-table thead.is-group th {
background: none;
}
@ -570,7 +567,6 @@ export default {
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
border-bottom: none;
}
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
content: '';
position: absolute;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:51
* @LastEditTime: 2024-04-24 09:34:36
* @LastEditors: zhp
* @Description:
-->
@ -17,12 +17,6 @@
</el-table-column>
</el-table-column>
</el-table>
<el-table class="baseTable" :max-height="tableH" id="exportTableChild" :data="tableDataChild" style="width: 100%">
<el-table-column v-for="item in tablePropsChild" :prop="item.prop" :label="item.label" align="center">
<el-table-column v-for="it in item.children" :prop="it.prop" :label="it.label" align="center">
</el-table-column>
</el-table-column>
</el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" /> -->
<!-- <base-dialog
@ -48,37 +42,6 @@ import {
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import FileSaver from 'file-saver'
import { parseTime } from '../../../core/mixins/code-filter';
const tablePropsChild = [
{
prop: '',
label: '人工堆垛人员'
},
{
prop: '',
label: '规格mm'
},
{
prop: '',
label: '片数'
},
{
prop: '',
label: '规格mm'
},
{
prop: '',
label: '片数'
},
{
prop: '',
label: '规格mm'
},
{
prop: '',
label: '片数'
},
]
// import { getList, } from "@/api/base/qualityScrapType";
const tableProps = [
// {
@ -158,10 +121,8 @@ export default {
// deleteURL: deleteQualityHotMaterial,
// exportURL: exportFactoryExcel,
},
tablePropsChild,
tableProps,
tableData: [],
tableDataChild:[],
mergeArr: [],//
pos: 0,
listQuery: {
@ -195,7 +156,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
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: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 350
},
{
@ -232,10 +193,9 @@ export default {
},
created() { },
mounted() {
// this.formConfig[1].defaultSelect[0] =
// this.formConfig[1].defaultSelect[0] =
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime()
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000
// this.formConfig[1].defaultSelect[]
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList()
this.getDict()
@ -327,36 +287,7 @@ export default {
// Blob
new Blob([wbout], { type: "application/octet-stream" }),
//
"切割堆垛日报.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
return wbout;
//do something......
})
var xlsxParam = { raw: true };
/* 从表生成工作簿对象 */
import('xlsx').then(excel => {
var wb = excel.utils.table_to_book(
document.querySelector("#exportTableChild"),
xlsxParam
);
/* 获取二进制字符串作为输出 */
var wbout = excel.write(wb, {
bookType: "xlsx",
bookSST: true,
type: "array",
});
try {
FileSaver.saveAs(
//Blob
//Blob JavaScript
//File Blob blob 使
// Blob
new Blob([wbout], { type: "application/octet-stream" }),
//
"切割堆垛日报.xlsx"
"原片各线堆垛表.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
@ -364,6 +295,7 @@ export default {
return wbout;
//do something......
})
},
// otherMethods(val) {
// if (val.type === 'detail') {
@ -463,8 +395,8 @@ export default {
// this.listQuery.materialId = val.materialId ? val.materialId : undefined;
// this.listQuery.startTime = '1706144404000';
// 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.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24*60*60*1000 : undefined;
this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
this.listQuery.lineId = val.lineId ? val.lineId : undefined
this.getDataList();
break;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-25 13:30:11
* @LastEditTime: 2024-04-24 14:41:01
* @LastEditors: zhp
* @Description:
-->
@ -9,7 +9,7 @@
<div class="app-container">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间" prop="startTime">
<el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期">
<el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="产线" prop="productionLineId">
@ -46,10 +46,7 @@
</el-table-column>
</el-table> -->
<el-table :header-cell-style="{
background: '#F2F4F9',
color: '#606266'
}" class=" baseTable" :data="tableData" style="width: 100%">
<el-table class="baseTable" :data="tableData" style="width: 100%">
<el-table-column label="时间" align="right" width="150">
<el-table-column prop="name" label="缺陷" width="120">
</el-table-column>
@ -62,6 +59,21 @@
</el-table-column> -->
<el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label">
</el-table-column>
<div slot="append" v-if="this.tableData.length != 0" style="text-align: center">
<!--在此处添加你想要插入在表格最后一行的内容-->
<el-col :span="8">
人工监测人员
</el-col>
<el-col :span="8">
<!-- {{ }} -->
</el-col>
<el-col :span="8">
合计
</el-col>
<el-col :span="8">
{{ sum }}
</el-col>
</div>
</el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" /> -->
@ -148,59 +160,59 @@ export default {
radio:'晚班查询',
lineList:[],
codeList: [
// {
// label: '19:00',
// prop: 'num0'
{
label: '19:00',
prop: 'num0'
// },
// {
// label: '20:00',
// prop: 'num1'
// },
// {
// label: '21:00',
// prop: 'num2'
// },
// {
// label: '22:00',
// prop: 'num3'
// },
// {
// label: '23:00',
// prop: 'num4'
// },
// {
// label: '00:00',
// prop: 'num5'
// },
// {
// label: '01:00',
// prop: 'num6'
// },
// {
// label: '02:00',
// prop: 'num7'
// },
// {
// label: '03:00',
// prop: 'num8'
// },
// {
// label: '04:00',
// prop: 'num9'
// },
// {
// label: '05:00',
// prop: 'num10'
// },
// {
// label: '06:00',
// prop: 'num11'
// },
// {
// label: '',
// prop: 'sum'
// }
},
{
label: '20:00',
prop: 'num1'
},
{
label: '21:00',
prop: 'num2'
},
{
label: '22:00',
prop: 'num3'
},
{
label: '23:00',
prop: 'num4'
},
{
label: '00:00',
prop: 'num5'
},
{
label: '01:00',
prop: 'num6'
},
{
label: '02:00',
prop: 'num7'
},
{
label: '03:00',
prop: 'num8'
},
{
label: '04:00',
prop: 'num9'
},
{
label: '05:00',
prop: 'num10'
},
{
label: '06:00',
prop: 'num11'
},
{
label: '不良合计',
prop: 'sum'
}
],
tableData: [],
formConfig: [
@ -214,7 +226,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'checkTime',
defaultSelect: [Date.now() - 24 * 60 * 60*1000, Date.now()],
defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 350
},
{
@ -243,7 +255,7 @@ export default {
// this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
// this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.listQuery.startTime = new Date()
this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime()
this.getDataList()
this.getDict()
// this.getSpanArr(this.tableData)
@ -256,12 +268,28 @@ export default {
this.lineList = res.data
},
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// if (columnIndex === 1) {
// if (rowIndex === this.tableData.length-1) {
// return {
// rowspan: 1,
// colspan: 4
// let spanOneArr = [], concatOne = 0;
// this.tableData.map((item, index) => {
// if (index === 0) {
// spanOneArr.push(1);
// } else {
// //
// if (item.className === this.tableData[index - 1].className) {
// spanOneArr[concatOne] += 1;
// spanOneArr.push(0);
// } else {
// spanOneArr.push(1);
// concatOne = index;
// };
// }
// });
// if (columnIndex === 0) {
// const _row = spanOneArr[rowIndex];
// const _col = _row > 0 ? 1 : 0;
// return {
// rowspan: _row,
// colspan: _col
// }
// }
// },
@ -282,7 +310,134 @@ export default {
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
},
handleGetClass(e) {
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
// console.log(startTime1)
this.codeList = []
if (e === '早班查询') {
let arr = [
{
label: '07:00',
prop:'num0'
},
{
label: '08:00',
prop: 'num1'
},
{
label: '09:00',
prop: 'num2'
},
{
label: '10:00',
prop: 'num3'
},
{
label: '11:00',
prop: 'num4'
},
{
label: '12:00',
prop: 'num5'
},
{
label: '13:00',
prop: 'num6'
},
{
label: '14:00',
prop: 'num7'
},
{
label: '15:00',
prop: 'num8'
},
{
label: '16:00',
prop: 'num9'
},
{
label: '17:00',
prop: 'num10'
},
{
label: '18:00',
prop: 'num11'
},
{
label: '不良合计',
prop: 'sum'
}
]
arr.forEach((ele,index) => [
this.codeList.push(ele)
])
this.getDataList()
} else {
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
let arr = [
{
label: '19:00',
prop: 'num0'
},
{
label: '20:00',
prop: 'num1'
},
{
label: '21:00',
prop: 'num2'
},
{
label: '22:00',
prop: 'num3'
},
{
label: '23:00',
prop: 'num4'
},
{
label: '00:00',
prop: 'num5'
},
{
label: '01:00',
prop: 'num6'
},
{
label: '02:00',
prop: 'num7'
},
{
label: '03:00',
prop: 'num8'
},
{
label: '04:00',
prop: 'num9'
},
{
label: '05:00',
prop: 'num10'
},
{
label: '06:00',
prop: 'num11'
},
{
label: '不良合计',
prop: 'sum'
}
]
arr.forEach((ele, index) => [
this.codeList.push(ele)
])
this.getDataList()
}
},
handleExport() {
//
@ -308,7 +463,7 @@ export default {
// Blob
new Blob([wbout], { type: "application/octet-stream" }),
//
"全检检验记录.xlsx"
"原片各线堆垛表.xlsx"
);
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
@ -329,45 +484,28 @@ export default {
// },
//
getDataList() {
var str = null
if (this.radio == '晚班查询') {
console.log(this.radio);
str = new Date(new Date(this.listQuery.startTime).setHours(19, 0, 0, 0)).getTime()
if (this.radio === '晚班查询') {
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(1, 9, 0, 0)).getTime()
} else {
str = new Date(new Date(this.listQuery.startTime).setHours(7, 0, 0, 0)).getTime()
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
}
// this.dataListLoading = true;
this.dataListLoading = true;
// this.listQuery.startTime = '1713197388000';
// this.listQuery.endTime = '1713254961000';
this.urlOptions.getDataListURL({
// productionLineId: '1696716506443354114',
// startTime: '1705618800000',
// startTime: '1705618800000'
productionLineId: this.listQuery.productionLineId,
startTime: str
startTime:this.listQuery.startTime
},).then(res => {
let count = 0
let arr = []
console.log(res.data)
res.data.timeStrList.push('不良合计')
this.codeList = res.data.timeStrList.map((ele, index) => {
if (ele === '不良合计') {
return {
label: ele,
prop: 'sum'
}
} else {
return {
label: ele,
prop: 'num' + index
}
}
})
console.log(this.codeList)
// res.data.timeStrList.forEach((ele, index) => [
// this.codeList.push(ele)
// ])
this.sum = res.data.allSum
for (let i in res.data.qualityInspectionRecordReportLineVOMap) {
count ++,
console.log(res.data.qualityInspectionRecordReportLineVOMap[i])
@ -388,11 +526,130 @@ export default {
}
console.log(arr);
this.tableData = arr
this.tableData.push({
name: '检验员',
num11: '合计',
sum: res.data.allSum
})
// console.log(res)
// console.log(res.data)
// let arr = [
// {
// classType: 1,
// className: '(8:00-20:00)',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: ''
// },
// {
// classType: 1,
// className: '(8:00-20:00)',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: ''
// },
// {
// classType: 2,
// className: '(20:00-8:00)',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: '',
// },
// {
// classType: 2,
// className: '(20:00-8:00)',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: '',
// },
// {
// classType: 1,
// className: '',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: '',
// },
// {
// classType: 2,
// className: '',
// 'sj1': null,
// 'sj2': null,
// 'sj3': null,
// 'sj4': null,
// 'sj5': null,
// 'sj7': null,
// 'sj8': null,
// 'sj10': null,
// 'sj11': null,
// 'sj12': null,
// 'sj13': null,
// 'sj14': null,
// putType: '',
// }
// ]
// res.data.forEach((ele) => {
// this.codeList.forEach((item) => {
// if (ele.classType === 1 && ele.code == item) {
// // console.log(arr[0][item])
// arr[0][item] = ele.putNum
// arr[1][item] = ele.useNum
// } else if (ele.classType === 2 && ele.code == item) {
// arr[2][item] = ele.putNum
// arr[3][item] = ele.useNum
// } else if (ele.classType === 3 && ele.code == item) {
// arr[4][item] = ele.putNum
// arr[5][item] = ele.useNum
// }
// })
// })
// // console.log(arr)
// this.tableData = arr
// this.dataListLoading = false;
});
},
buttonClick(val) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:36
* @LastEditTime: 2024-04-24 09:56:20
* @LastEditors: zhp
* @Description:
-->
@ -132,7 +132,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
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: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 350
},
{
@ -170,8 +170,8 @@ export default {
created() { },
mounted() {
// this.formConfig[1].defaultSelect[]
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime()
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList()
this.getDict()
@ -365,8 +365,8 @@ export default {
// this.listQuery.materialId = val.materialId ? val.materialId : undefined;
// this.listQuery.startTime = '1706144404000';
// 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.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000 : undefined;
this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
this.listQuery.lineId = val.lineId ? val.lineId : undefined
this.getDataList();
break;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-18 15:07:53
* @LastEditTime: 2024-04-25 13:41:27
* @LastEditTime: 2024-04-24 09:58:07
* @LastEditors: zhp
* @Description:
-->
@ -129,7 +129,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
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: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 350
},
{
@ -167,8 +167,8 @@ export default {
created() { },
mounted() {
// this.formConfig[1].defaultSelect[]
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime()
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
this.getDataList()
this.getDict()
@ -357,8 +357,8 @@ export default {
// this.listQuery.materialId = val.materialId ? val.materialId : undefined;
// this.listQuery.startTime = '1706144404000';
// 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.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000 : undefined;
this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
this.listQuery.lineId = val.lineId ? val.lineId : undefined
this.getDataList();
break;