This commit is contained in:
liushuai
2019-09-05 10:33:39 +08:00
parent 653abcfc59
commit afcda77786
19 changed files with 4558 additions and 81 deletions

View File

@@ -34,12 +34,19 @@
:data="tableData"
:row-class-name="tableRowClassName"
size="mini"
border>
border
@row-click="searchMaterial1">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="物料状态" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.物料流水号===null" type="warning" size="small">不存在</el-tag>
<el-tag v-if="scope.row.物料流水号!==null" type="primary" size="small">存在</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="图号" min-width="150">
<template slot-scope="scope">
{{ scope.row.图号或者型号 }}
@@ -116,6 +123,41 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<el-table
:data="tableData10"
:cell-class-name="cell"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
@@ -289,7 +331,7 @@
<script>
import { sleep } from '../../../utils/tool'
import { unSpecificationQuery1, specificationQuery1, unSpecificationQueryWB1, specificationQueryWB1, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX1, update, searchOldParts, getMachineNames, transferWG1, allDelete, update1 } from '../../../api/TechnologyCenter/ImportParts'
import { unSpecificationQuery1, specificationQuery1, unSpecificationQueryWB1, specificationQueryWB1, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX1, update, searchOldParts, getMachineNames, transferWG1, allDelete, update1, searchMaterial1 } from '../../../api/TechnologyCenter/ImportParts'
export default {
name: 'SpecificationData',
props: {
@@ -319,6 +361,7 @@ export default {
machineNum: '',
tableData: [],
tableDataAll: [],
tableData10: [],
listLoading: false,
unSpecification: [],
pageCurrent: 1,
@@ -409,8 +452,20 @@ export default {
this.getSelect(getMaterial, ['材料', '材料流水号'], 'materials')
},
methods: {
cell({ row, column, rowIndex, columnIndex }) {
if (row.对比类型 === 1 && columnIndex === 2) {
return 'rgb196'
}
if (row.对比类型 === 3 && columnIndex === 1) {
return 'rgb196'
}
if (row.对比类型 === 4 && columnIndex === 3) {
return 'rgb196'
}
},
async fetchData() {
this.pageCurrent = 1
this.tableData10 = []
try {
this.listLoading = true
this.total = 0
@@ -483,6 +538,13 @@ export default {
this.dialogParts = true
}
},
searchMaterial1(row) {
console.log(row)
searchMaterial1(row.图号或者型号, row.名称, row.规格).then(response => {
this.tableData10 = response.data
console.log(response.data)
})
},
allDelete() {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
@@ -493,6 +555,7 @@ export default {
allDelete(this.projectName, this.machineValue, this.groupValue).then(response => {
if (response.data[0].result === '1') {
this.tableData = []
this.tableData10 = []
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
@@ -666,6 +729,7 @@ export default {
this.$message.success(`传递成功`)
this.tableDataAll = []
this.tableData = []
this.tableData10 = []
} else {
this.$message.error(`${this.err}个零件传递失败`)
}
@@ -686,6 +750,9 @@ export default {
.el-table .warning-row {
background: red;
}
.rgb196{
background: palevioletred !important;
}
</style>
<style scoped>