Merge branch 'master' of ssh://192.168.1.149:29418/高精2.0

This commit is contained in:
chenjianan
2018-11-29 15:14:07 +08:00
8 changed files with 144 additions and 19 deletions

View File

@@ -7,7 +7,7 @@ export function searchTable(partnumber) {
data: { data: {
type: '1', type: '1',
name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号', name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号',
param: '零件图号=' + partnumber + '=string' param: '工艺计划流水号=' + partnumber + '=string'
} }
}) })
} }

View File

@@ -12,7 +12,7 @@ export function getEntryNameValue() {
} }
}) })
} }
// 项目名称 // 机床名称
export function getToolNum(num) { export function getToolNum(num) {
return request({ return request({
url: '', url: '',

View File

@@ -1,14 +1,47 @@
import request from '@/utils/request' import request from '@/utils/request'
export function machine() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_序间外协_项目查询'
}
})
}
export function getToolNum(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床',
param: '项目流水号=' + num
}
})
}
// 组号
export function getNum(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
param: '机床流水号=' + num
}
})
}
// 查询表1 // 查询表1
export function searchTable(check, num1, pageCurrent, pageSize) { export function searchTable(num1, num2, num3, num4, num5, num6, check, num7, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新', name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新',
param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=' + check + '&零件图号=' + num1 + '&考核状态_check=0&考核状态=0&单件是否外协_check=1&单件是否外协=1&时间=0&机加工开始时间=0&机加工结束时间=0&零件类型=0', param: '项目流水号_check=' + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&机床流水号=' + num4 + '&组件流水号_check=' + num5 + '&组件流水号=' + num6 + '&零件图号_check=' + check + '&零件图号=' + num7 + '&考核状态_check=0&考核状态=0&单件是否外协_check=1&单件是否外协=1&时间=0&机加工开始时间=0&机加工结束时间=0&零件类型=0',
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })

View File

@@ -161,7 +161,9 @@ export default {
}, },
websocketonmessage(msg) { // 数据接收 websocketonmessage(msg) { // 数据接收
this.partNumber = msg.data.split('|')[3] this.partNumber = msg.data.split('|')[3]
this.getscantable() this.partNumber = this.partNumber.slice(1)
console.log()
this.getscantable(this.partNumber, 3333)
}, },
websocketclose() { // 关闭 websocketclose() { // 关闭
console.log('WebSocket关闭') console.log('WebSocket关闭')

View File

@@ -539,6 +539,11 @@
{{ scope.row.类型名称 }} {{ scope.row.类型名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全库存" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.安全库存量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px"> <el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="mini" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="standardselecting(scope.row)" >选择</el-button> <el-button size="mini" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="standardselecting(scope.row)" >选择</el-button>
@@ -674,19 +679,14 @@
align="center" align="center"
type="index" type="index"
width="50"/> width="50"/>
<el-table-column label="物料名称" align="center" min-width="80"> <el-table-column label="零件名称" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料规格" align="center" min-width="80"> <el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料规格 }} {{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目名称" align="center" min-width="80"> <el-table-column label="项目名称" align="center" min-width="80">
@@ -1273,6 +1273,7 @@ export default {
changesafeAmount(row) { changesafeAmount(row) {
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.teamPartNumber = row.组件零件流水号 this.teamPartNumber = row.组件零件流水号
this.form.safeNumber = row.安全库存量
}, },
// 修改安全库存量 // 修改安全库存量
edeitsafeAmount() { edeitsafeAmount() {
@@ -1280,6 +1281,7 @@ export default {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('添加成功') this.$message.success('添加成功')
this.searchStandardPartinfo()
} else { } else {
this.$message.error('添加失败') this.$message.error('添加失败')
} }

View File

@@ -409,7 +409,7 @@ export default {
toolNumValue: '', toolNumValue: '',
toolNum: [], // 机床号 toolNum: [], // 机床号
NumValue: '', NumValue: '',
Num: [], // 机床后什么号 Num: [], // 分组
liushuihao: '', liushuihao: '',
gongyijihua: '', gongyijihua: '',
radio: 0, // 第一组 radio: 0, // 第一组

View File

@@ -1206,6 +1206,7 @@ export default {
if (this.零件图号.length !== 0) { if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) { for (let i = 0; i < this.零件图号.length; i++) {
selection2(this.工艺计划流水号[i]).then(response => { selection2(this.工艺计划流水号[i]).then(response => {
console.log(response.data, 2)
for (let k = 0; k < response.data.length; k++) { for (let k = 0; k < response.data.length; k++) {
this.process[i][k] = response.data[k].工艺名称简称 this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短 this.planDate[i][k] = response.data[k].计划日期_短

View File

@@ -2,6 +2,30 @@
<div> <div>
<el-card> <el-card>
<el-row> <el-row>
<span>项目名称:</span>
<el-select v-model="entryNameValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="项目名称" @change="typeChange()">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床名称:</span>
<el-select v-model="toolNumValue" clearable filterable size="small" placeholder="机床号" style="margin-bottom:10px" @change="typeChange1()">
<el-option
v-for="item in toolNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>分组:</span>
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="机床组号">
<el-option
v-for="item in Num"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号:</span> <span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/> <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="pageSize1=10; pageCurrent1=1;searchTable()">查询</el-button> <el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize1=10; pageCurrent1=1;searchTable()">查询</el-button>
@@ -108,10 +132,16 @@
</template> </template>
<script> <script>
import { searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation' import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
export default { export default {
data() { data() {
return { return {
entryNameValue: '',
entryName: [], // 项目名称
toolNumValue: '',
toolNum: [], // 机床号
NumValue: '',
Num: [], // 分组
count: 0, // 计数器 (表二是否有外协工序) count: 0, // 计数器 (表二是否有外协工序)
InOut: 1, // 工序间是否外协变量 1自家 2外协 InOut: 1, // 工序间是否外协变量 1自家 2外协
num1: '', num1: '',
@@ -127,17 +157,74 @@ export default {
pageCurrent1: 1 pageCurrent1: 1
} }
}, },
created() {
this.fetchData()
},
methods: { methods: {
fetchData() {
this.entryNameValue = ''
this.entryName = []
machine().then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.entryName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
typeChange() {
this.toolNumValue = ''
this.toolNum = []
this.NumValue = ''
this.Num = []
getToolNum(this.entryNameValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.toolNum.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
typeChange1() {
this.NumValue = ''
this.Num = []
getNum(this.toolNumValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Num.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
searchTable() { searchTable() {
this.loading1 = true this.loading1 = true
this.tableData1 = [] this.tableData1 = []
this.tableData2 = [] this.tableData2 = []
if (this.partName !== null && this.partName !== '') { if (this.entryNameValue !== null && this.entryNameValue !== '') {
this.check_partName = true this.check_entryNameValue = 1
} else { } else {
this.check_partName = false this.check_entryNameValue = 0
} }
searchTable(this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => { if (this.toolNumValue !== null && this.toolNumValue !== '') {
this.check_toolNumValue = 1
} else {
this.check_toolNumValue = 0
}
if (this.NumValue !== null && this.NumValue !== '') {
this.check_NumValue = 1
} else {
this.check_NumValue = 0
}
if (this.partName !== null && this.partName !== '') {
this.check_partName = 1
} else {
this.check_partName = 0
}
searchTable(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
}).then(() => { }).then(() => {