Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
39
src/api/Inventory/OutPartSelect.js
Normal file
39
src/api/Inventory/OutPartSelect.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 机床查询
|
||||||
|
export function getMachines(check, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_机床名称_查询数据',
|
||||||
|
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 分组查询
|
||||||
|
export function getGroups(machineNumber) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_组件名称_查询数据',
|
||||||
|
param: '机床流水号=' + machineNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 主表查询
|
||||||
|
export function getTable(num1, num2, num3, num4, num5, num6, pageCurrent, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_库存管理_基本件出库记录查询',
|
||||||
|
param: '机床流水号_check=' + num1 + '&机床流水号=' + num2 + '&组件流水号_check=' + num3 + '&组件流水号=' + num4 + '&零件图号_check=' + num5 + '&零件图号=' + num6,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -81,7 +81,7 @@ export function BasicPart(listNumber, data1, data2, data3, data4, data5) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: 'MES_机加工MES_库存管理_出库模块_出库零件信息_零件出库',
|
name: 'MES_机加工MES_库存管理_出库模块_出库零件信息_零件出库',
|
||||||
param: '领料单明细流水号=' + listNumber + '工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&领用人编号=' + data4 + '&出库备注=' + data5
|
param: '领料单明细流水号=' + listNumber + '&工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&领用人编号=' + data4 + '&出库备注=' + data5
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,6 +136,18 @@ export function dropListDetail(DetailNumberx, isBacklog) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 删除领料单明细/基本件
|
||||||
|
export function dropListDetailBasic(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间装配管理_领料单_领料单明细删除_基本件',
|
||||||
|
param: `领料单明细流水号=${params[0]}&收件信息ID=${params[1]}&返还数量=${params[2]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 增加领料单明细
|
// 增加领料单明细
|
||||||
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
|
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, outNumber, partType, Note, data1, data2, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -74,3 +74,15 @@ export function change2(Number, code, num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function handlechange2(Number, code) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_零件工序_修改数据_修改实际完成时间',
|
||||||
|
param: '工序流水号=' + Number + '&实际完成时间=' + code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,17 +32,17 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划数量" align="center" min-width="100">
|
<el-table-column label="计划数量" align="center" min-width="100">
|
||||||
<template slot-scope="scope" align="center">
|
<template slot-scope="scope" align="center">
|
||||||
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
|
{{ tableData[scope.$index].plannumber }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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">
|
||||||
<el-input v-model="tableData[scope.$index].innumber" clearable size="small"/>
|
<el-input v-model="tableData[scope.$index].innumber" clearable size="mini"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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">
|
||||||
<el-select v-model="inventoryNumber" filterable clearable size="small" placeholder="仓库名称" @change="Getlocate">
|
<el-select v-model="inventoryNumber" filterable clearable size="mini" placeholder="仓库名称" @change="Getlocate">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in inventoryName"
|
v-for="item in inventoryName"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="货位" align="center" min-width="120">
|
<el-table-column label="货位" align="center" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="locateNumber" filterable clearable size="small" placeholder="货位名称">
|
<el-select v-model="locateNumber" filterable clearable size="mini" placeholder="货位名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in locateName"
|
v-for="item in locateName"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center">
|
<el-table-column label="备注" align="center">
|
||||||
<template slot-scope="scope" align="center">
|
<template slot-scope="scope" align="center">
|
||||||
<el-input v-model="tableData[scope.$index].note" clearable size="small"/>
|
<el-input v-model="tableData[scope.$index].note" clearable size="mini"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" min-width="100" align="center">
|
<el-table-column label="操作" min-width="100" align="center">
|
||||||
@@ -79,7 +79,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -87,7 +86,6 @@
|
|||||||
import { searchTable, insertOne, getinventory, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
|
import { searchTable, insertOne, getinventory, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { wsuri, name } from '@/utils/request'
|
import { wsuri, name } from '@/utils/request'
|
||||||
import print from '@/vendor/print'
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -118,75 +116,67 @@ export default {
|
|||||||
this.Getinvent()
|
this.Getinvent()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 移除
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
this.tableData.splice(index, 1)
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.tableData.splice(index, 1)
|
|
||||||
this.$message({
|
|
||||||
message: '已被成功移除',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消删除'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 获取人员编号
|
// 获取人员编号
|
||||||
getpeopleid() {
|
getpeopleid() {
|
||||||
this.PeopleNumber = this.id
|
this.PeopleNumber = this.id
|
||||||
const a = this.token
|
|
||||||
console.log(a, 1111)
|
|
||||||
},
|
},
|
||||||
aaa() {
|
// 初始化websocket
|
||||||
print('#print')
|
initWebpack() {
|
||||||
},
|
|
||||||
initWebpack() { // 初始化websocket
|
|
||||||
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
||||||
this.websock.onopen = this.websocketopen
|
this.websock.onopen = this.websocketopen
|
||||||
this.websock.onmessage = this.websocketonmessage
|
this.websock.onmessage = this.websocketonmessage
|
||||||
this.websock.onclose = this.websocketclose
|
this.websock.onclose = this.websocketclose
|
||||||
this.websock.onerror = this.websocketerror
|
this.websock.onerror = this.websocketerror
|
||||||
},
|
},
|
||||||
websocketopen() { // 打开
|
// 打开
|
||||||
|
websocketopen() {
|
||||||
console.log('WebSocket连接成功')
|
console.log('WebSocket连接成功')
|
||||||
this.websock.send('{<' + name + '>}')
|
this.websock.send('{<' + name + '>}')
|
||||||
},
|
},
|
||||||
websocketonmessage(msg) { // 数据接收
|
// 数据接收
|
||||||
|
websocketonmessage(msg) {
|
||||||
this.partNumber = msg.data.split('|')[3]
|
this.partNumber = msg.data.split('|')[3]
|
||||||
this.partNumber = this.partNumber.slice(1)
|
this.partNumber = this.partNumber.slice(1)
|
||||||
this.getPaint(this.partNumber)
|
this.getPaint(this.partNumber)
|
||||||
},
|
},
|
||||||
websocketclose() { // 关闭
|
// 关闭
|
||||||
|
websocketclose() {
|
||||||
console.log('WebSocket关闭')
|
console.log('WebSocket关闭')
|
||||||
},
|
},
|
||||||
websocketerror() { // 失败
|
// 失败
|
||||||
|
websocketerror() {
|
||||||
console.log('WebSocket连接失败')
|
console.log('WebSocket连接失败')
|
||||||
},
|
},
|
||||||
|
// 根据图号查流水号并查表1
|
||||||
getCraftNumber() {
|
getCraftNumber() {
|
||||||
|
this.partNumber = ''
|
||||||
CraftNumber(this.Partpaint).then(response => {
|
CraftNumber(this.Partpaint).then(response => {
|
||||||
this.partNumber = response.data[0].工艺计划流水号
|
if (response.data.length > 0 && response.data[0].工艺计划流水号) {
|
||||||
|
this.partNumber = response.data[0].工艺计划流水号
|
||||||
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getscantable()
|
this.getscantable()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 扫描并获取图号并查表1
|
||||||
getPaint() {
|
getPaint() {
|
||||||
searchPartNumber(this.partNumber).then(response => {
|
searchPartNumber(this.partNumber).then(response => {
|
||||||
this.Partpaint = response.data[0].零件图号
|
this.Partpaint = response.data[0].零件图号
|
||||||
})
|
})
|
||||||
this.getscantable()
|
this.getscantable()
|
||||||
},
|
},
|
||||||
// 扫描查询
|
// 根据流水号查询
|
||||||
getscantable() {
|
getscantable() {
|
||||||
if (this.partNumber === '' || this.partNumber === null) {
|
if (this.partNumber === '' || this.partNumber === null) {
|
||||||
this.$message.error('请输入零件号')
|
this.$message.error('请输入正确零件号')
|
||||||
} else {
|
} else {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
searchTable(this.partNumber).then(response => {
|
searchTable(this.partNumber).then(response => {
|
||||||
|
console.log(response.data)
|
||||||
if (response.data.length === 0) {
|
if (response.data.length === 0) {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
this.$message.warning('该零件未加工完成')
|
this.$message.warning('该零件未加工完成')
|
||||||
@@ -234,19 +224,25 @@ export default {
|
|||||||
this.$message.error('请选择货位')
|
this.$message.error('请选择货位')
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
if (this.tableData[i].innumber === '0') {
|
if (Number(this.tableData[i].innumber) === 0) {
|
||||||
this.$message.error('请输入正确数量')
|
this.$message.error('请输入正确数量')
|
||||||
} else {
|
} else {
|
||||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||||
}
|
}
|
||||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||||
this.$message({
|
if (response.data[0].result === '1') {
|
||||||
type: 'success',
|
this.$message({
|
||||||
message: '零件入库成功!'
|
type: 'success',
|
||||||
})
|
message: '零件入库成功!'
|
||||||
}).then(() => {
|
})
|
||||||
this.Empty()
|
this.Empty()
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '零件入库失败!'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,7 +263,7 @@ export default {
|
|||||||
Getinvent() {
|
Getinvent() {
|
||||||
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
|
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
|
||||||
},
|
},
|
||||||
// 根据项目获取机床
|
// 根据仓库获取货位
|
||||||
Getlocate() {
|
Getlocate() {
|
||||||
this.locateName = []
|
this.locateName = []
|
||||||
this.locateNumber = ''
|
this.locateNumber = ''
|
||||||
|
|||||||
186
src/views/Inventory/OutPartSelect/index.vue
Normal file
186
src/views/Inventory/OutPartSelect/index.vue
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<span>机床号:</span>
|
||||||
|
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Machines"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
<div style="float: left">{{ item.label }}</div>
|
||||||
|
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<span>组号:</span>
|
||||||
|
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Groups"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>零件图号:</span>
|
||||||
|
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
|
||||||
|
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="listLoading1" :data="tableData1" class="table" border height="650">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
width="50"
|
||||||
|
type="index"/>
|
||||||
|
<el-table-column align="center" label="零件名称" width="150px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="零件图号" width="150px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="入库数量" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.入库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="机床图号" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="组号" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="仓库名称" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.仓库名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="货位名称" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.货位名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="入库时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.入库时间 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
v-if="!listLoading1"
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getMachines, getGroups, getTable } from '@/api/Inventory/OutPartSelect'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
Machine: '',
|
||||||
|
Machines: [],
|
||||||
|
Group: '',
|
||||||
|
Groups: [],
|
||||||
|
number: '',
|
||||||
|
checkbox_Machine: false,
|
||||||
|
checkbox_Group: false,
|
||||||
|
checkbox_number: false,
|
||||||
|
tableData1: [],
|
||||||
|
listLoading1: false,
|
||||||
|
total: 0, // 总条数
|
||||||
|
pageSize: 10,
|
||||||
|
pageCurrent: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getMachine()
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMachine() {
|
||||||
|
this.Machine = ''
|
||||||
|
this.Machines = []
|
||||||
|
this.Group = ''
|
||||||
|
this.Groups = []
|
||||||
|
getMachines().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.Machines.push({
|
||||||
|
label: response.data[i].机床图号,
|
||||||
|
value: response.data[i].机床流水号,
|
||||||
|
value2: response.data[i].项目名称
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getGroup() {
|
||||||
|
this.Group = ''
|
||||||
|
this.Groups = []
|
||||||
|
getGroups(this.Machine).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.Groups.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: response.data[i].组件流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 按条件查询
|
||||||
|
getTableData() {
|
||||||
|
this.listLoading1 = true
|
||||||
|
if (this.Machine === '') {
|
||||||
|
this.checkbox_Machine = 0
|
||||||
|
} else {
|
||||||
|
this.checkbox_Machine = 1
|
||||||
|
}
|
||||||
|
if (this.Group === '') {
|
||||||
|
this.checkbox_Group = 0
|
||||||
|
} else {
|
||||||
|
this.checkbox_Group = 1
|
||||||
|
}
|
||||||
|
if (this.number === '') {
|
||||||
|
this.checkbox_number = 0
|
||||||
|
} else {
|
||||||
|
this.checkbox_number = 1
|
||||||
|
}
|
||||||
|
this.tableData1 = []
|
||||||
|
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
|
||||||
|
if (response.data.total === 0) {
|
||||||
|
this.listLoading1 = false
|
||||||
|
} else {
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.total = response.data.total
|
||||||
|
this.listLoading1 = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@@ -327,7 +327,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 出库
|
// 出库
|
||||||
partOut(row) {
|
partOut(row) {
|
||||||
console.log(row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号)
|
console.log(row.出库类型, row.领料单明细流水号, row.出库数量, row.滞货物料与货位对照流水号)
|
||||||
this.$confirm('确认出库?', '提示', {
|
this.$confirm('确认出库?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@@ -355,11 +355,12 @@ export default {
|
|||||||
} else { this.$message.error('出库失败') }
|
} else { this.$message.error('出库失败') }
|
||||||
})
|
})
|
||||||
} else { // 自制件
|
} else { // 自制件
|
||||||
|
console.log(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注)
|
||||||
BasicPart(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
|
BasicPart(row.领料单明细流水号, row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('出库成功')
|
this.$message.success('出库成功')
|
||||||
this.searchListDetailt()
|
this.searchListDetailt()
|
||||||
} else { this.$message.error('增加失败') }
|
} else { this.$message.error('出库失败') }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" align="center" width="80">
|
<el-table-column label="库存数量" align="center" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.可出库数量 }}
|
{{ scope.row.入库数量 - scope.row.出库总数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待出库数量" align="center" width="90">
|
<el-table-column label="待出库数量" align="center" width="90">
|
||||||
@@ -168,6 +168,11 @@
|
|||||||
{{ scope.row.待出库数量 }}
|
{{ scope.row.待出库数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="可出库数量" align="center" width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.可出库数量 = scope.row.入库数量 - scope.row.出库总数量 - 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.仓库名称 }}
|
||||||
@@ -190,7 +195,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope" align="center">
|
<template slot-scope="scope" align="center">
|
||||||
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
|
<el-button :disabled="scope.row.可出库数量===0" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicList(scope.row)">领料</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -439,6 +444,9 @@
|
|||||||
<!--基本件领料对话框-->
|
<!--基本件领料对话框-->
|
||||||
<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="领料单号" 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-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
||||||
<el-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
|
<el-input-number v-model="form1.outNumber" :min="0" :max="enableOut" controls-position="right" style="width: 200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -510,7 +518,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
|
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList,
|
||||||
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList } from '@/api/Inventory/PickingList'
|
addListDetail, searchListDetail, dropListDetail, searchHoursePart, searchBacklogPart, submitAddBacklogList, dropListDetailBasic } from '@/api/Inventory/PickingList'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -692,28 +700,52 @@ export default {
|
|||||||
},
|
},
|
||||||
// 删除领料单明细
|
// 删除领料单明细
|
||||||
dropListdetail(row) {
|
dropListdetail(row) {
|
||||||
let isBacklog
|
console.log(row)
|
||||||
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
if (Number(row.零件类型) === 3) { // 基本件
|
||||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
|
dropListDetailBasic(row.领料单明细流水号, row.收件信息ID, row.出库数量).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.searchListDetailt()
|
this.searchListDetailt()
|
||||||
this.searchPartinfo()
|
this.searchPartinfo()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('数据占用')
|
this.$message.error('数据占用')
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
} else { // 采购部采购件、滞货件
|
||||||
this.$message({
|
let isBacklog
|
||||||
type: 'info',
|
Number(row.出库类型) === 4 ? isBacklog = 1 : isBacklog = 0
|
||||||
message: '已取消删除'
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
dropListDetail(row.领料单明细流水号, isBacklog).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchListDetailt()
|
||||||
|
this.searchPartinfo()
|
||||||
|
} else {
|
||||||
|
this.$message.error('数据占用')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
// 查询机床
|
// 查询机床
|
||||||
searchMachine() {
|
searchMachine() {
|
||||||
@@ -760,6 +792,7 @@ export default {
|
|||||||
this.listLoading1 = true
|
this.listLoading1 = true
|
||||||
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||||
const data = response.data.rows
|
const data = response.data.rows
|
||||||
|
console.log(response.data.rows)
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||||
}
|
}
|
||||||
@@ -904,7 +937,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$refs['form1'].validate((valid) => {
|
this.$refs['form1'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form.outNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.materialNumber, this.material).then(response => {
|
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form1.outNumber, this.partType, this.form1.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.materialNumber, this.material).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('增加成功')
|
this.$message.success('增加成功')
|
||||||
this.searchPartinfo()
|
this.searchPartinfo()
|
||||||
|
|||||||
@@ -95,66 +95,16 @@ import { getMachines, getGroups, getTable } from '@/api/Inventory/StockInquiry'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
startTime: '',
|
|
||||||
endTime: '',
|
|
||||||
startTime_check: 0,
|
|
||||||
endTime_check: 0,
|
|
||||||
liushuihao: '',
|
|
||||||
// value2: null,
|
|
||||||
radioList: '0',
|
|
||||||
length: 0,
|
|
||||||
listLoading1: false,
|
|
||||||
tableData1: [],
|
|
||||||
project: '',
|
|
||||||
projects: [],
|
|
||||||
Machine: '',
|
Machine: '',
|
||||||
Machines: [],
|
Machines: [],
|
||||||
Group: '',
|
Group: '',
|
||||||
Groups: [],
|
Groups: [],
|
||||||
part: '',
|
|
||||||
parts: [{
|
|
||||||
value: 0,
|
|
||||||
label: '全部零件'
|
|
||||||
}, {
|
|
||||||
value: 1,
|
|
||||||
label: '自家生产'
|
|
||||||
}, {
|
|
||||||
value: 2,
|
|
||||||
label: '外协生产'
|
|
||||||
}],
|
|
||||||
Speed: '',
|
|
||||||
Speeds: [{
|
|
||||||
value: 5,
|
|
||||||
label: '全部'
|
|
||||||
}, {
|
|
||||||
value: 1,
|
|
||||||
label: '拖期'
|
|
||||||
}, {
|
|
||||||
value: 2,
|
|
||||||
label: '即将拖期'
|
|
||||||
}, {
|
|
||||||
value: 3,
|
|
||||||
label: '如期'
|
|
||||||
}, {
|
|
||||||
value: 4,
|
|
||||||
label: '工序外协'
|
|
||||||
}],
|
|
||||||
number: '',
|
number: '',
|
||||||
checkbox_project: false,
|
|
||||||
checkbox_Machine: false,
|
checkbox_Machine: false,
|
||||||
checkbox_Group: false,
|
checkbox_Group: false,
|
||||||
checkbox_part: false,
|
|
||||||
checkbox_number: false,
|
checkbox_number: false,
|
||||||
零件图号: [],
|
tableData1: [],
|
||||||
零件名称: [],
|
listLoading1: false,
|
||||||
投产数量: [],
|
|
||||||
result: [],
|
|
||||||
process: [[]],
|
|
||||||
planDate: [[]],
|
|
||||||
worker: [[]],
|
|
||||||
colorCode: [[]],
|
|
||||||
realDate: [[]],
|
|
||||||
// waixie: [[]],
|
|
||||||
total: 0, // 总条数
|
total: 0, // 总条数
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageCurrent: 1
|
pageCurrent: 1
|
||||||
@@ -215,9 +165,6 @@ export default {
|
|||||||
if (response.data.total === 0) {
|
if (response.data.total === 0) {
|
||||||
this.listLoading1 = false
|
this.listLoading1 = false
|
||||||
} else {
|
} else {
|
||||||
// for (let i = 0; i < response.data.rows.length; i++) {
|
|
||||||
// response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ')[0]
|
|
||||||
// }
|
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.total = response.data.total
|
this.total = response.data.total
|
||||||
this.listLoading1 = false
|
this.listLoading1 = false
|
||||||
|
|||||||
@@ -115,11 +115,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchtable, searchtable2, change, handlechange, searchtable3, change2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
editTime: '',
|
||||||
bianliang1: [],
|
bianliang1: [],
|
||||||
bianliang2: [],
|
bianliang2: [],
|
||||||
num: 0,
|
num: 0,
|
||||||
@@ -179,20 +180,40 @@ export default {
|
|||||||
备料到货: this.Data[i].备料到货,
|
备料到货: this.Data[i].备料到货,
|
||||||
工艺要求: response.data[0].工艺要求,
|
工艺要求: response.data[0].工艺要求,
|
||||||
工序流水号: response.data[0].工序流水号,
|
工序流水号: response.data[0].工序流水号,
|
||||||
重量: response.data[0].重量
|
重量: response.data[0].重量,
|
||||||
|
单价: 0
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
zeroFill(i) {
|
||||||
|
if (i >= 0 && i <= 9) {
|
||||||
|
return '0' + i
|
||||||
|
} else {
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
},
|
||||||
// 自家备料出库
|
// 自家备料出库
|
||||||
handleChange1(row) {
|
handleChange1(row) {
|
||||||
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
|
if (row.重量 === '' || row.重量 === null) {
|
||||||
handlechange(row.工序流水号, '0000')
|
this.$message.error('请输入重量')
|
||||||
}).then(response => {
|
} else if (row.单价 === '' || row.单价 === null) {
|
||||||
this.searchTable()
|
this.$message.error('请输入单价')
|
||||||
})
|
} else {
|
||||||
|
var date = new Date()
|
||||||
|
var month = this.zeroFill(date.getMonth() + 1)
|
||||||
|
var day = this.zeroFill(date.getDate())
|
||||||
|
this.editTime = date.getFullYear() + '-' + month + '-' + day
|
||||||
|
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
|
||||||
|
handlechange(row.工序流水号, '0000').then(response => {
|
||||||
|
handlechange2(row.工序流水号, this.form.完成时间)
|
||||||
|
})
|
||||||
|
}).then(response => {
|
||||||
|
this.searchTable()
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.arrest = val
|
this.arrest = val
|
||||||
|
|||||||
@@ -141,9 +141,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合同状态" align="center" width="100" fixed="left">
|
<el-table-column label="合同状态" align="center" width="100" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
|
<el-tag v-if="editing(scope.row)" type="warning" size="small">编辑中</el-tag>
|
||||||
<el-tag v-if="Number(scope.row.离线合同状态)===2&&Number(scope.row.总采购数量)!==Number(scope.row.总到货数量)" type="primary" size="small">已采购</el-tag>
|
<el-tag v-if="purchasing(scope.row)" type="primary" size="small">已采购</el-tag>
|
||||||
<el-tag v-if="Number(scope.row.总采购数量)===Number(scope.row.总到货数量)&&Number(scope.row.总采购数量)!==0" type="success" size="small">全部到货</el-tag>
|
<el-tag v-if="arrival(scope.row)" type="success" size="small">全部到货</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="离线合同编号" align="center" min-width="170">
|
<el-table-column label="离线合同编号" align="center" min-width="170">
|
||||||
@@ -596,6 +596,15 @@ export default {
|
|||||||
this.searchTable2()
|
this.searchTable2()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
editing(row) {
|
||||||
|
return Number(row.离线合同状态) === 1
|
||||||
|
},
|
||||||
|
purchasing(row) {
|
||||||
|
return Number(row.离线合同状态) === 2 && Number(row.总采购数量) !== Number(row.总到货数量)
|
||||||
|
},
|
||||||
|
arrival(row) {
|
||||||
|
return Number(row.总采购数量) === Number(row.总到货数量) && Number(row.总采购数量) !== 0
|
||||||
|
},
|
||||||
useqrcode(contractNum) {
|
useqrcode(contractNum) {
|
||||||
const opts = {
|
const opts = {
|
||||||
errorCorrectionLevel: 'H',
|
errorCorrectionLevel: 'H',
|
||||||
|
|||||||
Reference in New Issue
Block a user