This commit is contained in:
shilixia 2022-01-06 08:34:46 +08:00
parent 1bc22240b7
commit c8589cb158
9 changed files with 441 additions and 289 deletions

View File

@ -2,8 +2,8 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' #VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
#VUE_APP_BASE_API = 'http://47.95.0.242:2222/api' VUE_APP_BASE_API = 'http://47.95.0.242:2222/api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,

View File

@ -324,3 +324,13 @@ export function getwproductticketList(query) {
params: query params: query
}) })
} }
//下料清单
export function getcutList(query) {
return request({
url: '/wpm/cutting_list/',
method: 'get',
params: query
})
}

View File

@ -184,7 +184,25 @@ export const asyncRoutes = [
name: 'management', name: 'management',
component: () => import('@/views/pm/management'), component: () => import('@/views/pm/management'),
meta: { title: '生产任务管理', icon: 'example', perms: ['pm_resources'] } meta: { title: '生产任务管理', icon: 'example', perms: ['pm_resources'] }
},
{
path: 'plandetails/:id',
name: 'plandetails',
component: () => import('@/views/pm/plandetails'),
meta: { title: '生产任务详情', perms: ['vendor_manage'] },
hidden: true
} }
,
{
path: 'processcard/:id',
name: 'processcard',
component: () => import('@/views/pm/processcard'),
meta: { title: '流程卡', perms: ['vendor_manage'] },
hidden: true
}
] ]
} }
, ,

View File

@ -65,8 +65,8 @@
<el-table-column label="生产数量" width="110"> <el-table-column label="生产数量" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
<el-table-column label="生产状态" width="110"> <el-table-column label="状态" width="110">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="计划开工时间" width="110"> <el-table-column label="计划开工时间" width="110">
<template slot-scope="scope">{{ scope.row.start_date }}</template> <template slot-scope="scope">{{ scope.row.start_date }}</template>
@ -131,7 +131,13 @@ export default {
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
state_:{
10:'制定中',
20:'已下达',
30:'已接受',
40:'生产中',
50:'已完成',
60:'军检完成'},
listLoading: true, listLoading: true,
proList: [], proList: [],
@ -271,6 +277,10 @@ export default {
this.listLoading = false; this.listLoading = false;
}); });
}, },
//详情
handleselectplan(scope){
this.$router.push({ name: "plandetails", params: { id: scope.row.id } });
},
}, },
}; };
</script> </script>

View File

