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

View File

@@ -325,10 +325,10 @@
<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-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 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>
<div slot="footer" class="dialog-footer">

View File

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

View File

@@ -116,11 +116,41 @@
{{ 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">
<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">
<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.交换数量 }}
@@ -146,6 +176,11 @@
{{ scope.row.审批状态 }}
</template>
</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-card>
<!--异常出库对话框-->
@@ -167,7 +202,7 @@
</template>
<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'
export default {
data() {
@@ -255,6 +290,9 @@ export default {
searchExchange() {
ExchangeOut(this.pickingListNumberx).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataExchange = data
})
},
@@ -324,6 +362,17 @@ export default {
this.form = []
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() {
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') {

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-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 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-card>

View File

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

View File

@@ -78,18 +78,18 @@
{{ scope.row.废品数量 }}
</template>
</el-table-column>
<el-table-column label="不合格处理方式" align="center">
<el-table-column label="不合格处理方式" width="200" align="center">
<template slot-scope="scope">
{{ scope.row.不合格处理方式 }}
</template>
</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">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEdit(scope.$index, scope.row, 'form')">编辑</el-button>
@click="handleEdit(scope.$index, scope.row, 'form')">扣款</el-button>
</template>
</el-table-column>
@@ -107,7 +107,7 @@
</div>
</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-item label="废品数量" prop="wasteQuantity">
@@ -138,6 +138,7 @@ import { initOutHelp, searchTable, editList } from '@/api/Outsourcing/Unqualifie
export default {
data() {
return {
num_bhg: '',
count2: 0,
form: {
wasteQuantity: '', // 废品数量
@@ -165,6 +166,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable()
},
methods: {
fetchData() {
@@ -218,11 +220,15 @@ export default {
}
this.number = row.外协加工任务单明细流水号
this.form.wasteQuantity = row.废品数量
this.num_bhg = row.批次数量
this.form.processingMethod = row.不合格处理方式
this.dialogFormVisible1 = true
},
// 提交编辑
submitEdit() {
if (this.form.wasteQuantity > this.num_bhg) {
this.$message.error('废品数量大于总数量')
} else {
editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
if (response.data[0].result === '1') {
this.dialogFormVisible1 = false
@@ -236,6 +242,7 @@ export default {
this.$message.error('信息更新失败')
}
})
}
},
// 提交添加或者修改
submit(formName) {