add:粉料计划添加行颜色
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="统计日期">
|
<el-form-item label="统计日期">
|
||||||
<date-range-picker v-model="query.createTime" class="date-item"/>
|
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属组织">
|
<el-form-item label="所属组织">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -31,49 +31,58 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation/>
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission" />
|
||||||
</crudOperation>
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
size="mini"
|
size="mini"
|
||||||
:max-height="590"
|
:max-height="590"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="100" align="center" fixed/>
|
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||||
<template v-for="(col,index) in cols">
|
<template v-for="(col,index) in cols">
|
||||||
<el-table-column v-if="col.prop !== '1'" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip/>
|
<el-table-column v-if="col.prop !== '1'" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip />
|
||||||
<el-table-column v-if="col.prop === '1'" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip fixed/>
|
<el-table-column v-if="col.prop === '1'" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip fixed />
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
ref="dtl_table"
|
ref="dtl_table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
:data="dtlList"
|
:data="dtlList"
|
||||||
size="mini"
|
size="mini"
|
||||||
:max-height="590"
|
:max-height="590"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="100" align="center" fixed/>
|
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||||
<template v-for="(col,index) in cols2">
|
<template v-for="(col,index) in cols2">
|
||||||
<el-table-column v-if="!col.option" :prop="col.prop" :label="col.label" width="120px" />
|
<el-table-column v-if="!col.option" :prop="col.prop" :label="col.label" width="120px" />
|
||||||
<el-table-column v-if="col.option" :prop="col.prop" :label="col.label" width="120px" fixed/>
|
<el-table-column v-if="col.option" :prop="col.prop" :label="col.label" width="120px" fixed />
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<style>
|
||||||
|
.el-table .warning-row {
|
||||||
|
background: oldlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .success-row {
|
||||||
|
background: #f0f9eb;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import report from '@/api/wms/statistics/report'
|
import report from '@/api/wms/statistics/report'
|
||||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
@@ -132,7 +141,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
debugger
|
|
||||||
report.getHeader().then(res => {
|
report.getHeader().then(res => {
|
||||||
this.cols = res
|
this.cols = res
|
||||||
})
|
})
|
||||||
@@ -165,6 +173,12 @@ export default {
|
|||||||
crud.downloadLoading = false
|
crud.downloadLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
if (rowIndex % 2 === 1) {
|
||||||
|
return 'success-row'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user