This commit is contained in:
lixin
2018-11-23 17:04:26 +08:00
parent abb1fe3912
commit c740a9d1d6
5 changed files with 75 additions and 41 deletions

View File

@@ -75,18 +75,19 @@ export function searchHoursePart(pageCurrent, pageSize, project_check, project,
}) })
} }
// 领料单查询 // 领料单查询
export function searchList(pageCurrent, pageSize, listNumber) { export function searchList(pageCurrent, pageSize, listNumber_check, listNumber) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间装配管理_领料单_领料单查询', name: '车间装配管理_领料单_领料单查询',
param: '领料单编号=' + listNumber, param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
// 领料单明细查询 // 领料单明细查询
export function searchListDetail(listNumber) { export function searchListDetail(listNumber) {
return request({ return request({

View File

@@ -222,8 +222,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="180"> <el-table-column label="操作" align="center" min-width="180">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button> <el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button> <el-button :disabled="scope.row.是否禁用" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -269,7 +269,7 @@ export default {
count2: 0, // 清表单验证计数器 count2: 0, // 清表单验证计数器
ProjectValue: '', ProjectValue: '',
Project: [], Project: [],
ProjectValue_check: 1, ProjectValue_check: 0,
MachineValue: '', MachineValue: '',
Machine: [], Machine: [],
MachineValue_check: 1, MachineValue_check: 1,
@@ -337,24 +337,32 @@ export default {
getpeopleid() { getpeopleid() {
this.picikingPeople = this.id this.picikingPeople = this.id
}, },
searchMachine() { // 查询机床 searchMachine() {
if (this.ProjectValue === '') { this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
this.GroupNum = []
if (this.ProjectValue !== '') {
this.ProjectValue_check = 1
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} else {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} }
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}, },
searchGroupList() { // 查询组号 searchGroupList() {
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
label: response.data[i].件名称, label: response.data[i].,
value: response.data[i].组件流水号 value: response.data[i].组件流水号
}) })
} }
@@ -392,7 +400,12 @@ export default {
getExchangeTable() { getExchangeTable() {
this.listLoading1 = true this.listLoading1 = true
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => { searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
this.tableDataExchange = response.data.rows const data = response.data.rows
console.log(data)
for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataExchange = data
this.total1 = response.data.total this.total1 = response.data.total
this.listLoading1 = false this.listLoading1 = false
}) })

View File

@@ -76,6 +76,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button> <el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
<el-button <el-button
:disabled="scope.row.是否禁用"
size="mini" size="mini"
type="danger" type="danger"
class="el-icon-delete" class="el-icon-delete"
@@ -178,6 +179,8 @@ export default {
if (response.data.length === 0) { if (response.data.length === 0) {
this.listLoading = false this.listLoading = false
this.$message.warning('无此零件') this.$message.warning('无此零件')
} else if (response.data[0].剩余数量 === 0) {
this.$message.warning('该零件已入库完毕')
} else { } else {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) { if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {

View File

@@ -93,7 +93,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button> <el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="addDirectPartm()"> </el-button> <el-button type="primary" @click="addDirectPartm()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-card> <el-card>
@@ -177,7 +177,8 @@ export default {
PeopleNumber: '', PeopleNumber: '',
tableDataOut: [], tableDataOut: [],
listLoading: '', listLoading: '',
listLoading1: '' listLoading1: '',
partnumber: ''
} }
}, },
computed: { computed: {
@@ -200,7 +201,6 @@ export default {
this.PeopleNumber = this.id this.PeopleNumber = this.id
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
console.log(1351)
if (this.ProjectValue === '') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} }
@@ -251,6 +251,8 @@ export default {
this.contractNumber = row.离线合同明细流水号 this.contractNumber = row.离线合同明细流水号
this.locateNumber = row.货位流水号 this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号 this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
console.log(this.partnumber)
this.searchoutRecord() this.searchoutRecord()
}, },
// 重置表单 // 重置表单
@@ -272,21 +274,24 @@ export default {
}, },
// 离线外购件出库 // 离线外购件出库
addDirectPartm() { addDirectPartm() {
console.log(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber) if (this.partnumber < this.form.DirectNumber) {
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => { this.$message.error('请正确输入数量')
if (response.data[0].result === '1') { } else {
this.$notify({ outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
title: '成功', if (response.data[0].result === '1') {
message: '信息添加成功', this.$notify({
type: 'success' title: '成功',
}) message: '信息添加成功',
this.dialogFormVisible = false type: 'success'
this.searchDirect() })
} else { this.dialogFormVisible = false
this.$message.error('信息添加失败') this.searchDirect()
} } else {
}) this.$message.error('信息添加失败')
this.dialogFormVisible = false }
})
this.dialogFormVisible = false
}
} }
} }
} }

View File

@@ -464,9 +464,9 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
ProjectValue: null, ProjectValue: '',
Project: [], Project: [],
ProjectValue_check: 0, ProjectValue_check: 1,
MachineValue: null, MachineValue: null,
Machine: [], Machine: [],
MachineValue_check: 0, MachineValue_check: 0,
@@ -557,7 +557,8 @@ export default {
dialogFormVisibleWork: false, dialogFormVisibleWork: false,
time: [], time: [],
materialLocate: '', materialLocate: '',
enableOut: '' enableOut: '',
pickingListNumber_check: 1
} }
}, },
computed: { computed: {
@@ -579,8 +580,14 @@ export default {
console.log(this.picikingPeople) console.log(this.picikingPeople)
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
if (this.ProjectValue === null) { this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
this.GroupNum = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => { searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -592,6 +599,8 @@ export default {
}) })
}, },
searchGroupList() { // 查询组号 searchGroupList() { // 查询组号
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
@@ -664,8 +673,11 @@ export default {
}, },
// 查询领料单 // 查询领料单
searchListinfor() { searchListinfor() {
if (this.pickingListNumber === null) {
this.pickingListNumber_check = 0
}
this.listLoading2 = true this.listLoading2 = true
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => { searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber_check, this.pickingListNumber).then(response => {
for (let i = 0; i < response.data.rows.length; i++) { for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8) response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8)
} }