fix conflict
This commit is contained in:
commit
ba2e583b26
|
|
@ -2,8 +2,8 @@
|
|||
ENV = 'development'
|
||||
|
||||
# base 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://127.0.0.1:8000/api'
|
||||
#VUE_APP_BASE_API = 'http://47.95.0.242:2222/api'
|
||||
|
||||
|
||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,13 @@ export function getProductionplanList(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
export function getProductionplan(id) {
|
||||
return request({
|
||||
url: `/pm/production_plan/${id}/`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function createProductionplan(data) {
|
||||
return request({
|
||||
url: 'pm/production_plan/',
|
||||
|
|
|
|||
|
|
@ -340,23 +340,38 @@ export const asyncRoutes = [
|
|||
}
|
||||
,
|
||||
{
|
||||
path: 'testitem',
|
||||
name: 'testitem',
|
||||
component: () => import('@/views/qm/testitem'),
|
||||
path: 'admissiontest',
|
||||
name: 'admissiontest',
|
||||
component: () => import('@/views/qm/admissiontest'),
|
||||
meta: { title: '入场检验', icon: 'example', perms: ['index_manage'] }
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'testitem',
|
||||
name: 'testitem',
|
||||
component: () => import('@/views/qm/testitem'),
|
||||
path: 'processtest',
|
||||
name: 'processtest',
|
||||
component: () => import('@/views/qm/processtest'),
|
||||
meta: { title: '过程检验', icon: 'example', perms: ['index_manage'] }
|
||||
},
|
||||
{
|
||||
path: 'taskdetails/:id',
|
||||
name: 'taskdetails',
|
||||
component: () => import('@/views/qm/taskdetails'),
|
||||
meta: { title: '过程检验详情', perms: ['vendor_manage'] },
|
||||
hidden: true
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'testitem',
|
||||
name: 'testitem',
|
||||
component: () => import('@/views/qm/testitem'),
|
||||
path: 'taskrecordfrom/:id',
|
||||
name: 'taskrecordfrom',
|
||||
component: () => import('@/views/qm/taskrecordfrom'),
|
||||
meta: { title: '检验记录', perms: ['vendor_manage'] },
|
||||
hidden: true
|
||||
}
|
||||
,
|
||||
{
|
||||
path: 'producttest',
|
||||
name: 'producttest',
|
||||
component: () => import('@/views/qm/producttest'),
|
||||
meta: { title: '成品检验', icon: 'example', perms: ['index_manage'] }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<template slot-scope="scope">{{ scope.row.order_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" width="110">
|
||||
<template slot-scope="scope">{{
|
||||
<template slot-scope="scope" v-if="scope.row.contract">{{
|
||||
scope.row.order_.contract_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<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>
|
||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.order_.contract_.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品名称" width="150" show-overflow-tooltip>
|
||||
|
|
@ -39,6 +39,9 @@
|
|||
</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">{{ state_[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划开工时间" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||
|
|
@ -109,10 +112,10 @@
|
|||
</el-table-column>
|
||||
|
||||
<el-table-column label="合同编号" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.contract_.number }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" show-overflow-tooltip width="110">
|
||||
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所需产品" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||
|
|
@ -138,6 +141,7 @@
|
|||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -225,6 +229,13 @@
|
|||
orderList: {
|
||||
count: 0,
|
||||
},
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成',
|
||||
60:'军检完成'},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
>修改日期</el-link
|
||||
>
|
||||
<el-link type="primary"
|
||||
v-if="scope.row.state==0"
|
||||
v-if="scope.row.state==10"
|
||||
@click="handleissuedclick(scope)"
|
||||
>下达</el-link
|
||||
>
|
||||
|
|
@ -221,11 +221,11 @@ export default {
|
|||
|
||||
},
|
||||
state_:{
|
||||
0:'制定中',
|
||||
1:'已下达',
|
||||
2:'已接受',
|
||||
3:'生产中',
|
||||
4:'已完成'}
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成'}
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,323 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<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 label="待检物料" name="2">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="fifodetailList2.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">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="fifodetailList2.count > 0"
|
||||
:total="fifodetailList2.count"
|
||||
:page.sync="listQuery2.page"
|
||||
:limit.sync="listQuery2.page_size"
|
||||
@pagination="getList2"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<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 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-tabs>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { createTestrecord } from "@/api/inm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
InventoryList: {
|
||||
count: 0,
|
||||
},
|
||||
fifodetailList1: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery1: {
|
||||
page: 1,
|
||||
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"
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList1();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList1() {
|
||||
this.listLoading = true;
|
||||
|
||||
this.listQuery1.fifo__type = 3;
|
||||
getfifodetailList(this.listQuery1).then((response) => {
|
||||
if (response.data) {
|
||||
this.fifodetailList1 = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
//待检
|
||||
getList2() {
|
||||
this.listLoading = true;
|
||||
this.listQuery2.fifo__type = 3;
|
||||
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 = 3;
|
||||
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 = 3;
|
||||
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>
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="总览" name="1" >
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="productionplan.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.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称">
|
||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.product_.specification
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" >
|
||||
<el-table-column label="冷加工">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['01']">{{ scope.row.process_json['01'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="热弯">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['02']">{{ scope.row.process_json['02'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="化学钢化">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['03']">{{ scope.row.process_json['03'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="镀膜">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['04']">{{ scope.row.process_json['04'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="夹层">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['05']">{{ scope.row.process_json['05'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="包边">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['06']">{{ scope.row.process_json['06'].rate }}%</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装框">
|
||||
<template slot-scope="scope" v-if="scope.row.process_json['07']">{{ scope.row.process_json['07'].rate }}%</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['material_update'])"
|
||||
type="primary"
|
||||
@click="handledetail(scope)"
|
||||
>详情</el-link
|
||||
>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="productionplan.count > 0"
|
||||
:total="productionplan.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="不合格物料" name="2">
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getProductionplanList } from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { createTestrecord } from "@/api/inm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
process_json_:{
|
||||
|
||||
"01":'冷加工',
|
||||
"02":'热弯',
|
||||
"03":'化学钢化',
|
||||
"04":'镀膜',
|
||||
"05":'夹层',
|
||||
"06":'包边',
|
||||
"07":'装框',
|
||||
|
||||
},
|
||||
productionplan:{
|
||||
count: 0,
|
||||
},
|
||||
activeName:"1",
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
getProductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
handledetail(scope)
|
||||
{
|
||||
this.$router.push({name: "taskdetails", params: { id: scope.row.id }, })
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<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 label="待检物料" name="2">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="fifodetailList2.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">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="fifodetailList2.count > 0"
|
||||
:total="fifodetailList2.count"
|
||||
:page.sync="listQuery2.page"
|
||||
:limit.sync="listQuery2.page_size"
|
||||
@pagination="getList2"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<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 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-tabs>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { createTestrecord } from "@/api/inm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
InventoryList: {
|
||||
count: 0,
|
||||
},
|
||||
fifodetailList1: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery1: {
|
||||
page: 1,
|
||||
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"
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList1();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList1() {
|
||||
this.listLoading = true;
|
||||
this.listQuery1.material=1;
|
||||
this.listQuery1.fifo__type = 1;
|
||||
getfifodetailList(this.listQuery1).then((response) => {
|
||||
if (response.data) {
|
||||
this.fifodetailList1 = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
//待检
|
||||
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>
|
||||
|
|
@ -1,284 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增标准</el-button >
|
||||
<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-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="standardList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="标准名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.enabled===true">是</el-tag>
|
||||
<el-tag v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准文件">
|
||||
<template slot-scope="scope" v-if="scope.row.file_">
|
||||
<el-link :href="scope.row.file_.path" >{{scope.row.file_.name}}</el-link>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleEdit(scope)"
|
||||
>编辑</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="standardList.count > 0"
|
||||
:total="standardList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'edit' ? '编辑标准' : '新增标准'"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="standard"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="标准名称" prop="name">
|
||||
<el-input v-model="standard.name" placeholder="标准名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标准编号" prop="number">
|
||||
<el-input v-model="standard.number" placeholder="标准编号" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否启用" prop="enabled">
|
||||
<el-switch v-model="standard.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导书" prop="template" v-if="dialogVisible">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:action="upUrl"
|
||||
:on-preview="handlePreview"
|
||||
:on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:headers="upHeaders"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getStandardList, createStandard,updateStandard,deleteStandard} from "@/api/qm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultestandard = {
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
standard: defaultestandard,
|
||||
contractList: {
|
||||
count: 0,
|
||||
},
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList:[],
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
options:[],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
enabled:false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getStandardList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.standardList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
window.open(file.url);
|
||||
} else {
|
||||
window.open(file.response.data.path);
|
||||
}
|
||||
},
|
||||
handleUpSuccess(res, file, filelist) {
|
||||
this.standard.file = res.data.id;
|
||||
},
|
||||
handleRemove(file, filelist){
|
||||
this.standard.file = null;
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.standard = Object.assign({}, defaultestandard);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.fileList=[];
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
handleEdit(scope) {
|
||||
this.standard = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
if (this.standard.file) {
|
||||
this.fileList = [
|
||||
{
|
||||
name:this.standard.file_.name,
|
||||
url: this.standard.file_.path,
|
||||
},
|
||||
];
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteStandard(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateStandard(this.standard.id, this.standard).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createStandard(this.standard).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="任务详情" :column="5" border>
|
||||
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">{{productionplan.product_.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">{{productionplan.product_.specification}}</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态">生产状态没有</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格品数量">不合格数没有</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-tabs v-model="activeName" type="card" >
|
||||
<el-tab-pane label="玻璃" name="1" >
|
||||
<el-table
|
||||
:data="wproduct"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
|
||||
<el-table-column type="index" 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
|
||||
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-tab-pane>
|
||||
<el-tab-pane label="工序" name="2" >
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getProductionplan } 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:"",
|
||||
activeName:"1",
|
||||
wproduct:"",
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
};
|
||||
},
|
||||
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;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
getwproductList()
|
||||
{
|
||||
getwproductList({production_plan:this.id,page:0,}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproduct = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope){
|
||||
|
||||
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id }, })
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
|
||||
|
||||
|
||||
<el-table
|
||||
:data="recordList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="表单名称">
|
||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
<span v-else>未提交</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
|
||||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
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 {
|
||||
recordList:"",
|
||||
checkTypes:{
|
||||
10:"子工序检验",
|
||||
20:"工序检验",
|
||||
30:"工序复检",
|
||||
36:"夹层检验",
|
||||
40:"成品检验",
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
getTestRecord({wproduct: this.id}).then(res=>{
|
||||
if(res.code==200){
|
||||
|
||||
this.recordList = res.data;
|
||||
}else{
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,257 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增项目</el-button
|
||||
>
|
||||
<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-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="testitemList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="项目名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="条款号">
|
||||
<template slot-scope="scope">{{ scope.row.term_number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准名称">
|
||||
<template slot-scope="scope">{{ scope.row.standard_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准编号">
|
||||
<template slot-scope="scope">{{ scope.row.standard_.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleEdit(scope)"
|
||||
>编辑</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="testitemList.count > 0"
|
||||
:total="testitemList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'edit' ? '编辑项目' : '新增项目'"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="testitem"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input v-model="testitem.name" placeholder="项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="条款号" prop="term_number">
|
||||
<el-input v-model="testitem.term_number" placeholder="条款号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标准" prop="standard">
|
||||
<el-select style="width: 100%" v-model="testitem.standard" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTestitemList, createTestitem,updateTestitem,deleteTestitem,getStandardList } from "@/api/qm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultetestitem = {
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
testitem: defaultetestitem,
|
||||
testitemList: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
options:[],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
term_number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getLists()
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//列表
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getTestitemList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.testitemList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getLists() {
|
||||
|
||||
getStandardList({pageoff:true}).then((response) => {
|
||||
|
||||
this.options = genTree(response.data);
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.testitem = Object.assign({}, defaultetestitem);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
handleEdit(scope) {
|
||||
this.testitem = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteTestitem(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateTestitem(this.testitem.id, this.testitem).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createTestitem(this.testitem).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -48,8 +48,8 @@
|
|||
<el-table-column label="客户" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属合同" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope" v-if="scope.row.contract_">{{ scope.row.contract_.name }}</template>
|
||||
<el-table-column label="所属合同" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||
|
|
|
|||
|
|
@ -240,12 +240,12 @@
|
|||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
<!-- <el-link
|
||||
type="danger"
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleScrap(scope)"
|
||||
>报废
|
||||
</el-link>
|
||||
</el-link>!-->
|
||||
<el-link type="primary"
|
||||
v-if="!scope.row.ticket"
|
||||
@click="handleRetrial(scope)"
|
||||
|
|
|
|||
|
|
@ -75,12 +75,17 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.is_submited"
|
||||
type="primary"
|
||||
@click="handleoperation(scope)"
|
||||
>前往查看</el-link>
|
||||
<el-link
|
||||
v-else
|
||||
type="primary"
|
||||
@click="handleoperation(scope)"
|
||||
>前往操作</el-link>
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
type="danger"
|
||||
|
|
@ -136,7 +141,7 @@ export default {
|
|||
|
||||
handleoperation(scope)
|
||||
{
|
||||
this.$router.push({name: "operationdo", params: { id: scope.row.id }, })
|
||||
this.$router.push({name: "operationdo", params: { id: scope.row.id,is_submited:scope.row.is_submited }, })
|
||||
},
|
||||
//大工序工序渲染
|
||||
getProcessList() {
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@
|
|||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
|
||||
type="primary"
|
||||
@click="handlerecord(scope)"
|
||||
>填写表单</el-link
|
||||
|
|
@ -461,8 +462,8 @@
|
|||
scope.row.material_.unit
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应产数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
<el-table-column label="计划/产出/合格">
|
||||
<template slot-scope="scope">{{ scope.row.count }}/{{ scope.row.count_real }}/{{ scope.row.count_ok }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本操作产出数量" width="140px">
|
||||
|
|
@ -526,7 +527,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<el-button type="primary" style="float: right" @click="handlesubmit()"
|
||||
<el-button type="primary" style="float: right" @click="handlesubmit()" v-if="this.is_submited==false"
|
||||
>提交本次操作</el-button
|
||||
>
|
||||
</el-card>
|
||||
|
|
@ -689,6 +690,7 @@ export default {
|
|||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id; //操作ID
|
||||
this.is_submited=this.$route.params.is_submited; //操作是否提交
|
||||
this.getList(); //边角料
|
||||
this.getpwpList(); //半成品
|
||||
this.getequList(); //设备
|
||||
|
|
@ -697,7 +699,7 @@ export default {
|
|||
this.getoutputLists(); //产出物料
|
||||
this.getwmaterialList();
|
||||
this.getprogressList(); //产出物料调出
|
||||
this. gettoolList();//工序工装
|
||||
this.gettoolList();//工序工装
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
|
|
|||
|
|
@ -725,9 +725,9 @@ import {
|
|||
getpickhalfList,
|
||||
createpickhalf,
|
||||
createOperation,
|
||||
scrap
|
||||
} from "@/api/wpm";
|
||||
import { getiproductList } from "@/api/inm";
|
||||
import { scrap } from "@/api/wpm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaulteneed = {};
|
||||
export default {
|
||||
|
|
@ -763,6 +763,7 @@ export default {
|
|||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
state_: {
|
||||
0: "制定中",
|
||||
|
|
@ -931,6 +932,7 @@ export default {
|
|||
//大工序下子工序产出的半成品
|
||||
getwproductLists() {
|
||||
this.wproductdata.page = 0;
|
||||
this.wproductdata.tag = "no_scrap";
|
||||
this.wproductdata.step__process = this.process;
|
||||
if (this.subproduction_plan != "") {
|
||||
this.wproductdata.subproduction_plan = this.subproduction_plan;
|
||||
|
|
|
|||
Loading…
Reference in New Issue