<template>
|
<GlobalWindow
|
:title="title"
|
width="85%"
|
:visible.sync="visible"
|
>
|
<TableLayout >
|
<!-- 搜索表单 -->
|
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
|
<el-form-item label="客户名称" prop="name">
|
<el-input v-model="searchForm.name" placeholder="请输入客户名称" @keypress.enter.native="search"></el-input>
|
</el-form-item>
|
<el-form-item label="客户简码" prop="code">
|
<el-input v-model="searchForm.code" placeholder="请输入客户简码" @keypress.enter.native="search"></el-input>
|
</el-form-item>
|
<section>
|
<el-button type="primary" @click="search">搜索</el-button>
|
<el-button @click="reset">重置</el-button>
|
</section>
|
</el-form>
|
<!-- 表格和分页 -->
|
<template v-slot:table-wrap>
|
<el-table
|
:height="tableHeightNew"
|
v-loading="isWorking.search"
|
:data="tableData.list"
|
stripe
|
@selection-change="handleSelectionChange"
|
>
|
<el-table-column prop="sortnum" label="客户序号" min-width="100px"></el-table-column>
|
<el-table-column prop="code" label="客户简码" min-width="120px"></el-table-column>
|
<el-table-column prop="name" label="客户名称" min-width="120px"></el-table-column>
|
<el-table-column prop="lineName" label="线路名称" min-width="180px" show-tooltip-when-overflow></el-table-column>
|
<el-table-column prop="totalNum" label="送货量(条)" min-width="120px"></el-table-column>
|
<el-table-column prop="dateInfo" label="送货日期" min-width="120px"></el-table-column>
|
</el-table>
|
<pagination
|
@size-change="handleSizeChange"
|
@current-change="handlePageChange"
|
:pagination="tableData.pagination"
|
>
|
</pagination>
|
</template>
|
</TableLayout>
|
<template v-slot:footer>
|
<el-button @click="visible=false">返回</el-button>
|
</template>
|
</GlobalWindow>
|
</template>
|
|
<script>
|
import BaseTable from '@/components/base/BaseTable'
|
import TableLayout from '@/layouts/TableLayout'
|
import Pagination from '@/components/common/Pagination'
|
import GlobalWindow from '@/components/common/GlobalWindow'
|
export default {
|
name: 'OperaJkSketchCustomerWindow',
|
extends: BaseTable,
|
components: { GlobalWindow, TableLayout, Pagination },
|
data () {
|
return {
|
// 表单数据
|
visible: false,
|
title: '',
|
searchForm: {
|
sketchLineId: '',
|
name: '',
|
code: ''
|
}
|
}
|
},
|
created () {
|
this.config({
|
module: '交控-线路优化线路客户记录信息表',
|
api: '/business/jkSketchCustomer',
|
'field.id': 'id',
|
'field.main': 'id'
|
})
|
this.search()
|
},
|
methods: {
|
open (title, row) {
|
this.title = title + (row.lineName)
|
this.searchForm.sketchLineId = row.id
|
this.visible = true
|
this.tableData = {
|
// 已选中的数据
|
selectedRows: [],
|
// 排序的字段
|
sorts: [],
|
// 当前页数据
|
list: [],
|
// 分页
|
pagination: {
|
pageIndex: 1,
|
pageSize: 10,
|
total: 0
|
}
|
}
|
this.search()
|
}
|
}
|
}
|
</script>
|