@ -5,7 +5,27 @@
<span>生产任务列表</span> <span>生产任务列表</span>
</div> </div>
<el-input
v-model="listQuery1.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
>
<el-table <el-table
:data="productionplanList.results" :data="productionplanList.results"
border border
@ -285,7 +305,7 @@
getplanList() { getplanList() {
let that = this; let that = this;
this.listLoading = true; this.listLoading = true;
getProductionplanList(this.listQuery).then((response) => { getProductionplanList(this.listQuery1).then((response) => {
if (response.data) { if (response.data) {
this.productionplanList = response.data; this.productionplanList = response.data;
let list = response.data.results; let list = response.data.results;
@ -314,6 +334,18 @@
this.listLoading = false; this.listLoading = false;
}); });
}, },
//搜索生产计划
handleFilter() {
this.listQuery1.page = 1;
this.getplanList();
},
resetFilter() {
this.listQuery1 = {
page: 1,
page_size: 20,
}
this.getplanList();
},
handleclick(scope) { handleclick(scope) {
this.orderID = scope.row.id; this.orderID = scope.row.id;
this.countsx = scope.row.count; this.countsx = scope.row.count;

View File

@ -0,0 +1,179 @@
<template>
<div class="app-container">
<el-card style="margin-top: 2px">
<el-descriptions title="任务详情" :column="4" border style="margin-bottom: 20px">
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}</el-descriptions-item>
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item>
<el-descriptions-item label="生产数量">{{productionplan.count}}</el-descriptions-item>
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
<el-descriptions-item label="计划开工时间">{{productionplan.start_date}}</el-descriptions-item>
<el-descriptions-item label="计划完工时间">{{productionplan.end_date}}</el-descriptions-item>
</el-descriptions>
<el-table
:data="wproduct"
border
fit
stripe
style="width: 100%"
height="500"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="玻璃编号/产品编号" >
<template slot-scope="scope" >{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="所在子工序">
<template slot-scope="scope" >{{
scope.row.step_.name
}}</template>
</el-table-column>
<el-table-column label="产品状态" >
<template slot-scope="scope">{{
actstate_[scope.row.act_state]
}}</template>
</el-table-column>
<el-table-column label="生产状态">
<template slot-scope="scope" >{{
scope.row.step_.name
}}</template>
</el-table-column>
<el-table-column label="最后检验结果">
<template slot-scope="scope" >{{
scope.row.step_.name
}}</template>
</el-table-column>
<el-table-column label="生成记录">
<template slot-scope="scope" >{{
scope.row.step_.name
}}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_delete'])"
type="primary"
@click="handleoption(scope)"
>生成流程卡</el-link
>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
import { getwproductList} from "@/api/wpm";
import checkPermission from "@/utils/permission";
import {getTestRecord} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
components: { Pagination },
data() {
return {
productionplan:{
number:""
},
activeName:"1",
wproduct:[],
listQuery: {
page: 1,
page_size: 20,
},
state_:{
10:'制定中',
20:'已下达',
30:'已接受',
40:'生产中',
50:'已完成',
60:'军检完成'},
actstate_: {
6: "待复检",
10: "操作进行中",
20: "待检验",
30: "已合格",
40: "库存中",
50: "不合格",
60: "待成品检验",
8: "操作准备中",
26: "待夹层检验",
70: "报废",
},
process_json:null,
productionplanID:null,
};
},
computed: {},
watch: {},
created() {
this.id = this.$route.params.id;
this.getList();
this.getwproductList();
},
methods: {
checkPermission,
getList() {
getProductionplan(this.id).then((response) => {
if (response.data) {
this.productionplan = response.data;
this.productionplanID=response.data.id;
let process_json = [];
for(let item in response.data.process_json){
let obj = new Object();
obj = response.data.process_json[item];
process_json.push(obj)
}
this.process_json= process_json;
}
});
},
getwproductList()
{
getwproductList({production_plan:this.id,page:0,}).then((response) => {
if (response.data) {
this.wproduct = response.data;
}
});
},
//查看该玻璃检验记录表
handleoption(scope){
this.$router.push({name: "processcard", params: { id: scope.row.id }, })
},
},
};
</script>

View File

@ -0,0 +1,34 @@
<template>
<div class="app-container">
<el-card style="margin-top: 2px">
流程卡界面正在更新
</el-card>
</div>
</template>
<script>
import checkPermission from "@/utils/permission";
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
import customForm from "@/components/customForm/index";
import { getTestRecord ,getTestRecordItem} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
components: { Pagination, customForm },
data() {
return {
};
},
computed: {},
watch: {},
created() {
},
methods: {
checkPermission,
},
};
</script>

View File

@ -1,191 +1,67 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" >
<el-tab-pane label="总览" name="1" > <el-tab-pane label="总览" name="1" >
<el-table
v-loading="listLoading"
:data="fifodetailList1.results"
border
fit
stripe
highlight-current-row
height="620"
v-el-height-adaptive-table="{bottomOffset: 40}"
>
<el-table-column type="index" width="50" />
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
<el-table-column label="物料名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{
scope.row.material_.specification
}}</template>
</el-table-column>
<el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
</el-table-column>
<el-table-column label="总数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column>
<el-table-column label="检查状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_tested == false">未检查</el-tag>
<el-tag v-else>已检查</el-tag>
</template>
</el-table-column>
<el-table-column label="检查是否合格">
<template slot-scope="scope" v-if="scope.row.is_tested == true">
<el-tag v-if="scope.row.is_testok == false">不合格</el-tag>
<el-tag v-else>合格</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
</el-table>
<pagination
v-show="fifodetailList1.count > 0"
:total="fifodetailList1.count"
:page.sync="listQuery1.page"
:limit.sync="listQuery1.page_size"
@pagination="getList1"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="待检物料" name="2"> <el-tab-pane label="待检成品" name="2">
<el-table <el-table
v-loading="listLoading"
:data="fifodetailList2.results" :data="wproductList.results"
border border
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="620" max-height="600"
v-el-height-adaptive-table="{bottomOffset: 40}" >
> <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.material_.name }}</template>
<template slot-scope="scope">{{ scope.row.batch }}</template> </el-table-column>
</el-table-column>
<el-table-column label="物料名称"> <el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.material_.name }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="规格型号"> <el-table-column label="检测状态">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.material_.specification {{ actstate_[scope.row.act_state] }}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template> <el-table-column label="所在子工序">
</el-table-column> <template slot-scope="scope">{{ scope.row.step_.name }}</template>
<el-table-column label="总数量"> </el-table-column>
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-table-column label="创建时间"> <el-link
<template slot-scope="scope">{{ scope.row.create_time }}</template> v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
</el-table-column> @click="handleInspection(scope)"
>检验
</el-table> </el-link>
<pagination <el-link
v-show="fifodetailList2.count > 0" v-if="scope.row.test!==null"
:total="fifodetailList2.count" @click="checkRecord(scope)"
:page.sync="listQuery2.page" >检验记录
:limit.sync="listQuery2.page_size" </el-link>
@pagination="getList2" </template>
/> </el-table-column>
</el-table>
<pagination
v-show="wproductList.count > 0"
:total="wproductList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="合格物料" name="3"> <el-tab-pane label="合格成品" name="3">
<el-table
v-loading="listLoading"
:data="fifodetailList3.results"
border
fit
stripe
highlight-current-row
height="620"
v-el-height-adaptive-table="{bottomOffset: 40}"
>
<el-table-column type="index" width="50" />
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
<el-table-column label="物料名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{
scope.row.material_.specification
}}</template>
</el-table-column>
<el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
</el-table-column>
<el-table-column label="仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
</el-table-column>
<el-table-column label="入库数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
</el-table>
<pagination
v-show="fifodetailList3.count > 0"
:total="fifodetailList3.count"
:page.sync="listQuery3.page"
:limit.sync="listQuery3.page_size"
@pagination="getList3"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="不合格物料" name="4"> <el-tab-pane label="不合格成品" name="4">
<el-table
v-loading="listLoading"
:data="fifodetailList4.results"
border
fit
stripe
highlight-current-row
height="620"
v-el-height-adaptive-table="{bottomOffset: 40}"
>
<el-table-column type="index" width="50" />
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
<el-table-column label="物料名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{
scope.row.material_.specification
}}</template>
</el-table-column>
<el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
</el-table>
<pagination
v-show="fifodetailList4.count > 0"
:total="fifodetailList4.count"
:page.sync="listQuery4.page"
:limit.sync="listQuery4.page_size"
@pagination="getList4"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -200,127 +76,49 @@
import { getfifodetailList } from "@/api/inm"; import { getfifodetailList } from "@/api/inm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import { createTestrecord } from "@/api/inm"; import { createTestrecord } from "@/api/inm";
import {getwproductList, wproductTest, wproductPutin, createputins} from "@/api/wpm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default { export default {
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
InventoryList: { wproductList: {
count: 0, count: 0,
}, },
fifodetailList1: {
count: 0, listQuery: {
},
listQuery1: {
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
listQuery2: {
page: 1,
page_size: 20,
},
listQuery3: {
page: 1,
page_size: 20,
},
listQuery4: {
page: 1,
page_size: 20,
},
is_testok: "true",
fifodetailList2:{
count: 0,
},
fifodetailList3:{
count: 0,
},
fifodetailList4:{
count: 0,
},
activeName:"1" activeName:"1"
}; };
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
this.getList1(); this.getList();
}, },
methods: { methods: {
checkPermission, checkPermission,
getList1() {
this.listLoading = true;
this.listQuery1.material=1; //待检成品列表
this.listQuery1.fifo__type = 1; getList() {
getfifodetailList(this.listQuery1).then((response) => {
if (response.data) { this.listQuery.act_state = 60;
this.fifodetailList1 = response.data; this.listQuery.material__type = 1;
} getwproductList(this.listQuery).then((response) => {
this.listLoading = false; if (response.data) {
}); this.wproductList = response.data;
}, }
//待检
getList2() { });
this.listLoading = true; },
this.listQuery2.fifo__type = 1;
this.listQuery2.material=1;
this.listQuery2.is_tested = false;
getfifodetailList(this.listQuery2).then((response) => {
if (response.data) {
this.fifodetailList2 = response.data;
}
this.listLoading = false;
});
},
//合格物料
getList3() {
this.listLoading = true;
this.listQuery3.fifo__type = 1;
this.listQuery3.material=1;
this.listQuery3.is_testok = true;
getfifodetailList(this.listQuery3).then((response) => {
if (response.data) {
this.fifodetailList3 = response.data;
}
this.listLoading = false;
});
},
//不合格物料
getList4() {
this.listLoading = true;
this.listQuery4.fifo__type = 1;
this.listQuery1.material=1;
this.listQuery4.is_testok = false;
this.listQuery4.is_tested = true;
getfifodetailList(this.listQuery4).then((response) => {
if (response.data) {
this.fifodetailList4 = response.data;
}
this.listLoading = false;
});
},
//选项卡切换
handleClick(tab) {
if(tab.name==1)
{
this.getList1()
}
else if(tab.name==2)
{
this.getList2()
}
else if(tab.name==3)
{
this.getList3()
}
else
{
this.getList4()
}
},
}, },
}; };
</script> </script>

