fix bug
This commit is contained in:
@@ -136,6 +136,18 @@ export function dropListDetail(DetailNumberx, isBacklog) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 删除领料单明细/基本件
|
||||||
|
export function dropListDetailBasic(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间装配管理_领料单_领料单明细删除_基本件',
|
||||||
|
param: `领料单明细流水号=${params[0]}&收件信息ID=${params[1]}&返还数量=${params[2]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 增加领料单明细
|
// 增加领料单明细
|
||||||
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
|
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" align="center" width="80">
|
<el-table-column label="库存数量" align="center" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.可出库数量 }}
|
{{ scope.row.入库数量 - scope.row.出库总数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待出库数量" align="center" width="90">
|
<el-table-column label="待出库数量" align="center" width="90">
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可出库数量" align="center" width="90">
|
<el-table-column label="可出库数量" align="center" width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.待出库数量 }}
|
{{ scope.row.可出库数量 = scope.row.入库数量 - scope.row.出库总数量 - scope.row.待出库数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库" align="center" min-width="80">
|
<el-table-column label="仓库" align="center" min-width="80">
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope" align="center">
|
<template slot-scope="scope" align="center">
|
||||||
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
|
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -444,6 +444,9 @@
|
|||||||
<!--基本件领料对话框-->
|
<!--基本件领料对话框-->
|
||||||
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
||||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
|
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
|
||||||
|
<el-form-item label="领料单号" label-width="100px" size="small">
|
||||||
|
<el-input v-model="pickingListNumber" size="small" placeholder="空" readonly style="width: 200px"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
||||||
<el-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
|
<el-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -515,7 +518,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
|
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
|
||||||
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList } from '@/api/Inventory/PickingList'
|
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList, dropListDetailBasic } from '@/api/Inventory/PickingList'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -697,28 +700,52 @@ export default {
|
|||||||
},
|
},
|
||||||
// 删除领料单明细
|
// 删除领料单明细
|
||||||
dropListdetail(row) {
|
dropListdetail(row) {
|
||||||
let isBacklog
|
console.log(row)
|
||||||
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
if (Number(row.零件类型) === 3) { // 基本件
|
||||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
|
dropListDetailBasic(row.领料单明细流水号, row.收件信息ID, row.出库数量).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.searchListDetailt()
|
this.searchListDetailt()
|
||||||
this.searchPartinfo()
|
this.searchPartinfo()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('数据占用')
|
this.$message.error('数据占用')
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
} else { // 采购部采购件、滞货件
|
||||||
this.$message({
|
let isBacklog
|
||||||
type: 'info',
|
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
||||||
message: '已取消删除'
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchListDetailt()
|
||||||
|
this.searchPartinfo()
|
||||||
|
} else {
|
||||||
|
this.$message.error('数据占用')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
// 查询机床
|
// 查询机床
|
||||||
searchMachine() {
|
searchMachine() {
|
||||||
@@ -765,6 +792,7 @@ export default {
|
|||||||
this.listLoading1 = true
|
this.listLoading1 = true
|
||||||
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||||
const data = response.data.rows
|
const data = response.data.rows
|
||||||
|
console.log(response.data.rows)
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user