加工进度查询

This commit is contained in:
zhangdingyu
2019-01-11 17:52:08 +08:00
parent 785a76e857
commit 33319826e3
3 changed files with 27 additions and 44 deletions

View File

@@ -11,15 +11,15 @@ export function getNames() {
}
})
}
export function getMachines(gongyi) {
// 机床名称
export function getMachines() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床',
param: '项目流水号=' + gongyi + '=int'
name: '车间生产管理工艺_传递后_机床名称_根据机床查询',
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
}
})
}

View File

@@ -11,8 +11,8 @@ export function getEntryNameValue() {
}
})
}
// 项目名称
export function getToolNum(num) {
// 机床名称
export function getToolNum() {
return request({
url: '',
method: 'post',

View File

@@ -2,42 +2,30 @@
<div class="app-container">
<el-card>
<el-row>
<span>项目名称:</span>
<el-select v-model="project" size="small" filterable clearable placeholder="项目名称" style="width: 180px;" @change="getMachine">
<el-option
v-for="item in projects"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床号:</span>
<el-select v-model="Machine" size="small" clearable placeholder="机床号" style="width: 180px;" @change="getGroup">
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()">
<el-option
v-for="item in Machines"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 180px;">
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;">
<el-option
v-for="item in Groups"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<el-row>
<el-select v-show="false" v-model="part" size="small" placeholder="是否外协">
<el-option
v-for="item in parts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
</el-row>
<el-row style="margin-top:10px;">
<span>进度颜色</span>
<span style="background-color: red">拖期</span>
<span style="background-color: yellow">即将拖期</span>
@@ -372,7 +360,7 @@ export default {
}
},
created() {
this.fetchData()
this.getMachine()
this.getTableData()
},
methods: {
@@ -394,16 +382,15 @@ export default {
this.Machines = []
this.Group = ''
this.Groups = []
if (this.project !== '') {
getMachines(this.project).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床,
value: response.data[i].机床流水号
})
}
})
}
getMachines().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水,
value2: response.data[i].项目名称
})
}
})
},
getGroup() {
this.Group = ''
@@ -420,11 +407,7 @@ export default {
// 按条件查询
getTableData() {
this.listLoading1 = true
if (this.project === '') {
this.checkbox_project = false
} else {
this.checkbox_project = true
}
this.checkbox_project = false
if (this.Machine === '') {
this.checkbox_Machine = false
} else {
@@ -456,7 +439,7 @@ export default {
this.colorCode = [[]]
this.realDate = [[]]
this.length = 0
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.part, this.pageCurrent, this.pageSize).then(response => {
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.pageCurrent, this.pageSize).then(response => {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
this.零件图号.push(response.data.rows[i].零件图号)
@@ -471,7 +454,7 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], this.part).then(response => {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], 1).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {