Compare commits
No commits in common. "3aee4a54fb0e2a56aec380e492a188a4237d876c" and "0a1175075d7d5181655f8473786581e3845220e8" have entirely different histories.
3aee4a54fb
...
0a1175075d
4
.env.dev
4
.env.dev
@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2024-03-05 09:48:49
|
# @LastEditTime: 2024-03-01 20:40:47
|
||||||
# @LastEditors: zhp
|
# @LastEditors: DY
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:49:02
|
* @Date: 2023-12-12 13:49:02
|
||||||
* @LastEditTime: 2024-03-12 11:16:01
|
* @LastEditTime: 2024-01-24 15:54:58
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 20 KiB |
@ -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-03-12 09:05:20
|
* @LastEditTime: 2024-02-29 15:48:47
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -870,8 +870,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -888,16 +886,14 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
.unit{
|
.unit{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 290px;
|
left: 260px;
|
||||||
top:25px;
|
top:25px;
|
||||||
color: rgba($color: #ffffff, $alpha: 8);
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.time{
|
.time{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 1360px;
|
left: 1360px;
|
||||||
top:25px;
|
top:25px;
|
||||||
color: rgba($color: #ffffff, $alpha: 8);
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<div class="bar-item">
|
<div class="bar-item">
|
||||||
<div v-if="title" class="bar-title" ds>
|
<div v-if="title" class="bar-title" ds>
|
||||||
<span>
|
<span>
|
||||||
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .01em" />
|
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</span>
|
</span>
|
||||||
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||||
|
@ -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-03-12 09:34:06
|
* @LastEditTime: 2024-02-23 16:11:48
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -632,12 +632,12 @@ export default {
|
|||||||
])
|
])
|
||||||
this.eqConfig.data = eqArr
|
this.eqConfig.data = eqArr
|
||||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||||
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
|
||||||
this.getList()
|
this.getList()
|
||||||
this.initWebSocket()
|
this.initWebSocket()
|
||||||
this.SJGInitWebSocket()
|
this.SJGInitWebSocket()
|
||||||
this.getTimes()
|
this.getTimes()
|
||||||
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
||||||
|
// this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
||||||
const _this = this;
|
const _this = this;
|
||||||
_this.beilv2 = document.documentElement.clientWidth / 1920
|
_this.beilv2 = document.documentElement.clientWidth / 1920
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
@ -699,22 +699,22 @@ export default {
|
|||||||
])
|
])
|
||||||
this.processConfig.data = processArr
|
this.processConfig.data = processArr
|
||||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
// if (res.data.length !==0) {
|
if (res.data.length !==0) {
|
||||||
// let processArr = res.data.map((item, index) => [
|
let processArr = res.data.map((item, index) => [
|
||||||
// // console.log(item)
|
// console.log(item)
|
||||||
// `<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.productionLineName || ''}
|
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||||
// </span>`,
|
</span>`,
|
||||||
// `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||||
// `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||||
// `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||||
// ])
|
])
|
||||||
// this.processConfig.data = processArr
|
this.processConfig.data = processArr
|
||||||
// this.$refs['processScrollBoard'].updateRows(processArr)
|
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||||
// }
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTimes() {
|
getTimes() {
|
||||||
@ -982,8 +982,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
|
||||||
.visual-container {
|
.visual-container {
|
||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 1080px;
|
height: 1080px;
|
||||||
@ -995,15 +993,12 @@ export default {
|
|||||||
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
// word-spacing: 8px;
|
word-spacing: 8px;
|
||||||
letter-spacing: 8px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.unit {
|
.unit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 290px;
|
left: 260px;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
letter-spacing: 0px;
|
|
||||||
color: rgba($color: #ffffff, $alpha: 8);
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1011,8 +1006,6 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 1360px;
|
left: 1360px;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
letter-spacing: 0px;
|
|
||||||
color: rgba($color: #ffffff, $alpha: 8);
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.title-button {
|
.title-button {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-08 09:14:38
|
* @LastEditTime: 2023-12-14 14:03:27
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -224,7 +224,6 @@ export default {
|
|||||||
this.equipmentList.forEach((ele) => {
|
this.equipmentList.forEach((ele) => {
|
||||||
if (val === ele.id) {
|
if (val === ele.id) {
|
||||||
this.dataForm.equipmentCode = ele.code
|
this.dataForm.equipmentCode = ele.code
|
||||||
console.log(this.dataForm.equipmentCode);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -337,17 +336,16 @@ export default {
|
|||||||
pageSize:10
|
pageSize:10
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data
|
||||||
this.getCode(response.data.equipmentId)
|
|
||||||
// this.dataForm.unit = String(this.dataForm.unit)
|
// this.dataForm.unit = String(this.dataForm.unit)
|
||||||
// this.dataForm.ValueType = String(this.dataForm.ValueType)
|
// this.dataForm.ValueType = String(this.dataForm.ValueType)
|
||||||
// this.dataForm.productType = String(this.dataForm.productType)
|
// this.dataForm.productType = String(this.dataForm.productType)
|
||||||
});
|
});
|
||||||
// 获取产品属性列表
|
// 获取产品属性列表
|
||||||
this.getList()
|
this.getList();
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
// this.getCode()
|
this.getCode()
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="包装要求" prop="packReq">
|
<el-form-item label="包装要求" prop="packReq">
|
||||||
<el-input v-model="form.packReq"></el-input>
|
<el-select v-model="form.packReq" placeholder="请选择" style="width: 100%;" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -120,7 +127,7 @@ export default {
|
|||||||
this.form.customerId = res.data.customerId
|
this.form.customerId = res.data.customerId
|
||||||
this.form.planQuantity = res.data.planQuantity
|
this.form.planQuantity = res.data.planQuantity
|
||||||
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
||||||
this.form.packReq = res.data.packReq
|
this.form.packReq = res.data.packReq ? res.data.packReq+'' : ''
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getSpecifications(this.form.planProductId)
|
this.getSpecifications(this.form.planProductId)
|
||||||
|
@ -125,7 +125,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'packReq',
|
prop: 'packReq',
|
||||||
label: '包装要求',
|
label: '包装要求',
|
||||||
// filter: publicFormatter('pack_spec'),
|
filter: publicFormatter('pack_spec'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产线" prop="productionLineId"
|
<el-form-item label="产线" prop="productionLineId"
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||||
<el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable :disabled="disabled"
|
<el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable
|
||||||
@change="handleProductlineChange">
|
@change="handleProductlineChange">
|
||||||
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -19,8 +19,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
||||||
<el-select :disabled="disabled" v-model="dataForm.sectionId" placeholder="请选择工段" filterable
|
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" filterable @change="$emit('update', dataForm)">
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -110,18 +109,15 @@ export default {
|
|||||||
productionLineId: null,
|
productionLineId: null,
|
||||||
inspectionDetIdList:[],
|
inspectionDetIdList:[],
|
||||||
},
|
},
|
||||||
disabled:false,
|
|
||||||
formLoading: true,
|
formLoading: true,
|
||||||
productionLineList: [],
|
productionLineList: [],
|
||||||
inspectionDetList:[],
|
inspectionDetList:[],
|
||||||
workshopSectionList: [],
|
workshopSectionList: [],
|
||||||
};
|
};
|
||||||
},
|
|
||||||
created () {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getProductionLineList()
|
||||||
|
this.getQualityInspectionDetList()
|
||||||
// this.getList()
|
// this.getList()
|
||||||
// this.getWorksectionList();
|
// this.getWorksectionList();
|
||||||
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
||||||
@ -143,14 +139,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(obj) {
|
init(obj) {
|
||||||
// console.log(productionLineId);
|
// console.log(productionLineId);
|
||||||
console.log(obj)
|
console.log(obj);
|
||||||
this.getProductionLineList()
|
|
||||||
this.getQualityInspectionDetList()
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
// if(obj.id)
|
// if(obj.id)
|
||||||
if (obj) {
|
if (obj) {
|
||||||
this.dataForm.id = obj.id || null;
|
this.dataForm.id = obj.id || null;
|
||||||
this.disabled = true
|
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dataForm"].resetFields()
|
this.$refs["dataForm"].resetFields()
|
||||||
@ -170,6 +163,7 @@ export default {
|
|||||||
console.log(1111);
|
console.log(1111);
|
||||||
this.urlOptions.infoURL(obj.id).then(response => {
|
this.urlOptions.infoURL(obj.id).then(response => {
|
||||||
this.dataForm.id = response.data.id
|
this.dataForm.id = response.data.id
|
||||||
|
|
||||||
// if (this.setData) {
|
// if (this.setData) {
|
||||||
// this.setDataForm()
|
// this.setDataForm()
|
||||||
// }
|
// }
|
||||||
|
@ -98,12 +98,10 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'productionLineName',
|
prop: 'productionLineName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
width:120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'sectionName',
|
prop: 'sectionName',
|
||||||
label: '工段',
|
label: '工段',
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inspectionInfoList',
|
prop: 'inspectionInfoList',
|
||||||
|
@ -188,8 +188,8 @@ export default {
|
|||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.materialId = val.materialId ? val.materialId : undefined;
|
this.listQuery.content = val.content ? val.content : undefined;
|
||||||
// this.listQuery.typeId = val.typeId ? val.typeId : undefined;
|
this.listQuery.typeId = val.typeId ? val.typeId : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
<el-form-item label="报废时间" prop="logTime">
|
||||||
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="timestamp" placeholder="选择日期">
|
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-02-28 09:51:25
|
* @Date: 2024-02-28 09:51:25
|
||||||
* @LastEditTime: 2024-03-08 13:46:46
|
* @LastEditTime: 2024-02-28 10:05:00
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -41,7 +41,7 @@ export default {
|
|||||||
console.log(response)
|
console.log(response)
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data
|
||||||
this.dataForm.detId = response.data.detIdList
|
this.dataForm.detId = response.data.detIdList
|
||||||
this.dataForm.logTime = new Date(response.data.logTime)
|
this.dataForm.logTime = new Date(response.data.createTime)
|
||||||
|
|
||||||
// if (this.setData) {
|
// if (this.setData) {
|
||||||
// this.setDataForm()
|
// this.setDataForm()
|
||||||
|
@ -36,7 +36,7 @@ const tableProps = [
|
|||||||
// filter: parseTime
|
// filter: parseTime
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'logTime',
|
||||||
label: '报废时间',
|
label: '报废时间',
|
||||||
filter: parseTime
|
filter: parseTime
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-03-08 08:38:25
|
* @LastEditTime: 2023-12-01 16:33:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="报废类型描述" prop="description" label-width="110px">
|
<el-form-item label="描述类型" prop="description" label-width="110px">
|
||||||
<el-input v-model="dataForm.description" clearable placeholder="描述类型" />
|
<el-input v-model="dataForm.description" clearable placeholder="描述类型" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-24 15:15:24
|
* @Date: 2024-01-24 15:15:24
|
||||||
* @LastEditTime: 2024-03-11 15:51:20
|
* @LastEditTime: 2024-01-24 15:38:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
|
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
|
||||||
@refreshDataList="getDataList" />
|
@refreshDataList="getDataList" />
|
||||||
<!-- <pagination
|
<!-- <pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
@ -53,7 +53,6 @@ export default {
|
|||||||
reportType: 2,
|
reportType: 2,
|
||||||
reportTime: []
|
reportTime: []
|
||||||
},
|
},
|
||||||
date:'许昌安彩日原片生产汇总',
|
|
||||||
reportTime: '',
|
reportTime: '',
|
||||||
startTimeStamp: '',
|
startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
endTimeStamp: '',
|
||||||
@ -64,37 +63,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getTodayStartTimeAndEndTime()
|
|
||||||
this.getDataList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTodayStartTimeAndEndTime() {
|
|
||||||
this.reportTime = new Date()
|
|
||||||
this.changeTime(this.reportTime)
|
|
||||||
},
|
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
multipliedByHundred(str) {
|
|
||||||
let floatVal = parseFloat(str);
|
|
||||||
if (isNaN(floatVal)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
floatVal = Math.round(str * 10000) / 100;
|
|
||||||
let strVal = floatVal.toString();
|
|
||||||
let searchVal = strVal.indexOf('.');
|
|
||||||
if (searchVal < 0) {
|
|
||||||
searchVal = strVal.length;
|
|
||||||
strVal += '.';
|
|
||||||
}
|
|
||||||
while (strVal.length <= searchVal + 2) {
|
|
||||||
strVal += '0';
|
|
||||||
}
|
|
||||||
return parseFloat(strVal);
|
|
||||||
},
|
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||||
@ -102,9 +78,6 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
@ -140,7 +113,7 @@ export default {
|
|||||||
// console.log(val.setHours(7, 0, 0))
|
// console.log(val.setHours(7, 0, 0))
|
||||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||||
// let time = this.format(val.setHours(7, 0, 0))
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
console.log(this.listQuery.reportTime);
|
console.log(this.listQuery.reportTime);
|
||||||
} else {
|
} else {
|
||||||
@ -181,7 +154,7 @@ export default {
|
|||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return this.urlOptions.exportURL(params);
|
return this.urlOptions.exportURL(params);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '原片生产日报.xls');
|
this.$download.excel(response, '原片生产周报.xls');
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
|
@ -1,33 +1,46 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-13 14:10:04
|
* @Date: 2023-12-13 14:10:04
|
||||||
* @LastEditTime: 2024-03-11 16:10:25
|
* @LastEditTime: 2023-12-14 10:18:20
|
||||||
* @LastEditors: zhp
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button v-if="!edit" size="small" @click="edit = true">编辑</el-button>
|
<el-button size="small" @click="edit = true">编辑</el-button>
|
||||||
<el-button v-if="edit" size="small" @click="edit= false">返回</el-button>
|
|
||||||
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="data" border show-summary style="width: 100%">
|
<el-table
|
||||||
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
:data="data"
|
||||||
|
border
|
||||||
|
show-summary
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in cols"
|
||||||
|
:key="index" :prop="item.prop"
|
||||||
|
:label="item.label"
|
||||||
:align="item.align ? item.align : 'left'">
|
:align="item.align ? item.align : 'left'">
|
||||||
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
<el-table-column
|
||||||
|
v-for="(it, index1) in item.children"
|
||||||
|
:key="index1"
|
||||||
|
:prop="it.prop"
|
||||||
|
:label="it.label"
|
||||||
:align="item.align ? item.align : 'left'">
|
:align="item.align ? item.align : 'left'">
|
||||||
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
<el-table-column
|
||||||
|
v-for="(y, index2) in it.children"
|
||||||
|
:key="index2"
|
||||||
|
:prop="y.prop"
|
||||||
|
:label="y.label">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
||||||
<el-input v-else v-model="scope.row[y.prop]"></el-input>
|
<el-input v-else v-model.number="scope.row[y.prop]"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-input type="textarea" v-model="sum.remark" placeholder="备注" :disabled="!edit"
|
<el-input type="textarea" v-model="sum.remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}"></el-input>
|
||||||
:autosize="{ minRows: 2, maxRows: 6}"></el-input>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -79,7 +92,6 @@ const cols = [
|
|||||||
{
|
{
|
||||||
prop: 'originalGlassStatisticsTrend',
|
prop: 'originalGlassStatisticsTrend',
|
||||||
label: '增减',
|
label: '增减',
|
||||||
// filter:(v)=>{v + '%'}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -99,7 +111,6 @@ const cols = [
|
|||||||
{
|
{
|
||||||
prop: 'actualProductTrend',
|
prop: 'actualProductTrend',
|
||||||
label: '增减',
|
label: '增减',
|
||||||
// filter: (v) => { v + '%' }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -134,10 +145,6 @@ const cols = [
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
date: {
|
|
||||||
type: String,
|
|
||||||
default:''
|
|
||||||
},
|
|
||||||
sum: {
|
sum: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
@ -158,9 +165,9 @@ const cols = [
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
handler(newv, oldv) {
|
handler(newv, oldv) {
|
||||||
if (newv[0] !== '') {
|
if (newv[0] !== '') {
|
||||||
this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
|
this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
|
||||||
} else {
|
} else {
|
||||||
this.cols[0].label = this.date
|
this.cols[0].label = '许昌安彩周原片生产汇总'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -176,10 +183,6 @@ const cols = [
|
|||||||
text1 = '本月'
|
text1 = '本月'
|
||||||
text2 = '上月'
|
text2 = '上月'
|
||||||
text3 = '原片合计(片/月)'
|
text3 = '原片合计(片/月)'
|
||||||
} else if (newv === 2) {
|
|
||||||
text1 = '今日'
|
|
||||||
text2 = '昨日'
|
|
||||||
text3 = '原片合计(片/日)'
|
|
||||||
} else {
|
} else {
|
||||||
text1 = '本年'
|
text1 = '本年'
|
||||||
text2 = '上年'
|
text2 = '上年'
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form
|
||||||
|
:model="listQuery"
|
||||||
|
:inline="true"
|
||||||
|
ref="dataForm"
|
||||||
|
class="blueTip">
|
||||||
<el-form-item label="月" prop="reportTime">
|
<el-form-item label="月" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" type="month" size="small" @change="changeTime" placeholder="选择月">
|
<el-date-picker
|
||||||
|
v-model="reportTime"
|
||||||
|
type="month"
|
||||||
|
size="small"
|
||||||
|
@change="changeTime"
|
||||||
|
placeholder="选择月">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small"
|
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||||
@click="getDataList">查询</el-button>
|
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
|
|
||||||
@click="handleExport">导出</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
|
||||||
<!-- <pagination
|
<!-- <pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
@ -45,7 +51,6 @@ export default {
|
|||||||
reportType: 4,
|
reportType: 4,
|
||||||
reportTime: []
|
reportTime: []
|
||||||
},
|
},
|
||||||
date: '许昌安彩月原片生产汇总',
|
|
||||||
reportTime: '',
|
reportTime: '',
|
||||||
startTimeStamp: '',
|
startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
endTimeStamp: '',
|
||||||
@ -55,23 +60,13 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCurrentMonthFirst()
|
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getDataList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
},
|
|
||||||
getCurrentMonthFirst() {
|
|
||||||
const date = new Date();
|
|
||||||
date.setDate(1);
|
|
||||||
this.reportTime = date
|
|
||||||
// console.log(date)
|
|
||||||
this.changeTime(date)
|
|
||||||
// console.log(date.valueOf());
|
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -81,9 +76,6 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
@ -99,40 +91,29 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
console.log(val)
|
|
||||||
if(val) {
|
if(val) {
|
||||||
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
||||||
const fullyear = val.getFullYear()
|
const fullyear = val.getFullYear()
|
||||||
let days = 0
|
let days = 0
|
||||||
switch (timeStamp) {
|
switch (timeStamp) {
|
||||||
case 0:
|
case 0, 2, 4, 6, 7, 9, 11:
|
||||||
case 2:
|
|
||||||
case 4:
|
|
||||||
case 6:
|
|
||||||
case 7:
|
|
||||||
case 9:
|
|
||||||
case 11:
|
|
||||||
days = 31
|
days = 31
|
||||||
break
|
break
|
||||||
case 3:
|
case 3, 4, 8, 10:
|
||||||
case 4:
|
|
||||||
case 8:
|
|
||||||
case 10:
|
|
||||||
days = 30
|
days = 30
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
|
if ((fullyear % 400 === 0) || (fullyear() % 4 === 0 && fullyear() % 100 !== 0)) {
|
||||||
days = 29
|
days = 29
|
||||||
} else {
|
} else {
|
||||||
days = 28
|
days = 28
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()); //开始时间
|
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1).getTime()); //开始时间
|
||||||
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()); //结束时间
|
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()); //结束时间
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
|
@ -5,24 +5,30 @@
|
|||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" /> -->
|
@headBtnClick="buttonClick" /> -->
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form
|
||||||
|
:model="listQuery"
|
||||||
|
:inline="true"
|
||||||
|
ref="dataForm"
|
||||||
|
class="blueTip">
|
||||||
<el-form-item label="周" prop="reportTime">
|
<el-form-item label="周" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker
|
||||||
:picker-options="{firstDayOfWeek: 4}"
|
v-model="reportTime"
|
||||||
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" style="width: 350px"
|
type="week"
|
||||||
|
size="small"
|
||||||
|
@change="changeTime"
|
||||||
|
:picker-options="{firstDayOfWeek: 1}"
|
||||||
|
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
|
style="width: 350px"
|
||||||
placeholder="选择周">
|
placeholder="选择周">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small"
|
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||||
@click="getDataList">查询</el-button>
|
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain
|
|
||||||
@click="handleExport">导出</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -47,7 +53,6 @@ export default {
|
|||||||
reportType: 3,
|
reportType: 3,
|
||||||
reportTime: []
|
reportTime: []
|
||||||
},
|
},
|
||||||
date: '许昌安彩周原片生产汇总',
|
|
||||||
reportTime: '',
|
reportTime: '',
|
||||||
startTimeStamp: '',
|
startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
endTimeStamp: '',
|
||||||
@ -89,10 +94,8 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
// const day = new Date().getDay()
|
// const day = new Date().getDay()
|
||||||
// console.log('周四', day)
|
// console.log('周四', day)
|
||||||
this.getCurrentWeekStartTimeAndEndTime()
|
|
||||||
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getDataList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
async getDict() {
|
||||||
@ -101,68 +104,6 @@ export default {
|
|||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
// this.getDataList()
|
// this.getDataList()
|
||||||
});
|
});
|
||||||
},
|
|
||||||
getCurrentWeekStartTimeAndEndTime() {
|
|
||||||
this.reportTime = new Date()
|
|
||||||
var weekday = new Array(7);
|
|
||||||
weekday[0] = "Sunday";
|
|
||||||
weekday[1] = "Monday";
|
|
||||||
weekday[2] = "Tuesday";
|
|
||||||
weekday[3] = "Wednesday";
|
|
||||||
weekday[4] = "Thursday";
|
|
||||||
weekday[5] = "Friday";
|
|
||||||
weekday[6] = "Saturday";
|
|
||||||
// console.log(weekday[this.reportTime.getDay()]);
|
|
||||||
if (weekday[this.reportTime.getDay()] === 'Monday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 4 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime())
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -172,9 +113,6 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
@ -190,14 +128,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
console.log(val);
|
|
||||||
if(val) {
|
if(val) {
|
||||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
||||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 00:00:00').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 23:59:59').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form
|
||||||
|
:model="listQuery"
|
||||||
|
:inline="true"
|
||||||
|
ref="dataForm"
|
||||||
|
class="blueTip">
|
||||||
<el-form-item label="年" prop="reportTime">
|
<el-form-item label="年" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
<el-date-picker
|
||||||
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
v-model="reportTime"
|
||||||
style="width: 350px" placeholder="选择年">
|
type="year"
|
||||||
|
size="small"
|
||||||
|
@change="changeTime"
|
||||||
|
:picker-options="{firstDayOfWeek: 1}"
|
||||||
|
:format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
|
style="width: 350px"
|
||||||
|
placeholder="选择年">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small"
|
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small" @click="getDataList">查询</el-button>
|
||||||
@click="getDataList">查询</el-button>
|
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
|
||||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain
|
|
||||||
@click="handleExport">导出</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -42,7 +49,6 @@ export default {
|
|||||||
reportType: 5,
|
reportType: 5,
|
||||||
reportTime: []
|
reportTime: []
|
||||||
},
|
},
|
||||||
date: '许昌安彩年原片生产汇总',
|
|
||||||
reportTime: '',
|
reportTime: '',
|
||||||
startTimeStamp: '',
|
startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
endTimeStamp: '',
|
||||||
@ -54,22 +60,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
mounted () {
|
|
||||||
this.getCurrentYearFirst()
|
|
||||||
this.getDataList()
|
|
||||||
;
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getCurrentYearFirst() {
|
|
||||||
let date = new Date();
|
|
||||||
date.setDate(1);
|
|
||||||
date.setMonth(0);
|
|
||||||
this.reportTime = date;
|
|
||||||
this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1,7,0,1).getTime()); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
|
|
||||||
},
|
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
@ -82,9 +73,6 @@ export default {
|
|||||||
this.tableData = response.data.filter(item => {
|
this.tableData = response.data.filter(item => {
|
||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -103,10 +91,10 @@ export default {
|
|||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
if(val) {
|
if(val) {
|
||||||
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||||
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()); //开始时间
|
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1).getTime()); //开始时间
|
||||||
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
|
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-12 11:17:53
|
* @LastEditTime: 2024-03-01 15:26:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="listQuery" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item label="日" prop="reportTime">
|
<el-form-item label="日" prop="reportTime">
|
||||||
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
<el-date-picker v-model="dataForm.reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -24,106 +24,104 @@
|
|||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
<el-table-column :label="'许昌安彩日成品生产汇总' + '(' + timeTips + ')'" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineName" label="生产线" align="center">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineName }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡" align="center">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="今日" align="center">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="昨日" align="center">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined}} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成良品产量" align="center">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="今日" align="center">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="昨日" align="center">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="今日" align="center">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
</el-input>
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -153,12 +151,12 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
// width: 128,
|
// width: 128,
|
||||||
prop: 'lineName',
|
prop: 'lineId',
|
||||||
label: '生产线',
|
label: '生产线',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -169,11 +167,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'inputNow',
|
prop: 'inputNow',
|
||||||
label: '今日'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputHis',
|
prop: 'inputHis',
|
||||||
label: '昨日'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputTrend',
|
prop: 'inputTrend',
|
||||||
@ -189,11 +187,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductNow',
|
prop: 'goodProductNow',
|
||||||
label: '今日'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductHis',
|
prop: 'goodProductHis',
|
||||||
label: '昨日'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductTrend',
|
prop: 'goodProductTrend',
|
||||||
@ -209,11 +207,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'missCheckNow',
|
prop: 'missCheckNow',
|
||||||
label: '今日'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckHis',
|
prop: 'missCheckHis',
|
||||||
label: '昨日'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckTrend',
|
prop: 'missCheckTrend',
|
||||||
@ -229,11 +227,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassNow',
|
prop: 'goodProductPassNow',
|
||||||
label: '今日'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassHis',
|
prop: 'goodProductPassHis',
|
||||||
label: '昨日'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassTrend',
|
prop: 'goodProductPassTrend',
|
||||||
@ -391,8 +389,7 @@ export default {
|
|||||||
// remark: undefined,
|
// remark: undefined,
|
||||||
// },
|
// },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
reportTime:'',
|
dataForm: {
|
||||||
listQuery: {
|
|
||||||
// workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
// productionId: undefined,
|
// productionId: undefined,
|
||||||
// startTime: undefined,
|
// startTime: undefined,
|
||||||
@ -422,9 +419,7 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
this.getTodayStartTimeAndEndTime()
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
format(shijianchuo) {
|
format(shijianchuo) {
|
||||||
@ -439,27 +434,22 @@ export default {
|
|||||||
// var s = time.getSeconds();
|
// var s = time.getSeconds();
|
||||||
return time
|
return time
|
||||||
},
|
},
|
||||||
getTodayStartTimeAndEndTime() {
|
|
||||||
this.reportTime = new Date()
|
|
||||||
this.changeTime(this.reportTime)
|
|
||||||
},
|
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
console.log(val)
|
|
||||||
if (val) {
|
if (val) {
|
||||||
// console.log(val)
|
// console.log(val)
|
||||||
// console.log(val.setHours(7, 0, 0))
|
// console.log(val.setHours(7, 0, 0))
|
||||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||||
// let time = this.format(val.setHours(7, 0, 0))
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
console.log(this.listQuery.reportTime);
|
console.log(this.dataForm.reportTime);
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.dataForm.reportTime = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
let params = { ...this.dataForm };
|
||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||||
@ -470,36 +460,36 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
// timeSelect() {
|
timeSelect() {
|
||||||
// // switch (this.queryParams.timeDim) {
|
// switch (this.queryParams.timeDim) {
|
||||||
// // case '1':
|
// case '1':
|
||||||
// // if (this.timeValue[1] - this.timeValue[0] > 7 * 24 * 3600000) {
|
// if (this.timeValue[1] - this.timeValue[0] > 7 * 24 * 3600000) {
|
||||||
// // this.$modal.msgError('最大时间范围为7天,请重新选择')
|
// this.$modal.msgError('最大时间范围为7天,请重新选择')
|
||||||
// // this.timeValue = []
|
// this.timeValue = []
|
||||||
// // }
|
// }
|
||||||
// // break
|
// break
|
||||||
// // case '2':
|
// case '2':
|
||||||
|
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
|
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
|
this.monthValue = []
|
||||||
|
}
|
||||||
|
// break
|
||||||
|
// case '4':
|
||||||
// if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
// if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
// this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
// this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
// this.monthValue = []
|
// this.monthValue = []
|
||||||
// }
|
// }
|
||||||
// // break
|
// break
|
||||||
// // case '4':
|
// default:
|
||||||
// // if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
},
|
||||||
// // this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
transformTime(timeStamp) {// 本月最后一天
|
||||||
// // this.monthValue = []
|
let year = moment(timeStamp).format('YYYY')
|
||||||
// // }
|
let month = moment(timeStamp).format('MM')
|
||||||
// // break
|
let newData = moment(new Date(year, month, 0)).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
// // default:
|
let value = newData
|
||||||
// },
|
console.log(value);
|
||||||
// transformTime(timeStamp) {// 本月最后一天
|
return value
|
||||||
// let year = moment(timeStamp).format('YYYY')
|
},
|
||||||
// let month = moment(timeStamp).format('MM')
|
|
||||||
// let newData = moment(new Date(year, month, 0)).format('YYYY-MM-DD') + ' 23:59:59'
|
|
||||||
// let value = newData
|
|
||||||
// console.log(value);
|
|
||||||
// return value
|
|
||||||
// },
|
|
||||||
// selectTime() {
|
// selectTime() {
|
||||||
// switch (this.queryParams.type) {
|
// switch (this.queryParams.type) {
|
||||||
// case 1:
|
// case 1:
|
||||||
@ -531,40 +521,34 @@ export default {
|
|||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
await updateSumProductionDataList(obj),
|
await updateSumProductionDataList(obj),
|
||||||
await updateProductionDataList(updateArr),
|
await updateProductionDataList(updateArr),
|
||||||
])
|
]);
|
||||||
console.log(result);
|
if (result[0] == true && result[1] == true) {
|
||||||
if (result[0].data == true && result[1].data == true) {
|
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.isSave = false
|
this.isSave = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError('更新失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDict() {
|
|
||||||
// 产线列表
|
|
||||||
const res = await getCorePLList();
|
|
||||||
this.proLineList = res.data;
|
|
||||||
},
|
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.list = []
|
if (this.monthValue.length > 0) {
|
||||||
// if (this.monthValue.length > 0) {
|
console.log(this.monthValue)
|
||||||
// console.log(this.monthValue)
|
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||||
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
|
// this.queryParams.startTime = this.monthValue[0]
|
||||||
// // this.queryParams.startTime = this.monthValue[0]
|
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||||
// this.listQuery.reportTime[1] = this.transformTime(this.monthValue[1])
|
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||||
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
console.log(this.timeTips);
|
||||||
// console.log(this.timeTips);
|
} else {
|
||||||
// } else {
|
// this.$modal.msgError('月范围不能为空')
|
||||||
// // this.$modal.msgError('月范围不能为空')
|
// return false
|
||||||
// // return false
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
console.log(this.listQuery);
|
|
||||||
|
|
||||||
|
console.log(this.dataForm);
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/report-auto-production/page',
|
url: '/base/report-auto-production/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.listQuery
|
params: this.dataForm
|
||||||
})
|
})
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// let sum = undefined
|
// let sum = undefined
|
||||||
@ -575,19 +559,10 @@ export default {
|
|||||||
// })
|
// })
|
||||||
res.data.list.forEach((ele,index) => {
|
res.data.list.forEach((ele,index) => {
|
||||||
if (ele.det === false) {
|
if (ele.det === false) {
|
||||||
res.data.list[index].lineName = '合计'
|
res.data.list[index].lineId = '合计'
|
||||||
this.remark = res.data.list[index].remark
|
this.remark = res.data.list[index].remark
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
res.data.list.forEach(item => {
|
|
||||||
this.proLineList.forEach(it => {
|
|
||||||
if (item.lineId === it.id) {
|
|
||||||
console.log(item)
|
|
||||||
item.lineName = it.name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-12 11:14:04
|
* @LastEditTime: 2024-01-24 15:57:10
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -10,8 +10,8 @@
|
|||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" clearable :picker-options="pickerOptions" size="small" style='width:350px;'
|
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
||||||
@change="timeSelect">
|
size="small" style='width:350px;' @change="timeSelect">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -26,106 +26,104 @@
|
|||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + '(' + timeTips + ')'" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线" align="center">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineName }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡" align="center">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本月" align="center">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上月" align="center">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成良品产量" align="center">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本月" align="center">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上月" align="center">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本月" align="center">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上月" align="center">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend +'%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本月" align="center">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上月" align="center">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' :undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
</el-input>
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -155,7 +153,6 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
|
||||||
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
@ -172,11 +169,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'inputNow',
|
prop: 'inputNow',
|
||||||
label: '本月'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputHis',
|
prop: 'inputHis',
|
||||||
label: '上月'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputTrend',
|
prop: 'inputTrend',
|
||||||
@ -192,11 +189,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductNow',
|
prop: 'goodProductNow',
|
||||||
label: '本月'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductHis',
|
prop: 'goodProductHis',
|
||||||
label: '上月'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductTrend',
|
prop: 'goodProductTrend',
|
||||||
@ -212,15 +209,15 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'missCheckNow',
|
prop: 'missCheckNow',
|
||||||
label: '本月'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckHis',
|
prop: 'missCheckHis',
|
||||||
label: '上月'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckTrend',
|
prop: 'missCheckTrend',
|
||||||
label: '增月'
|
label: '增减'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -232,11 +229,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassNow',
|
prop: 'goodProductPassNow',
|
||||||
label: '本月'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassHis',
|
prop: 'goodProductPassHis',
|
||||||
label: '上月'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassTrend',
|
prop: 'goodProductPassTrend',
|
||||||
@ -406,8 +403,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCurrentMonthFirst()
|
|
||||||
this.getCurrentMonthLast()
|
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -426,16 +421,9 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
|
||||||
// 产线列表
|
|
||||||
const res = await getCorePLList();
|
|
||||||
this.proLineList = res.data;
|
|
||||||
},
|
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.dataForm };
|
||||||
@ -449,22 +437,6 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
getCurrentMonthFirst() {
|
|
||||||
const date = new Date();
|
|
||||||
date.setDate(1)
|
|
||||||
// date.setHours(7, 0, 1)
|
|
||||||
this.monthValue[0] = moment(date).format('YYYY-MM-DD')
|
|
||||||
console.log(date)
|
|
||||||
// console.log(date.valueOf());
|
|
||||||
},
|
|
||||||
getCurrentMonthLast() {
|
|
||||||
const date = new Date();
|
|
||||||
const currentMonth = date.getMonth();
|
|
||||||
const nextMonth = currentMonth + 1;
|
|
||||||
const nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
|
|
||||||
const oneDay = 24 * 60 * 60 * 1000;
|
|
||||||
this.monthValue[1] = new Date(nextMonthFirstDay - oneDay)
|
|
||||||
},
|
|
||||||
timeSelect() {
|
timeSelect() {
|
||||||
// switch (this.queryParams.timeDim) {
|
// switch (this.queryParams.timeDim) {
|
||||||
// case '1':
|
// case '1':
|
||||||
@ -474,9 +446,8 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// break
|
// break
|
||||||
// case '2':
|
// case '2':
|
||||||
console.log(this.monthValue[1],this.monthValue[0]);
|
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
if (this.monthValue[1] - this.monthValue[0] > 2629800000) {
|
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
this.$modal.msgError('最大时间范围为1个月,请重新选择')// 同理上面
|
|
||||||
this.monthValue = []
|
this.monthValue = []
|
||||||
}
|
}
|
||||||
// break
|
// break
|
||||||
@ -496,14 +467,6 @@ export default {
|
|||||||
console.log(value);
|
console.log(value);
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
transformStartTime(timeStamp) {// 本月最后一天
|
|
||||||
let year = moment(timeStamp).format('YYYY')
|
|
||||||
let month = moment(timeStamp).format('MM')
|
|
||||||
let newData = moment(new Date(year, month, 1)).format('YYYY-MM-DD') + ' 23:59:59'
|
|
||||||
let value = newData
|
|
||||||
console.log(value);
|
|
||||||
return value
|
|
||||||
},
|
|
||||||
// selectTime() {
|
// selectTime() {
|
||||||
// switch (this.queryParams.type) {
|
// switch (this.queryParams.type) {
|
||||||
// case 1:
|
// case 1:
|
||||||
@ -535,21 +498,22 @@ export default {
|
|||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
await updateSumProductionDataList(obj),
|
await updateSumProductionDataList(obj),
|
||||||
await updateProductionDataList(updateArr),
|
await updateProductionDataList(updateArr),
|
||||||
])
|
]);
|
||||||
console.log(result);
|
if (result[0] == true && result[1] == true) {
|
||||||
if (result[0].data == true && result[1].data == true) {
|
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.isSave = false
|
this.isSave = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError('更新失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
if (this.monthValue.length > 0) {
|
if (this.monthValue.length > 0) {
|
||||||
console.log(this.monthValue)
|
console.log(this.monthValue)
|
||||||
this.dataForm.reportTime[0] = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' 07:00:01'
|
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||||
// this.queryParams.startTime = this.monthValue[0]
|
// this.queryParams.startTime = this.monthValue[0]
|
||||||
this.dataForm.reportTime[1] = moment(this.monthValue[1]).format('YYYY-MM-DD') + ' 07:00:00'
|
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||||
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||||
console.log(this.timeTips);
|
console.log(this.timeTips);
|
||||||
} else {
|
} else {
|
||||||
@ -572,21 +536,11 @@ export default {
|
|||||||
// })
|
// })
|
||||||
res.data.list.forEach((ele,index) => {
|
res.data.list.forEach((ele,index) => {
|
||||||
if (ele.det === false) {
|
if (ele.det === false) {
|
||||||
res.data.list[index].lineName = '合计'
|
res.data.list[index].lineId = '合计'
|
||||||
this.remark = res.data.list[index].remark
|
this.remark = res.data.list[index].remark
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
res.data.list.forEach(item => {
|
|
||||||
this.proLineList.forEach(it => {
|
|
||||||
if (item.lineId === it.id) {
|
|
||||||
console.log(item)
|
|
||||||
item.lineName = it.name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
// this.list = res.data.list
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-12 11:17:14
|
* @LastEditTime: 2024-01-24 15:50:10
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker clearable v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
||||||
size="small" style='width:350px;' @change="timeSelect">
|
size="small" style='width:350px;' @change="timeSelect">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -26,144 +26,136 @@
|
|||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
<el-table-column :label="'许昌安彩周成品发货及库存日报' + '(' + timeTips + ')'" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="glassType" label="品种" align="center">
|
<el-table-column prop="glassType" label="品种" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.glassType" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.glassType" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.glassType }} </span>
|
<span v-else>{{ scope.row.glassType }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productionH" label="厚度" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
|
||||||
<span v-else>{{ scope.row.productionH }} </span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="规格" align="center">
|
<el-table-column label="规格" align="center">
|
||||||
<el-table-column label="成品" align="center">
|
<el-table-column label="成品" align="center">
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionL }} </span>
|
<span v-else>{{ scope.row.productionL }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionW }} </span>
|
<span v-else>{{ scope.row.productionW }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionH }} </span>
|
<span v-else>{{ scope.row.productionH }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片" align="center">
|
<el-table-column label="原片">
|
||||||
<el-table-column prop="originalGlassSize">
|
<el-table-column prop="originalGlassSize">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="完成良品产量"> -->
|
<!-- <el-table-column label="完成良品产量"> -->
|
||||||
<el-table-column prop="customerId" align="center" label="用户">
|
<el-table-column prop="customerId" label="用户">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.customerId" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.customerId" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.customerId }} </span>
|
<span v-else>{{ scope.row.customerId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="packageType" align="center" label="包装形式">
|
<el-table-column prop="packageType" label="包装形式">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.packageType" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.packageType" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.packageType }} </span>
|
<span v-else>{{ scope.row.packageType }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderNum" align="center" label="订单数量">
|
<el-table-column prop="orderNum" label="订单数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.orderNum" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.orderNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderNum }} </span>
|
<span v-else>{{ scope.row.orderNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderFinish" align="center" label="订单完成">
|
<el-table-column prop="orderFinish" label="订单完成">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.orderFinish" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.orderFinish" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderFinish }} </span>
|
<span v-else>{{ scope.row.orderFinish }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderRemaining" align="center" label="未完成订单">
|
<el-table-column prop="orderRemaining" label="未完成订单">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.orderRemaining" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.orderRemaining" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderRemaining }} </span>
|
<span v-else>{{ scope.row.orderRemaining }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stockLastMonth" align="center" label="上月库存">
|
<el-table-column prop="stockLastMonth" label="上月库存">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.stockLastMonth" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.stockLastMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.stockLastMonth }} </span>
|
<span v-else>{{ scope.row.stockLastMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productNumThisMonth" align="center" label="本月生产成品">
|
<el-table-column prop="productNumThisMonth" label="本月生产成品">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productNumThisMonth" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.productNumThisMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.productNumThisMonth }} </span>
|
<span v-else>{{ scope.row.productNumThisMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="deliveNum" align="center" label="发货量">
|
<el-table-column prop="deliveNum" label="发货量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.deliveNum" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.deliveNum }} </span>
|
<span v-else>{{ scope.row.deliveNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="undeliveNum" align="center" label="未发货量">
|
<el-table-column prop="undeliveNum" label="未发货量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.undeliveNum" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.undeliveNum }} </span>
|
<span v-else>{{ scope.row.undeliveNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="undeliveArea" align="center" label="未发货面积">
|
<el-table-column prop="undeliveArea" label="未发货面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.undeliveArea" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveArea" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.undeliveArea }} </span>
|
<span v-else>{{ scope.row.undeliveArea }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="deliveArea" align="center" label="发货面积">
|
<el-table-column prop="deliveArea" label="发货面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.deliveArea" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveArea" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.deliveArea }} </span>
|
<span v-else>{{ scope.row.deliveArea }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="productAreaThisMonth" align="center" label="本月生产面积">
|
<el-table-column prop="productAreaThisMonth" label="本月生产面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productAreaThisMonth" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.productAreaThisMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.productAreaThisMonth }} </span>
|
<span v-else>{{ scope.row.productAreaThisMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- </el-table-column> -->
|
<!-- </el-table-column> -->
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
</el-input>
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -186,15 +178,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getAutoDeliveDataList,
|
getAutoDeliveDataList,
|
||||||
// updateSumAutoDeliveDataList,
|
updateSumAutoDeliveDataList,
|
||||||
// updateAutoDeliveDataList
|
updateAutoDeliveDataList
|
||||||
updateAutoDeliveDataList,
|
|
||||||
updateSumAutoDeliveDataList
|
|
||||||
} from '@/api/report/production';
|
} from '@/api/report/production';
|
||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -449,15 +439,24 @@ export default {
|
|||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
||||||
|
// this.searchBarFormConfig[0].defaultSelect = [
|
||||||
|
// this.$route.params.startTime,
|
||||||
|
// this.$route.params.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.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
|
||||||
// 产线列表
|
|
||||||
const res = await getCorePLList()
|
|
||||||
this.proLineList = res.data;
|
|
||||||
},
|
|
||||||
timeSelect() {
|
timeSelect() {
|
||||||
// switch (this.queryParams.timeDim) {
|
// switch (this.queryParams.timeDim) {
|
||||||
// case '1':
|
// case '1':
|
||||||
@ -517,10 +516,10 @@ export default {
|
|||||||
let updateArr = this.list
|
let updateArr = this.list
|
||||||
// console.log(JSON.stringify(updateArr[1]))
|
// console.log(JSON.stringify(updateArr[1]))
|
||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
await updateAutoDeliveDataList(obj),
|
await updateSumProductionDataList(obj),
|
||||||
await updateSumAutoDeliveDataList(updateArr),
|
await updateAutoDeliveDataList(updateArr),
|
||||||
]);
|
]);
|
||||||
if (result[0].data == true && result[1].data == true) {
|
if (result[0] == true && result[1] == true) {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.isSave = false
|
this.isSave = false
|
||||||
@ -561,15 +560,6 @@ export default {
|
|||||||
this.remark = res.data[index].remark
|
this.remark = res.data[index].remark
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// res.data.list.forEach(item => {
|
|
||||||
// this.proLineList.forEach(it => {
|
|
||||||
// if (item.lineId === it.id) {
|
|
||||||
// console.log(item)
|
|
||||||
// item.lineName = it.name
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
this.list = res.data
|
this.list = res.data
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
37
src/views/report/productionWeekReport copy/InputArea.vue
Normal file
37
src/views/report/productionWeekReport copy/InputArea.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="tableInner">
|
||||||
|
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'InputArea',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
itemProp: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: this.injectData
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeInput() {
|
||||||
|
console.log(this.list)
|
||||||
|
this.$emit('emitData', this.list)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.tableInner .el-input__inner {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
height: 33px;
|
||||||
|
}
|
||||||
|
</style>
|
468
src/views/report/productionWeekReport copy/index.vue
Normal file
468
src/views/report/productionWeekReport copy/index.vue
Normal file
@ -0,0 +1,468 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-12-12 13:45:25
|
||||||
|
* @LastEditTime: 2024-01-24 15:55:48
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
|
<el-form-item>
|
||||||
|
<el-form-item label="日" prop="reportTime">
|
||||||
|
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
|
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
|
||||||
|
@click="handleExport">导出</el-button>
|
||||||
|
</el-form>
|
||||||
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
|
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266'
|
||||||
|
}">
|
||||||
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
|
<el-table-column prop="lineId" label="生产线">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="投入数㎡">
|
||||||
|
<el-table-column prop="inputNow" label="本周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="inputHis" label="上周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成良品产量">
|
||||||
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="原片漏检率">
|
||||||
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="综合良品率">
|
||||||
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
|
</div>
|
||||||
|
</el-table>
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<!-- <base-table :table-props="tableProps" :page="1" :limit="10" :summary-method="getSummaries" show-summary
|
||||||
|
:table-data="list">
|
||||||
|
</base-table> -->
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<!-- <pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" /> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getProductionDataList,
|
||||||
|
updateProductionDataList,
|
||||||
|
updateSumProductionDataList,
|
||||||
|
exportProductExcel
|
||||||
|
} from '@/api/report/production';
|
||||||
|
// import Editor from '@/components/Editor';
|
||||||
|
import moment from 'moment';
|
||||||
|
// import DialogForm from './dialogForm.vue';
|
||||||
|
|
||||||
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
// width: 128,
|
||||||
|
prop: 'lineId',
|
||||||
|
label: '生产线',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// width: 128,
|
||||||
|
prop: '',
|
||||||
|
label: '投入数㎡',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'inputNow',
|
||||||
|
label: '本周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'inputHis',
|
||||||
|
label: '上周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'inputTrend',
|
||||||
|
label: '增减'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// width: 128,
|
||||||
|
prop: '',
|
||||||
|
label: '完成良品产量',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'goodProductNow',
|
||||||
|
label: '本周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'goodProductHis',
|
||||||
|
label: '上周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'goodProductTrend',
|
||||||
|
label: '增减'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// width: 128,
|
||||||
|
prop: '',
|
||||||
|
label: '原片漏检率',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'missCheckNow',
|
||||||
|
label: '本周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'missCheckHis',
|
||||||
|
label: '上周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'missCheckTrend',
|
||||||
|
label: '增减'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// width: 128,
|
||||||
|
prop: '',
|
||||||
|
label: '综合良品率',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'goodProductPassNow',
|
||||||
|
label: '本周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'goodProductPassHis',
|
||||||
|
label: '上周'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'goodProductPassTrend',
|
||||||
|
label: '增减'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export default {
|
||||||
|
name: 'statisticalData',
|
||||||
|
// components: {
|
||||||
|
// DialogForm,
|
||||||
|
// },
|
||||||
|
// mixins: [basicPageMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
remark: '',
|
||||||
|
urlOptions: {
|
||||||
|
// getDataListURL: getGlassPage,
|
||||||
|
exportURL: exportProductExcel
|
||||||
|
},
|
||||||
|
// dynamicProps: [],
|
||||||
|
tableProps,
|
||||||
|
timeTips:'',
|
||||||
|
// dataForm: {
|
||||||
|
// reportTime:undefined
|
||||||
|
// },
|
||||||
|
isSave:false,
|
||||||
|
disabled: true,
|
||||||
|
sumArr: [],
|
||||||
|
weekValue1: null,//最多24周
|
||||||
|
weekValue2: null,
|
||||||
|
searchBarFormConfig: [
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '工单名称',
|
||||||
|
// placeholder: '请选择工单名称',
|
||||||
|
// param: 'workOrderIdList',
|
||||||
|
// selectOptions: [],
|
||||||
|
// multiple: true,
|
||||||
|
// labelField: 'name',
|
||||||
|
// valueField: 'id',
|
||||||
|
// defaultSelect: []
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '产品',
|
||||||
|
// placeholder: '请选择产品',
|
||||||
|
// param: 'productionId',
|
||||||
|
// selectOptions: [],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'input',
|
||||||
|
// label: '检测内容',
|
||||||
|
// placeholder: '请输入检测内容',
|
||||||
|
// param: 'inspectionDetContent',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间段',
|
||||||
|
dateType: 'daterange', // datetimerange
|
||||||
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始日期',
|
||||||
|
endPlaceholder: '结束日期',
|
||||||
|
defaultTime: ['00:00:00', '23:59:59'],
|
||||||
|
param: 'checkTime',
|
||||||
|
// width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi(
|
||||||
|
// 'base:quality-inspection-record:create'
|
||||||
|
// )
|
||||||
|
// ? 'button'
|
||||||
|
// : '',
|
||||||
|
// btnName: '新增',
|
||||||
|
// name: 'add',
|
||||||
|
// plain: true,
|
||||||
|
// color: 'success',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
pickerOptionsWeek: {
|
||||||
|
disabledDate(time) {
|
||||||
|
let day = Date.now()
|
||||||
|
let limitTime = moment(day).day(-1)
|
||||||
|
return time.getTime() > new Date(limitTime).getTime()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reportTime:undefined,
|
||||||
|
dataForm: {
|
||||||
|
// workOrderIdList:undefined,
|
||||||
|
// productionId: undefined,
|
||||||
|
// startTime: undefined,
|
||||||
|
// endTime: undefined,
|
||||||
|
reportTime: [],
|
||||||
|
reportType:2
|
||||||
|
// productionLineId: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.getProductLineList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
||||||
|
// this.searchBarFormConfig[0].defaultSelect = [
|
||||||
|
// this.$route.params.startTime,
|
||||||
|
// this.$route.params.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.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
format(shijianchuo) {
|
||||||
|
//shijianchuo是整数,否则要parseInt转换
|
||||||
|
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
// console.log(time)
|
||||||
|
// var y = time.getFullYear();
|
||||||
|
// var m = time.getMonth() + 1;
|
||||||
|
// var d = time.getDate();
|
||||||
|
// var h = time.getHours();
|
||||||
|
// var mm = time.getMinutes();
|
||||||
|
// var s = time.getSeconds();
|
||||||
|
return time
|
||||||
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
if (val) {
|
||||||
|
// console.log(val)
|
||||||
|
// console.log(val.setHours(7, 0, 0))
|
||||||
|
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||||
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
|
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
|
console.log(this.dataForm.reportTime);
|
||||||
|
} else {
|
||||||
|
this.dataForm.reportTime = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
editDataList() {
|
||||||
|
this.disabled = false
|
||||||
|
this.isSave = true
|
||||||
|
},
|
||||||
|
async saveDataList() {
|
||||||
|
let obj = {}
|
||||||
|
this.list.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
this.list[index].lineId = ''
|
||||||
|
this.list[index].remark = this.remark
|
||||||
|
obj = ele
|
||||||
|
this.list.splice(index,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let updateArr = this.list
|
||||||
|
// console.log(JSON.stringify(updateArr[1]))
|
||||||
|
const result = await Promise.all([
|
||||||
|
await updateSumProductionDataList(obj),
|
||||||
|
await updateProductionDataList(updateArr),
|
||||||
|
]);
|
||||||
|
if (result[0].data == true && result[1].data == true) {
|
||||||
|
// console.log(res)
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
this.getDataList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError('更新失败');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleExport() {
|
||||||
|
// 处理查询参数
|
||||||
|
let params = { ...this.dataForm };
|
||||||
|
params.pageNo = undefined;
|
||||||
|
params.pageSize = undefined;
|
||||||
|
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return this.urlOptions.exportURL(params);
|
||||||
|
}).then(response => {
|
||||||
|
this.$download.excel(response, '成品生产日报.xls');
|
||||||
|
this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
async getDataList() {
|
||||||
|
// if (this.weekValue1 && this.weekValue2) {
|
||||||
|
// this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
|
// // this.queryParams.startTime = this.monthValue[0]
|
||||||
|
// this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
// this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
this.loading = true;
|
||||||
|
// 执行查询
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: '/base/report-auto-production/page',
|
||||||
|
method: 'get',
|
||||||
|
params: this.dataForm
|
||||||
|
})
|
||||||
|
// console.log(this.queryParams);
|
||||||
|
console.log(res)
|
||||||
|
// let sum = undefined
|
||||||
|
// res.data.list.forEach((ele, index) => {
|
||||||
|
// if (ele.det === false) {
|
||||||
|
// sum = res.data.list.splice(index, 1)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
res.data.list.forEach((ele,index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
res.data.list[index].lineId = '合计'
|
||||||
|
this.remark = res.data.list[index].remark
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.list = res.data.list
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-12 11:14:55
|
* @LastEditTime: 2024-01-24 15:59:13
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,11 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker v-model="weekValue1" type="week" format="yyyy 第 WW 周" style='width:170px;'
|
||||||
:picker-options="{firstDayOfWeek: 5}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
:picker-options="pickerOptionsWeek" @change="startWeek" :clearable="false" size="small" placeholder="选择周">
|
||||||
style="width: 350px" placeholder="选择周">
|
</el-date-picker>-
|
||||||
|
<el-date-picker v-model="weekValue2" type="week" format="yyyy 第 WW 周" :picker-options="pickerOptionsWeek"
|
||||||
|
style='width:170px;' @change="endWeek" :clearable="false" size="small" placeholder="选择周">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -27,106 +29,104 @@
|
|||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
<el-table-column :label="'许昌安彩周成品生产汇总' + '(' + timeTips + ')'" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线" align="center">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineName }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡" align="center">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本周" align="center">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上周" align="center">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成良品产量" align="center">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本周" align="center">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上周" align="center">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本周" align="center">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周" align="center">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周" align="center">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周" align="center">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
</el-input>
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -156,8 +156,6 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
|
||||||
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
@ -263,8 +261,6 @@ export default {
|
|||||||
exportURL: exportProductExcel
|
exportURL: exportProductExcel
|
||||||
},
|
},
|
||||||
timeTips:'',
|
timeTips:'',
|
||||||
startTimeStamp: '',
|
|
||||||
endTimeStamp: '',
|
|
||||||
// dataForm: {
|
// dataForm: {
|
||||||
// reportTime:undefined
|
// reportTime:undefined
|
||||||
// },
|
// },
|
||||||
@ -330,7 +326,6 @@ export default {
|
|||||||
// color: 'success',
|
// color: 'success',
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
reportTime:'',
|
|
||||||
pickerOptionsWeek: {
|
pickerOptionsWeek: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
let day = Date.now()
|
let day = Date.now()
|
||||||
@ -368,78 +363,9 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
this.getCurrentWeekStartTimeAndEndTime()
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
|
||||||
// 产线列表
|
|
||||||
const res = await getCorePLList()
|
|
||||||
this.proLineList = res.data;
|
|
||||||
},
|
|
||||||
getCurrentWeekStartTimeAndEndTime() {
|
|
||||||
this.reportTime = new Date()
|
|
||||||
var weekday = new Array(7);
|
|
||||||
weekday[0] = "Sunday";
|
|
||||||
weekday[1] = "Monday";
|
|
||||||
weekday[2] = "Tuesday";
|
|
||||||
weekday[3] = "Wednesday";
|
|
||||||
weekday[4] = "Thursday";
|
|
||||||
weekday[5] = "Friday";
|
|
||||||
weekday[6] = "Saturday";
|
|
||||||
// console.log(weekday[this.reportTime.getDay()]);
|
|
||||||
if (weekday[this.reportTime.getDay()] === 'Monday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 4 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime())
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.dataForm };
|
||||||
@ -454,7 +380,6 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
startWeek() {
|
startWeek() {
|
||||||
// console.log(this.weekValue1);
|
|
||||||
if (this.weekValue1 && this.weekValue2) {
|
if (this.weekValue1 && this.weekValue2) {
|
||||||
let a = new Date(this.weekValue1).getTime()
|
let a = new Date(this.weekValue1).getTime()
|
||||||
let b = new Date(this.weekValue2).getTime()
|
let b = new Date(this.weekValue2).getTime()
|
||||||
@ -505,42 +430,21 @@ export default {
|
|||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
await updateSumProductionDataList(obj),
|
await updateSumProductionDataList(obj),
|
||||||
await updateProductionDataList(updateArr),
|
await updateProductionDataList(updateArr),
|
||||||
])
|
]);
|
||||||
console.log(result);
|
|
||||||
if (result[0].data == true && result[1].data == true) {
|
if (result[0].data == true && result[1].data == true) {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.isSave = false
|
this.isSave = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
}
|
|
||||||
},
|
|
||||||
changeTime(val) {
|
|
||||||
console.log(val);
|
|
||||||
if (val) {
|
|
||||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
|
||||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.reportTime = []
|
this.$modal.msgError('更新失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//时间戳转为yy-mm-dd hh:mm:ss
|
|
||||||
timeFun(unixtimestamp) {
|
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
|
||||||
var date = "0" + unixtimestamp.getDate();
|
|
||||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
|
||||||
},
|
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
if (this.weekValue1 && this.weekValue2) {
|
if (this.weekValue1 && this.weekValue2) {
|
||||||
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 07:00:01'
|
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
// this.queryParams.startTime = this.monthValue[0]
|
// this.queryParams.startTime = this.monthValue[0]
|
||||||
this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 07:00:00'
|
this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
@ -561,19 +465,10 @@ export default {
|
|||||||
// })
|
// })
|
||||||
res.data.list.forEach((ele,index) => {
|
res.data.list.forEach((ele,index) => {
|
||||||
if (ele.det === false) {
|
if (ele.det === false) {
|
||||||
res.data.list[index].lineName = '合计'
|
res.data.list[index].lineId = '合计'
|
||||||
this.remark = res.data.list[index].remark
|
this.remark = res.data.list[index].remark
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
res.data.list.forEach(item => {
|
|
||||||
this.proLineList.forEach(it => {
|
|
||||||
if (item.lineId === it.id) {
|
|
||||||
console.log(item)
|
|
||||||
item.lineName = it.name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-12 11:15:05
|
* @LastEditTime: 2024-01-24 15:59:21
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,11 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
<el-date-picker style='width:170px;' v-model="yearValue1" type="year" :picker-options="pickerOptions"
|
||||||
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
value-format="timestamp" placeholder="选择年" @change="startYear" size="small" :clearable="false">
|
||||||
style="width: 350px" placeholder="选择年">
|
</el-date-picker>-
|
||||||
|
<el-date-picker style='width:170px;' v-model="yearValue2" type="year" :picker-options="pickerOptions"
|
||||||
|
value-format="timestamp" placeholder="选择年" @change="endYear" size="small" :clearable="false">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -29,107 +31,104 @@
|
|||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
|
|
||||||
<el-table-column :label="'许昌安彩年成品生产汇总' + '(' + timeTips + ')'" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线" align="center">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineName }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡" align="center">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="今年" align="center">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="去年" align="center">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成良品产量" align="center">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="今年" align="center">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="去年" align="center">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="今年" align="center">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="去年" align="center">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="今年" align="center">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="去年" align="center">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||||
</el-input>
|
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -159,9 +158,8 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
|
||||||
|
|
||||||
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
// width: 128,
|
// width: 128,
|
||||||
@ -176,11 +174,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'inputNow',
|
prop: 'inputNow',
|
||||||
label: '今年'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputHis',
|
prop: 'inputHis',
|
||||||
label: '去年'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputTrend',
|
prop: 'inputTrend',
|
||||||
@ -196,11 +194,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductNow',
|
prop: 'goodProductNow',
|
||||||
label: '今年'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductHis',
|
prop: 'goodProductHis',
|
||||||
label: '去年'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductTrend',
|
prop: 'goodProductTrend',
|
||||||
@ -216,11 +214,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'missCheckNow',
|
prop: 'missCheckNow',
|
||||||
label: '今年'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckHis',
|
prop: 'missCheckHis',
|
||||||
label: '去年'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'missCheckTrend',
|
prop: 'missCheckTrend',
|
||||||
@ -236,11 +234,11 @@ const tableProps = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassNow',
|
prop: 'goodProductPassNow',
|
||||||
label: '今年'
|
label: '本周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassHis',
|
prop: 'goodProductPassHis',
|
||||||
label: '去年'
|
label: '上周'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'goodProductPassTrend',
|
prop: 'goodProductPassTrend',
|
||||||
@ -267,9 +265,6 @@ export default {
|
|||||||
yearValue2: null,
|
yearValue2: null,
|
||||||
// dynamicProps: [],
|
// dynamicProps: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
reportTime: [],
|
|
||||||
startTimeStamp: '',
|
|
||||||
endTimeStamp: '',
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
// workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
// productionId: undefined,
|
// productionId: undefined,
|
||||||
@ -350,8 +345,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCurrentYearFirst()
|
|
||||||
|
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -371,24 +364,8 @@ export default {
|
|||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getDict() {
|
|
||||||
// 产线列表
|
|
||||||
const res = await getCorePLList()
|
|
||||||
this.proLineList = res.data;
|
|
||||||
},
|
|
||||||
getCurrentYearFirst() {
|
|
||||||
let date = new Date();
|
|
||||||
date.setDate(1);
|
|
||||||
date.setMonth(0);
|
|
||||||
this.reportTime = date;
|
|
||||||
this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1).getTime()); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
|
|
||||||
},
|
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.dataForm };
|
||||||
@ -402,34 +379,34 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
// startYear() {
|
startYear() {
|
||||||
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||||
// this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
|
this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
|
||||||
// this.yearValue1 = null
|
this.yearValue1 = null
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
// if (this.yearValue1 && this.yearValue2) {
|
if (this.yearValue1 && this.yearValue2) {
|
||||||
// if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
||||||
// this.$modal.msgError('最大时间范围为10年,请重新选择')
|
this.$modal.msgError('最大时间范围为10年,请重新选择')
|
||||||
// this.yearValue1 = null
|
this.yearValue1 = null
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// endYear() {
|
endYear() {
|
||||||
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||||
// this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
|
this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
|
||||||
// this.yearValue2 = null
|
this.yearValue2 = null
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
// if (this.yearValue1 && this.yearValue2) {
|
if (this.yearValue1 && this.yearValue2) {
|
||||||
// if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
||||||
// this.$modal.msgError('最大时间范围为10年,请重新选择')
|
this.$modal.msgError('最大时间范围为10年,请重新选择')
|
||||||
// this.yearValue2 = null
|
this.yearValue2 = null
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
editDataList() {
|
editDataList() {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.isSave = true
|
this.isSave = true
|
||||||
@ -449,13 +426,14 @@ export default {
|
|||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
await updateSumProductionDataList(obj),
|
await updateSumProductionDataList(obj),
|
||||||
await updateProductionDataList(updateArr),
|
await updateProductionDataList(updateArr),
|
||||||
])
|
]);
|
||||||
console.log(result);
|
|
||||||
if (result[0].data == true && result[1].data == true) {
|
if (result[0].data == true && result[1].data == true) {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
this.isSave = false
|
this.isSave = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError('更新失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
transformYear(timeStamp) {// 本年最后一天
|
transformYear(timeStamp) {// 本年最后一天
|
||||||
@ -464,37 +442,15 @@ export default {
|
|||||||
let value = newData
|
let value = newData
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
|
||||||
console.log(val);
|
|
||||||
if (val) {
|
|
||||||
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
|
||||||
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 7, 0, 1).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
} else {
|
|
||||||
this.dataForm.reportTime = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
//时间戳转为yy-mm-dd hh:mm:ss
|
|
||||||
timeFun(unixtimestamp) {
|
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
|
||||||
var date = "0" + unixtimestamp.getDate();
|
|
||||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
|
||||||
},
|
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.timeTips = moment(this.dataForm.reportTime[0]).format('YYYY-MM-DD') + " - " + moment(this.dataForm.reportTime[1]).format('YYYY-MM-DD')
|
|
||||||
console.log(this.yearValue1);
|
|
||||||
if (this.yearValue1 && this.yearValue2) {
|
if (this.yearValue1 && this.yearValue2) {
|
||||||
if (this.yearValue2 < this.yearValue1) {
|
if (this.yearValue2 < this.yearValue1) {
|
||||||
this.$modal.msgError('结束时间不能早于开始时间')
|
this.$modal.msgError('结束时间不能早于开始时间')
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
// this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
||||||
// this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
||||||
|
this.timeTips = this.transformYear(this.yearValue1) + " - " + this.transformYear(this.yearValue1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -514,19 +470,10 @@ export default {
|
|||||||
// })
|
// })
|
||||||
res.data.list.forEach((ele,index) => {
|
res.data.list.forEach((ele,index) => {
|
||||||
if (ele.det === false) {
|
if (ele.det === false) {
|
||||||
res.data.list[index].lineName = '合计'
|
res.data.list[index].lineId = '合计'
|
||||||
this.remark = res.data.list[index].remark
|
this.remark = res.data.list[index].remark
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
res.data.list.forEach(item => {
|
|
||||||
this.proLineList.forEach(it => {
|
|
||||||
if (item.lineId === it.id) {
|
|
||||||
console.log(item)
|
|
||||||
item.lineName = it.name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user