This commit is contained in:
chenjianan
2019-03-23 18:00:39 +08:00
parent 2ccc8201d7
commit 275284f157
3 changed files with 105 additions and 36 deletions

View File

@@ -61,26 +61,27 @@ export function searchPeople(data1) {
})
}
// 离线件出库
export function outlinePartOut(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10) {
export function outlinePartOut(data2, data3, data4, data5, data6, data7, data8, data9, data10) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_离线采购件_零件出库',
param: '离线合同明细流水号=' + data1 + '&领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10
param: '领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10
}
})
}
// 查询出库记录
export function outRecord(data1) {
export function outRecord(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_离线外购件出库_出库记录',
param: '离线合同明细流水号=' + data1
param: '物料流水号=' + params[0],
Pagination: params[1] + '&' + params[2]
}
})
}

View File

@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope" align="center">
<el-button size="mini" type="success" icon="el-icon-search" @click="searchoutRecord(scope.row)">查看领用情况</el-button>
<el-button size="mini" type="success" icon="el-icon-search" @click="pageCurrent2=1;pageSize2=10;total2=0;searchoutRecord(scope.row)">查看领用情况</el-button>
<el-button :disabled="Number(scope.row.货位存量)===0" size="mini" type="primary" icon="el-icon-sort-up" @click="parOut(scope.row)">出库</el-button>
</template>
</el-table-column>
@@ -81,7 +81,7 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="出库数量" align="center" min-width="80">
<el-table-column label="出库数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
@@ -106,12 +106,28 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="80">
<el-table-column label="出库人" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.出库人姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<!--零件出库对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
@@ -192,7 +208,6 @@ export default {
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
},
contractNumber: '',
locateNumber: '',
materialNumber: '',
PeopleNumber: '',
@@ -203,6 +218,9 @@ export default {
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
materialName: '', // 物料名称
materialSpec: '', // 物料规格
materialModel: '' // 物料型号
@@ -279,10 +297,31 @@ export default {
},
// 离线记录查询
searchoutRecord(row) {
this.contractNumber = row.离线合同明细流水号
// 物料流水号查
this.materialNumber = row.物料流水号
this.listLoading1 = true
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
@@ -295,7 +334,6 @@ export default {
this.form.MachineValue = ''
this.form.GroupNumValue = ''
this.dialogFormVisible = true
this.contractNumber = row.离线合同明细流水号
this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
@@ -319,18 +357,21 @@ export default {
},
// 离线外购件出库
addDirectPartm() {
if (this.partnumber < this.form.DirectNumber) {
console.log(this.partnumber, this.form.DirectNumber)
if (Number(this.partnumber) < Number(this.form.DirectNumber)) {
this.$message.error('请正确输入数量')
} else {
this.$refs['form'].validate((valid) => {
if (valid) {
outlinePartOut(this.contractNumber, this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false
this.searchTable1()
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
// 物料流水号查
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
} else {

View File

@@ -261,7 +261,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" width="80">
@@ -271,7 +271,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" icon="el-icon-edit" @click="addListDetailinfor(scope.row)">领料</el-button>
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" @click="addListDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
@@ -304,11 +304,6 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -319,12 +314,22 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="合同数量" align="center" width="80">
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="80">
<el-table-column label="仓库名称" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位名称" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="货位存量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
@@ -334,6 +339,11 @@
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="可出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.可出库数量 = scope.row.货位存量 - scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
@@ -341,7 +351,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addWorkshopDetailinfor(scope.row)">领料</el-button>
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" @click="addWorkshopDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
@@ -392,6 +402,9 @@
<!--车间采购件领料对话框-->
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" class="demo-ruleForm">
<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 v-model="form3.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
@@ -655,6 +668,7 @@ export default {
this.total = response.data.total
})
searchHoursePart(this.PageCurrentx, this.PageSizex, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
console.log(response.data.rows)
this.tableDataHouse = response.data.rows
this.listLoadingx = false
this.totalx = response.data.total
@@ -750,14 +764,18 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropList(this.pickingListNumberx).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListinfor()
} else {
this.$message.error('数据占用')
}
})
if (this.tableDataPicking.length === 0) {
dropList(this.pickingListNumberx).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListinfor()
} else {
this.$message.error('数据占用')
}
})
} else {
this.$message.error('数据占用')
}
}).catch(() => {
this.$message({
type: 'info',
@@ -889,7 +907,8 @@ export default {
},
// 增加车间采购领料单明细
addWorkshopDetailinfor(row) {
this.form3 = []
console.log(row)
this.form3 = {}
this.outType = 3
this.partProjectNumber = row.项目流水号
this.partMachineNumber = row.机床流水号
@@ -914,10 +933,19 @@ export default {
} else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
this.$message.error('请正确输入领用数量')
} else {
console.log(this.materialLocate)
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.partPiant, this.material).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchPartinfo()
searchListDetail(this.pickingListNumberx).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataPicking = data
})
this.dialogFormVisibleWork = false
} else {
this.$message.error('增加失败')
}
@@ -925,7 +953,6 @@ export default {
}
}
})
this.dialogFormVisibleWork = false
this.searchListinfor()
this.searchListDetailt()
},