修改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: 2024-01-24 15:15:24
* @LastEditTime: 2024-03-05 09:36:28
* @LastEditTime: 2024-03-07 16:21:26
* @LastEditors: zhp
* @Description:
-->
@@ -21,7 +21,7 @@
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
@refreshDataList="getDataList" />
<!-- <pagination
:limit.sync="listQuery.pageSize"
@@ -52,7 +52,8 @@ export default {
total: 0,
reportType: 2,
reportTime: []
},
},
date:'许昌安彩日原片生产汇总',
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
@@ -75,14 +76,34 @@ export default {
const res = await getCorePLList();
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() {
this.dataListLoading = true;
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
item.lineName = it.name
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
}
})
if (item.det === false) {
@@ -121,6 +142,7 @@ export default {
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
console.log(this.listQuery.reportTime);
this.getDataList();
} else {
this.listQuery.reportTime = []
}
@@ -159,7 +181,7 @@ export default {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '原片生产报.xls');
this.$download.excel(response, '原片生产报.xls');
this.exportLoading = false;
}).catch(() => { });
}