加工顺序调整

This commit is contained in:
zhangdingyu
2019-03-16 09:51:14 +08:00
parent fd6f422264
commit 18aaa31c1e
2 changed files with 72 additions and 36 deletions

View File

@@ -64,7 +64,7 @@ export function getTable2(stepNumber) {
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序', name: '车间生产管理工艺_零件工序_查询数据_加工顺序调整查询',
param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=1=string&零件图号=' + stepNumber + '=string&是否查询全部数据=1=string&单件是否外协=1&考核状态=6=int' param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=1=string&零件图号=' + stepNumber + '=string&是否查询全部数据=1=string&单件是否外协=1&考核状态=6=int'
} }
}) })
@@ -81,3 +81,27 @@ export function searchParts(stepNumber) {
} }
}) })
} }
// 跳序权限
export function JurisdictionContro2(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_加工顺序调整_更改跳序权限',
param: 'MES终端号=' + num1 + '&变更类型=' + num2
}
})
}
// 撤出零件
export function outParts(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_零件撤出待加工库',
param: '工艺计划流水号=' + code + '&结果=11111=string=output'
}
})
}

View File

@@ -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"> 加工零件 {{ Parts }};加工工序 {{ gongxu }}</span>
<span v-if="lengths === 0" style="color: #53A3F7;font-size: 14px"> 无正在加工零件</span> <span v-if="lengths === 0" style="color: #53A3F7;font-size: 14px"> 无正在加工零件</span>
<el-badge :value="num" :max="99" class="item"> <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-badge>
</el-card> </el-card>
@@ -260,26 +260,11 @@
<el-table-column label="操作" width="300" align="center"> <el-table-column label="操作" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button <el-button size="mini" icon="el-icon-arrow-up" type="primary" @click="upOne(scope.row)"/>
size="mini" <el-button size="mini" icon="el-icon-arrow-down" type="primary" @click="downOne(scope.row)"/>
icon="el-icon-arrow-up" <el-button size="mini" icon="el-icon-upload2" type="primary" @click="TOP(scope.row)"/>
type="primary" <el-button size="mini" icon="el-icon-download" type="primary" @click="Down(scope.row)"/>
@click="upOne(scope.row)"/> <el-button size="mini" icon="el-icon-delete" type="danger" @click="outParts(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)"/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -312,16 +297,20 @@
</el-table-column> </el-table-column>
<el-table-column property="date" label="操作" align="center"> <el-table-column property="date" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-if="scope.row.调序权限==='0'" size="mini" type="success" @click="JurisdictionControl1(scope.row)">开启</el-button>
v-if="scope.row.调序权限==='0'" <el-button v-if="scope.row.调序权限==='1'" size="mini" type="danger" @click="JurisdictionControl2(scope.row)">关闭</el-button>
size="mini" </template>
type="success" </el-table-column>
@click="JurisdictionControl1(scope.row)">开启</el-button> <el-table-column property="name" label="跳序权限" align="center">
<el-button <template slot-scope="scope">
v-if="scope.row.序权限==='1'" <el-tag v-if="scope.row.序权限===1" type="success" size="small">已开放</el-tag>
size="mini" <el-tag v-else type="info" size="small">未开放</el-tag>
type="danger" </template>
@click="JurisdictionControl2(scope.row)">关闭</el-button> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -331,7 +320,7 @@
</template> </template>
<script> <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' import { wsuri, name } from '@/utils/request'
export default { export default {
data() { data() {
@@ -470,7 +459,6 @@ export default {
if (this.MachineValue !== '' && this.MachineValue !== null) { if (this.MachineValue !== '' && this.MachineValue !== null) {
this.loading0 = true this.loading0 = true
searchtable(this.MachineValue, this.pageCurrent, this.pageSize).then(response => { searchtable(this.MachineValue, this.pageCurrent, this.pageSize).then(response => {
console.log(response.data)
this.tableData = response.data.rows this.tableData = response.data.rows
this.total = response.data.total this.total = response.data.total
this.loading0 = false this.loading0 = false
@@ -531,10 +519,9 @@ export default {
Jurisdiction() { Jurisdiction() {
this.count = 0 this.count = 0
getMachine2().then(response => { getMachine2().then(response => {
console.log(response.data)
this.gridData = response.data this.gridData = response.data
for (let i = 0; i < response.data.length; i++) { 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 this.num = this.count
}) })
@@ -557,6 +544,24 @@ export default {
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0') 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) { upOne(row) {
Order(this.MachineValue, row.工序流水号, '上移').then(response => { Order(this.MachineValue, row.工序流水号, '上移').then(response => {
@@ -581,6 +586,13 @@ export default {
this.searchTable() this.searchTable()
}) })
}, },
outParts(row) {
outParts(row.工艺计划流水号).then(response => {
this.searchTable()
}).then(data => {
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0')
})
},
// 分页 // 分页
handleSizeChange(val) { handleSizeChange(val) {
this.pageCurrent = 1 this.pageCurrent = 1