修改bug
This commit is contained in:
@@ -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(() => { });
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-12-13 14:10:04
|
||||
* @LastEditTime: 2023-12-14 10:18:20
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
* @LastEditTime: 2024-03-07 16:17:14
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
@@ -92,6 +92,7 @@ const cols = [
|
||||
{
|
||||
prop: 'originalGlassStatisticsTrend',
|
||||
label: '增减',
|
||||
// filter:(v)=>{v + '%'}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -111,6 +112,7 @@ const cols = [
|
||||
{
|
||||
prop: 'actualProductTrend',
|
||||
label: '增减',
|
||||
// filter: (v) => { v + '%' }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -145,6 +147,10 @@ const cols = [
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
date: {
|
||||
type: String,
|
||||
default:''
|
||||
},
|
||||
sum: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
@@ -165,9 +171,9 @@ const cols = [
|
||||
immediate: true,
|
||||
handler(newv, oldv) {
|
||||
if (newv[0] !== '') {
|
||||
this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
|
||||
this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
|
||||
} else {
|
||||
this.cols[0].label = '许昌安彩周原片生产汇总'
|
||||
this.cols[0].label = this.date
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -203,11 +209,11 @@ const cols = [
|
||||
updateGlass(this.data).then(response => {
|
||||
updateGlassRemark(this.sum).then(res => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.edit = false;
|
||||
this.edit = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="月" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="month"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
placeholder="选择月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small" @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-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
<!-- <pagination
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="月" prop="reportTime">
|
||||
<el-date-picker v-model="reportTime" type="month" size="small" @change="changeTime" placeholder="选择月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small"
|
||||
@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-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
<!-- <pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -50,7 +44,8 @@ export default {
|
||||
total: 0,
|
||||
reportType: 4,
|
||||
reportTime: []
|
||||
},
|
||||
},
|
||||
date: '许昌安彩月原片生产汇总',
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
|
||||
@@ -1,35 +1,29 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <search-bar
|
||||
<div class="app-container">
|
||||
<!-- <search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" /> -->
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="周" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="week"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}"
|
||||
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||
style="width: 350px"
|
||||
placeholder="选择周">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small" @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-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
<div>
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="周" prop="reportTime">
|
||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}"
|
||||
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" style="width: 350px"
|
||||
placeholder="选择周">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small"
|
||||
@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-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -52,7 +46,8 @@ export default {
|
||||
total: 0,
|
||||
reportType: 3,
|
||||
reportTime: []
|
||||
},
|
||||
},
|
||||
date: '许昌安彩周原片生产汇总',
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
|
||||
@@ -1,31 +1,24 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
:inline="true"
|
||||
ref="dataForm"
|
||||
class="blueTip">
|
||||
<el-form-item label="年" prop="reportTime">
|
||||
<el-date-picker
|
||||
v-model="reportTime"
|
||||
type="year"
|
||||
size="small"
|
||||
@change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}"
|
||||
:format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||
style="width: 350px"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small" @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-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||
<el-form-item label="年" prop="reportTime">
|
||||
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
||||
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||
style="width: 350px" placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small"
|
||||
@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-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
||||
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -48,7 +41,8 @@ export default {
|
||||
total: 0,
|
||||
reportType: 5,
|
||||
reportTime: []
|
||||
},
|
||||
},
|
||||
date: '许昌安彩年原片生产汇总',
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
|
||||
Reference in New Issue
Block a user