This commit is contained in:
zhangdingyu
2019-05-31 13:58:28 +08:00
7 changed files with 48 additions and 25 deletions

View File

@@ -11,6 +11,17 @@ export function initProject() {
}
})
}
// 初始化质检类型
export function QualityType() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '质量管理_质检类型_查询数据'
}
})
}
// 组件查询
export function searchgroup(num) {
return request({
@@ -24,14 +35,14 @@ export function searchgroup(num) {
})
}
// 组件查询
export function selecttable(check1, value1, check2, value2, check3, value3) {
export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '质量管理_质量情况_查询数据',
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 + '&质检类型代码_check=' + check4 + '&质检类型代码=' + value4
}
})
}

View File

@@ -66,7 +66,7 @@ export function getExport(num) {
method: 'post',
data: {
type: '3',
name: `select 机床流水号,组件流水号,车间生产管理工艺_零件工艺计划.工艺计划流水号,车间生产管理工艺_零件工艺计划.零件图号_零件工艺计划,车间生产管理工艺_零件工序_视图.零件名称,待加工工序顺序,车间生产管理工艺_零件工序.工序流水号,车间生产管理工艺_零件工序.工艺编号,车间生产管理工艺_基础表_工艺名称.工艺名称,批次数量,材料
name: `select 机床流水号,机床图号,组件流水号,组号,车间生产管理工艺_零件工艺计划.工艺计划流水号,车间生产管理工艺_零件工艺计划.零件图号_零件工艺计划,车间生产管理工艺_零件工序_视图.零件名称,待加工工序顺序,车间生产管理工艺_零件工序.工序流水号,车间生产管理工艺_零件工序.工艺编号,车间生产管理工艺_基础表_工艺名称.工艺名称,批次数量,材料
from ( select 工艺计划流水号,min(工序顺序) as 待加工工序顺序
from 车间生产管理工艺_零件工序_视图
where 完成日期_短 is null and 考核状态 = 6

View File

@@ -50,7 +50,7 @@ export function searchTable(check, entryNameValue, check1, machine, check2, grou
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK',
name: '车间生产管理工艺_零件工艺计划_零件状态_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + '=int',
pagination: pageCurrent + '&' + pageSize
}

View File

@@ -22,9 +22,9 @@
:value="item.value"/>
</el-select>
<span>质检类型:</span>
<el-select v-model="QualityTypeNumber" filterable placeholder="质检类型" size="small" clearable>
<el-select v-model="QualityTypeValue" filterable placeholder="质检类型" size="small" clearable>
<el-option
v-for="item in QualityTypeValue"
v-for="item in QualityTypeNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
@@ -102,7 +102,7 @@
</template>
<script>
import { initProject, searchgroup, selecttable } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { initProject, searchgroup, selecttable, QualityType } from '@/api/Assembly/QualityInspectionInformationInquiry'
// import { mapGetters } from 'vuex'
export default {
data() {
@@ -122,6 +122,7 @@ export default {
},
mounted() {
this.initProject()
this.QualityType()
},
methods: {
initProject() {
@@ -135,6 +136,17 @@ export default {
}
})
},
QualityType() {
QualityType().then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.QualityTypeNumber.push({
label: response.data[i].质检类型,
value: response.data[i].质检类型代码
})
}
})
},
machineChange() {
this.groupNumberValue = ''
this.groupNumber = []
@@ -152,7 +164,8 @@ export default {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts).then(response => {
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue).then(response => {
this.tableData1 = response.data
console.log(response.data, 1111)
})

View File

@@ -398,8 +398,8 @@ export default {
getExport(this.Group).then(res => {
console.log(res.data)
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['图号及规格', '制品名称', '计划数', '材料', '当前工序名']
const filterVal = ['零件图号_零件工艺计划', '零件名称', '批次数量', '材料', '工艺名称']
const tHeader = ['机床', '组号', '图号及规格', '制品名称', '计划数', '材料', '当前工序名']
const filterVal = ['机床图号', '组号', '零件图号_零件工艺计划', '零件名称', '批次数量', '材料', '工艺名称']
const list = res.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({

View File

@@ -176,7 +176,7 @@
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="100px">
<el-table-column label="计划开始时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务开始时间 }}
</template>
@@ -216,7 +216,7 @@
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="100px">
<el-table-column label="计划开始时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务开始时间 }}
</template>
@@ -261,7 +261,7 @@
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="100px">
<el-table-column label="计划开始时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务开始时间 }}
</template>
@@ -306,7 +306,7 @@
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="100px">
<el-table-column label="计划开始时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务开始时间 }}
</template>
@@ -351,7 +351,7 @@
{{ scope.row.任务名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="100px">
<el-table-column label="计划开始时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务开始时间 }}
</template>

View File

@@ -83,15 +83,16 @@
</el-table-column>
<el-table-column align="center" label="投产时间" width="100px">
<template slot-scope="scope">
{{ scope.row.传递时间 }}
{{ scope.row.传递时间 ? scope.row.传递时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="零件状态" min-width="960px">
<template slot-scope="scope">
<el-steps id="StatusQuery" :active="scope.row.考核状态" finish-status="success" simple>
<el-steps id="StatusQuery" :active="scope.row.零件状态" finish-status="success" simple>
<el-step title="分配" />
<el-step title="投产" />
<el-step title="工艺定额" />
<!--<el-step title="定额" />-->
<el-step title="工艺" />
<el-step title="定额" />
<el-step title="平衡" />
<el-step title="完成" />
<el-step title="入库" />
@@ -351,12 +352,10 @@ export default {
}
this.loading0 = true
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.partNumber, this.check4, this.partStateValue, this.check5, this.partTypeValue, this.pageSize, this.pageCurrent).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].考核状态 = parseInt(response.data.rows[i].考核状态) - 2
if (response.data.rows[i].传递时间 !== undefined || response.data.rows[i].hasOwnProperty('传递时间')) {
response.data.rows[i].传递时间 = response.data.rows[i].传递时间.split(' ', 2)[0]
}
}
response.data.rows.map(v => {
this.$set(v, '零件状态码', v.考核状态 ? parseInt(v.考核状态) - 2 : 0)
v.传递时间 = v.传递时间 ? v.传递时间.split(' ')[0] : ''
})
this.loading0 = false
this.tableData = response.data.rows
this.total = parseInt(response.data.total)