物料出库
This commit is contained in:
@@ -71,3 +71,15 @@ export function searchStockNumber(...params) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 出库
|
||||||
|
export function submitOutStore(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料出库_出库记录_增加数据',
|
||||||
|
param: `出库数量=${params[0]}&出库人流水号=${params[1]}&基本件流水号=${params[2]}&标准件和外购件流水号=${params[3]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="领回确认" align="center" min-width="80">
|
<el-table-column label="领回确认" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning">未确认</el-tag>
|
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning" size="small">未确认</el-tag>
|
||||||
<el-tag v-else type="success">已确认</el-tag>
|
<el-tag v-else type="success" size="small">已确认</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
@current-change="handleCurrentChange3"/>
|
@current-change="handleCurrentChange3"/>
|
||||||
</div>
|
</div>
|
||||||
<h4>领料单明细:{{ pickingListNumberShow }}</h4>
|
<h4>领料单明细:{{ pickingListNumberShow }}</h4>
|
||||||
<el-table :data="pickListTable2" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="clickListDetail">
|
<el-table :data="pickListTable2" highlight-current-row border style="width: 100%;" size="mini" height="400" @row-click="clickListDetail">
|
||||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||||
<el-table-column label="名称" align="center" min-width="100">
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已领数量" align="center" min-width="70">
|
<el-table-column label="已领数量" align="center" min-width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.备件数量 }}
|
{{ scope.row.出库数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<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="机床" prop="machineValue" label-width="100px">
|
<el-form-item label="机床" prop="machineValue" label-width="100px">
|
||||||
<el-select v-model="form1.machineValue" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroup()">
|
<el-select v-model="form1.machineValue" :disabled="true" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroup()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in machine"
|
v-for="item in machine"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分组" prop="groupNumValue" label-width="100px">
|
<el-form-item label="分组" prop="groupNumValue" label-width="100px">
|
||||||
<el-select v-model="form1.groupNumValue" filterable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
<el-select v-model="form1.groupNumValue" :disabled="true" filterable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in group"
|
v-for="item in group"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber } from '@/api/Inventory/MaterialOut'
|
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber, submitOutStore } from '@/api/Inventory/MaterialOut'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'MaterialOut',
|
name: 'MaterialOut',
|
||||||
@@ -233,7 +233,11 @@ export default {
|
|||||||
},
|
},
|
||||||
form2: {
|
form2: {
|
||||||
errorNumber: '',
|
errorNumber: '',
|
||||||
reason: ''
|
reason: '',
|
||||||
|
物料流水号: '',
|
||||||
|
基本件流水号: '',
|
||||||
|
仓库流水号: '',
|
||||||
|
货位流水号: ''
|
||||||
},
|
},
|
||||||
rules1: {
|
rules1: {
|
||||||
machineValue: [{ required: true, message: '请选择' }],
|
machineValue: [{ required: true, message: '请选择' }],
|
||||||
@@ -248,7 +252,13 @@ export default {
|
|||||||
},
|
},
|
||||||
machine: [],
|
machine: [],
|
||||||
group: [],
|
group: [],
|
||||||
person: []
|
person: [],
|
||||||
|
materialNum: '', // 中间变量
|
||||||
|
machineValue: '', // 中间变量
|
||||||
|
groupNumValue: '', // 中间变量
|
||||||
|
basePartNum: '', // 中间变量
|
||||||
|
parchasePartNum: '', // 中间变量
|
||||||
|
outNumber: 0 // 中间变量
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -283,6 +293,19 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 查询组号
|
||||||
|
searchGroup() {
|
||||||
|
this.group = []
|
||||||
|
this.form1.groupNumValue = ''
|
||||||
|
searchgroup(this.form1.machineValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.group.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: Number(response.data[i].组件流水号)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询领料单列表
|
// 查询领料单列表
|
||||||
searchList() {
|
searchList() {
|
||||||
let check
|
let check
|
||||||
@@ -312,65 +335,79 @@ export default {
|
|||||||
// 查看领料单明细相关的物料货位数量
|
// 查看领料单明细相关的物料货位数量
|
||||||
clickListDetail(row) {
|
clickListDetail(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if (row.物料流水号) {
|
row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = '', this.parchasePartNum = '') : this.basePartNum
|
||||||
searchStockNumber(row.物料流水号).then(res => {
|
row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = '') : this.materialNum
|
||||||
|
row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = '') : this.parchasePartNum
|
||||||
|
this.machineValue = row.机床流水号
|
||||||
|
this.groupNumValue = row.组件流水号
|
||||||
|
this.outNumber = row.总数量
|
||||||
|
if (this.materialNum) {
|
||||||
|
searchStockNumber(this.materialNum).then(res => {
|
||||||
this.StockNumberTable = res.data
|
this.StockNumberTable = res.data
|
||||||
})
|
})
|
||||||
} else if (row.基本件流水号) {
|
} else if (this.basePartNum) {
|
||||||
console.log(row.基本件流水号)
|
console.log(this.basePartNum)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询组号
|
// 出库
|
||||||
searchGroup() {
|
outStore(row) {
|
||||||
|
console.log(this.form1.machineValue, this.form1.groupNumValue, row, this.id)
|
||||||
|
if (this.$refs['form1'] !== undefined) {
|
||||||
|
this.$refs['form1'].resetFields()
|
||||||
|
}
|
||||||
|
this.form1.machineValue = this.machineValue
|
||||||
this.group = []
|
this.group = []
|
||||||
this.form1.GroupNumValue = ''
|
this.form1.groupNumValue = ''
|
||||||
searchgroup(this.form1.MachineValue).then(response => {
|
searchgroup(this.form1.machineValue).then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.group.push({
|
this.group.push({
|
||||||
label: response.data[i].组号,
|
label: response.data[i].组号,
|
||||||
value: Number(response.data[i].组件流水号)
|
value: Number(response.data[i].组件流水号)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).then(() => {
|
||||||
|
this.form1.groupNumValue = this.groupNumValue
|
||||||
|
this.form1.outNumber = this.outNumber
|
||||||
|
this.form1.personValue = Number(this.id)
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 出库
|
|
||||||
outStore(row) {
|
|
||||||
console.log(row, this.id)
|
|
||||||
if (this.$refs['form1'] !== undefined) {
|
|
||||||
this.$refs['form1'].resetFields()
|
|
||||||
}
|
|
||||||
row.机床流水号 ? this.form1.machineValue = row.机床流水号 : this.form1.machineValue = null
|
|
||||||
row.组件流水号 ? this.form1.groupNumValue = row.组件流水号 : this.form1.groupNumValue = null
|
|
||||||
this.form1.outNumber = 0
|
|
||||||
this.form1.personValue = Number(this.id)
|
|
||||||
this.dialogFormVisible1 = true
|
|
||||||
},
|
|
||||||
// 提交出库
|
// 提交出库
|
||||||
submitOutStore() {
|
submitOutStore() {
|
||||||
this.$refs['form1'].validate((valid) => {
|
this.$refs['form1'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.form1.machineValue, this.form1.groupNumValue, this.form1.outNumber, this.form1.personValue)
|
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
||||||
this.dialogFormVisible1 = false
|
submitOutStore(this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum).then(response => {
|
||||||
this.$message.success('出库成功')
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('出库成功')
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
this.clickListDetail()
|
||||||
|
this.clickList()
|
||||||
|
} else { this.$message.error('操作失败') }
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 异常记录
|
// 异常记录
|
||||||
errorRecord() {
|
errorRecord(row) {
|
||||||
if (this.$refs['form2'] !== undefined) {
|
if (this.$refs['form2'] !== undefined) {
|
||||||
this.$refs['form2'].resetFields()
|
this.$refs['form2'].resetFields()
|
||||||
}
|
}
|
||||||
this.form2.errorNumber = ''
|
this.form2.errorNumber = ''
|
||||||
this.form2.reason = ''
|
this.form2.reason = ''
|
||||||
|
this.form2.物料流水号 = row.物料流水号
|
||||||
|
this.form2.基本件流水号 = row.基本件流水号
|
||||||
|
this.form2.仓库流水号 = row.仓库流水号
|
||||||
|
this.form2.货位流水号 = row.货位流水号
|
||||||
this.dialogFormVisible2 = true
|
this.dialogFormVisible2 = true
|
||||||
},
|
},
|
||||||
// 提交异常记录
|
// 提交异常记录
|
||||||
submitErrorRecord() {
|
submitErrorRecord() {
|
||||||
this.$refs['form2'].validate((valid) => {
|
this.$refs['form2'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.form2.errorNumber, this.form2.reason)
|
console.log(this.form2.errorNumber, this.form2.reason, this.form2.物料流水号, this.form2.基本件流水号, this.form2.仓库流水号, this.form2.货位流水号)
|
||||||
this.dialogFormVisible2 = false
|
this.dialogFormVisible2 = false
|
||||||
this.$message.success('记录成功')
|
this.$message.success('记录成功')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default {
|
|||||||
fax2: '',
|
fax2: '',
|
||||||
postCode2: '',
|
postCode2: '',
|
||||||
hasTax: '含税',
|
hasTax: '含税',
|
||||||
taxRate: 0.16,
|
taxRate: 0.13,
|
||||||
preview: false, // 预览
|
preview: false, // 预览
|
||||||
demoRadio: '', // 模板radio
|
demoRadio: '', // 模板radio
|
||||||
content: ``, // 合同格式模板
|
content: ``, // 合同格式模板
|
||||||
|
|||||||
Reference in New Issue
Block a user