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