1、看板料罐车数获取;2、小时产量加班次、分钟数做活,导出功能;3、工序完成记录加入班次

master
zhaoxiaolin 1 year ago
parent 4cb1c3ad6c
commit fa27045f50

@ -98,3 +98,11 @@ export function getHourProductionList(query) {
params: query
});
}
// 获取班次信息
export function getProShifts() {
return request({
url: '/mes/reportWork/getProShifts/',
method: 'get'
})
}

@ -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;

@ -11,6 +11,13 @@
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"
@ -105,7 +112,7 @@
</template>
<script>
import { getProcessFinishList} from "@/api/mes/reportWork";
import { getProcessFinishList,getProShifts} from "@/api/mes/reportWork";
import moment from 'moment';
export default {
name: "Prepare",
@ -158,11 +165,17 @@ export default {
//
form: {},
//
rules: {}
rules: {},
// list
workShift: []
};
},
created() {
this.getList();
//
getProShifts().then(response => {
this.workShift = response.data
})
},
methods: {
indexMethod(index){

Loading…
Cancel
Save