排产代码提交

dev-scheduling
zhangdi 2 days ago
parent 40648601c7
commit 7280f8c9bb
  1. 54
      src/views/productionSchedulingPlan/schedulingDashboard/index.vue
  2. 27
      src/views/productionSchedulingPlan/statisticalAnalysis/index.vue

@ -5,7 +5,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="维度:"> <el-form-item label="维度:">
<el-select v-model="formLabelAlign.type" placeholder="请选择"> <el-select v-model="formLabelAlign.type" placeholder="请选择" @change="typeChange">
<el-option label="车间订单" value="1"> </el-option> <el-option label="车间订单" value="1"> </el-option>
<el-option label="班组" value="2"> </el-option> <el-option label="班组" value="2"> </el-option>
<el-option label="设备" value="3"> </el-option> <el-option label="设备" value="3"> </el-option>
@ -19,20 +19,31 @@
</el-col> </el-col>
<el-col :span="6" v-if="formLabelAlign.type == '2'"> <el-col :span="6" v-if="formLabelAlign.type == '2'">
<el-form-item label="班组:"> <el-form-item label="班组:">
<el-input v-model="formLabelAlign.teamame" placeholder="请输入"></el-input> <!-- <el-input v-model="formLabelAlign.teamame" placeholder="请输入"></el-input> -->
<!-- <el-select v-model="formLabelAlign.teamame" placeholder="请选择"> <el-select v-model="formLabelAlign.teamName" filterable placeholder="请选择">
<el-option label="班组1" value="1"> </el-option> <el-option
<el-option label="班组2" value="2"> </el-option> v-for="(item, index) in selectTeamOptions"
</el-select> --> :label="item"
:value="item"
:key="index"
>
</el-option>
<!-- <el-option label="班组2" value="2"> </el-option> -->
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" v-if="formLabelAlign.type == '3'"> <el-col :span="6" v-if="formLabelAlign.type == '3'">
<el-form-item label="设备:"> <el-form-item label="设备:">
<el-input v-model="formLabelAlign.equipName" placeholder="请输入"></el-input> <!-- <el-input v-model="formLabelAlign.equipName" placeholder="请输入"></el-input> -->
<!-- <el-select v-model="formLabelAlign.equipName" placeholder="请选择"> <el-select v-model="formLabelAlign.equipName" filterable placeholder="请选择">
<el-option label="设备1" value="1"> </el-option> <el-option
<el-option label="设备2" value="2"> </el-option> v-for="(item, index) in selectEquipOptions"
</el-select> --> :label="item"
:value="item"
:key="index"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -293,7 +304,6 @@
<i v-if="tooltipData.planStatus == '3'">报工完成</i> <i v-if="tooltipData.planStatus == '3'">报工完成</i>
<i v-if="tooltipData.planStatus == '5'">已完成</i> <i v-if="tooltipData.planStatus == '5'">已完成</i>
<i v-if="tooltipData.planStatus == '6'">已返工</i> <i v-if="tooltipData.planStatus == '6'">已返工</i>
</el-tag> </el-tag>
<el-tag v-if="searchType == '2' || searchType == '3'" :type="tooltipData.status"> <el-tag v-if="searchType == '2' || searchType == '3'" :type="tooltipData.status">
<i v-if="tooltipData.orderStatus == '1'">未开始</i> <i v-if="tooltipData.orderStatus == '1'">未开始</i>
@ -311,7 +321,7 @@
</template> </template>
<script> <script>
import { getData } from '@/api/productionSchedulingPlan/scheduling'; import { getData, selectEquip, selectTeam } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
name: 'GanttChart', name: 'GanttChart',
data() { data() {
@ -341,6 +351,8 @@ export default {
tooltipY: 0, tooltipY: 0,
baseRowHeight: 36, // baseRowHeight: 36, //
rowHeights: {}, // rowHeights: {}, //
selectTeamOptions: [], //
selectEquipOptions: [], //
}; };
}, },
computed: { computed: {
@ -366,13 +378,29 @@ export default {
this.searchType = this.formLabelAlign.type; this.searchType = this.formLabelAlign.type;
this.formLabelAlign.startTime = new Date().toISOString().substr(0, 10); this.formLabelAlign.startTime = new Date().toISOString().substr(0, 10);
this.getData(); this.getData();
this.getSelectTeam();
}, },
methods: { methods: {
typeChange(){
this.formLabelAlign.teamName = ''
this.formLabelAlign.equipName = ''
this.formLabelAlign.woCode = ''
},
getData() { getData() {
getData(this.formLabelAlign).then(res => { getData(this.formLabelAlign).then(res => {
this.processData(res.data.data); this.processData(res.data.data);
}); });
}, },
getSelectEquip() {
selectEquip().then(res => {
this.selectEquipOptions = res.data.data;
});
},
getSelectTeam() {
selectTeam().then(res => {
this.selectTeamOptions = res.data.data;
});
},
processData(rawData) { processData(rawData) {
const tasks = []; const tasks = [];
const workOrders = Object.keys(rawData); const workOrders = Object.keys(rawData);

@ -19,9 +19,7 @@
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #schedulingRate="{ row }"> <template #schedulingRate="{ row }"> {{ row.schedulingRate }}% </template>
{{row.schedulingRate}}%
</template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
@ -153,7 +151,7 @@ export default {
sums[index] = all; sums[index] = all;
} else if (prop == 'schedulingRate') { } else if (prop == 'schedulingRate') {
// sums[index] = all / values.length + '%' || 0; // sums[index] = all / values.length + '%' || 0;
sums[index] = ((sums[3]/sums[2])*100).toFixed(2)+ '%' || 0 sums[index] = ((sums[3] / sums[2]) * 100).toFixed(2) + '%' || 0;
} }
} else { } else {
if (index == 0) { if (index == 0) {
@ -188,22 +186,27 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
console.log(9999999,!!params.cycledate,(!!params.cycledate)&&params.cycledate.lenght>0) console.log(9999999, !!params.cycledate, !!params.cycledate && params.cycledate.lenght > 0);
this.loading = true; this.loading = true;
this.data = []; this.data = [];
if(!!params.cycledate){ if (!!params.cycledate) {
this.query.startTime=params.cycledate[0] this.query.startTime = params.cycledate[0];
this.query.endTime=params.cycledate[1] this.query.endTime = params.cycledate[1];
} }
schedulingCount(this.query).then( schedulingCount(this.query).then(res => {
res => {
this.data = res.data.data; this.data = res.data.data;
this.loading = false; this.loading = false;
this.page.total = res.data.data.total; this.page.total = res.data.data.total;
} });
);
}, },
}, },
mounted() {}, mounted() {},
}; };
</script> </script>
<style lang="scss" scoped>
:deep(.el-button--primary) {
background-color: #284c89 !important;
color: #fff;
}
</style>

Loading…
Cancel
Save