加工进度修改

This commit is contained in:
zhangdingyu
2019-03-13 14:18:34 +08:00
parent 604ffa26f2
commit 07f59782e3
2 changed files with 46 additions and 18 deletions

View File

@@ -144,3 +144,14 @@ export function getTable8(code) {
}
})
}
export function isMachining(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_零件撤出待加工库',
param: '工艺计划流水号=' + code + '&结果=0=int=output'
}
})
}

View File

@@ -367,11 +367,13 @@
</div>
</template>
<script>
import { handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
export default {
data() {
return {
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
ssks: '',
cjscgy: '',
@@ -562,6 +564,7 @@ export default {
this.result = []
this.kaoqinbianhao = [[]]
this.gongxuliushuihao = [[]]
this.gongyijihualiushuihao = [[]]
this.process = [[]]
this.planDate = [[]]
this.worker = [[]]
@@ -579,6 +582,7 @@ export default {
this.投产数量.push(response.data.rows[i].投产数量)
this.kaoqinbianhao[i] = []
this.gongxuliushuihao[i] = []
this.gongyijihualiushuihao[i] = []
this.process[i] = []
this.planDate[i] = []
this.worker[i] = []
@@ -594,6 +598,7 @@ export default {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
this.gongxuliushuihao[i][k] = response.data[k].工序流水号
this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
@@ -642,42 +647,54 @@ export default {
}
this.title = this.process[index][a]
this.Num = this.gongxuliushuihao[index][a]
this.Num2 = this.gongyijihualiushuihao[index][a]
this.dialogFormVisible = true
}
},
// 编辑确定
handleChange() {
if (this.midd === 0) {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
this.getTableData()
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
}