加工顺序调整
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<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-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">跳序权限</el-button>
|
||||
</el-badge>
|
||||
</el-card>
|
||||
|
||||
@@ -260,26 +260,11 @@
|
||||
<el-table-column label="操作" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-upload2"
|
||||
type="primary"
|
||||
@click="TOP(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-download"
|
||||
type="primary"
|
||||
@click="Down(scope.row)"/>
|
||||
<el-button size="mini" icon="el-icon-arrow-up" type="primary" @click="upOne(scope.row)"/>
|
||||
<el-button size="mini" icon="el-icon-arrow-down" type="primary" @click="downOne(scope.row)"/>
|
||||
<el-button size="mini" icon="el-icon-upload2" type="primary" @click="TOP(scope.row)"/>
|
||||
<el-button size="mini" icon="el-icon-download" type="primary" @click="Down(scope.row)"/>
|
||||
<el-button size="mini" icon="el-icon-delete" type="danger" @click="outParts(scope.row)"/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -312,16 +297,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column property="date" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.调序权限==='0'"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="JurisdictionControl1(scope.row)">开启</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.调序权限==='1'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="JurisdictionControl2(scope.row)">关闭</el-button>
|
||||
<el-button v-if="scope.row.调序权限==='0'" size="mini" type="success" @click="JurisdictionControl1(scope.row)">开启</el-button>
|
||||
<el-button v-if="scope.row.调序权限==='1'" size="mini" type="danger" @click="JurisdictionControl2(scope.row)">关闭</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="name" label="跳序权限" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.跳序权限===1" type="success" size="small">已开放</el-tag>
|
||||
<el-tag v-else type="info" size="small">未开放</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="date" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.跳序权限===0" size="mini" type="success" @click="JurisdictionControl3(scope.row)">开启</el-button>
|
||||
<el-button v-if="scope.row.跳序权限===1" size="mini" type="danger" @click="JurisdictionControl4(scope.row)">关闭</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -331,7 +320,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl, JurisdictionContro2, outParts } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
@@ -470,7 +459,6 @@ export default {
|
||||
if (this.MachineValue !== '' && this.MachineValue !== null) {
|
||||
this.loading0 = true
|
||||
searchtable(this.MachineValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading0 = false
|
||||
@@ -531,10 +519,9 @@ export default {
|
||||
Jurisdiction() {
|
||||
this.count = 0
|
||||
getMachine2().then(response => {
|
||||
console.log(response.data)
|
||||
this.gridData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].调序权限 === '1') { this.count = this.count + 1 }
|
||||
if (response.data[i].跳序权限 === 1) { this.count = this.count + 1 }
|
||||
}
|
||||
this.num = this.count
|
||||
})
|
||||
@@ -557,6 +544,24 @@ export default {
|
||||
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0')
|
||||
})
|
||||
},
|
||||
JurisdictionControl3(row) {
|
||||
this.opname = row.MES终端号
|
||||
JurisdictionContro2(row.MES终端号, 1).then(response => {
|
||||
this.Jurisdiction()
|
||||
return this.opname
|
||||
}).then(data => {
|
||||
this.websock.send('TOBS?MES?' + data + '?MES|SkipPermission|' + data + '|1')
|
||||
})
|
||||
},
|
||||
JurisdictionControl4(row) {
|
||||
this.opname = row.MES终端号
|
||||
JurisdictionContro2(row.MES终端号, 2).then(response => {
|
||||
this.Jurisdiction()
|
||||
return this.opname
|
||||
}).then(data => {
|
||||
this.websock.send('TOBS?MES?' + data + '?MES|SkipPermission|' + data + '|0')
|
||||
})
|
||||
},
|
||||
// 上移
|
||||
upOne(row) {
|
||||
Order(this.MachineValue, row.工序流水号, '上移').then(response => {
|
||||
@@ -581,6 +586,13 @@ export default {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
outParts(row) {
|
||||
outParts(row.工艺计划流水号).then(response => {
|
||||
this.searchTable()
|
||||
}).then(data => {
|
||||
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0')
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
|
||||
Reference in New Issue
Block a user