Commit 99112f72 authored by CenXinYi's avatar CenXinYi

实现出入库记录根据操作时间进行排序功能

Signed-off-by: 's avatarCenXinYi <2810162984@qq.com>
parent ee44182c
......@@ -10,6 +10,7 @@
:data="allTableArguments.List"
style="width: 100%;"
@selection-change="handleSelectionChange(row)"
@sort-change="changeTableSort"
>
<el-table-column type="index" label="序号" width="50" />
......@@ -101,6 +102,9 @@ export default {
}
},
methods: {
changeTableSort(val) {
this.$emit('change-table-sort', val)
},
handleSelectionChange(row) {
this.$emit('handle-selection-change', row)
},
......
......@@ -115,6 +115,7 @@
:key="queryParams.rows"
:all-table-arguments="allTableArguments"
@handle-detail="handleDetail"
@change-table-sort="changeTableSort"
/>
</transition>
<!--TODO: 分页组件-->
......@@ -280,6 +281,10 @@ export default {
rows: 10
},
queryEntity: {
// TODO: 0表示倒序排序,1表示顺序排序
tableSortMark: 0,
entity: {
// TODO: 设备编码
pn: '',
......@@ -354,6 +359,7 @@ export default {
{
time: true,
prop: 'createDate',
sortable: 'custom',
label: '操作时间',
align: 'center'
},
......@@ -426,6 +432,7 @@ export default {
/** TODO:查询工序库的出入库记录列表 */
getList() {
this.loading = true
console.log('66666')
listLog(this.queryParams, this.addDateRange(this.queryEntity, this.dateRange)).then(response => {
this.inventoryRecordList = response.rows
this.total = response.total
......@@ -478,6 +485,18 @@ export default {
this.activateAbandonedState = false
this.singleLogIdAndFqYs = {}
},
/* TODO: 进行排序 */
changeTableSort: function(val) {
console.log('column', val)
// TODO:按照降序排序
if (val.order === 'descending') {
this.queryEntity.tableSortMark = 0
} else {
// TODO:按照升序排序
this.queryEntity.tableSortMark = 1
}
this.getList()
},
/* TODO: 获取详情信息*/
handleDetail: function(row) {
/* TODO: 如果库状态为‘废弃’,即为‘4’时,则可以进入 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment