This commit is contained in:
caoxinyu
2018-12-05 20:03:26 +08:00
3 changed files with 54 additions and 43 deletions

View File

@@ -222,8 +222,8 @@ export default {
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
},
rules2: {
Process: [{ required: true, message: '请输入工艺名称' }],
ProcessShort: [{ required: true, message: '请输入工艺名称简称' }]
Process: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }],
ProcessShort: [{ required: true, message: '请输入工艺名称简称', trigger: 'blur' }]
},
rules3: {
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]

View File

@@ -175,7 +175,7 @@ export default {
this.fetchData()
},
methods: {
fetchData() { // 初始化未编制零件号、材料、公差
fetchData() { // 初始化未编制零件号
getPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
@@ -255,13 +255,18 @@ export default {
this.num0 = ''
if (this.radio === 1) {
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.num0 = response.data[0].工艺计划流水号
console.log(response.data[0].工艺计划流水号, 520)
this.material = response.data[0].材料
}
}).then(() => {
mainTable(this.num0).then(response => {
if (response.data.length === 0) {
this.listLoading = false
} else {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
name: response.data[i].工艺名称,
@@ -274,17 +279,23 @@ export default {
})
}
this.listLoading = false
}
})
})
} else {
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.num0 = response.data[0].工艺计划流水号
this.material = response.data[0].材料
})
}
}).then(() => {
mainTable1(this.partNumValue).then(response => {
if (response.data.length === 0) {
this.listLoading = false
} else {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
name: response.data[i].工艺名称,
@@ -297,7 +308,8 @@ export default {
numm: response.data[i].工艺计划流水号
})
}
this.listLoading = false
}
})
})
}
},

View File

@@ -97,10 +97,10 @@
<el-checkbox :disabled="parseInt(scope.row.工序状态)!==3" v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
</template>
</el-table-column>
<el-table-column label="外协状态" width="100" align="center">
<el-table-column label="是否外协" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small">外协</el-tag>
<el-tag v-else size="small">自制</el-tag>
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small"></el-tag>
<el-tag v-else size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="工艺名称" align="center" width="220px">
@@ -242,7 +242,6 @@ export default {
this.checkBox = []
this.tableData2 = []
searchTable2(row.工艺计划流水号).then(response => {
console.log(response.data)
this.num1 = row.工艺计划流水号
if (response.data.length === 0) {
this.loading0 = false