修改bug

This commit is contained in:
‘937886381’
2024-03-07 16:28:23 +08:00
parent 2c06d68d72
commit 39493549b9
11 changed files with 221 additions and 128 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-05 09:36:18
* @LastEditTime: 2024-03-07 16:10:22
* @LastEditors: zhp
* @Description:
-->
@@ -24,11 +24,11 @@
background: '#F2F4F9',
color: '#606266'
}">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineId" label="生产线">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineName" label="生产线">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineId }} </span>
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column label="投入数㎡">
@@ -153,12 +153,12 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { getCorePLList } from '@/api/base/coreProductionLine';
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
{
// width: 128,
prop: 'lineId',
prop: 'lineName',
label: '生产线',
},
{
@@ -424,6 +424,7 @@ export default {
// }
this.getTodayStartTimeAndEndTime()
this.getDataList()
this.getDict()
},
methods: {
format(shijianchuo) {
@@ -540,7 +541,13 @@ export default {
this.$modal.msgError('更新失败');
}
},
async getDict() {
// 产线列表
const res = await getCorePLList();
this.proLineList = res.data;
},
async getDataList() {
this.list = []
// if (this.monthValue.length > 0) {
// console.log(this.monthValue)
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
@@ -554,6 +561,7 @@ export default {
// }
console.log(this.listQuery);
const res = await this.$axios({
url: '/base/report-auto-production/page',
method: 'get',
@@ -568,10 +576,19 @@ export default {
// })
res.data.list.forEach((ele,index) => {
if (ele.det === false) {
res.data.list[index].lineId = '合计'
res.data.list[index].lineName = '合计'
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
},
},