将车间采购分为基本件和外购件两张表

This commit is contained in:
liushuai
2018-11-30 13:40:47 +08:00
parent 09cd1828de
commit 6dbe7817de
19 changed files with 635 additions and 158 deletions

View File

@@ -60,6 +60,43 @@
<el-card>
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">车间采购</div>
<el-table v-loading="" :data="tableData2" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
<template slot-scope="scope">
{{ scope.row.金额 }}
</template>
</el-table-column>
</el-table>
<el-table v-loading="" :data="tableData" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
@@ -102,7 +139,7 @@
</template>
<script>
import { initProject, searchProjectTotal, searchProjectTotal1 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
import { initProject, searchProjectTotal, searchProjectTotal1, searchProjectTotal2 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
@@ -111,11 +148,9 @@ export default {
return {
projectValue: '',
project: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData: [],
tableData1: []
tableData1: [],
tableData2: []
}
},
computed: {
@@ -143,25 +178,17 @@ export default {
searchTable1() {
if (this.projectValue) {
searchProjectTotal(this.projectValue).then(response => {
console.log(response.data)
this.tableData1 = response.data
})
searchProjectTotal1(this.projectValue).then(response => {
console.log(response.data)
this.tableData = response.data
})
searchProjectTotal2(this.projectValue).then(response => {
this.tableData2 = response.data
})
} else {
this.$message.error('请选择项目')
}
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}