baofei
This commit is contained in:
parent
0827f5de77
commit
85c8a85594
|
@ -297,5 +297,14 @@ export function testInit(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//不合格半成品报废
|
||||||
|
export function scrap(id) {
|
||||||
|
return request({
|
||||||
|
url: `/wpm/wproduct/${id}/scrap/`,
|
||||||
|
method: 'post',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,58 @@
|
||||||
@pagination="getList1"
|
@pagination="getList1"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="不合格半成品">
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="wproductList4.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.material_.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">
|
||||||
|
{{ 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 align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handleScrap(scope)"
|
||||||
|
>报废
|
||||||
|
</el-link>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="wproductList1.count > 0"
|
||||||
|
:total="wproductList1.count"
|
||||||
|
:page.sync="listQuery1.page"
|
||||||
|
:limit.sync="listQuery1.page_size"
|
||||||
|
@pagination="getList1"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="夹层半成品">
|
<el-tab-pane label="夹层半成品">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
@ -425,7 +477,7 @@
|
||||||
<script>
|
<script>
|
||||||
import customForm from '@/components/customForm/index';
|
import customForm from '@/components/customForm/index';
|
||||||
import reviewForm from '@/components/customForm/review';
|
import reviewForm from '@/components/customForm/review';
|
||||||
import {getwproductList, wproductTest, wproductPutin, createputins,testInit} from "@/api/wpm";
|
import {getwproductList, wproductTest, wproductPutin, createputins,testInit,scrap} from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getWarehouseList} from "@/api/inm";
|
import {getWarehouseList} from "@/api/inm";
|
||||||
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
|
@ -451,6 +503,9 @@
|
||||||
},
|
},
|
||||||
wproductList3: {
|
wproductList3: {
|
||||||
count: 0,
|
count: 0,
|
||||||
|
},
|
||||||
|
wproductList4: {
|
||||||
|
count: 0,
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
|
@ -468,6 +523,10 @@
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
listQuery4: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
formLabelWidth:'',
|
formLabelWidth:'',
|
||||||
formLabelWidthL:'',
|
formLabelWidthL:'',
|
||||||
actstate_: {
|
actstate_: {
|
||||||
|
@ -537,6 +596,7 @@
|
||||||
this.getList2();
|
this.getList2();
|
||||||
this.getList1();
|
this.getList1();
|
||||||
this.getList3();
|
this.getList3();
|
||||||
|
this.getList4();
|
||||||
// this.getLists();
|
// this.getLists();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -572,6 +632,34 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//不合格半成品
|
||||||
|
getList4(){
|
||||||
|
this.listQuery4.act_state = 50;
|
||||||
|
this.listQuery4.material__type = 2;
|
||||||
|
getwproductList(this.listQuery4).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductList4= response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//不合格半成品报废
|
||||||
|
handleScrap(scope){
|
||||||
|
this.$confirm("确认该半成品报废?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await scrap(scope.row.id);
|
||||||
|
this.getList4();
|
||||||
|
this.$message.success("该半成品已报废!");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//夹层半成品列表
|
//夹层半成品列表
|
||||||
getList3() {
|
getList3() {
|
||||||
this.listQuery3.act_state = 26;
|
this.listQuery3.act_state = 26;
|
||||||
|
@ -582,6 +670,7 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//半成品批量入库
|
//半成品批量入库
|
||||||
handleCreate() {
|
handleCreate() {
|
||||||
this.dialogFormVisibles = true;
|
this.dialogFormVisibles = true;
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
||||||
|
<el-tab-pane
|
||||||
|
:key="item.name"
|
||||||
|
v-for="item in processOption"
|
||||||
|
:label="item.name"
|
||||||
|
:name="item.id"
|
||||||
|
:closable="item.close"
|
||||||
|
>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="operationList.results"
|
:data="operationList.results"
|
||||||
|
@ -91,6 +98,8 @@
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -98,6 +107,7 @@
|
||||||
import { getoperationList, deleteOperation } from "@/api/wpm";
|
import { getoperationList, deleteOperation } from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
import { getProcessList, getStepLists } from "@/api/mtm";
|
||||||
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 {
|
||||||
|
@ -111,18 +121,38 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
processOption: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.id = this.$route.params.id;
|
this.id = this.$route.params.id;
|
||||||
this.getList();
|
this. getProcessList()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
//订单列表
|
|
||||||
getList() {
|
handleoperation(scope)
|
||||||
|
{
|
||||||
|
this.$router.push({name: "operationdo", params: { id: scope.row.id }, })
|
||||||
|
},
|
||||||
|
//大工序工序渲染
|
||||||
|
getProcessList() {
|
||||||
|
getProcessList({ page: 0 }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.processOption = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//选项卡切换
|
||||||
|
handleClick(tab) {
|
||||||
|
this.process = tab.name;
|
||||||
|
this.listQuery.step__process = tab.name;
|
||||||
|
this.steps = [];
|
||||||
getoperationList(this.listQuery).then((response) => {
|
getoperationList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.operationList = response.data;
|
this.operationList = response.data;
|
||||||
|
@ -130,11 +160,6 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleoperation(scope)
|
|
||||||
{
|
|
||||||
this.$router.push({name: "operationdo", params: { id: scope.row.id }, })
|
|
||||||
},
|
|
||||||
|
|
||||||
//操作记录删除
|
//操作记录删除
|
||||||
handleDelete(scope) {
|
handleDelete(scope) {
|
||||||
this.$confirm("确认该操作删除?", "警告", {
|
this.$confirm("确认该操作删除?", "警告", {
|
||||||
|
|
Loading…
Reference in New Issue