甘特图排产页面
This commit is contained in:
parent
f2b2dbc363
commit
4425d6960e
@ -176,6 +176,20 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/mes/pro/schedule',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['mes:pro:schedule:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'ganttedit',
|
||||
component: () => import("@/views/mes/pro/schedule/ganttedit"),
|
||||
name: 'ganttEdit',
|
||||
meta: {title: '使用甘特图排产',activeMenu: '/mes/pro/schedule'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
|
76
src/views/mes/pro/schedule/ganttedit.vue
Normal file
76
src/views/mes/pro/schedule/ganttedit.vue
Normal file
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
<GanttChar class="left-container" ref="ganttChar" optType="edit" :tasks="tasks"></GanttChar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GanttChar from "./ganttx.vue";
|
||||
import {listGanttTaskList} from "@/api/mes/pro/protask";
|
||||
export default {
|
||||
name:'',
|
||||
components:{GanttChar},
|
||||
data(){
|
||||
return {
|
||||
tasks:{
|
||||
data: [],
|
||||
links: []
|
||||
},
|
||||
optType:'edit',
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
workorderCode: null,
|
||||
workorderName: null,
|
||||
orderSource: null,
|
||||
sourceCode: null,
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productName: null,
|
||||
productSpc: null,
|
||||
unitOfMeasure: null,
|
||||
quantity: null,
|
||||
quantityProduced: null,
|
||||
quantityChanged: null,
|
||||
quantityScheduled: null,
|
||||
clientId: null,
|
||||
clientCode: null,
|
||||
clientName: null,
|
||||
requestDate: null,
|
||||
parentId: null,
|
||||
ancestors: null,
|
||||
status: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getGanttTasks();
|
||||
},
|
||||
methods: {
|
||||
getGanttTasks(){
|
||||
listGanttTaskList(this.queryParams).then(response =>{
|
||||
debugger;
|
||||
this.tasks.data = response.data.data;
|
||||
this.tasks.links = response.data.links;
|
||||
this.$refs.ganttChar.reload();
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrapper{
|
||||
height: 700px;
|
||||
}
|
||||
.container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.left-container {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -17,6 +17,12 @@ export default {
|
||||
default () {
|
||||
return {data: [], links: []}
|
||||
}
|
||||
},
|
||||
optType: {
|
||||
type: String,
|
||||
default (){
|
||||
return 'view'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -60,7 +66,12 @@ export default {
|
||||
initConfig() {
|
||||
// 1 基础配置
|
||||
// 1.1 甘特图是否只读
|
||||
gantt.config.readonly = true;
|
||||
if(this.optType =='view'){
|
||||
gantt.config.readonly = true;
|
||||
}else{
|
||||
gantt.config.readonly = false;
|
||||
}
|
||||
|
||||
// 1.2 表格列设置
|
||||
gantt.config.duration_unit="hour";
|
||||
gantt.config.duration_step=8;
|
||||
|
@ -73,7 +73,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-refresh" circle="" @click="getList"></el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" circle="" @click="getList"></el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" circle="" @click="handleOpenGantt"></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="wrapper">
|
||||
@ -351,7 +351,9 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handleOpenGantt(){
|
||||
this.$router.push({ path: '/mes/pro/schedule/ganttedit'})
|
||||
},
|
||||
getGanttTasks(){
|
||||
listGanttTaskList(this.queryParams).then(response =>{
|
||||
debugger;
|
||||
|
@ -347,12 +347,10 @@ export default {
|
||||
}, `warehouse_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleLocation(warehouseId){
|
||||
debugger;
|
||||
this.$router.push({ path: '/mes/wm/location/index', query: { warehouseId: warehouseId || 0 ,optType: this.optType} })
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag){
|
||||
debugger;
|
||||
if(autoGenFlag){
|
||||
genCode('WAREHOUSE_CODE').then(response =>{
|
||||
this.form.warehouseCode = response;
|
||||
|
Loading…
Reference in New Issue
Block a user