add:粉料计划添加行颜色

This commit is contained in:
zhangzhiqiang
2022-11-22 16:28:45 +08:00
parent 4a6775fe1c
commit 929d00ac32

View File

@@ -35,12 +35,12 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
</crudOperation>
<crudOperation :permission="permission" />
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:row-class-name="tableRowClassName"
:data="crud.data"
size="mini"
:max-height="590"
@@ -57,6 +57,7 @@
<el-table
ref="dtl_table"
v-loading="crud.loading"
:row-class-name="tableRowClassName"
:data="dtlList"
size="mini"
:max-height="590"
@@ -73,7 +74,15 @@
</div>
</div>
</template>
<style>
.el-table .warning-row {
background: oldlace;
}
.el-table .success-row {
background: #f0f9eb;
}
</style>
<script>
import report from '@/api/wms/statistics/report'
import CRUD, { presenter, header, crud } from '@crud/crud'
@@ -132,7 +141,6 @@ export default {
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
debugger
report.getHeader().then(res => {
this.cols = res
})
@@ -165,6 +173,12 @@ export default {
crud.downloadLoading = false
})
}
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 === 1) {
return 'success-row'
}
return ''
}
}
}