Merge branch 'master' of http://123.56.95.229:10010/r/高精
This commit is contained in:
@@ -70,11 +70,36 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="更新零件状态" center>
|
||||
<el-table :data="finishParts" stripe border size="mini" style="width: 100%;margin: 3px 0px" height="300px">
|
||||
<el-table-column label="序号" align="center" type="index" width="55"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="FinishPart()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, insertOne, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
|
||||
import { searchTable, insertOne, getlocate, searchPartNumber, CraftNumber, FinishPart } from '@/api/Inventory/Inboundscanning'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
export default {
|
||||
@@ -94,7 +119,9 @@ export default {
|
||||
locateName: [], // 货位名称下拉框
|
||||
locateNumber: '',
|
||||
Partpaint: '',
|
||||
tableDataNum: []
|
||||
tableDataNum: [],
|
||||
dialogFormVisible: false,
|
||||
finishParts: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -178,34 +205,27 @@ export default {
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
this.finishParts = []
|
||||
this.listLoading = true
|
||||
searchTable(this.partNumber).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '该零件未加工完成',
|
||||
message: '该零件未加工',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].考核状态 === 8) {
|
||||
this.listLoading = false
|
||||
if (response.data[i].状态 === '未完成') {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已入库',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '未加工完成',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (response.data[i].考核状态 === 9) {
|
||||
this.listLoading = false
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已出库',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (response.data[i].考核状态 === 7) {
|
||||
this.listLoading = false
|
||||
this.tableData.push({
|
||||
} else if (response.data[i].状态 === '可完成') {
|
||||
this.finishParts.push({
|
||||
plannumber: response.data[i].剩余数量,
|
||||
innumber: response.data[i].入库数量,
|
||||
capture: '',
|
||||
@@ -215,28 +235,92 @@ export default {
|
||||
机床图号: response.data[i].机床图号,
|
||||
零件图号: response.data[i].零件图号
|
||||
})
|
||||
const hash = {} // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件
|
||||
this.tableDataNum = this.tableData.reduce((preVal, curVal) => {
|
||||
hash[curVal.工艺计划流水号] ? '' : hash[curVal.工艺计划流水号] = true && preVal.push({
|
||||
工艺计划流水号: curVal.工艺计划流水号,
|
||||
项目名称: curVal.项目名称,
|
||||
机床图号: curVal.机床图号,
|
||||
零件图号: curVal.零件图号,
|
||||
plannumber: curVal.plannumber,
|
||||
innumber: curVal.innumber,
|
||||
} else if (response.data[i].状态 === '已完成') {
|
||||
if (response.data[i].考核状态 === '7') {
|
||||
this.listLoading = false
|
||||
this.tableData.push({
|
||||
plannumber: response.data[i].剩余数量,
|
||||
innumber: response.data[i].入库数量,
|
||||
capture: '',
|
||||
note: ''
|
||||
note: '',
|
||||
工艺计划流水号: response.data[i].工艺计划流水号,
|
||||
项目名称: response.data[i].项目名称,
|
||||
机床图号: response.data[i].机床图号,
|
||||
零件图号: response.data[i].零件图号
|
||||
})
|
||||
return preVal
|
||||
}, [])
|
||||
const hash = {} // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件
|
||||
this.tableDataNum = this.tableData.reduce((preVal, curVal) => {
|
||||
hash[curVal.工艺计划流水号] ? '' : hash[curVal.工艺计划流水号] = true && preVal.push({
|
||||
工艺计划流水号: curVal.工艺计划流水号,
|
||||
项目名称: curVal.项目名称,
|
||||
机床图号: curVal.机床图号,
|
||||
零件图号: curVal.零件图号,
|
||||
plannumber: curVal.plannumber,
|
||||
innumber: curVal.innumber,
|
||||
capture: '',
|
||||
note: ''
|
||||
})
|
||||
return preVal
|
||||
}, [])
|
||||
} else if (response.data[i].考核状态 === '8') {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已入库',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (response.data[i].考核状态 === '9') {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: 'P' + response.data[i].工艺计划流水号 + '已出库',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
if (this.finishParts.length > 0) {
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
FinishPart() {
|
||||
var nums = []
|
||||
this.finishParts.map(v => {
|
||||
nums.push(v.工艺计划流水号)
|
||||
})
|
||||
FinishPart(nums).then(response => {
|
||||
this.dialogFormVisible = false
|
||||
for (let i = 0; i < this.finishParts.length; i++) {
|
||||
this.tableData.push({
|
||||
plannumber: this.finishParts[i].plannumber,
|
||||
innumber: this.finishParts[i].innumber,
|
||||
capture: '',
|
||||
note: '',
|
||||
工艺计划流水号: this.finishParts[i].工艺计划流水号,
|
||||
项目名称: this.finishParts[i].项目名称,
|
||||
机床图号: this.finishParts[i].机床图号,
|
||||
零件图号: this.finishParts[i].零件图号
|
||||
})
|
||||
const hash = {} // 一个新数组,data为你需要去重的数组,newData用于接收去重后的数组, curVal.去重条件
|
||||
this.tableDataNum = this.tableData.reduce((preVal, curVal) => {
|
||||
hash[curVal.工艺计划流水号] ? '' : hash[curVal.工艺计划流水号] = true && preVal.push({
|
||||
工艺计划流水号: curVal.工艺计划流水号,
|
||||
项目名称: curVal.项目名称,
|
||||
机床图号: curVal.机床图号,
|
||||
零件图号: curVal.零件图号,
|
||||
plannumber: curVal.plannumber,
|
||||
innumber: curVal.innumber,
|
||||
capture: '',
|
||||
note: ''
|
||||
})
|
||||
return preVal
|
||||
}, [])
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改入库
|
||||
Innumber() {
|
||||
this.$confirm('此操作将不可逆转,且如果入库数量大于计划数量,则全部入库,是否继续?', '提示', {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-button type="distribution" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table :data="tableData1" stripe highlight-current-row border height="550px" style="width: 865px" size="mini">
|
||||
<el-table v-loading="loading" :data="tableData1" stripe highlight-current-row border height="550px" style="width: 865px" size="mini">
|
||||
<el-table-column label="名称" prop="物料名称" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
@@ -185,6 +185,7 @@ export default {
|
||||
locateNameValue: '',
|
||||
locateName: [],
|
||||
tableData1: [],
|
||||
loading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
@@ -251,6 +252,7 @@ export default {
|
||||
},
|
||||
// 根据条件查物料货位数量
|
||||
searchMaterial() {
|
||||
this.loading = true
|
||||
let check1, check2, check3, check4, check5
|
||||
this.materialName ? check1 = 1 : check1 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
@@ -263,18 +265,19 @@ export default {
|
||||
data: {
|
||||
type: '1',
|
||||
name: `库存管理_库存盘点_物料货位数量_查询数据`,
|
||||
param: `物料名称_check=${check1}&物料名称=${this.materialName}&物料规格_check=${check2}&物料规格=${this.materialSpec}&物料型号_check=${check3}&物料型号=${this.materialModel}&仓库流水号_check=${check4}&仓库流水号=${this.inventoryNameValue}&货位流水号_check=${check5}&货位流水号=${this.locateNameValue}`,
|
||||
Pagination: this.pageCurrent + '&' + this.pageSize
|
||||
param: `物料名称_check=${check1}&物料名称=${this.materialName}&物料规格_check=${check2}&物料规格=${this.materialSpec}&物料型号_check=${check3}&物料型号=${this.materialModel}&仓库流水号_check=${check4}&仓库流水号=${this.inventoryNameValue}&货位流水号_check=${check5}&货位流水号=${this.locateNameValue}` + `&PageCurrent=${this.pageCurrent}&PageSize=${this.pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
|
||||
}
|
||||
}
|
||||
request(param).then(res => {
|
||||
this.tableData1 = res.data.rows
|
||||
console.log(res.data)
|
||||
this.tableData1 = res.data.result
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'changeValue', false)
|
||||
v.原货位存量 = v.货位存量
|
||||
return v
|
||||
})
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
this.total = parseInt(res.data.output[0].ItemCount)
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
@@ -384,4 +387,3 @@ export default {
|
||||
width:165px
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user