This commit is contained in:
lixin
2018-12-05 20:11:30 +08:00
7 changed files with 133 additions and 99 deletions

View File

@@ -7,15 +7,15 @@ export const wsuri = `ws://192.168.0.108:61101//WebMoudule//websocket`
export const name = `OP8888`
// 创建axios实例
export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx`
export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
export const upload = `http://localhost:8411/submit/uploadFile.ashx`
export const download = `http://localhost:8411/submit/downloadFile.ashx`
const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.0.108:8411/submit/MESCommonBase.ashx`,
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,

View File

@@ -537,13 +537,16 @@ export default {
}
},
addPeople() {
if (this.id) {
this.people_title = '新增人员'
this.people_DFV = true
this.addForm('people_form')
} else {
this.$message.warning(`请选择部门名称`)
}
},
submitAddPeople() {
this.people_DFV = false
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 => {
if (response.data[0].result === '1') {
this.i = 1
@@ -553,9 +556,6 @@ export default {
this.$message.error('添加失败')
}
})
} else {
this.$message.warning(`请选择部门名称`)
}
},
handleEditPeople(row) {
this.people_title = '编辑人员'

View File

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

View File

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

View File

@@ -175,7 +175,7 @@ export default {
this.fetchData()
},
methods: {
fetchData() { // 初始化未编制零件号、材料、公差
fetchData() { // 初始化未编制零件号
getPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
@@ -255,13 +255,18 @@ export default {
this.num0 = ''
if (this.radio === 1) {
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.num0 = response.data[0].工艺计划流水号
console.log(response.data[0].工艺计划流水号, 520)
this.material = response.data[0].材料
}
}).then(() => {
mainTable(this.num0).then(response => {
if (response.data.length === 0) {
this.listLoading = false
} else {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
name: response.data[i].工艺名称,
@@ -274,17 +279,23 @@ export default {
})
}
this.listLoading = false
}
})
})
} else {
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.num0 = response.data[0].工艺计划流水号
this.material = response.data[0].材料
})
}
}).then(() => {
mainTable1(this.partNumValue).then(response => {
if (response.data.length === 0) {
this.listLoading = false
} else {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
name: response.data[i].工艺名称,
@@ -297,7 +308,8 @@ export default {
numm: response.data[i].工艺计划流水号
})
}
this.listLoading = false
}
})
})
}
},

View File

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

View File

@@ -97,10 +97,10 @@
<el-checkbox :disabled="parseInt(scope.row.工序状态)!==3" v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
</template>
</el-table-column>
<el-table-column label="外协状态" width="100" align="center">
<el-table-column label="是否外协" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small">外协</el-tag>
<el-tag v-else size="small">自制</el-tag>
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small"></el-tag>
<el-tag v-else size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="工艺名称" align="center" width="220px">