fixed bug

This commit is contained in:
chenjianan
2019-07-05 12:16:18 +08:00
parent 04db8c6753
commit 5fd4e2cb4c
2 changed files with 20 additions and 11 deletions

View File

@@ -48,7 +48,7 @@
size="small" size="small"
icon="el-icon-search" icon="el-icon-search"
style="margin-left: 10px" style="margin-left: 10px"
@click="pageCurrent11=1;pageSize11=150;total11=0;searchTable11()">查询</el-button> @click="pageCurrent11=1;pageSize11=100;total11=0;searchTable11()">查询</el-button>
<el-button <el-button
type="warning" type="warning"
size="small" size="small"
@@ -74,9 +74,9 @@
</el-table-column> </el-table-column>
<el-table-column label="物料状态" align="center" width="80"> <el-table-column label="物料状态" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag> <el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag> <el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag> <el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100"> <el-table-column label="任务分配时间" align="center" min-width="100">
@@ -234,7 +234,7 @@
size="small" size="small"
icon="el-icon-search" icon="el-icon-search"
style="margin-left: 10px" style="margin-left: 10px"
@click="pageCurrent12=1;pageSize12=150;total12=0;searchTable12()">查询</el-button> @click="pageCurrent12=1;pageSize12=100;total12=0;searchTable12()">查询</el-button>
<el-button <el-button
type="warning" type="warning"
size="small" size="small"
@@ -260,9 +260,9 @@
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column label="零件状态" align="center" width="100"> <el-table-column label="零件状态" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag> <el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag> <el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag> <el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100"> <el-table-column label="任务分配时间" align="center" min-width="100">
@@ -893,11 +893,11 @@ export default {
tableData11: [], // 外购件列表 tableData11: [], // 外购件列表
total11: 0, total11: 0,
pageCurrent11: 1, pageCurrent11: 1,
pageSize11: 150, pageSize11: 100,
tableData12: [], // 基本件列表 tableData12: [], // 基本件列表
total12: 0, total12: 0,
pageCurrent12: 1, pageCurrent12: 1,
pageSize12: 150, pageSize12: 100,
remarkFilters: [], remarkFilters: [],
supplierFilters: [], supplierFilters: [],
tableData2: [], // 询价单列表 tableData2: [], // 询价单列表
@@ -984,6 +984,15 @@ export default {
this.searchTable2() // 查表2 this.searchTable2() // 查表2
}, },
methods: { methods: {
unInquiry(row) {
return parseInt(row.询价状态编号) === 1
},
inquiry(row) {
return parseInt(row.询价状态编号) === 3 && parseInt(row.采购状态编号) !== 3
},
purchased(row) {
return parseInt(row.询价状态编号) !== 1 && parseInt(row.采购状态编号) === 3
},
filterSource(value, row) { filterSource(value, row) {
return Number(row['零件类型']) === Number(value) return Number(row['零件类型']) === Number(value)
}, },

View File

@@ -70,7 +70,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="小计(元)" prop="小计"> <el-table-column align="center" label="小计(元)" prop="小计">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.小计.toFixed(2) }} {{ scope.row.小计 ? scope.row.小计.toFixed(2) : 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="单价"> <el-table-column align="center" label="单价">