零件报废补投
This commit is contained in:
@@ -64,7 +64,7 @@ export function editTime(CutCode, StartTime, FinishTime) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function editSpare(CutCode, number, reason, time) {
|
export function editSpare(CutCode, number, reason, time, id) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -73,7 +73,7 @@ export function editSpare(CutCode, number, reason, time) {
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '车间生产管理工艺_零件工艺计划_报废零件_增加数据',
|
name: '车间生产管理工艺_零件工艺计划_报废零件_增加数据',
|
||||||
param: '工艺计划流水号=' + CutCode + '&报废数量=' + number + '&报废原因=' + reason + '&报废时间=' + time
|
param: '工艺计划流水号=' + CutCode + '&报废数量=' + number + '&报废原因=' + reason + '&报废时间=' + time + '&报废人=' + id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -319,6 +319,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MachineDrawingSelect, TeamSelect, TableDataSelect, editSpare, TableDta2Select, editA } from '@/api/ManufacturingCenter/SparePartsForScrap'
|
import { MachineDrawingSelect, TeamSelect, TableDataSelect, editSpare, TableDta2Select, editA } from '@/api/ManufacturingCenter/SparePartsForScrap'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -387,6 +388,14 @@ export default {
|
|||||||
inputD: 1
|
inputD: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'sidebar',
|
||||||
|
'avatar',
|
||||||
|
'name',
|
||||||
|
'id' // 人员编号
|
||||||
|
])
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fetchMachineDrawingData()
|
this.fetchMachineDrawingData()
|
||||||
this.fetchTableData()
|
this.fetchTableData()
|
||||||
@@ -489,11 +498,11 @@ export default {
|
|||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form2.报废数量 > 0) {
|
if (this.form2.报废数量 > 0) {
|
||||||
editSpare(this.code, this.form2.报废数量, this.form2.报废原因, this.form2.报废时间).then(response => {
|
editSpare(this.code, this.form2.报废数量, this.form2.报废原因, this.form2.报废时间, this.id).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('报废成功')
|
this.$message.success('报废成功')
|
||||||
this.dialogeditVisible = false
|
this.dialogeditVisible = false
|
||||||
this.tableData[this.index].报废数量 = this.tableData[this.index].报废数量 + this.form2.报废数量
|
this.tableData[this.index].报废数量 = parseInt(this.tableData[this.index].报废数量) + parseInt(this.form2.报废数量)
|
||||||
this.tableData[this.index].批次数量 = this.tableData[this.index].批次数量 - this.form2.报废数量
|
this.tableData[this.index].批次数量 = this.tableData[this.index].批次数量 - this.form2.报废数量
|
||||||
if (this.tableData[this.index].批次数量 === 0) {
|
if (this.tableData[this.index].批次数量 === 0) {
|
||||||
this.tableData[this.index].批次零件状态 = '2'
|
this.tableData[this.index].批次零件状态 = '2'
|
||||||
|
|||||||
Reference in New Issue
Block a user