View File

@ -8,7 +8,65 @@
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item> <el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item> <el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-card style="margin-bottom: 20px">
<div slot="header" class="clearfix">
<span>下料清单</span>
</div>
<el-table
:data="cut"
border
fit
stripe
style="width: 100%"
>
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="玻璃批次" >
<template slot-scope="scope" >{{ scope.row.from_batch }}</template>
</el-table-column>
<el-table-column label="生产型号" >
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template>
</el-table-column>
<el-table-column label="切裁规格" >
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template>
</el-table-column>
<el-table-column label="切裁板数" >
<template slot-scope="scope" >{{ scope.row.count_cut }}</template>
</el-table-column>
<el-table-column label="切裁片数" >
<template slot-scope="scope" >{{ scope.row.count_real }}</template>
</el-table-column>
<el-table-column label="成品数量" >
<template slot-scope="scope" >{{ scope.row.count_ok }}</template>
</el-table-column>
<el-table-column label="操作人" >
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template>
</el-table-column>
<el-table-column label="甩片原因及数量(片)" >
<el-table-column label="气泡" >
<template slot-scope="scope" >{{ scope.row.count_qipao }}</template>
</el-table-column>
<el-table-column label="破点" >
<template slot-scope="scope" >{{ scope.row.count_podian }}</template>
</el-table-column>
<el-table-column label="划伤" >
<template slot-scope="scope" >{{ scope.row.count_hua }}</template>
</el-table-column>
<el-table-column label="其他" >
<template slot-scope="scope" >{{ scope.row.count_other }}</template>
</el-table-column>
</el-table-column>
<el-table-column label="检验员" >
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template>
</el-table-column>
</el-table>
</el-card>
<el-tabs v-model="activeName" type="card" > <el-tabs v-model="activeName" type="card" >
<el-tab-pane label="玻璃" name="1" > <el-tab-pane label="玻璃" name="1" >
<el-table <el-table
@ -116,7 +174,7 @@
<script> <script>
import { getProductionplan,getsubproductionplanList } from "@/api/pm"; import { getProductionplan,getsubproductionplanList } from "@/api/pm";
import { getwproductList} from "@/api/wpm"; import { getwproductList,getcutList} from "@/api/wpm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getTestRecord} from "@/api/qm"; import {getTestRecord} from "@/api/qm";
@ -129,6 +187,7 @@ export default {
productionplan:{ productionplan:{
number:"" number:""
}, },
cut:[],
activeName:"1", activeName:"1",
wproduct:[], wproduct:[],
subproductionplanList: "", subproductionplanList: "",
@ -164,6 +223,7 @@ export default {
created() { created() {
this.id = this.$route.params.id; this.id = this.$route.params.id;
this.getList(); this.getList();
this.gecutList();
this.getspList(); this.getspList();
this.getwproductList(); this.getwproductList();
@ -209,6 +269,17 @@ export default {
}); });
}, },
//下料清单
gecutList()
{
getcutList({production_plan:this.id,page:0}).then((response) => {
if (response.data) {
this.cut = response.data;
}
});
},
//查看该玻璃检验记录表 //查看该玻璃检验记录表
handleoption(scope){ handleoption(scope){