序间外协项目机床分组

This commit is contained in:
zhangdingyu
2018-11-29 14:30:28 +08:00
parent c9f494419a
commit 50e7969b1b
5 changed files with 130 additions and 9 deletions

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

@@ -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(() => {