doum
22 小时以前 46124fe454f90d24171ebc5be0d9cfe2ab22cbc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<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>