Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -12,14 +12,14 @@ export function initProject() {
|
||||
})
|
||||
}
|
||||
// 机床查询
|
||||
export function searchmachine(check, num) {
|
||||
export function searchmachine(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据',
|
||||
param: '项目流水号_check=' + check + '&项目流水号=' + num
|
||||
param: '项目流水号_check=1&项目流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -66,21 +66,6 @@
|
||||
<el-card>
|
||||
<el-table v-loading="listLoading1" :data="tableDataOut" size="mini" border style="width: 100%;" height="250">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<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.物料名称 }}
|
||||
@@ -106,6 +91,21 @@
|
||||
{{ 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.备注 }}
|
||||
@@ -116,8 +116,8 @@
|
||||
<!--零件出库对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="form.ProjectValue" filterable clearable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-form-item label="项目" prop="ProjectValue" label-width="100px">
|
||||
<el-select v-model="form.ProjectValue" filterable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
@@ -125,8 +125,8 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机床" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-form-item label="机床" prop="MachineValue" label-width="100px">
|
||||
<el-select v-model="form.MachineValue" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
@@ -134,8 +134,8 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||
<el-form-item label="分组" prop="GroupNumValue" label-width="100px">
|
||||
<el-select v-model="form.GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
@@ -143,11 +143,11 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-form-item label="出库数量" prop="DirectNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
|
||||
<el-form-item label="出库人" prop="PeopleValue" label-width="100px">
|
||||
<el-select v-model="form.PeopleValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
@@ -155,7 +155,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-form-item label="备注" label-width="100px">
|
||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -174,26 +174,23 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: '',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: '',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
People: [],
|
||||
PeopleValue: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
ProjectValue: '',
|
||||
MachineValue: '',
|
||||
GroupNumValue: '',
|
||||
DirectNumber: '',
|
||||
PeopleValue: '',
|
||||
DirectNote: ''
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
|
||||
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
|
||||
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
|
||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
|
||||
},
|
||||
contractNumber: '',
|
||||
locateNumber: '',
|
||||
@@ -232,14 +229,11 @@ export default {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
this.Machine = []
|
||||
this.MachineValue = ''
|
||||
this.form.MachineValue = ''
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
|
||||
this.form.GroupNumValue = ''
|
||||
searchmachine(this.form.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
@@ -250,8 +244,8 @@ export default {
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
this.form.GroupNumValue = ''
|
||||
searchTeam(this.form.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组号,
|
||||
@@ -269,7 +263,6 @@ export default {
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
searchPart(check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableDataBasic = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.listLoading = false
|
||||
@@ -295,9 +288,12 @@ export default {
|
||||
},
|
||||
// 打开表单
|
||||
parOut(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form = {}
|
||||
this.MachineValue = ''
|
||||
this.GroupNumValue = ''
|
||||
this.form.MachineValue = ''
|
||||
this.form.GroupNumValue = ''
|
||||
this.dialogFormVisible = true
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
this.locateNumber = row.货位流水号
|
||||
@@ -326,20 +322,26 @@ export default {
|
||||
if (this.partnumber < this.form.DirectNumber) {
|
||||
this.$message.error('请正确输入数量')
|
||||
} else {
|
||||
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 => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('零件出库成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable1()
|
||||
outRecord(this.contractNumber).then(response => {
|
||||
this.tableDataOut = response.data
|
||||
this.listLoading1 = false
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
outlinePartOut(this.contractNumber, this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('零件出库成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable1()
|
||||
outRecord(this.contractNumber).then(response => {
|
||||
this.tableDataOut = response.data
|
||||
this.listLoading1 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('零件出库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('零件出库失败')
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user