This commit is contained in:
liushuai
2019-01-03 08:12:47 +08:00
8 changed files with 129 additions and 53 deletions

View File

@@ -97,3 +97,15 @@ export function ErrorOut(data1, data2, data3, data4, data5, data6, data7, data8,
} }
}) })
} }
// 交换出库
export function ExchangePartOut(data1, data2, data3, data4, data5) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_交换件出库_修改数据',
param: '采购合同明细流水号=' + data1 + '&领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5
}
})
}

View File

@@ -794,6 +794,7 @@ export default {
} }
}) })
}, },
// 选中采购部入库记录
handleSelectionChange(val) { handleSelectionChange(val) {
this.nameGroup = [] this.nameGroup = []
this.modelGroup = [] this.modelGroup = []
@@ -810,6 +811,7 @@ export default {
this.priceGroup.push(val[i].单价) this.priceGroup.push(val[i].单价)
} }
}, },
// 选中车间采购入库记录
handleSelectionChange2(val) { handleSelectionChange2(val) {
this.nameGroup = [] this.nameGroup = []
this.modelGroup = [] this.modelGroup = []
@@ -827,17 +829,21 @@ export default {
} }
}, },
InboundCardDetail() { InboundCardDetail() {
addInboundCardDetail(this.DetailNumber, this.nameGroup, this.modelGroup, this.specificationGroup, this.paintGroup, this.numberGroup, this.priceGroup).then(response => { if (this.DetailNumber === '') {
if (response.data[0].result === '1') { this.$message.error('请选择入库单')
this.$message.success('增加成功') } else {
this.dialogVisible1 = false addInboundCardDetail(this.DetailNumber, this.nameGroup, this.modelGroup, this.specificationGroup, this.paintGroup, this.numberGroup, this.priceGroup).then(response => {
searchInboundCardDetail(this.DetailNumber).then(response => { if (response.data[0].result === '1') {
this.tableData4 = response.data this.$message.success('增加成功')
}) this.dialogVisible1 = false
} else { searchInboundCardDetail(this.DetailNumber).then(response => {
this.$message.error('增加失败') this.tableData4 = response.data
} })
}) } else {
this.$message.error('增加失败')
}
})
}
}, },
// 修改入库单 // 修改入库单
editInboundCardInfor(row) { editInboundCardInfor(row) {

View File

@@ -325,10 +325,10 @@
<el-dialog :visible.sync="dialogFormVisible" title="盘点修改" center width="380px"> <el-dialog :visible.sync="dialogFormVisible" title="盘点修改" center width="380px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm"> <el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm">
<el-form-item label="零件数量" prop="Number" label-width="100px" size="small"> <el-form-item label="零件数量" prop="Number" label-width="100px" size="small">
<el-input v-model="form2.Number" size="small" placeholder="出库数量" style="width: 200px"/> <el-input v-model="form2.Number" size="small" placeholder="零件数量" style="width: 200px"/>
</el-form-item> </el-form-item>
<el-form-item label="修改原因" prop="AlterReason" label-width="100px"> <el-form-item label="修改原因" prop="AlterReason" label-width="100px">
<el-input v-model="form2.AlterReason" size="small" placeholder="请输入备注" style="width: 200px"/> <el-input v-model="form2.AlterReason" size="small" placeholder="修改原因" style="width: 200px"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

View File

@@ -351,6 +351,7 @@ export default {
disable2: true, disable2: true,
disable3: true, disable3: true,
disable4: true, disable4: true,
purchasecardnumber: '', // 请购单流水号
disable: false, // 其他的禁用 disable: false, // 其他的禁用
House: [], House: [],
HouseNumber: '', HouseNumber: '',

View File

@@ -116,11 +116,41 @@
{{ scope.row.交换件名称 }} {{ scope.row.交换件名称 }}
</template> </template>
</el-table-column> </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.机床图号 }}
</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"> <el-table-column label="被交换件名称" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.被交换件名称 }} {{ scope.row.被交换件名称 }}
</template> </template>
</el-table-column> </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.被交换件机床图号 }}
</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"> <el-table-column label="交换数量" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.交换数量 }} {{ scope.row.交换数量 }}
@@ -146,6 +176,11 @@
{{ scope.row.审批状态 }} {{ scope.row.审批状态 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="scope.row.审批通过" size="mini" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="execExchangePartOut(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<!--异常出库对话框--> <!--异常出库对话框-->
@@ -167,7 +202,7 @@
</template> </template>
<script> <script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut, ErrorOut, ExchangeOut } from '@/api/Inventory/PartOut' import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut, ErrorOut, ExchangeOut, ExchangePartOut } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -255,6 +290,9 @@ export default {
searchExchange() { searchExchange() {
ExchangeOut(this.pickingListNumberx).then(response => { ExchangeOut(this.pickingListNumberx).then(response => {
const data = response.data const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataExchange = data this.tableDataExchange = data
}) })
}, },
@@ -324,6 +362,17 @@ export default {
this.form = [] this.form = []
this.dialogFormVisible = false this.dialogFormVisible = false
}, },
execExchangePartOut(row) {
ExchangePartOut(row.采购合同明细流水号, row.申请人, row.交换数量, row.被交换货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.dialogFormVisible = false
this.form = []
} else {
this.$message.error('出库失败')
}
})
},
submitEdit() { submitEdit() {
ErrorOut(this.projectnumber, this.machinenumber, this.teamnumber, this.partName, this.picikingPeople, this.purchaseDeatileNumber, this.askPurchaseNumber, this.craftnumber, this.locatenumber, this.form.ErrorNumber, this.form.Reason, this.partType).then(response => { ErrorOut(this.projectnumber, this.machinenumber, this.teamnumber, this.partName, this.picikingPeople, this.purchaseDeatileNumber, this.askPurchaseNumber, this.craftnumber, this.locatenumber, this.form.ErrorNumber, this.form.Reason, this.partType).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {

View File

@@ -7,7 +7,7 @@
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button> <el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox> <el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button> <el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button> <!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row> </el-row>
</el-card> </el-card>

View File

@@ -768,10 +768,8 @@ export default {
if (valid) { if (valid) {
if (this.title === '增加') { if (this.title === '增加') {
this.submitAdd() this.submitAdd()
this.title = ''
} else if (this.title === '编辑') { } else if (this.title === '编辑') {
this.submitEdit() this.submitEdit()
this.title = ''
} }
} }
}) })
@@ -781,7 +779,6 @@ export default {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
} }
this.title = '增加' this.title = '增加'
this.dialogFormVisible = true
var time = new Date() var time = new Date()
var month = time.getMonth() + 1 var month = time.getMonth() + 1
var day = time.getDate() var day = time.getDate()
@@ -797,21 +794,29 @@ export default {
}) })
this.form.运费 = null this.form.运费 = null
this.form.外协厂家 = '' this.form.外协厂家 = ''
this.dialogFormVisible = true
}, },
submitAdd() { submitAdd() {
addTable(this.form.表单号, this.id, this.ManufactorNumber1, this.form.下达任务日期, this.form.运费).then(response => { this.form.运费 = parseInt(this.form.运费)
if (response.data[0].result === '1') { if (isNaN(this.form.运费)) {
this.$notify({ this.form.运费 = ''
title: '成功', this.$message.error('请输入数字')
message: '信息添加成功', } else {
type: 'success' addTable(this.form.表单号, this.id, this.ManufactorNumber1, this.form.下达任务日期, this.form.运费).then(response => {
}) if (response.data[0].result === '1') {
this.dialogFormVisible = false this.$notify({
this.fetchData() title: '成功',
} else { message: '信息添加成功',
this.$message.error('信息添加失败') type: 'success'
} })
}) this.dialogFormVisible = false
this.title = ''
this.fetchData()
} else {
this.$message.error('信息添加失败')
}
})
}
}, },
getList() { getList() {
if (this.partNumber !== '') { if (this.partNumber !== '') {
@@ -1247,6 +1252,7 @@ export default {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.dialogFormVisible = false this.dialogFormVisible = false
this.title = ''
this.fetchData() this.fetchData()
} else { this.$message.error('编辑失败') } } else { this.$message.error('编辑失败') }
}) })
@@ -1571,8 +1577,6 @@ export default {
span{ span{
margin: 10px 0 10px 10px; margin: 10px 0 10px 10px;
} }
</style>
<style>
td{ td{
width: 100px; width: 100px;
height: 30px; height: 30px;
@@ -1594,8 +1598,6 @@ export default {
width: 7%; width: 7%;
text-align: left; text-align: left;
} }
</style>
<style>
.el-table .chajia { .el-table .chajia {
background: #EBF953; background: #EBF953;
} }
@@ -1606,4 +1608,3 @@ export default {
height: 30px; height: 30px;
} }
</style> </style>

View File

@@ -78,18 +78,18 @@
{{ scope.row.废品数量 }} {{ scope.row.废品数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="不合格处理方式" align="center"> <el-table-column label="不合格处理方式" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.不合格处理方式 }} {{ scope.row.不合格处理方式 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="130px" align="center"> <el-table-column label="操作" width="130px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
class="el-icon-edit" class="el-icon-edit"
@click="handleEdit(scope.$index, scope.row, 'form')">编辑</el-button> @click="handleEdit(scope.$index, scope.row, 'form')">扣款</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -107,7 +107,7 @@
</div> </div>
</el-card> </el-card>
<el-dialog :visible.sync="dialogFormVisible1" title="外协价格计算系数维护" center width="20%"> <el-dialog :visible.sync="dialogFormVisible1" title="外协价格计算系数维护" center width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm" label-width="100px" style="width: 90%;margin: auto"> <el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm" label-width="100px" style="width: 90%;margin: auto">
<el-form-item label="废品数量" prop="wasteQuantity"> <el-form-item label="废品数量" prop="wasteQuantity">
@@ -138,6 +138,7 @@ import { initOutHelp, searchTable, editList } from '@/api/Outsourcing/Unqualifie
export default { export default {
data() { data() {
return { return {
num_bhg: '',
count2: 0, count2: 0,
form: { form: {
wasteQuantity: '', // 废品数量 wasteQuantity: '', // 废品数量
@@ -165,6 +166,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.searchTable()
}, },
methods: { methods: {
fetchData() { fetchData() {
@@ -218,24 +220,29 @@ export default {
} }
this.number = row.外协加工任务单明细流水号 this.number = row.外协加工任务单明细流水号
this.form.wasteQuantity = row.废品数量 this.form.wasteQuantity = row.废品数量
this.num_bhg = row.批次数量
this.form.processingMethod = row.不合格处理方式 this.form.processingMethod = row.不合格处理方式
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
}, },
// 提交编辑 // 提交编辑
submitEdit() { submitEdit() {
editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => { if (this.form.wasteQuantity > this.num_bhg) {
if (response.data[0].result === '1') { this.$message.error('废品数量大于总数量')
this.dialogFormVisible1 = false } else {
this.$message({ editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
type: 'success', if (response.data[0].result === '1') {
message: '信息更新成功!' this.dialogFormVisible1 = false
}) this.$message({
this.searchTable() type: 'success',
} else { message: '信息更新成功!'
this.dialogFormVisible1 = false })
this.$message.error('信息更新失败') this.searchTable()
} } else {
}) this.dialogFormVisible1 = false
this.$message.error('信息更新失败')
}
})
}
}, },
// 提交添加或者修改 // 提交添加或者修改
submit(formName) { submit(formName) {