Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
0babf4df77
|
@ -179,6 +179,13 @@ export const asyncRoutes = [
|
||||||
meta: { title: '生产资源配置', icon: 'example', perms: ['pm_resources'] }
|
meta: { title: '生产资源配置', icon: 'example', perms: ['pm_resources'] }
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
{
|
||||||
|
path: 'management',
|
||||||
|
name: 'management',
|
||||||
|
component: () => import('@/views/pm/management'),
|
||||||
|
meta: { title: '生产任务管理', icon: 'example', perms: ['pm_resources'] }
|
||||||
|
}
|
||||||
|
,
|
||||||
{
|
{
|
||||||
path: 'gantt',
|
path: 'gantt',
|
||||||
name: 'gantt',
|
name: 'gantt',
|
||||||
|
|
|
@ -0,0 +1,207 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>生产任务列表</span>
|
||||||
|
|
||||||
|
<el-input
|
||||||
|
v-model="listQuery.search"
|
||||||
|
placeholder="任务编号/订单编号/合同编号/产品名称"
|
||||||
|
style="width: 300px"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="handleFilter"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleFilter"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="resetFilter"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="productionplanList.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{ bottomOffset: 40 }"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
<el-table-column label="任务编号" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="订单编号" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.order_.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合同编号" width="110">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.order_.contract_.number
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="产品名称" width="250" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品型号" width="110">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.product_.specification
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品单位" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.unit }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产数量" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产状态" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" width="110">
|
||||||
|
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交付截止时间" width="110">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.order_.delivery_date
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.is_planed"
|
||||||
|
@click="handleselectplan(scope)"
|
||||||
|
>详情
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="productionplanList.count > 0"
|
||||||
|
:total="productionplanList.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getplanList"
|
||||||
|
/>
|
||||||
|
<gantt
|
||||||
|
v-if="ganttShow"
|
||||||
|
:proList="proList"
|
||||||
|
></gantt>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import gantt from "@/components/Gantt/index";
|
||||||
|
import { getordertoplan } from "@/api/sam";
|
||||||
|
import {
|
||||||
|
createProductionplan,
|
||||||
|
getProductionplanList,
|
||||||
|
createsubplan,
|
||||||
|
} from "@/api/pm";
|
||||||
|
import { getMaterialList } from "@/api/mtm";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
import { genTree } from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaulteorderplan = {};
|
||||||
|
export default {
|
||||||
|
components: { Pagination, gantt },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
productionplanList: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
|
||||||
|
listLoading: true,
|
||||||
|
proList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getplanList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
//搜索生产计划
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getplanList();
|
||||||
|
},
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getplanList();
|
||||||
|
},
|
||||||
|
//生产计划列表
|
||||||
|
//列表
|
||||||
|
getplanList() {
|
||||||
|
let that = this;
|
||||||
|
this.listLoading = true;
|
||||||
|
getProductionplanList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.productionplanList = response.data;
|
||||||
|
let list = response.data.results;
|
||||||
|
let arr = [];
|
||||||
|
list.forEach((item) => {
|
||||||
|
if (!item.children || item.children.length < 1) {
|
||||||
|
let startTime = new Date(item.start_date).getTime();
|
||||||
|
let endTime = new Date(item.end_date).getTime();
|
||||||
|
let obj = new Object();
|
||||||
|
obj.name = item.number;
|
||||||
|
obj.id = item.id;
|
||||||
|
obj.top = 20;
|
||||||
|
obj.startTime = startTime;
|
||||||
|
obj.endTime = endTime;
|
||||||
|
obj.planTime = [startTime, endTime];
|
||||||
|
obj.per = item.count;
|
||||||
|
obj.type = 1;
|
||||||
|
obj.isShow = true;
|
||||||
|
arr.push(obj);
|
||||||
|
}
|
||||||
|
that.proList = arr;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-table .warning-row {
|
||||||
|
background: oldlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .success-row {
|
||||||
|
background: #f0f9eb;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -501,6 +501,27 @@
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>工序工装</span>
|
<span>工序工装</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="tool"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="230"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column prop="material_.name" label="物料名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="material_.unit" label="物料单位">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -660,6 +681,7 @@ export default {
|
||||||
wmaterialData: [],
|
wmaterialData: [],
|
||||||
outputData: [],
|
outputData: [],
|
||||||
tprogressData: [],
|
tprogressData: [],
|
||||||
|
tool:"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -674,6 +696,7 @@ export default {
|
||||||
this.getoutputLists(); //产出物料
|
this.getoutputLists(); //产出物料
|
||||||
this.getwmaterialList();
|
this.getwmaterialList();
|
||||||
this.getprogressList(); //产出物料调出
|
this.getprogressList(); //产出物料调出
|
||||||
|
this. gettoolList();//工序工装
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -778,6 +801,18 @@ export default {
|
||||||
});
|
});
|
||||||
this.dialogVisibleForm = true;
|
this.dialogVisibleForm = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//工序工装列表
|
||||||
|
gettoolList() {
|
||||||
|
gettoolList({ operation: this.id, page: 0 }).then(
|
||||||
|
(response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.tool = response.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
//提交表单内容
|
//提交表单内容
|
||||||
recordconfirm() {
|
recordconfirm() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="子计划编号">
|
|
||||||
<template slot-scope="scope">{{scope.row.id}}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="任务编号">
|
<el-table-column label="任务编号">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.number
|
scope.row.number
|
||||||
|
@ -145,8 +143,8 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="子计划编号">
|
<el-table-column label="任务编号">
|
||||||
<template slot-scope="scope">{{scope.row.subproduction_plan}}</template>
|
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="玻璃编号">
|
<el-table-column label="玻璃编号">
|
||||||
|
@ -193,9 +191,9 @@
|
||||||
max-height="300"
|
max-height="300"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="子计划编号">
|
<el-table-column label="任务编号">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.subproduction_plan
|
scope.row.subproduction_plan_.number
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料名称">
|
<el-table-column label="物料名称">
|
||||||
|
|
Loading…
Reference in New Issue