This commit is contained in:
liushuai
2019-06-05 19:14:30 +08:00
parent 054352fb3c
commit ab53ae8430
2 changed files with 26 additions and 7 deletions

View File

@@ -83,6 +83,18 @@ export function searchStockNumber2(...params) {
} }
}) })
} }
// 查看领料单明细相关的物料货位数量
export function searchStockNumber3(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_物料出库_车间采购件_查询数据',
param: `请购单明细流水号=${params[0]}`
}
})
}
// 出库 // 出库
export function submitOutStore(...params) { export function submitOutStore(...params) {
return request({ return request({
@@ -91,7 +103,7 @@ export function submitOutStore(...params) {
data: { data: {
type: '2', type: '2',
name: '库存管理_物料出库_出库记录_增加数据', name: '库存管理_物料出库_出库记录_增加数据',
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}` param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}&请购单明细流水号=${params[6]}`
} }
}) })
} }

View File

@@ -210,7 +210,7 @@
</template> </template>
<script> <script>
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber1, searchStockNumber2, submitOutStore, errorRecord } from '@/api/Inventory/MaterialOut' import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber1, searchStockNumber2, submitOutStore, errorRecord, searchStockNumber3 } from '@/api/Inventory/MaterialOut'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'MaterialOut', name: 'MaterialOut',
@@ -256,7 +256,8 @@ export default {
materialNum: '', // 中间变量物料流水号 materialNum: '', // 中间变量物料流水号
machineValue: '', // 中间变量机床流水号 machineValue: '', // 中间变量机床流水号
groupNumValue: '', // 中间变量组件流水号 groupNumValue: '', // 中间变量组件流水号
basePartNum: '', // 中间变量基本件流水u和 basePartNum: '', // 中间变量基本件流水
purchaseBillNum: '', // 中间变量请购单明细流水号
parchasePartNum: '', // 中间变量标准件和外购件流水号 parchasePartNum: '', // 中间变量标准件和外购件流水号
locationNum: '', // 中间变量货位流水号 locationNum: '', // 中间变量货位流水号
outNumber: 0 // 中间变量出库数量 outNumber: 0 // 中间变量出库数量
@@ -335,9 +336,11 @@ export default {
}, },
// 查看领料单明细相关的物料货位数量 // 查看领料单明细相关的物料货位数量
clickListDetail(row) { clickListDetail(row) {
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null) : this.basePartNum console.log(row, 111)
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = null) : this.materialNum row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null, this.purchaseBillNum = null) : this.basePartNum
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = null) : this.parchasePartNum row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.materialNum
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.parchasePartNum
row && row.请购单明细流水号 ? (this.purchaseBillNum = row.请购单明细流水号, this.basePartNum = null, this.materialNum = null, this.parchasePartNum = null) : this.parchasePartNum
row && row.机床流水号 ? this.machineValue = row.机床流水号 : this.machineValue row && row.机床流水号 ? this.machineValue = row.机床流水号 : this.machineValue
row && row.组件流水号 ? this.groupNumValue = row.组件流水号 : this.groupNumValue row && row.组件流水号 ? this.groupNumValue = row.组件流水号 : this.groupNumValue
row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber
@@ -349,6 +352,10 @@ export default {
searchStockNumber2(this.basePartNum).then(res => { searchStockNumber2(this.basePartNum).then(res => {
this.StockNumberTable = res.data this.StockNumberTable = res.data
}) })
} else if (this.purchaseBillNum) {
searchStockNumber3(this.purchaseBillNum).then(res => {
this.StockNumberTable = res.data
})
} }
}, },
// 出库 // 出库
@@ -380,7 +387,7 @@ export default {
if (valid) { if (valid) {
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表 // 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
// 物料流水号,货位流水号,出库数量 => 减掉货位物料数 // 物料流水号,货位流水号,出库数量 => 减掉货位物料数
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum).then(response => { submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum, this.purchaseBillNum).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('出库成功') this.$message.success('出库成功')
this.dialogFormVisible1 = false this.dialogFormVisible1 = false