工艺任务分配
This commit is contained in:
@@ -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('请选择工艺员')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user