序间外协项目机床分组

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

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

View File

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

View File

@@ -2,6 +2,30 @@
<div>
<el-card>
<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>
<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>
@@ -108,10 +132,16 @@
</template>
<script>
import { searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
export default {
data() {
return {
entryNameValue: '',
entryName: [], // 项目名称
toolNumValue: '',
toolNum: [], // 机床号
NumValue: '',
Num: [], // 分组
count: 0, // 计数器 (表二是否有外协工序)
InOut: 1, // 工序间是否外协变量 1自家 2外协
num1: '',
@@ -127,17 +157,74 @@ export default {
pageCurrent1: 1
}
},
created() {
this.fetchData()
},
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() {
this.loading1 = true
this.tableData1 = []
this.tableData2 = []
if (this.partName !== null && this.partName !== '') {
this.check_partName = true
if (this.entryNameValue !== null && this.entryNameValue !== '') {
this.check_entryNameValue = 1
} 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.total1 = response.data.total
}).then(() => {