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) {
|
||||
return request({
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
{{ scope.row.入库数量 - scope.row.出库总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" width="90">
|
||||
@@ -170,7 +170,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="可出库数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
{{ scope.row.可出库数量 = scope.row.入库数量 - scope.row.出库总数量 - scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="80">
|
||||
@@ -195,7 +195,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -444,6 +444,9 @@
|
||||
<!--基本件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
||||
<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-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
@@ -515,7 +518,7 @@
|
||||
|
||||
<script>
|
||||
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'
|
||||
export default {
|
||||
data() {
|
||||
@@ -697,28 +700,52 @@ export default {
|
||||
},
|
||||
// 删除领料单明细
|
||||
dropListdetail(row) {
|
||||
let isBacklog
|
||||
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
||||
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('数据占用')
|
||||
}
|
||||
console.log(row)
|
||||
if (Number(row.零件类型) === 3) { // 基本件
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropListDetailBasic(row.领料单明细流水号, row.收件信息ID, row.出库数量).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: '已取消删除'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
} else { // 采购部采购件、滞货件
|
||||
let isBacklog
|
||||
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
||||
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() {
|
||||
@@ -765,6 +792,7 @@ export default {
|
||||
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 => {
|
||||
const data = response.data.rows
|
||||
console.log(response.data.rows)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user