This commit is contained in:
zhangdingyu
2018-12-05 10:40:07 +08:00
parent fa3c525088
commit 7cdb10d153
4 changed files with 80 additions and 58 deletions

View File

@@ -537,26 +537,26 @@ export default {
} }
}, },
addPeople() { addPeople() {
this.people_title = '新增人员'
this.people_DFV = true
this.addForm('people_form')
},
submitAddPeople() {
this.people_DFV = false
if (this.id) { if (this.id) {
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => { this.people_title = '新增人员'
if (response.data[0].result === '1') { this.people_DFV = true
this.i = 1 this.addForm('people_form')
this.handleNodeClick()
this.$message.success('添加成功')
} else {
this.$message.error('添加失败')
}
})
} else { } else {
this.$message.warning(`请选择部门名称`) this.$message.warning(`请选择部门名称`)
} }
}, },
submitAddPeople() {
this.people_DFV = false
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
if (response.data[0].result === '1') {
this.i = 1
this.handleNodeClick()
this.$message.success('添加成功')
} else {
this.$message.error('添加失败')
}
})
},
handleEditPeople(row) { handleEditPeople(row) {
this.people_title = '编辑人员' this.people_title = '编辑人员'
this.people_DFV = true this.people_DFV = true

View File

@@ -25,15 +25,15 @@
stripe stripe
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
height="700" height="700">
highlight-current-row <el-table-column align="center" label=" " width="50px">
border>
<el-table-column align="center" label="流水号" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)"/> <el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)">
{{ a }}
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="工艺分类"> <el-table-column align="left" label="工艺分类">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺分类名称 }} {{ scope.row.工艺分类名称 }}
</template> </template>
@@ -191,6 +191,7 @@ export default {
data() { data() {
return { return {
// 工艺分类所需变量 // 工艺分类所需变量
a: '',
expands: [], expands: [],
tableData1: [], tableData1: [],
ProcessNum: '', ProcessNum: '',
@@ -221,8 +222,8 @@ export default {
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }] ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
}, },
rules2: { rules2: {
Process: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }], Process: [{ required: true, message: '请输入工艺名称' }],
ProcessShort: [{ required: true, message: '请输入工艺名称简称', trigger: 'blur' }] ProcessShort: [{ required: true, message: '请输入工艺名称简称' }]
}, },
rules3: { rules3: {
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }] TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]
@@ -318,27 +319,41 @@ export default {
if (valid) { if (valid) {
if (this.temp === 1) { if (this.temp === 1) {
this.submitaddProcessClassification() this.submitaddProcessClassification()
this.form1 = {} this.form1 = {
ProcessClassification: ''
}
this.temp = null this.temp = null
} else if (this.temp === 2) { } else if (this.temp === 2) {
this.submitProcessClassification() this.submitProcessClassification()
this.form1 = {} this.form1 = {
ProcessClassification: ''
}
this.temp = null this.temp = null
} else if (this.temp === 3) { } else if (this.temp === 3) {
this.submitaddProcess() this.submitaddProcess()
this.form2 = {} this.form2 = {
Process: '',
ProcessShort: ''
}
this.temp = null this.temp = null
} else if (this.temp === 4) { } else if (this.temp === 4) {
this.submiteditProcess() this.submiteditProcess()
this.form2 = {} this.form2 = {
Process: '',
ProcessShort: ''
}
this.temp = null this.temp = null
} else if (this.temp === 5) { } else if (this.temp === 5) {
this.submitTechnologicalRequirements() this.submitTechnologicalRequirements()
this.form3 = {} this.form3 = {
TechnologicalRequirements: ''
}
this.temp = null this.temp = null
} else if (this.temp === 6) { } else if (this.temp === 6) {
this.submiteditTechnologicalRequirements() this.submiteditTechnologicalRequirements()
this.form3 = {} this.form3 = {
TechnologicalRequirements: ''
}
this.temp = null this.temp = null
} }
} }
@@ -371,9 +386,16 @@ export default {
this.dialogFormVisible4 = false this.dialogFormVisible4 = false
this.dialogFormVisible5 = false this.dialogFormVisible5 = false
this.dialogFormVisible6 = false this.dialogFormVisible6 = false
this.form1 = {} this.form1 = {
this.form2 = {} ProcessClassification: ''
this.form3 = {} }
this.form2 = {
Process: '',
ProcessShort: ''
}
this.form3 = {
TechnologicalRequirements: ''
}
}, },
getCurrentRow(row) { getCurrentRow(row) {
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => { searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {

View File

@@ -205,7 +205,7 @@
@current-change="handleCurrentChange"/> @current-change="handleCurrentChange"/>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogMaterial=false">提交</el-button> <el-button type="primary" size="small" @click="selectMaterial2()">提交</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -616,7 +616,9 @@ export default {
result: 0, result: 0,
oldNum: '', oldNum: '',
newNum: '', newNum: '',
tableRecord: [] tableRecord: [],
materialName2: '',
material2: ''
} }
}, },
created() { created() {
@@ -635,15 +637,6 @@ export default {
this.spec = '' this.spec = ''
this.batchNum = '' this.batchNum = ''
}, },
// tableRowClassName({ row }) {
// for (let i = 0; i < this.tableRecord.length; i++) {
// if (this.tableRecord[i].工序流水号 === row.工序流水号 && this.radio === 2 && this.tableRecord[i].工艺编号 !== null) { // && this.tableRecord[i].工艺难度等级 !== null && this.tableRecord[i].工艺要求 !== null
// if (this.tableRecord[i].工艺编号 !== row.工艺编号 || this.tableRecord[i].工艺要求 !== row.工艺要求 || this.tableRecord[i].工艺难度等级 !== row.工艺难度等级 || this.tableRecord[i].工序顺序 !== row.工序顺序) {
// return 'change'
// }
// }
// }
// },
returnEdit() { // 在制零件工艺修改 returnEdit() { // 在制零件工艺修改
if (this.partNumValue === '' || this.partNumValue === null) { if (this.partNumValue === '' || this.partNumValue === null) {
this.$message.error('请选择零件') this.$message.error('请选择零件')
@@ -688,10 +681,17 @@ export default {
} }
}, },
selectMaterial(row) { // 选择材质 selectMaterial(row) { // 选择材质
this.materialName2 = ''
this.material2 = ''
this.materialName2 = row.材料
this.material2 = row.材料流水号
},
selectMaterial2() {
this.materialName = '' this.materialName = ''
this.material = '' this.material = ''
this.materialName = row.材料 this.materialName = this.materialName2
this.material = row.材料流水号 this.material = this.material2
this.dialogMaterial = false
}, },
fetchData() { fetchData() {
this.materialClass = [] this.materialClass = []
@@ -923,10 +923,8 @@ export default {
this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级 this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级
this.tableData[i].工艺要求 = this.tableData2[i].工艺要求 this.tableData[i].工艺要求 = this.tableData2[i].工艺要求
selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工艺序号, this.tableData2[i].工艺要求).then(response => { selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工艺序号, this.tableData2[i].工艺要求).then(response => {
console.log('该工艺保存成功', 501)
}) })
hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级).then(response => { hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级).then(response => {
console.log(response.data, '难度等级修改成功', 502)
}) })
this.dialogFormVisible = false this.dialogFormVisible = false
} }
@@ -970,7 +968,6 @@ export default {
this.$message.error('请在主界面选择一个零件作为被拷贝对象') this.$message.error('请在主界面选择一个零件作为被拷贝对象')
} else { } else {
gongyiCopy(this.num, this.partNumValue).then(() => { // 工艺计划流水号_完成工艺, 工艺计划流水号_被拷工艺 gongyiCopy(this.num, this.partNumValue).then(() => { // 工艺计划流水号_完成工艺, 工艺计划流水号_被拷工艺
console.log('已拷贝到主表', 503)
this.searchDetail() this.searchDetail()
}) })
} }
@@ -985,18 +982,15 @@ export default {
} }
} }
gongyiYQ(this.num).then(response => { gongyiYQ(this.num).then(response => {
console.log(response.data, 119)
this.tableData4 = response.data this.tableData4 = response.data
}) })
}, },
hardEdit(row) { // 修改难度等级 hardEdit(row) { // 修改难度等级
hardEdit(row.工序流水号, row.工艺难度等级).then(response => { hardEdit(row.工序流水号, row.工艺难度等级).then(response => {
console.log(response.data, '难度等级修改成功', 504)
}) })
}, },
requestEdit(row) { // 修改工艺要求 requestEdit(row) { // 修改工艺要求
requestEdit(row.工序流水号, row.工艺要求).then(response => { requestEdit(row.工序流水号, row.工艺要求).then(response => {
console.log(response.data, '工艺要求修改成功', 505)
}) })
}, },
tableSearch(index) { // 主界面工艺名称分类、工艺名称及工艺要求后续查询 tableSearch(index) { // 主界面工艺名称分类、工艺名称及工艺要求后续查询
@@ -1027,7 +1021,10 @@ export default {
} }
}, },
cChange() { // 工艺名称分类改变 cChange() { // 工艺名称分类改变
this.processNameValue = ''
this.processName = [] this.processName = []
this.processRequestValue = ''
this.processRequest = []
for (let i = 0; i < this.processNameClass.length; i++) { for (let i = 0; i < this.processNameClass.length; i++) {
if (this.processNameClassValue === this.processNameClass[i].value) { if (this.processNameClassValue === this.processNameClass[i].value) {
processNameSelect(this.processSelect[i].value).then(response => { // 查询工艺名称 processNameSelect(this.processSelect[i].value).then(response => { // 查询工艺名称
@@ -1042,6 +1039,7 @@ export default {
} }
}, },
nChange() { // 工艺名称改变 nChange() { // 工艺名称改变
this.processRequestValue = ''
this.processRequest = [] this.processRequest = []
for (let i = 0; i < this.processName.length; i++) { for (let i = 0; i < this.processName.length; i++) {
if (this.processNameValue === this.processName[i].value) { if (this.processNameValue === this.processName[i].value) {
@@ -1063,7 +1061,6 @@ export default {
this.tableData[this.index].工艺要求 = this.str this.tableData[this.index].工艺要求 = this.str
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
selectRequest(this.tableData[this.index].工序流水号, this.tableData[this.index].工艺计划流水号, this.tableData[this.index].工艺编号, this.tableData[this.index].工序顺序, this.tableData[this.index].工艺要求).then(response => { selectRequest(this.tableData[this.index].工序流水号, this.tableData[this.index].工艺计划流水号, this.tableData[this.index].工艺编号, this.tableData[this.index].工序顺序, this.tableData[this.index].工艺要求).then(response => {
console.log('该工艺保存成功', 506)
}) })
}, },
calTol() { // 计算公差 calTol() { // 计算公差
@@ -1114,7 +1111,6 @@ export default {
this.$message.error('请先选择一个零件') this.$message.error('请先选择一个零件')
} else { } else {
insertOne(this.partNumValue, row.工序流水号).then(response => { insertOne(this.partNumValue, row.工序流水号).then(response => {
console.log(response.data, '插入成功', 507)
this.searchDetail() this.searchDetail()
}) })
} }
@@ -1145,7 +1141,6 @@ export default {
this.$message.error('请先选择一个零件') this.$message.error('请先选择一个零件')
} else { } else {
upOne(this.partNumValue, row.工序流水号).then(response => { upOne(this.partNumValue, row.工序流水号).then(response => {
console.log(response.data, '上移成功', 508)
this.searchDetail() this.searchDetail()
}) })
} }
@@ -1155,7 +1150,6 @@ export default {
this.$message.error('请先选择一个零件') this.$message.error('请先选择一个零件')
} else { } else {
downOne(this.partNumValue, row.工序流水号).then(response => { downOne(this.partNumValue, row.工序流水号).then(response => {
console.log(response.data, '下移成功', 509)
this.searchDetail() this.searchDetail()
}) })
} }
@@ -1198,7 +1192,6 @@ export default {
}).then(() => { }).then(() => {
for (let i = 0; i < 30; i++) { for (let i = 0; i < 30; i++) {
hardEdit(this.tableData[i].工序流水号, '').then(response => { hardEdit(this.tableData[i].工序流水号, '').then(response => {
console.log(response.data, '清空难度等级', 510)
}) })
} }
deleteTable(this.newNum).then(response => { deleteTable(this.newNum).then(response => {

View File

@@ -8,7 +8,7 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table :data="List" style="height: 550px" border size="small"> <el-table :data="List" border size="small">
<el-table-column label="设备名称" align="center" > <el-table-column label="设备名称" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.设备名称 }} {{ scope.row.设备名称 }}
@@ -159,6 +159,7 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@@ -184,7 +185,8 @@ export default {
{ value: '3', label: 3 }, { value: '3', label: 3 },
{ value: '4', label: 4 }], { value: '4', label: 4 }],
form: { form: {
设备名称: '', 设备编号: '', 设备名称: '',
设备编号: '',
设备型号: '', 设备型号: '',
设备性能指标: '', 设备性能指标: '',
设备加工能力: '', 设备加工能力: '',
@@ -209,9 +211,11 @@ export default {
}, },
created() { created() {
this.initialization() this.initialization()
this.fetchData()
}, },
methods: { methods: {
fetchData() { fetchData() {
this.List = []
if (this.equipmentName !== '') { if (this.equipmentName !== '') {
this.check = 1 this.check = 1
} else { } else {
@@ -317,6 +321,9 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
if (this.List && this.List.length === 1 && this.pageCurrent > 1) {
this.pageCurrent--
}
deleteTable(row.设备流水号).then(response => { deleteTable(row.设备流水号).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('删除成功') this.$message.success('删除成功')