车间排产

This commit is contained in:
zhangdingyu
2019-10-26 15:48:41 +08:00
parent b1ddb09a80
commit ac3477bf77
3 changed files with 154 additions and 24 deletions

View File

@@ -22,3 +22,43 @@ export function getParts(pageCurrent, pageSize) {
}
})
}
export function getGongxu(num) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 姓名,排产时间,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 工艺编号 is not null and 工艺编号<>0 and 考核状态 = 6 and 工艺计划流水号=${num} order by 工序顺序`
}
})
}
export function searchTableData2(num) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 姓名,零件图号,零件名称,工序流水号,工艺名称,投产数量,完成日期,工序顺序,工序间是否外协,加工完成状态,工序状态 from dbo.车间生产管理工艺_插件排产查询_视图 where 排产人员=${num} order by 工序顺序`
}
})
}
export function XuanRu(num, num2) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 车间生产管理工艺_零件工序 set 排产人员=${num},排产时间= GETDATE() where 工序流水号=${num2}`
}
})
}
export function XuanChu(num) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 车间生产管理工艺_零件工序 set 排产人员= null,排产时间= null where 工序流水号=${num}`
}
})
}

View File

@@ -237,6 +237,7 @@ export default {
},
// 查询离线合同明细
async searchContractDetail() {
this.table1 = []
if (this.contractValue && this.searchType === '2') {
this.qrCode = this.contractValue
} else if (!this.supplierValue) {

View File

@@ -4,17 +4,17 @@
<el-col style="width: 650px">
<el-card style="height: 800px">
<el-row style="margin-top: 5px">
<el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px">
<el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px" @change="searchTableData2">
<el-option
v-for="item in Person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" style="float: right;">移除</el-button>
<el-button size="small" style="float: right;margin-right: 5px">添加</el-button>
<!--<el-button size="small" type="danger" style="float: right;">移除</el-button>-->
<!--<el-button size="small" type="success" style="float: right;margin-right: 5px">添加</el-button>-->
</el-row>
<el-table v-loading="loading1" :data="tableData1" height="710" highlight-current-row size="mini" style="width: 100%" border>
<el-table v-loading="loading1" :data="tableData1" height="710" highlight-current-row size="mini" style="width: 100%" border @row-click="getGongxu">
<el-table-column
label="序号"
type="index"
@@ -61,57 +61,57 @@
</el-col>
<el-col style="width: 650px">
<el-card style="height: 800px">
<el-table v-loading="loading2" :data="tableData2" height="380" highlight-current-row size="mini" style="width: 100%" border stripe>
<el-table v-loading="loading2" :data="tableData2" height="380" highlight-current-row size="mini" style="width: 100%" border stripe @row-dblclick="XuanChu">
<el-table-column label="操作者" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号_零件工艺计划 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号_零件工艺计划 }}
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="工序名" align="center">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.投产数量 }}
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading3" :data="tableData3" height="393" highlight-current-row size="mini" style="width: 100%" border stripe>
<el-table-column label="零件图号" align="center">
<el-table v-loading="loading3" :data="tableData3" :row-class-name="tableRowClassName" height="393" size="mini" style="width: 100%" border @row-dblclick="XuanRu">
<el-table-column label="号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号_零件工艺计划 }}
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center">
<el-table-column label="工序名" align="center">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<el-table-column label="操作者" align="center">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="计划开始" align="center">
<el-table-column label="排产时间" align="center">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.排产时间 }}
</template>
</el-table-column>
<el-table-column label="计划完成" align="center">
<el-table-column label="完成日期" align="center">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.完成日期 }}
</template>
</el-table-column>
</el-table>
@@ -121,10 +121,11 @@
</div>
</template>
<script>
import { getPerson, getParts } from '@/api/ManufacturingCenter/ShopScheduling'
import { getPerson, getParts, getGongxu, XuanRu, XuanChu, searchTableData2 } from '@/api/ManufacturingCenter/ShopScheduling'
export default {
data() {
return {
工艺计划流水号: '',
PersonValue: '',
Person: [],
loading1: false,
@@ -154,6 +155,7 @@ export default {
})
})
this.PersonValue = this.Person[0].value
this.searchTableData2()
})
},
getParts() {
@@ -174,6 +176,91 @@ export default {
this.loading1 = false
})
},
getGongxu(row) {
this.loading3 = true
this.tableData3 = []
this.工艺计划流水号 = row.工艺计划流水号
getGongxu(row.工艺计划流水号).then(response => {
response.data.map(v => {
this.tableData3.push({
工序流水号: v.工序流水号,
工序状态: v.工序状态,
工序顺序: v.工序顺序,
工艺名称: v.工艺名称,
排产人员: v.排产人员,
姓名: v.姓名,
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : ''
})
})
this.loading3 = false
})
},
// ??
tableRowClassName({ row, rowIndex }) {
if (row.工序状态 === 4) {
console.log(row.工序状态)
return 'successsss'
}
},
searchTableData2() {
this.loading2 = true
this.tableData2 = []
searchTableData2(this.PersonValue).then(response => {
this.tableData2 = response.data
this.loading2 = false
})
},
XuanRu(row) {
XuanRu(this.PersonValue, row.工序流水号).then(response => {
if (response.data[0].result === '1') {
this.getParts()
this.loading3 = true
this.tableData3 = []
getGongxu(this.工艺计划流水号).then(response => {
response.data.map(v => {
this.tableData3.push({
工序流水号: v.工序流水号,
工序状态: v.工序状态,
工序顺序: v.工序顺序,
工艺名称: v.工艺名称,
排产人员: v.排产人员,
姓名: v.姓名,
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : ''
})
})
this.loading3 = false
})
this.searchTableData2()
}
})
},
XuanChu(row) {
XuanChu(row.工序流水号).then(response => {
if (response.data[0].result === '1') {
this.getParts()
this.loading3 = true
this.tableData3 = []
getGongxu(this.工艺计划流水号).then(response => {
response.data.map(v => {
this.tableData3.push({
工序流水号: v.工序流水号,
工序状态: v.工序状态,
工序顺序: v.工序顺序,
工艺名称: v.工艺名称,
排产人员: v.排产人员,
姓名: v.姓名,
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : ''
})
})
this.loading3 = false
})
this.searchTableData2()
}
})
},
handleSizeChange(val) {
this.pageSize = val
this.getParts()
@@ -186,6 +273,8 @@ export default {
}
</script>
<style scoped>
<style>
.successsss{
background: yellowgreen !important;
}
</style>