Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -422,14 +422,22 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
// 如果路由有变化,会再次执行该方法
|
||||
'$route': {
|
||||
handler(route) {
|
||||
const _this = this
|
||||
if (route.name === 'InitialProduction') {
|
||||
_this.typeChange()
|
||||
}
|
||||
'$route'(to) {
|
||||
const _this = this
|
||||
console.log(to, 2222)
|
||||
if (to.name === 'InitialProduction') {
|
||||
_this.typeChange()
|
||||
}
|
||||
}
|
||||
// '$route': {
|
||||
// handler(route) {
|
||||
// const _this = this
|
||||
// console.log(route.name)
|
||||
// if (route.name === 'InitialProduction') {
|
||||
// _this.typeChange()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
created() {
|
||||
// this.typeChange()
|
||||
@@ -503,10 +511,12 @@ export default {
|
||||
})
|
||||
},
|
||||
typeChange() {
|
||||
console.log(Cookie.get('machineValue'), 1111111)
|
||||
this.toolNumValue = ''
|
||||
this.toolNum = []
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.toolNumValue = ''
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getToolNum().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.toolNum.push({
|
||||
@@ -524,9 +534,6 @@ export default {
|
||||
Cookie.remove('group')
|
||||
})
|
||||
} else {
|
||||
this.toolNumValue = ''
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getToolNum().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.toolNum.push({
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-bangzhu" style="margin-left: 10px" @click="selectAll(tableData)">全选</el-button>
|
||||
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px" @click="save">保存</el-button>
|
||||
<!--<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px;float: right" @click="currency">通用件保存</el-button>-->
|
||||
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px;float: right" @click="currency">通用件保存</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -386,34 +386,42 @@ export default {
|
||||
},
|
||||
// 直接保存工艺
|
||||
currency() {
|
||||
this.工艺计划流水号组 = []
|
||||
this.通用件图号 = []
|
||||
this.通用件规格 = []
|
||||
this.工艺员 = []
|
||||
var check = 1
|
||||
this.multipleSelection.map(v => {
|
||||
if (!v.工艺员) {
|
||||
check = 0
|
||||
}
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.通用件图号.push(v.零件号)
|
||||
this.通用件规格.push(v.规格)
|
||||
this.工艺员.push(v.工艺员)
|
||||
})
|
||||
if (check === 1) {
|
||||
console.log(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员)
|
||||
save2(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员).then(response => {
|
||||
console.log(response.data, 231)
|
||||
if (response.data[0].结果 === 'success') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
this.$message.error('请选择工艺员')
|
||||
}
|
||||
})
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.error('请先选择零件')
|
||||
} else {
|
||||
this.$message.error('请选择工艺员')
|
||||
this.工艺计划流水号组 = []
|
||||
this.通用件图号 = []
|
||||
this.通用件规格 = []
|
||||
this.工艺员 = []
|
||||
var check = 1
|
||||
this.multipleSelection.map(v => {
|
||||
if (!v.工艺员) {
|
||||
check = 0
|
||||
}
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.通用件图号.push(v.零件号)
|
||||
this.通用件规格.push(v.规格)
|
||||
this.工艺员.push(v.工艺员)
|
||||
})
|
||||
if (check === 1) {
|
||||
console.log(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员)
|
||||
save2(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员).then(response => {
|
||||
console.log(response.data, 231)
|
||||
if (response.data[0].结果 === 'success') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
var messages = []
|
||||
messages = response.data[0].结果.split('||||')
|
||||
messages.shift()
|
||||
console.log(messages)
|
||||
this.$message.error(`图号${messages}无已完成`)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择工艺员')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,12 @@
|
||||
{{ scope.row.跟单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="180">
|
||||
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="280">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="80">
|
||||
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -346,6 +346,7 @@ export default {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
考核状态: response.data.rows[i].考核状态,
|
||||
序号: response.data.rows[i].序号,
|
||||
跟单号: response.data.rows[i].跟单号,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
@@ -448,7 +449,7 @@ export default {
|
||||
// 完成日期变色
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
if (row.完成日期 !== '') {
|
||||
if (parseInt(row.考核状态) > 6) {
|
||||
return 'CompleteColor'
|
||||
}
|
||||
}, // 重置表单
|
||||
|
||||
Reference in New Issue
Block a user