备料到货管理
This commit is contained in:
@@ -8,7 +8,7 @@ export function searchtable(num1, num2, num3, num4, pageCurrent, pageSize) {
|
|||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料零件查询',
|
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料零件查询',
|
||||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4,
|
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4 + '&备料到货=0',
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
51
src/api/ManufacturingCenter/MaterialArrivalManagement.js
Normal file
51
src/api/ManufacturingCenter/MaterialArrivalManagement.js
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询零件
|
||||||
|
export function searchtable(num1, num2, num3, pageCurrent, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料到货查询',
|
||||||
|
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料到货_check=' + num3,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询零件工艺
|
||||||
|
export function searchtable2(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_备料打印_查询工序信息',
|
||||||
|
param: '工艺计划流水号=' + num1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更改打印状态
|
||||||
|
export function edit(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_备料到货_状态更改',
|
||||||
|
param: '工艺计划流水号=' + num1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function handlechange(Number, code) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_零件工序_修改数据_工作者',
|
||||||
|
param: '工序流水号=' + Number + '&工作者考勤编号=' + code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
align="center"/>
|
align="center"/>
|
||||||
<el-table-column label="打印状态" width="100" align="center">
|
<el-table-column label="打印状态" width="100" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="small">已打印</el-tag>
|
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="small">已导出</el-tag>
|
||||||
<el-tag v-else type="warning" size="small">未打印</el-tag>
|
<el-tag v-else type="warning" size="small">未导出</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件名称" align="center" width="220px">
|
<el-table-column label="零件名称" align="center" width="220px">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
{{ scope.row.零件名称 }}
|
{{ scope.row.零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件图号" align="center" width="280px">
|
<el-table-column label="零件图号" align="center" width="240px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
<col style="width: 450px">
|
<col style="width: 450px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th>GAOJING</th>
|
<th height="60px">GAOJING</th>
|
||||||
<th colspan="2"><span style="font-weight:bold">备料单</span></th>
|
<th colspan="2" height="60px"><span style="font-weight:bold">备料单</span></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">零件名称</td>
|
<td align="center">零件名称</td>
|
||||||
@@ -101,6 +101,7 @@ export default {
|
|||||||
searchTable() {
|
searchTable() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
|
this.Data = []
|
||||||
if (this.partName !== '' && this.partName !== null) {
|
if (this.partName !== '' && this.partName !== null) {
|
||||||
this.partNamecheck = true
|
this.partNamecheck = true
|
||||||
} else {
|
} else {
|
||||||
@@ -119,6 +120,7 @@ export default {
|
|||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
零件名称: this.Data[i].零件名称,
|
零件名称: this.Data[i].零件名称,
|
||||||
零件图号: this.Data[i].零件图号,
|
零件图号: this.Data[i].零件图号,
|
||||||
|
备料打印: this.Data[i].备料打印,
|
||||||
工艺要求: response.data[i].工艺要求
|
工艺要求: response.data[i].工艺要求
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-row>
|
||||||
|
<span>零件图号:</span>
|
||||||
|
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||||
|
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||||
|
<el-checkbox v-model="all" size="mini">查询全部</el-checkbox>
|
||||||
|
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center"/>
|
||||||
|
<el-table-column label="到货状态" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
|
||||||
|
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件名称" align="center" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件图号" align="center" width="240px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备料" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.工艺要求 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
v-if="!loading"
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchtable, searchtable2, edit, handlechange } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
arrest: [],
|
||||||
|
all: false,
|
||||||
|
partName: '',
|
||||||
|
loading: false,
|
||||||
|
tableData: [], // 表格数据
|
||||||
|
total: null, // 总条数
|
||||||
|
pageSize: 10, // 每页显示条数
|
||||||
|
pageCurrent: 1 // 后台获取页
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.searchTable()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询表格数据
|
||||||
|
searchTable() {
|
||||||
|
this.loading = true
|
||||||
|
this.tableData = []
|
||||||
|
this.Data = []
|
||||||
|
if (this.partName !== '' && this.partName !== null) {
|
||||||
|
this.partNamecheck = true
|
||||||
|
} else {
|
||||||
|
this.partNamecheck = false
|
||||||
|
}
|
||||||
|
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
|
||||||
|
if (response.data.total === 0) {
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.Data = response.data.rows
|
||||||
|
this.total = response.data.total
|
||||||
|
}
|
||||||
|
}).then(() => {
|
||||||
|
for (let i = 0; i < this.Data.length; i++) {
|
||||||
|
searchtable2(this.Data[i].工艺计划流水号).then(response => {
|
||||||
|
this.tableData.push({
|
||||||
|
工艺计划流水号: this.Data[i].工艺计划流水号,
|
||||||
|
零件名称: this.Data[i].零件名称,
|
||||||
|
零件图号: this.Data[i].零件图号,
|
||||||
|
备料到货: this.Data[i].备料到货,
|
||||||
|
工艺要求: response.data[i].工艺要求,
|
||||||
|
工序流水号: response.data[i].工序流水号
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.arrest = val
|
||||||
|
},
|
||||||
|
edit() {
|
||||||
|
if (this.arrest.length === 0) {
|
||||||
|
this.$message.warning('暂无数据')
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < this.arrest.length; i++) {
|
||||||
|
edit(this.arrest[i].工艺计划流水号)
|
||||||
|
handlechange(this.arrest[i].工序流水号, '0000')
|
||||||
|
if (i === this.arrest.length - 1) {
|
||||||
|
this.searchTable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 分页
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageCurrent = 1
|
||||||
|
this.pageSize = val
|
||||||
|
this.searchTable()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.searchTable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user