<template>
|
<div class="order-number-management-all-history-page">
|
<search-bar @search="onSearch" @reset="onReset">
|
<el-form :inline="true" class="search-form">
|
<el-form-item label="修改后订货号">
|
<el-input placeholder="请输入..." clearable class="default-form-width" v-model.trim="query.newOrderNo"></el-input>
|
</el-form-item>
|
<el-form-item label="修改前订货号">
|
<el-input placeholder="请输入..." clearable class="default-form-width" v-model.trim="query.oldOrderNo"></el-input>
|
</el-form-item>
|
</el-form>
|
</search-bar>
|
|
<el-table :data="list" border stripe>
|
<el-table-column width="50" label="序号" fixed>
|
<template #default="scope">{{(queried.page-1)*queried.pageSize+(scope.$index+1)}}</template>
|
</el-table-column>
|
<el-table-column prop="CreateTime" label="修改时间" width="160" />
|
<el-table-column prop="NewOrderNo" label="修改后订货号" />
|
<el-table-column prop="OldOrderNo" label="修改前订货号" />
|
<el-table-column prop="CreateBy" label="修改者" />
|
</el-table>
|
|
<div class="pagination-row">
|
<el-pagination :pager-count="5" layout="total, prev, pager, next, jumper" :total="total" @current-change="onPageList" />
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import SearchBar from '@/components/SearchBar.vue'
|
const defaultQuery = {
|
oldOrderNo:'',
|
oldOrderNo_FilterMode:'1',
|
newOrderNo:'',
|
newOrderNo_FilterMode:'1'
|
}
|
export default {
|
name:'orderNumberManagementAllHistoryPage',
|
components:{SearchBar},
|
data(){
|
return {
|
list:[],
|
total:0,
|
query:{...defaultQuery},
|
queried:{...this.$config.pagination}
|
}
|
},
|
mounted() {
|
this.init()
|
},
|
methods:{
|
/* 页面初始化 */
|
init(){
|
this.newList()
|
},
|
/* 搜索按钮 */
|
onSearch(){
|
this.newList()
|
},
|
/* 重置按钮 */
|
onReset(){
|
this.query = {...defaultQuery}
|
this.newList()
|
},
|
/* 翻页功能 */
|
onPageList(page){
|
this.queried.page = page;
|
this.getList();
|
},
|
/* 表格刷新至首页 */
|
newList(needLoading=true){
|
this.queried = {...this.query,...this.$config.pagination}
|
this.getList(()=>{},needLoading)
|
},
|
/* 更新数据表 */
|
getList(callback,needLoading=true){
|
if (needLoading) {
|
this.$loading();
|
}
|
this.$api.post('Get',this.queried,{block:'orderNo'}).then((d)=>{
|
//console.log(d)
|
this.total = d.total;
|
this.list = d.list.map((currentItem)=>{
|
currentItem.CreateTime = this.$utils.project.parseTimeStr(currentItem.CreateTime)
|
return currentItem
|
})
|
/* this.total = d.total;
|
this.list = d.list; */
|
if (needLoading) {
|
this.$loading().close();
|
}
|
callback && callback(true)
|
}).catch((err)=>{
|
if (needLoading) {
|
this.$loading().close();
|
}
|
callback && callback(false)
|
})
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
</style>
|