emis-frontend/src/views/emis/customerService/operLogList.vue
2025-01-21 14:15:20 +08:00

122 lines
2.8 KiB
Vue

<template>
<div class="">
<XdTable v-loading="loading"
border
size="mini"
:data="operLogDataList"
:total="total"
:showRightButton="false"
:showPagination="false"
:showOperateButton="false"
:showCustomizeTpl="false"
:default-sort="{prop: 'opDate', order: 'ascending'}"
>
<el-table-column label="序号" align="center" width="60">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
<el-table-column :label="$t('操作时间')" align="center" prop="opDate" :sortable="true" :sort-method="sortByOpDate" width="170" >
<template slot-scope="scope">
<span>{{ (scope.row.opDate) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作描述')" align="left" prop="opDesc" min-width="320" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span >{{scope.row.opDesc}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('操作网点')" align="center" prop="opSiteName" min-width="120" />
<el-table-column :label="$t('操作人')" align="center" prop="opMan" min-width="80" />
</XdTable>
</div>
</template>
<script>
import { getWaybillOperLogList } from "@/api/emis/emisWaybillOperLog";
export default {
name: "OperLogList",
props:{
billCode:{
type: String,
}
},
dicts: [],
data() {
return {
reverse: false,
loading: true,
operLogDataList: [],
total:0,
queryParams:{
pageNum:1,
pageSize:1000,
billCode:this.billCode
}
};
},
created() {
this.getList();
},
watch: {
"billCode": {
handler (newValue, oldValue) {
this.getList();
},
deep: true
}
},
methods: {
sortByOpDate(obj1, obj2) {
let val1 = new Date(obj1.opDate)
let val2 = new Date(obj2.opDate)
return val1.getTime() - val2.getTime()
},
getList() {
this.loading = true;
getWaybillOperLogList(this.billCode).then(response => {
this.operLogDataList = response.rows;
this.total=response.total;
this.loading = false;
});
},
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.margin-top{
margin-top: 20px;
}
.el-descriptions-item__label.is-bordered-label {
min-width: 80px;
}
.printMeClass {
font-family: SimHei;
label {
font-weight: normal;
}
}
.siteOrManHighlight {
color: #00BFFF;
font-weight: bold;
}
.transferGray{
color: gray;
}
</style>