This commit is contained in:
liushuai
2019-04-01 10:39:59 +08:00
5 changed files with 43 additions and 18 deletions

View File

@@ -49,7 +49,18 @@ export function ExchangeOut(listNumber) {
}
})
}
// 滞货件出库
export function backlogPart(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_滞货件出库_修改数据',
param: `领料单明细流水号=${params[0]}&出库数量=${params[1]}&滞货物料与货位对照流水号=${params[2]}`
}
})
}
// 外购件零件出库
export function PurchasePart(listNumber, data1, data2, data3, data4, data5, data6) {
return request({

View File

@@ -125,14 +125,14 @@ export function dropList(PickingListNumberx) {
})
}
// 删除领料单明细
export function dropListDetail(DetailNumberx) {
export function dropListDetail(DetailNumberx, isBacklog) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间装配管理_领料单_领料单明细删除',
param: '领料单明细流水号=' + DetailNumberx
param: '领料单明细流水号=' + DetailNumberx + '&是否是滞货=' + isBacklog
}
})
}

View File

@@ -200,7 +200,8 @@
</template>
<script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ErrorOut, ExchangeOut, ExchangePartOut } from '@/api/Inventory/PartOut'
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ErrorOut, ExchangeOut, ExchangePartOut,
backlogPart } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -295,6 +296,7 @@ export default {
},
// 选择领料单
chooseListinfor(row) {
console.log(row, 99)
this.pickingListNumberx = row.领料单流水号
this.getpicikingPeople = row.领料人流水号
this.searchListDetailt()
@@ -325,26 +327,34 @@ export default {
},
// 出库
partOut(row) {
console.log(row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号)
this.$confirm('确认出库?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (row.出库类型 === 3) {
if (row.出库类型 === 4) { // 滞货件
backlogPart(row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else if (row.出库类型 === 3) { // 车间采购件
WorkShopPart(row.领料单明细流水号, row.请购单明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else if (row.出库类型 === 2) {
} else if (row.出库类型 === 2) { // 采购件
PurchasePart(row.领料单明细流水号, row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.物料与货位对照流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') }
})
} else {
} else { // 自制件
BasicPart(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')

View File

@@ -93,7 +93,7 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<el-table-column v-if="true" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="!!scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" @click="dropListdetail(scope.row)">删除</el-button>
</template>
@@ -325,7 +325,7 @@
</el-table-column>
<el-table-column label="货位存量" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.关联数 }}
{{ scope.row.货位余 }}
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" width="120">
@@ -335,7 +335,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.货位余 - scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
@@ -692,12 +692,14 @@ export default {
},
// 删除领料单明细
dropListdetail(row) {
let isBacklog
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropListDetail(row.领料单明细流水号).then(response => {
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
@@ -736,7 +738,7 @@ export default {
searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({
label: response.data[i].件名称,
label: response.data[i].,
value: response.data[i].组件流水号
})
}

View File

@@ -20,8 +20,8 @@
:data="tableData11"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 600px;"
height="600px"
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
@@ -107,7 +107,7 @@
<!--</el-tooltip>-->
</template>
</el-table-column>
<el-table-column label="滞货数量" align="center" min-width="80">
<el-table-column label="可用滞货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ Number(scope.row.滞货数量) }}
</template>
@@ -351,12 +351,12 @@
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
{{ scope.row.机床图号 || scope.row.基本件机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
{{ scope.row.组号 || scope.row.基本件组号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
@@ -775,6 +775,7 @@ export default {
let check1
this.materialName ? check1 = 1 : check1 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, this.id).then(response => {
console.log(response.data.rows)
this.tableData11 = response.data.rows
this.total11 = response.data.total
})
@@ -983,7 +984,7 @@ export default {
this.allNum = []
for (let i = 0; i < val.length; i++) {
this.groupPartBasicNum[i] = val[i].组件零件基本件流水号
this.allNum[i] = val[i].数量
this.allNum[i] = val[i].零件数量
}
},
addInquirySheet() { // 追加物料
@@ -1123,6 +1124,7 @@ export default {
this.supplierExport = row.供应商名称
this.orderExport = row.询价单编号
searchSheetDetail(row.询价单流水号).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
},