更新
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
</template>
|
||||
|
||||
<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'
|
||||
export default {
|
||||
name: 'MaterialOut',
|
||||
@@ -256,7 +256,8 @@ export default {
|
||||
materialNum: '', // 中间变量物料流水号
|
||||
machineValue: '', // 中间变量机床流水号
|
||||
groupNumValue: '', // 中间变量组件流水号
|
||||
basePartNum: '', // 中间变量基本件流水u和
|
||||
basePartNum: '', // 中间变量基本件流水号
|
||||
purchaseBillNum: '', // 中间变量请购单明细流水号
|
||||
parchasePartNum: '', // 中间变量标准件和外购件流水号
|
||||
locationNum: '', // 中间变量货位流水号
|
||||
outNumber: 0 // 中间变量出库数量
|
||||
@@ -335,9 +336,11 @@ export default {
|
||||
},
|
||||
// 查看领料单明细相关的物料货位数量
|
||||
clickListDetail(row) {
|
||||
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null) : this.basePartNum
|
||||
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = null) : this.materialNum
|
||||
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = null) : this.parchasePartNum
|
||||
console.log(row, 111)
|
||||
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null, this.purchaseBillNum = null) : this.basePartNum
|
||||
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.groupNumValue = row.组件流水号 : this.groupNumValue
|
||||
row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber
|
||||
@@ -349,6 +352,10 @@ export default {
|
||||
searchStockNumber2(this.basePartNum).then(res => {
|
||||
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) {
|
||||
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
||||
// 物料流水号,货位流水号,出库数量 => 减掉货位物料数
|
||||
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') {
|
||||
this.$message.success('出库成功')
|
||||
this.dialogFormVisible1 = false
|
||||
|
||||
Reference in New Issue
Block a user