加工顺序调整
This commit is contained in:
@@ -1,13 +1,48 @@
|
||||
import request from '@/utils/request'
|
||||
// 初始化 项目名称
|
||||
export function searchtable() {
|
||||
// 初始化 工位
|
||||
export function getMachine() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_项目名称_查询数据',
|
||||
param: '考核状态=5=int'
|
||||
name: '车间生产管理工艺_加工顺序调整_查询工位'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchtable(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'MES_机加工MES_记录零件待加工显示',
|
||||
param: 'MES终端编号=' + num,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 调序
|
||||
export function Order(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'MES_机加工MES_待加工区列表_排序',
|
||||
param: 'MES终端编号=' + num1 + '&排序ID=' + num2 + '&排序类型=' + num3
|
||||
}
|
||||
})
|
||||
}
|
||||
// 调序权限
|
||||
export function JurisdictionControl(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_加工顺序调整_更改权限',
|
||||
param: 'MES终端号=' + num1 + '&变更类型=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,18 @@
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-button type="success" class="el-icon-search" size="small">查询</el-button>
|
||||
<span>工位号:</span>
|
||||
<el-select v-model="MachineValue" size="small" filterable placeholder="工位号" style="width: 180px;">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="searchTable();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
|
||||
<el-badge :value="num" :max="99" class="item">
|
||||
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">调序权限</el-button>
|
||||
</el-badge>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -12,58 +23,45 @@
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="外协厂家名称" align="center" width="280px">
|
||||
<el-table-column label="零件名称" align="center" width="310px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协厂家简称" align="center" width="110px">
|
||||
<el-table-column label="零件图号" align="center" width="330px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家简称 }}
|
||||
{{ scope.row.零件图号_短 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="地址" align="center" width="280px">
|
||||
<el-table-column label="待加工工序" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.地址 }}
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" width="120px">
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="传真" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传真 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备情况" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
<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)"/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -80,14 +78,50 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" width="60%">
|
||||
<el-table :data="gridData" height="500" size="mini" border>
|
||||
<el-table-column property="date" label="工位号" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.MES终端号 }}
|
||||
</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="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>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {} from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { getMachine, searchtable, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
num: 0,
|
||||
count: 0,
|
||||
dialogFormVisible: false,
|
||||
gridData: [],
|
||||
Machine: [],
|
||||
MachineValue: '',
|
||||
loading0: false,
|
||||
tableData: [], // 表格数据
|
||||
pageSize: 10,
|
||||
@@ -96,8 +130,80 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.Jurisdiction()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化获取工位
|
||||
fetchData() {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
getMachine().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].MES终端号,
|
||||
value: response.data[i].MES终端号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
if (this.MachineValue !== '' && this.MachineValue !== null) {
|
||||
this.loading0 = true
|
||||
searchtable(this.MachineValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
}).then(() => {
|
||||
this.loading0 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择工位')
|
||||
}
|
||||
},
|
||||
Jurisdiction() {
|
||||
this.count = 0
|
||||
getMachine().then(response => {
|
||||
this.gridData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].调序权限 === 1) { this.count = this.count + 1 }
|
||||
}
|
||||
this.num = this.count
|
||||
})
|
||||
},
|
||||
JurisdictionControl1(row) {
|
||||
JurisdictionControl(row.MES终端号, 1).then(response => {
|
||||
this.Jurisdiction()
|
||||
})
|
||||
},
|
||||
JurisdictionControl2(row) {
|
||||
JurisdictionControl(row.MES终端号, 2).then(response => {
|
||||
this.Jurisdiction()
|
||||
})
|
||||
},
|
||||
// 上移
|
||||
upOne(row) {
|
||||
Order(this.MachineValue, row.工序流水号, '上移').then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
// 下移
|
||||
downOne(row) {
|
||||
Order(this.MachineValue, row.工序流水号, '下移').then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
// 置顶
|
||||
TOP(row) {
|
||||
Order(this.MachineValue, row.工序流水号, '置顶').then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
// 置底
|
||||
Down(row) {
|
||||
Order(this.MachineValue, row.工序流水号, '置底').then(response => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
@@ -119,4 +225,9 @@ export default {
|
||||
.el-input{
|
||||
width: 210px;
|
||||
}
|
||||
.item {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user