Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0

This commit is contained in:
caoxinyu
2019-03-15 09:03:29 +08:00
17 changed files with 781 additions and 616 deletions

View File

@@ -831,7 +831,6 @@ export default {
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')
this.total = 0
this.pageSize = 10
this.pageList = 1
this.getTable()
this.checked_baitu = false

View File

@@ -3,7 +3,7 @@
<el-card>
<span>工位号:</span>
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable()">
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()">
<el-option
v-for="item in Machine"
:key="item.value"
@@ -15,6 +15,8 @@
</el-select>
<el-button type="success" class="el-icon-refresh" size="small" style="margin: 10px 0 0 10px" @click="Refresh">刷新工位</el-button>
<span v-if="lengths !== 0" style="color: #53A3F7;font-size: 14px"> 加工零件 {{ Parts }};加工工序 {{ gongxu }}</span>
<span v-if="lengths === 0" style="color: #53A3F7;font-size: 14px"> 无正在加工零件</span>
<el-badge :value="num" :max="99" class="item">
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">调序权限</el-button>
</el-badge>
@@ -329,11 +331,14 @@
</template>
<script>
import { getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { wsuri, name } from '@/utils/request'
export default {
data() {
return {
Parts: '',
gongxu: '',
lengths: '',
a: 1,
b: 1,
expands: [],
@@ -363,6 +368,7 @@ export default {
watch: {
MachineValue(val) {
this.searchTable()
this.searchParts()
}
},
created() {
@@ -371,8 +377,19 @@ export default {
this.initWebsocket()
},
methods: {
searchParts() {
this.Parts = ''
this.gongxu = ''
this.lengths = ''
searchParts(this.MachineValue).then(response => {
this.lengths = response.data.length
if (response.data.length !== 0) {
this.Parts = response.data[0].零件图号_零件工艺计划
this.gongxu = response.data[0].工艺名称
}
})
},
getRowKeys(row) {
console.log(row)
return row.零件图号
},
selectMachine(row) {

View File

@@ -343,12 +343,12 @@ export default {
if (this.multipleSelection[i].人员编号 === '') {
this.$message.error('请选择工艺员')
} else {
this.result = 0
save(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号, this.multipleSelection[i].零件号).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('保存成功')
this.PageCurrent = 1
this.PageSize = 10
this.getTable()
} else if (i === this.multipleSelection.length - 1 && this.result !== this.multipleSelection.length) {
this.$message.error('存在保存失败项')

View File

@@ -367,11 +367,13 @@
</div>
</template>
<script>
import { handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
export default {
data() {
return {
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
ssks: '',
cjscgy: '',
@@ -562,6 +564,7 @@ export default {
this.result = []
this.kaoqinbianhao = [[]]
this.gongxuliushuihao = [[]]
this.gongyijihualiushuihao = [[]]
this.process = [[]]
this.planDate = [[]]
this.worker = [[]]
@@ -579,6 +582,7 @@ export default {
this.投产数量.push(response.data.rows[i].投产数量)
this.kaoqinbianhao[i] = []
this.gongxuliushuihao[i] = []
this.gongyijihualiushuihao[i] = []
this.process[i] = []
this.planDate[i] = []
this.worker[i] = []
@@ -594,6 +598,7 @@ export default {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
this.gongxuliushuihao[i][k] = response.data[k].工序流水号
this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
@@ -642,42 +647,54 @@ export default {
}
this.title = this.process[index][a]
this.Num = this.gongxuliushuihao[index][a]
this.Num2 = this.gongyijihualiushuihao[index][a]
this.dialogFormVisible = true
}
},
// 编辑确定
handleChange() {
if (this.midd === 0) {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
this.getTableData()
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
}

View File

@@ -1442,9 +1442,6 @@ export default {
this.bianliang1.push(this.tableData1[i].工艺计划流水号)
}
discharge(this.bianliang1).then(response => {
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
})
},