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

master
zhaoxiaolin 1 year ago
parent 4cb1c3ad6c
commit fa27045f50

@ -98,3 +98,11 @@ export function getHourProductionList(query) {
params: 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-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;

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

Loading…
Cancel
Save