|
|
@ -4,13 +4,20 @@
|
|
|
|
<el-form-item label="生产时间段" prop="productDateArray">
|
|
|
|
<el-form-item label="生产时间段" prop="productDateArray">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="queryParams.productDateArray"
|
|
|
|
v-model="queryParams.productDateArray"
|
|
|
|
format="yyyy-MM-dd HH:00:00"
|
|
|
|
format="yyyy-MM-dd HH:mm:00"
|
|
|
|
type="datetimerange"
|
|
|
|
type="datetimerange"
|
|
|
|
range-separator="至"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="班次" prop="shiftId">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.shiftId" placeholder="请选择班次" clearable>
|
|
|
|
|
|
|
|
<el-option v-for="item in workShift" :key="item.shiftId" :label="item.shiftDesc"
|
|
|
|
|
|
|
|
:value="item.shiftId"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工单编号" prop="workorderCode">
|
|
|
|
<el-form-item label="工单编号" prop="workorderCode">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.workorderCode"
|
|
|
|
v-model="queryParams.workorderCode"
|
|
|
@ -83,7 +90,8 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {getHourProductionTitle, getHourProductionList} from "@/api/mes/reportWork";
|
|
|
|
import {getHourProductionTitle, getHourProductionList,getProShifts} from "@/api/mes/reportWork";
|
|
|
|
|
|
|
|
|
|
|
|
import moment from 'moment';
|
|
|
|
import moment from 'moment';
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Prepare",
|
|
|
|
name: "Prepare",
|
|
|
@ -126,12 +134,19 @@ export default {
|
|
|
|
productDate: null,
|
|
|
|
productDate: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {}
|
|
|
|
form: {},
|
|
|
|
|
|
|
|
// 班次list
|
|
|
|
|
|
|
|
workShift: []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getDate();
|
|
|
|
this.getDate();
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取班次信息
|
|
|
|
|
|
|
|
getProShifts().then(response => {
|
|
|
|
|
|
|
|
this.workShift = response.data
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
/**获取默认查询时间段**/
|
|
|
|
/**获取默认查询时间段**/
|
|
|
@ -152,8 +167,8 @@ export default {
|
|
|
|
/** 查询设备小时产量列表 */
|
|
|
|
/** 查询设备小时产量列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
if(this.queryParams.productDateArray!=null){
|
|
|
|
if(this.queryParams.productDateArray!=null){
|
|
|
|
this.queryParams.productDateStart = moment(this.queryParams.productDateArray[0]).format('YYYY-MM-DD HH:00:00');
|
|
|
|
this.queryParams.productDateStart = moment(this.queryParams.productDateArray[0]).format('YYYY-MM-DD HH:mm:00');
|
|
|
|
this.queryParams.productDateEnd = moment(this.queryParams.productDateArray[1]).format('YYYY-MM-DD HH:00:00');
|
|
|
|
this.queryParams.productDateEnd = moment(this.queryParams.productDateArray[1]).format('YYYY-MM-DD HH:mm:00');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
@ -223,9 +238,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
this.download('mes/reportWork/processFinishExport', {
|
|
|
|
this.download('mes/reportWork/getHourProductionExport', {
|
|
|
|
...this.queryParams
|
|
|
|
...this.queryParams
|
|
|
|
}, `processFinish_${new Date().getTime()}.xlsx`)
|
|
|
|
}, `hourProduction_${new Date().getTime()}.xlsx`)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getSummaries(param) {
|
|
|
|
getSummaries(param) {
|
|
|
|
const { columns, data } = param;
|
|
|
|
const { columns, data } = param;
|
|
|
|