质检修改——20190602

This commit is contained in:
jiangfuzhuang
2019-06-02 15:00:14 +08:00
parent 72267ae710
commit 5711aeb852
8 changed files with 190 additions and 12 deletions

View File

@@ -26,7 +26,7 @@
</el-card>
<el-card>
<h3 style="text-align: center;">总装调试</h3>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="100px">
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="200px">
<el-table-column label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -150,7 +150,7 @@ export default {
},
searchTable1() {
this.tableData1 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
searchTable1(this.machineNumberValue, this.check2).then(response => {
this.tableData1 = response.data
console.log(response.data, 1111)
@@ -158,8 +158,8 @@ export default {
},
searchTable2() {
this.tableData2 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.groupNumberValue !== '') { this.check3 = 1 } else { this.check3 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
searchTable2(this.machineNumberValue, this.check2).then(response => {
console.log(response.data, 222)
this.tableData2 = response.data

View File

@@ -46,7 +46,7 @@
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.发货状态===null || scope.row.发货状态===0" type="success" size="small" @click="handlconfirm(scope.row)">确认发货</el-button>
<el-button v-else-if="scope.row.发货状态===1" type="danger" size="small"> 审批</el-button>
<el-button v-else-if="scope.row.发货状态===1" disabled="true" type="danger" size="small">待审批</el-button>
<el-button v-else type="info" size="small" >已审批</el-button>
</template>
</el-table-column>
@@ -89,7 +89,7 @@ export default {
},
selecttable() {
this.tableData1 = []
if (this.machineNumberValue !== '') { this.check2 = 1 } else { this.check2 = 0 }
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
selecttable(this.check2, this.machineNumberValue).then(response => {
this.tableData1 = response.data
console.log(response.data)

View File

@@ -31,7 +31,7 @@
</el-select>
<span>零件:</span>
<el-input v-model="SpareParts" filterable placeholder="请输入零件名称" style="width: 200px" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
</el-row>
</el-card>
<el-card>
@@ -56,7 +56,7 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件号" align="center">
<el-table-column label="零件号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
@@ -66,6 +66,11 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格或材料" align="center">
<template slot-scope="scope">
{{ scope.row.规格或材料 }}
</template>
</el-table-column>
<el-table-column label="质检类型" align="center">
<template slot-scope="scope">
{{ scope.row.质检类型 }}
@@ -83,12 +88,17 @@
</el-table-column>
<el-table-column label="不合格原因" align="center">
<template slot-scope="scope">
{{ scope.row.不合格原因 }}
{{ scope.row.不合格原因文本 }}
</template>
</el-table-column>
<el-table-column label="处理结果" align="center">
<template slot-scope="scope">
{{ scope.row.处理结果 }}
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<el-table-column label="操作时间" align="center">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">

View File

@@ -0,0 +1,125 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="selecttable()">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
</el-row>
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="600px">
<el-table-column label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="注意事项" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.注意事项" style="width:100px;margin-right:3px" size="mini" width="120"/>
</template>
<span v-else>{{ scope.row.注意事项 }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="!scope.row.edit && scope.row.发货状态===1" type="success" size="mini" icon="el-icon-circle-check-outline" @click="scope.row.edit=!scope.row.edit" >确认审批</el-button>
<el-button v-else-if="!scope.row.edit && scope.row.发货状态===2" disabled="true" type="danger" size="mini" icon="el-icon-circle-check-outline" >已审批</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="primary" @click="confirmEdit(scope.row)">确认</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="danger" @click="cancelEdit(scope.row)">取消</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject, selecttable, updatestate } from '@/api/Assembly/ShipmentApproval'
// import { mapGetters } from 'vuex'
export default {
data() {
return {
machineNumberValue: '',
machineNumber: [],
groupNumberValue: '',
groupNumber: [],
tableData1: [],
tableData2: []
}
},
created() {
},
mounted() {
this.initProject()
},
methods: {
initProject() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
selecttable() {
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
selecttable(this.check2, this.machineNumberValue).then(response => {
response.data.map(v => {
this.$set(v, 'edit', false)
v.原注意事项 = v.注意事项
return v
})
this.tableData1 = response.data
this.edit = false
console.log(response.data)
})
},
cancelEdit(row) {
row.注意事项 = row.原注意事项
row.edit = false
this.$message('取消修改')
},
confirmEdit(row) {
updatestate(row.机床流水号, 2, row.注意事项).then(response => {
this.selecttable()
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -231,7 +231,11 @@ export default {
methods: {
// 导出
exportUninquirySheet3() {
if (this.machineNumberValue === null) {
this.machineNumberValue = ''
}
searchtable55(this.machineNumberValue).then(res1 => {
console.log(res1.data)
if (res1.data.length === 0) {
this.$message.error('请选择机床')
return